Add dinner count

Change-Id: If5b5074a012ad75fe34547a6d12d40986adb5a89
diff --git a/index.php b/index.php
index 9f75d0c..8a142dc 100755
--- a/index.php
+++ b/index.php
@@ -19,6 +19,7 @@
 include $TEMPLATE . "strings.php";
 $log = new Logger('signup');
 $log->pushHandler(new RotatingFileHandler(__DIR__ . '/logs/signup.log', 0, Logger::DEBUG));
+$dinners_left = $MAX_DINNERS - (new DB($log))->dinner_count();
 
 if (!$DEBUG)    error_reporting(0);
 else error_reporting(1);
@@ -115,6 +116,7 @@
 
 function register_page($error = false)
 {
+    global $log, $dinners_left;
     $TEMPLATE = template_path();
     include 'config.php';
     if ($error)