error_reporting(E_ERROR); if (!empty($_SERVER['SERVER_SOFTWARE'])) { echo 'The scheduler can only be called by CLI!'; exit; } // ######################################################################################## // ######################################################################################## // Init $starttime = microtime() + time(); $sdl = new scheduler(); $sdl->log('<br><b>-------------------------------------------------------------</b><br>' . '<b>Starting Install BOTs at ' . date('d.m.y H:i:s', time()) . '</b>', INSTALL_LOG_FILE_NPC); // create sql-object for db-connection $db = new sql($config['server'] . ":" . $config['port'], $config['game_database'], $config['user'], $config['password']); $game = new game(); // Install Quark BOT $quark = new Ferengi($db, $sdl); $quark->Install(); // Install SevenOfNine BOT $borg = new Borg($db, $sdl); $borg->Install(); // Install Settlers BOT $settlers = new Settlers($db, $sdl); $settlers->Install(); // ######################################################################################## // ######################################################################################## // Quit and close log $db->close(); $sdl->log('<b>Finished Install BOTs in <font color=#009900>' . round(microtime() + time() - $starttime, 4) . ' secs</font><br>Executed Queries: <font color=#ff0000>' . $db->i_query . '</font></b>', INSTALL_LOG_FILE_NPC); ?>