diff showajax.php @ 391:0c1798c9d486

Add disabled mode.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 05 Dec 2013 11:33:12 +0200
parents 3cc078b17260
children 14cdbeb331b6
line wrap: on
line diff
--- a/showajax.php	Thu Dec 05 10:51:45 2013 +0200
+++ b/showajax.php	Thu Dec 05 11:33:12 2013 +0200
@@ -64,6 +64,16 @@
 }
 
 
+function stGuruMeditation()
+{
+  echo
+    "<div class=\"guru\">".
+    "Software Failure.&nbsp;&nbsp;&nbsp;Press left mouse button to continue.<br />".
+    "Guru Meditation #00000004.0000AAC0".
+    "</div>\n";
+}
+
+
 //
 // Initialize
 //
@@ -80,6 +90,11 @@
 //
 $updated = FALSE;
 
+if (stGetDisplayVar("showMode") == SMODE_DISABLED)
+{
+  stGuruMeditation();
+  exit;
+}
 
 // Temporary slides are handled globally
 if (stGetDisplayVar("tempDuration") > 0 &&
@@ -203,9 +218,7 @@
               stPrintRotationSlide($slide);
           }
           else
-          {
-            echo "<div class=\"guru\">Software Failure.&nbsp;&nbsp;&nbsp;Press left mouse button to continue.<br />Guru Meditation #00000004.0000AAC0</div>\n";
-          }
+            stGuruMeditation();
           break;
         
         case SMODE_COMPO:
@@ -232,7 +245,7 @@
     break;
 
   default:
-    stSetStatus(404, "Not Found");
+    stGuruMeditation();
     break;
 }