echo "<td class='pepHeader' id='sumHeader'>Sum " . $mainFieldFilter . "</td>"; } foreach ($resultPersons as $rowPersons) { echo "<td id='Sum" . $rowPersons['id'] . "' class='sumCell " . $rowPersons['sign'] . "'>"; echo $personMetaHours[$rowPersons['sign']]['totalHoursOnSelectedMainfield']; echo "</td>"; } echo "</tr>"; // Displaying course headers echo "<tr>"; generatesorter($sortorder, $sortkind, "name", "Kursnamn", "sortable courseHeader"); //sortable will be the classname, which is needed for the custom cursor implemented in clickScript.js echo "<td class='courseHeader superfluous'>Kod</td>"; echo "<td class='courseHeader superfluous'>Nivå</td>"; echo "<td class='courseHeader superfluous'>P</td>"; generatesorter($sortorder, $sortkind, "start_period", "LP", "sortable courseHeader"); //sortable will be the classname, which is needed for the custom cursor echo "<td class='courseHeader superfluous'>Takt</td>"; echo "<td class='courseHeader superfluous'>Bstud</td>"; echo "<td class='courseHeader superfluous'>Ram</td>"; echo "<td class='courseHeader superfluous'>EX</td>"; echo "<td class='courseHeader superfluous'>KA</td>"; // Display nr of courses with allocated time echo "<td class='pepHeader' title='Antal kurser med allokerad tid' id='AKMATHeader'>AKMAT</td>"; //antal kurser med allokerad tid foreach ($resultPersons as $rowPersons) { echo "<td id='NrOfCourses" . $rowPersons['id'] . "'class='" . $rowPersons['sign'] . " AKMATCell'>"; echo $personMetaHours[$rowPersons['sign']]["totalCoursesOnSelectedMainfield"]; echo "</td>"; } echo "</tr>";
echo "<div id='manageBox'>"; echo "<h1>Kurstillfällen</h1>"; $coursesPerPeriod = $dbConn->getCoursesByMainfield($mainfieldFilter, $yearfilter, $sortorder, $sortkind, $searchQuery); if (!$coursesPerPeriod) { echo "<div class='messageBox invalid'>"; echo "Inga kurstillfällen matchade sökkriterierna"; echo "</div>"; } else { $currentrow = 1; echo "<table id='contentTable' cellspacing='0'>"; echo "<tr id='top'>"; generatesorter($sortorder, $sortkind, "name", "Kursnamn"); generatesorter($sortorder, $sortkind, "code", "Kod"); generatesorter($sortorder, $sortkind, "start_period", "Läsperiod"); generatesorter($sortorder, $sortkind, "examinator", "Examinator"); generatesorter($sortorder, $sortkind, "course_admin", "Kursansvarig"); echo "</tr>"; foreach ($coursesPerPeriod as $coursePerPeriod) { if ($yearfilter >= date('Y')) { echo "<a href='#'><tr onclick='document.C" . $coursePerPeriod['cpp_id'] . ".submit();'"; if (isset($_POST['cpp_id'])) { if ($_POST['cpp_id'] == $coursePerPeriod['cpp_id']) { echo " id='selectedRow'"; } } } else { echo "<tr "; } if ($currentrow % 2 == 0) { echo ">"; } else {
echo "<h1>Användare</h1>"; $persons = $dbConn->getPersons($sortorder, $sortkind, $searchQuery); if (!$persons) { echo "<div class='messageBox invalid'>"; echo "<p>Inga personer matchade sökkriterierna</p>"; echo "</div>"; } else { $currentrow = 1; echo "<table id='contentTable' cellspacing='0'>"; echo "<tr id='top'>"; generatesorter($sortorder, $sortkind, "firstname", "Förnamn"); generatesorter($sortorder, $sortkind, "lastname", "Efternamn"); generatesorter($sortorder, $sortkind, "sign", "Signatur"); generatesorter($sortorder, $sortkind, "type", "Typ"); generatesorter($sortorder, $sortkind, "datelastchange", "Senast ändrad"); generatesorter($sortorder, $sortkind, "datecreation", "Skapad"); echo "</tr>"; foreach ($persons as $person) { echo "<a href='#'><tr onclick='document.C" . $person['id'] . ".submit();'"; if (isset($_POST['user_id'])) { if ($_POST['user_id'] == $person['id']) { echo " id='selectedRow'"; } } if ($currentrow % 2 == 0) { echo ">"; } else { echo "class='even'>"; } echo "<form action='index.php' method='post' name='C" . $person['id'] . "'><input type='hidden' name='user_id' value='" . $person['id'] . "' />"; passon("sortorder", $sortorder);
echo "<div id='manageBox'>"; echo "<h1>Kurser</h1>"; $courses = $dbConn->getCourses($sortorder, $sortkind, $searchQuery, $mainfieldFilter); if (!$courses) { echo "<div class='messageBox invalid'>"; echo "Inga kurser matchade sökkriterierna"; echo "</div>"; } else { $currentrow = 1; echo "<table id='contentTable' cellspacing='0'>"; echo "<tr id='top'>"; generatesorter($sortorder, $sortkind, "name", "Kursnamn"); generatesorter($sortorder, $sortkind, "code", "Kod"); generatesorter($sortorder, $sortkind, "mainfield", "Huvudområde"); generatesorter($sortorder, $sortkind, "credits", "Poäng"); generatesorter($sortorder, $sortkind, "level", "Nivå"); echo "</tr>"; foreach ($courses as $course) { echo "<a href='#'><tr onclick='document.C" . $course['id'] . ".submit();'"; if (isset($_POST['course_id'])) { if ($_POST['course_id'] == $course['id']) { echo " id='selectedRow'"; } } if ($currentrow % 2 == 0) { echo ">"; } else { echo "class='even'>"; } echo "<form action='index.php' method='post' name='C" . $course['id'] . "'>"; echo "<input type='hidden' name='course_id' value='" . $course['id'] . "' />";