6) die(); if (! $semester){ echo "ERROR

semester parameter required

"; exit(); } /* elseif (! preg_match('/(spr|sum|fall)\d\d/',$semester) ){ echo "ERROR

semester parameter $semester malformed

"; exit(); */ else { if ($semester == "latest"){ $semester = readlink("/home/ibl/secure_html/JSON/$semester"); preg_match('/(spr|sum|fall)(\d\d)\.js$/',$semester,$matches); $semester = $matches[1] . $matches[2]; } if (! preg_match('/(spr|sum|fall)(\d\d)/',$semester,$matches) ){ echo htmlspecialchars("ERROR

semester parameter malformed

", ENT_QUOTES, 'UTF-8'); exit(); } } preg_match('/(spr|sum|fall)(\d\d)/',$semester,$SEMYY); if ($SEMYY[1] == 'spr'){$sem = 'Spring';} elseif ($SEMYY[1] == 'sum'){$sem = 'Summer';} else {$sem = 'Fall';} $year = '20' . $SEMYY[2]; preg_match('/\/([-a-z.0-9]+)\.php/',$_SERVER['SCRIPT_FILENAME'],$SELF); $semfiles = preg_grep("/\d\.js$/",scandir("../JSON/")); function semcode($sssyy){ preg_match('/([sumfalpr]+)(\d\d)/',$sssyy,$parts); $yyyy = 2000 + $parts[2]; $code = $yyyy; if ($parts[1] == 'spr'){ $sem = 'Spring'; $code--; $code .= '20'; } elseif ($parts[1] == 'sum'){ $sem = 'Summer'; $code--; $code .= '30'; } else {$sem = 'Fall'; $code .= '10'; } return Array($code, $parts[1] . $parts[2], "$sem $yyyy"); } $availsems = ""; foreach ($semfiles as $s){ if ($s != '.' && $s != '..'){ list($code,$sssyy,$label) = semcode($s); if ($availsems){ $availsems .= ",\n[$code,\"$sssyy\",\"$label\"]"; } else { $availsems .= "[\n[$code,\"$sssyy\",\"$label\"]"; } } } $availsems .= "]"; ?> Computer Science Courses
Search Categories
    Course Information
    Selected Section Details
    AvailCRNCnumTitleTimes/DaysSiteInstr
    Sample16747CS 550Database Concepts1330-1445 TRDRAGAS 1117LEVINSTEIN, I
    4011020sampleIntroduction to Networks and Communications1500-1615 MWDRAGAS 1117MALY, K
    812869CS 600Sample Sample Sample Sample1130-1245 MFECSB 2120RANJAN, D
    2014835CS 665Computer ArchitectureSampleECSB 2120OLARIU, S

    After you use the button at the bottom of a page, this page will contain the details of all the sections visible in the list on that page.
    Categories