5 if(isset($_POST['submit']) && $_POST['mnumber']!="") {
6 require 'createdb.inc';
9 $mnumber = trim($_POST['mnumber']);
10 $password = trim($_POST['password']);
12 $sessionid = strtotime(end($sessions)[0]);
14 if (! ( $mnumber == 007 AND $password == 007 )) {
15 require 'usercheck.inc';
16 $result = $db->query("SELECT thisdone FROM workdone WHERE mnumber = $mnumber AND session = $sessionid")->fetch(PDO::FETCH_NUM)[0];
18 print "<table bgcolor=\"red\">";
19 print "<tr><th><b><font color=\"white\">no submit</font></b></th><tr>";
21 print "No results were submitted for " . end($sessions)[0] . ".";
29 $result = $db->query("SELECT students.firstname, students.lastname, students.mnumber, workdone.manydone, workdone.thisdone FROM workdone, students WHERE workdone.session = $sessionid AND workdone.mnumber = students.mnumber");
34 while ($row = $result->fetch(PDO::FETCH_NUM)) {
36 echo "<td>$row[0] $row[1] </td> <td>$row[2] </td> <td>$row[4] </td> <td>$row[3]/$lstsession_nex </td>";
47 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
48 <table bgcolor="black">
49 <tr><th><b><font color="white">Last submission</font></b></th><tr>
54 <th align="left">Mat.nummer:</th> <th align="left"><input type="text" name="mnumber"></th>
57 <th align="left">Password:</th> <th align="left"><input type="text" name="password"></th>
59 <tr><th colspan=2></th></tr>
62 <th align="left"><input type="submit" name="submit" value="Show"></th> <th></th>