X-Git-Url: https://git.treefish.org/banana.git/blobdiff_plain/8db41c98817b1b48532dc3cebf4bea166e42bb70..24a718f3612d0b9dc396970cfa85298d33655570:/admin/blackboard.php?ds=sidebyside diff --git a/admin/blackboard.php b/admin/blackboard.php index b683221..139abe9 100644 --- a/admin/blackboard.php +++ b/admin/blackboard.php @@ -8,6 +8,11 @@ block("lightgreen", "added blackboard"); } + if ($db->query("SELECT COUNT(*) FROM students")->fetch(PDO::FETCH_NUM)[0] == 0) { + block("red", "no students registered"); + exit; + } + block("black", "add blackboard"); ?>