]> git.treefish.org Git - banana.git/blobdiff - admin/summary.php
submit as often as you want.
[banana.git] / admin / summary.php
index 0cd54671f019ea7e3d981ac5d638990a9ba230d2..cac27fcf28a672bc6065396ff3f1a0c4a1963940 100644 (file)
@@ -4,6 +4,11 @@
   require 'include/session.inc';
   require 'include/common.inc';
 
+  if ($db->query("SELECT COUNT(*) FROM students")->fetch(PDO::FETCH_NUM)[0] == 0) {
+    block("red", "no students registered");
+    exit;
+  }
+
   block("black", "summary of everything for " . date("d.m.Y H:i"));
 
   $result = $db->query("SELECT firstname, lastname, mnumber, blackboard FROM students ORDER BY lastname");