if ($db->query("SELECT COUNT(*) FROM students")->fetch(PDO::FETCH_NUM)[0] == 0) {
block("red", "no students registered");
- break;
+ exit;
}
block("black", "add blackboard");
if (! isset($SESSIONS_actual)) {
block("red", "no next session");
- break;
+ exit;
}
block("black", "summary for session " . $SESSIONS[$SESSIONS_actual]['timestr'] . " (" . $SESSIONS[$SESSIONS_actual]['examples'] . ")");
fclose($fh_access);
block("lightgreen", "admin password set");
- break;
+ exit;
}
?>
$db->query("INSERT INTO prefs (key,value) VALUES ('groupname','" . trim($_POST['groupname']) . "')");
block("lightgreen", "set preferences");
- break;
+ exit;
}
?>
if ($db->query("SELECT COUNT(*) FROM students")->fetch(PDO::FETCH_NUM)[0] == 0) {
block("red", "no students registered");
- break;
+ exit;
}
block("black", "summary of everything for " . date("d.m.Y H:i"));
print '<tr><th><b><font color="white">Mat.nummer not found</font></b></th><tr>';
print '</table>';
print "Mat.Nummer was not found. You have to register first!";
- break;
+ exit;
}
if($db->query("SELECT COUNT(*) FROM students WHERE mnumber = $mnumber AND password = \"$password\"")->fetch(PDO::FETCH_NUM)[0] == 0) {
print '<table bgcolor="red">';
print '<tr><th><b><font color="white">wrong password</font></b></th><tr>';
print '</table>';
- break;
+ exit;
}
?>
\ No newline at end of file
print "<table bgcolor=\"red\">";
print "<tr><th><b><font color=\"white\">user already registered</font></b></th><tr>";
print "</table>";
- break;
+ exit;
}
$db->query("INSERT INTO students (mnumber,firstname,lastname,email,password)
'X-Mailer: PHP/' . phpversion();
mail($email, "Banana Registration: " . $PREFS['exname'] . " (" . $PREFS['groupname'] . ")", $nachricht, $header);
- break;
+ exit;
}
?>
if ( ! isset($SESSIONS_next) ) {
block("red", "submission closed");
- break;
+ exit;
}
if(isset($_POST['submit']) && $_POST['mnumber']!="") {
print '<tr><th><b><font color="white">You already submitted results for this session</font></b></th><tr>';
print '</table>';
print "You can only submit your calculated examples once!";
- break;
+ exit;
}
$excount = count($exchecked);
print '<table bgcolor="lightgreen">';
print '<tr><th><b><font color="white">submitted</font></b></th><tr>';
print '</table>';
- break;
+ exit;
}
?>
for( $ib=0; $ib<$blackdone; $ib++ ) { echo " * "; }
- break;
+ exit;
}
?>