From b29ab3c07ebe1667e852457f22f6f51193970c1b Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Sat, 28 Jul 2007 10:04:38 -0700 Subject: CLEANUP: working on database now a config.php option moved error checking into a function and made working on the database a config.php option --- functions.php | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'functions.php') diff --git a/functions.php b/functions.php index af34345..6fe8137 100644 --- a/functions.php +++ b/functions.php @@ -1,5 +1,54 @@ Setup not completed"; + echo "You need to set \$ADMIN_NAME in config.php."; + output_footer(); + exit(); + } + if(!isset($ADMIN_EMAIL)) + { + output_header(); + echo "

Setup not completed

"; + echo "You need to set \$ADMIN_EMAIL in config.php. ". + "If something goes wrong an email will be send to this address."; + output_footer(); + exit(); + } + if(!isset($DB_work)) + { + output_header(); + echo "

Setup not completed

"; + echo "You need to set \$DB_work in config.php. ". + "If this is set to 1, the game will be suspended and one can work safely on the database.". + "The default should be 0 for the game to work."; + output_footer(); + exit(); + } + if($DB_work) + { + output_header(); + echo "Working on the database...please check back later."; + output_footer(); + exit(); + } + + return; +} + function mymail($To,$Subject,$message,$header="") { global $debug; -- cgit v1.2.3-18-g5258