** Filename......: insert_image.php ** Last changed..: 8 Mar 2003 Last changed by Fred Stuurman (fc.stuurman@hccnet.nl) #$Id: insert_image.php,v 1.1 2006/10/03 12:27:15 fstuurman Exp $ 04-09-2003 , to make it work with Site@School 1.2.1 ***********************************************************************/ include ("../../../configuration/database.inc.php"); // connecting to database mysql_connect("$db_server", "$db_username", "$db_password"); mysql_select_db("$db_name"); require ("../../../core/session.php"); //build a session $query = "SELECT config_value FROM $table_configuration WHERE config_key='sessioncode'"; if ($result = mysql_query($query)) { $check_sessioncode = mysql_result($result, 0); unset ($query); unset ($result); } if ($_SESSION['sessioncode'] != "$check_sessioncode") { //if we don't have a session present the login screen Header("Location: ../../../index.php"); exit; } $query = "SELECT config_value FROM $table_configuration where config_key='language'"; $result = mysql_query($query) or die_script(mysql_error()); $language = mysql_result($result, 0); include ("../../../languages/$language/$language.php"); unset ($query); unset ($result); $query = "SELECT config_value FROM $table_configuration where config_key='serverpath'"; $result = mysql_query($query) or die_script(mysql_error()); $server_path = mysql_result($result, 0); if (strrpos($server_path, '/') != strlen($server_path) - 1) { $server_path .= '/'; } //add last slash if not present unset ($query); unset ($result); $query = "SELECT config_value FROM $table_configuration where config_key='user_path'"; $result = mysql_query($query) or die_script(mysql_error()); $user_path = mysql_result($result, 0); if (substr($user_path, 0, 1) == "/") { $user_path = substr($user_path, 1); //strip first slash } unset ($query); unset ($result); $BASE_DIR = $server_path . "/"; $BASE_ROOT = $user_path . '/media'; $IMG_ROOT = $BASE_ROOT; $no_dir = false; if (!is_dir($BASE_DIR . $BASE_ROOT)) { $no_dir = true; } ?> <?PHP echo $sas_lang['insert_picture'] ?>
Up
<?PHP echo $sas_lang[createdir] ?>
:
 
 
   
 
 
: