// include necessary files include "util.inc.php"; include INC_DIR . "db.inc.php"; include INC_DIR . "config.inc.php"; include INC_DIR . "basic.lib.php"; include INC_DIR . "time.inc.php"; include INC_DIR . "rules/effects.list.php"; include INC_DIR . "rules/wonder.rules.php"; include INC_DIR . "wonder.inc.php"; // show header weather_showHeader(); // connect to databases $db = DbConnect(); init_Weathers(); // actually do something weather_generate(); // show footer weather_showFooter(); // ***** FUNCTIONS ***** ******************************************************* /** * Logging function with printf syntax */ function weather_log($format) { // get args $args = func_get_args(); // get format string $format = array_shift($args); // do something echo vsprintf($format, $args) . "\n"; }
include INC_DIR . "db.inc.php"; include INC_DIR . "config.inc.php"; include INC_DIR . "basic.lib.php"; include INC_DIR . "time.inc.php"; include INC_DIR . "effect_list.php"; include INC_DIR . "wonder.rules.php"; include INC_DIR . "wonder.inc.php"; // get globals $config = new Config(); // show header weather_showHeader(); // connect to databases $db = weather_connectToGameDB(); init_Weathers(); // actually do something weather_generate($db); // show footer weather_showFooter(); // ***** FUNCTIONS ***** ******************************************************* /** * Logging function with printf syntax */ function weather_log($format) { // get args $args = func_get_args(); // get format string $format = array_shift($args); // do something echo vsprintf($format, $args) . "\n"; }