require 'include/db.inc';
require 'include/common.inc';
- if($_GET['mnumber']!="" &&
+ if( isset($_GET['mnumber']) &&
$db->query("SELECT COUNT(*) FROM students WHERE mnumber=" . trim($_GET['mnumber']) . " AND lastblackboard=" . trim($_GET['tstamp']))->fetch(PDO::FETCH_NUM)[0] == 0) {
if( $_GET['sign'] == 0 ) {
<?php
block("black", "blackboard overview");
- $result=$db->query("SELECT firstname, lastname, mnumber, blackboard FROM students");
+ $result=$db->query("SELECT firstname, lastname, mnumber, blackboard FROM students ORDER BY LOWER(lastname)");
print "<table>";
while ($student = $result->fetch(PDO::FETCH_ASSOC)) {