Esempio n. 1
0
?>
 Department.<br />
      To change the Department, please restart the browser.
    </p>
    <a class = 'return' href='index.php'>Return</a><br />
    <?php 
$courseListLocation = "../resource/" . $theDepartment . "/courseList.csv";
$requestListLocation = "../resource/" . $theDepartment . "/request/*";
if (!file_exists($courseListLocation)) {
    die("<p>" . "The " . $theDepartment . " Department has not uploaded a course list.<br />" . "Please <a href='upload.php'>upload</a> a course list first.<br />" . "</p>");
}
$requestList = glob($requestListLocation);
if (count($requestList) == 0) {
    die("<p>There are currently no requests for " . $theDepartment . " Department.</p>");
}
$courseList = parseCourseList($courseListLocation);
?>
    <p>Select a waitlist to view.</p>
    <table>
      <tr>
        <th>Open</th>
        <th>Section Number</th>
        <th>Course Number</th>
        <th>Course Name</th>
      </tr>
      <?php 
$row = 1;
ini_set('auto_detect_line_endings', TRUE);
foreach (glob($requestListLocation) as $request) {
    $sectionNumber = basename($request, ".csv");
    $courseNumber = $courseList[$sectionNumber][0];
Esempio n. 2
0
  <p><b>Department : <?php 
echo $_POST['department'];
?>
</b></p>
  <table>
    <tr>
      <th>Request</th>
      <th>Course Section</th>
      <th>Course Number</th>
      <th>Course Name</th>
    </tr>
    <?php 
//open course list
$courses = array();
$courses = parseCourseList($filename);
asort($courses);
foreach ($courses as $key => $value) {
    $sectionNumber = $key;
    $courseNumber = $value[0];
    $courseName = $value[1];
    echo "<tr>";
    echo "<td>" . "<form action='submit.php' method='post'>" . "<input type='hidden' name='department' value='" . $_POST['department'] . "' />" . "<input type='hidden' name='courseSection' value='" . $sectionNumber . "' />" . "<input type='hidden' name='courseNumber' value='" . $courseNumber . "' />" . "<input type='hidden' name='courseName' value='" . $courseName . "' />" . "<input type='submit' class = 'request' value='Request' />" . "</form>" . "</td>";
    echo "<td>" . $sectionNumber . "</td>";
    echo "<td>" . $courseNumber . "</td>";
    echo "<td>" . $courseName . "</td>";
    echo "</tr>";
}
?>
   </table>
   </div>