X-Git-Url: https://git.treefish.org/banana.git/blobdiff_plain/7b7f10ba3917a6d5229f13d27aa4e94a9685b00e..17e62c4bb73a987b44853d7b07a86c2b14160bda:/admin/blackboard.php?ds=inline diff --git a/admin/blackboard.php b/admin/blackboard.php index 9642c59..6571f39 100644 --- a/admin/blackboard.php +++ b/admin/blackboard.php @@ -3,7 +3,7 @@ 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 ) { @@ -24,7 +24,7 @@ query("SELECT firstname, lastname, mnumber, blackboard FROM students"); + $result=$db->query("SELECT firstname, lastname, mnumber, blackboard FROM students ORDER BY LOWER(lastname)"); print "