sql_fetchrow($db->sql_query("SELECT * FROM ".$prefix."_authors WHERE aid='$admin_name'"));
if ($isadmin['radminsuper']==1) {
switch($op) {
default:
$pagetitle = "Wars";
include("header.php");
title("$pagetitle");
OpenTable();
echo "
\n";
CloseTable();
include("footer.php");
break;
case "install":
$pagetitle = "Wars: Install";
include("header.php");
title("$pagetitle");
OpenTable();
$db->sql_query("CREATE TABLE ".$prefix."_wars (
wid int(11) NOT NULL auto_increment,
status varchar(25) NOT NULL default '',
game int(3) default NULL,
day int(2) NOT NULL default '0',
month int(2) NOT NULL default '0',
year int(4) NOT NULL default '0',
time varchar(5) default NULL,
opp_tag varchar(25) default NULL,
opp_name varchar(50) default NULL,
opp_url varchar(100) default NULL,
opp_country varchar(50) default NULL,
style varchar(20) default NULL,
gametype varchar(20) default NULL,
first_map varchar(25) default NULL,
second_map varchar(25) default NULL,
third_map varchar(25) default NULL,
our_score int(3) default '0',
opp_score int(3) default '0',
report text,
report_url varchar(100) default NULL,
PRIMARY KEY (wid))");
$db->sql_query("CREATE TABLE ".$prefix."_wars_games (
gid int(11) NOT NULL auto_increment,
name varchar(60) NOT NULL default '',
icon_url varchar(255) NOT NULL default '',
PRIMARY KEY (gid))");
$db->sql_query("CREATE TABLE ".$prefix."_wars_screenshots (
screen_id int(11) NOT NULL auto_increment,
screen_name varchar(50) NOT NULL default '',
screen_url varchar(125) NOT NULL default '',
wid varchar(5) NOT NULL default '',
PRIMARY KEY (screen_id))");
echo "
\n";
echo "Done!
\n";
echo "Go back to index\n";
CloseTable();
include("footer.php");
break;
}
} else {
$pagetitle = "Wars: ERROR";
include("header.php");
title("$pagetitle");
OpenTable();
echo "Sorry, ONLY super admins may run this script\n";
CloseTable();
include("footer.php");
}
?>