GetAll("SHOW TABLES FROM `$database`;"); foreach ($tablesResults AS $row) $tables[] = $row[0]; return(in_array($tableName, $tables)); } ?> kusaba Installation

kusaba Installation

Checking configuration file...'; if (file_exists('config.php')) { require 'config.php'; require KU_ROOTDIR . 'inc/functions.php'; if (KU_RANDOMSEED!="ENTER RANDOM LETTERS/NUMBERS HERE"&&KU_RANDOMSEED!="") { echo 'Configuration appears correct.'; echo '

Checking database...

'; $reqiredtables = array("banlist","bannedhashes","blotter","boards","board_filetypes","events","filetypes","loginattempts","modlog","module_settings","news","reports","sections","staff","watchedthreads","wordfilter"); foreach ($reqiredtables as $tablename) { if (!mysql_table_exists(KU_DBDATABASE,KU_DBPREFIX.$tablename)) { die("Couldn't find the table ".KU_DBPREFIX.$tablename." in the database. Please insert the mySQL dump."); } } echo 'Database appears correct.'; echo '

Inserting default administrator account...

'; $result_exists = $db->GetOne("SELECT COUNT(*) FROM `".KU_DBPREFIX."staff` WHERE `username` = 'admin'"); if ($result_exists==0) { $result = $db->Execute("INSERT INTO `".KU_DBPREFIX."staff` ( `username` , `password` , `type` , `addedon` ) VALUES ( 'admin' , '".md5("admin")."' , '1' , '".time()."' )"); echo 'Account inserted.'; } else { echo 'There is already an administrator account inserted.'; $result = true; } if ($result) { require_once KU_ROOTDIR . 'inc/classes/menu.class.php'; $menu_class = new Menu(); $menu_class->Generate(); echo '

Done!

Installation has finished! The default administrator account is admin with the password of admin.

Delete this and the install-mysql.php file from the server, then add some boards!'; echo '


DELETE THIS AND install-mysql.php RIGHT NOW!

'; } else { echo 'Error inserting SQL. Please add $db->debug = true; just before ?> in config.php to turn on debugging, and check the error message.'; } } else { echo 'Please enter a random string into the KU_RANDOMSEED value.'; } } else { echo 'Unable to locate config.php'; } ?>