plugins/SpecialAdmin.php
changeset 42 45ebe475ff75
parent 40 723bb7acf914
child 43 30d2fb25afff
--- a/plugins/SpecialAdmin.php	Tue Jul 03 14:21:33 2007 -0400
+++ b/plugins/SpecialAdmin.php	Thu Jul 05 10:37:36 2007 -0400
@@ -110,10 +110,14 @@
   $hash = md5($dbpasswd);
   unset($dbname, $dbhost, $dbuser, $dbpasswd);
   unset($dbname, $dbhost, $dbuser, $dbpasswd); // PHP5 Zend bug
-  if ( defined('ENANO_DEMO_MODE') && !isset($_GET[ $hash ]) )
+  if ( defined('ENANO_DEMO_MODE') && !isset($_GET[ $hash ]) && substr($_SERVER['REMOTE_ADDR'], 0, 8) != '192.168.' )
   {
     echo '<tr><td class="row1" colspan="4">Logs are recorded but not displayed for privacy purposes in the demo.</td></tr>';
   }
+  else if ( defined('ENANO_DEMO_MODE') && isset($_GET['hash']) && $_GET['hash'] != $hash && substr($_SERVER['REMOTE_ADDR'], 0, 8) != '192.168.' )
+  {
+    echo '<tr><td class="row1" colspan="4">Invalid hash. Cheater.</td></tr>';
+  }
   else
   {
     if(isset($_GET['fulllog']))