All Data Structures Namespaces Files Functions Variables Pages
dbup.php
Go to the documentation of this file.
<?php
define('CURSCRIPT', 'dbup');
define('IN_GAME', TRUE);
define('GAME_ROOT', dirname(__FILE__));
define('GAMENAME', 'bra');
if(PHP_VERSION < '4.3.0') {
exit('PHP version must >= 4.3.0!');
}
require GAME_ROOT.'./include/global.func.php';
$magic_quotes_gpc = get_magic_quotes_gpc();
extract(gstrfilter($_COOKIE));
extract(gstrfilter($_POST));
unset($_GET);
$_FILES = gstrfilter($_FILES);
require GAME_ROOT.'./config.inc.php';
$errorinfo ? error_reporting(E_ALL) : error_reporting(0);
$now = time() + $moveut*3600 + $moveutmin*60;
list($sec,$min,$hour,$day,$month,$year,$wday) = explode(',',date("s,i,H,j,n,Y,w",$now));
//if($attackevasive) {
// include_once GAME_ROOT.'./include/security.inc.php';
//}
require GAME_ROOT.'./include/db_'.$database.'.class.php';
$db = new dbstuff;
$db->connect($dbhost, $dbuser, $dbpw, $dbname, $pconnect);
//$db->select_db($dbname);
unset($dbhost, $dbuser, $dbpw, $dbname, $pconnect);
require GAME_ROOT.'./gamedata/system.php';
require config('resources',$gamecfg);
require config('gamecfg',$gamecfg);
//include GAME_ROOT.'./gamedata/gameinfo.php';
$q = "ALTER TABLE {$tablepre}winners ADD killnum2 smallint unsigned NOT NULL default 0 AFTER killnum";
echo $q.'<br>';
echo $db->query($q);
$q = "ALTER TABLE {$tablepre}users ADD credits2 mediumint NOT NULL default 0 AFTER credits";
echo $q.'<br>';
echo $db->query($q);
?>
$database
$database
Definition: config.inc.php:67
$magic_quotes_gpc
$magic_quotes_gpc
Definition: dbup.php:14
$gamecfg
$gamecfg
Definition: system.php:22
$_FILES
$_FILES
Definition: dbup.php:18
$moveutmin
$moveutmin
Definition: config.inc.php:52
$dbpw
$dbpw
Definition: config.inc.php:12
gstrfilter
gstrfilter($str)
Definition: global.func.php:48
GAME_ROOT
const GAME_ROOT
Definition: dbup.php:6
$db
$db
Definition: dbup.php:32
dbstuff
Definition: db_mysql.class.php:7
$q
$q
Definition: dbup.php:42
$now
$now
Definition: dbup.php:23
$moveut
$moveut
Definition: config.inc.php:49
$errorinfo
$errorinfo
Definition: config.inc.php:94
config
config($file= '', $cfg=1)
Definition: global.func.php:122
$dbhost
$dbhost
Definition: config.inc.php:6
$dbuser
$dbuser
Definition: config.inc.php:9
$pconnect
$pconnect
Definition: config.inc.php:40
$dbname
$dbname
Definition: config.inc.php:15