Browse Source

Add check of configuration file.

philippe_mingo 23 years ago
parent
commit
9e83bf8de7
1 changed files with 16 additions and 0 deletions
  1. 16 0
      src/login.php

+ 16 - 0
src/login.php

@@ -53,6 +53,22 @@
         $rcptaddress = urlencode($rcptaddress);
     }
 
+    /* Check if system has been configured */
+    if ( !file_exists( '../config/config.php' ) ) {
+        echo "<html>\n".
+             "<head>\n".
+             '<title>' . _("Configuration Error") . "</title>\n".
+             "</head>\n".
+             "<body>\n" .
+             '<center><h1>' . 
+             _("This system has not been configured yet.") .
+             '<br>' .
+             _("Please contact system administrator.") .
+             '</h1></center>'.
+             "</body></html>\n";
+        exit;
+    }
+
     require_once('../functions/strings.php');
     require_once('../config/config.php');
     require_once('../functions/i18n.php');