\n"; $error_occured = true; } else { echo "\n"; } if (!empty($attributes_content)) { echo "\n"; $error_occured = true; } else { echo "\n"; } if (empty($owner)) { echo "\n"; $error_occured = true; } else { echo "\n"; } if (empty($default_language)) { echo "\n"; $error_occured = true; } else { echo "\n"; } if (empty($global_universe) || !is_numeric($global_universe)) { echo "\n"; $error_occured = true; } else { echo "\n"; } $link = mysql_connect($dbhost, $dbusername, $dbpassword); if (!$link) { echo "\n"; echo "\n"; echo "\n"; $error_occured = true; } else { echo "\n"; $db_selected = mysql_select_db($dbname, $link); if (!$db_selected) { echo "\n"; $error_occured = true; } else { echo "\n"; $query = "SELECT VERSION() as version"; $res = mysql_query($query) or die(mysql_error()); $version = mysql_fetch_object($res); if (strpos($version->version,"-") > 0) { $version = substr($version->version,0,strpos($version->version,"-")); } else { $version = $version->version; } $subversion = explode(".",$version); if (!isset($subversion[0]) || $subversion[0] < 4) { echo "\n"; $error_occured = true; } else { if ($subversion[0] == 4) { // MySQL 4.x.x if (!isset($subversion[1]) || $subversion[1] < 1) { echo "\n"; $error_occured = true; } else { if (!isset($subversion[2]) || $subversion[2] < 16) { echo "\n"; $error_occured = true; } else { // success echo "\n"; } } } elseif ($subversion[0] == 5) { // MySQL 5.x.x if (!isset($subversion[1]) || !isset($subversion[2]) || ($subversion[1] == 0 && $subversion[2] < 16)) { echo "\n"; $error_occured = true; } else { // success echo "\n"; } } elseif ($subversion[0] == 6) { // MySQL 6.x.x echo "\n"; } } } } ?> \n"; } else { echo "\n"; } } else { echo '
Galaxytool - Installation check
Syntax: config.phpfailed
Syntax: config.phpsuccess
Syntax: attributes.phpfailed
Syntax: attributes.phpsuccess
Ownerfailed
Owner$owner
Languagefailed
Language$default_language
Universefailed
Universe$global_universe
MySQL connectionfailed
Database existencyfailed
MySQL version checkfailed
MySQL connectionsuccess
Database existencyfailed
Database existencysuccess
MySQL version check$version
MySQL version check$version
MySQL version check$version
MySQL version check$version
MySQL version check$version
MySQL version check$version
MySQL version check$version
 
Install
Check again
'; // start installation mysql_connect($dbhost,$dbusername,$dbpassword) or die(mysql_error()); mysql_select_db($dbname) or die(mysql_error()); // Tabelle fuer die Galaxieansichten $query = "CREATE TABLE ".$dbtablename." ( galaxy int(2) NOT NULL default '0', system int(3) NOT NULL default '0', planet int(2) NOT NULL default '0', player_id smallint(5) unsigned NOT NULL default '0', moon enum('true','false') NOT NULL default 'false', moonsize smallint(5) unsigned NOT NULL default '0', metal int(10) unsigned NOT NULL default '0', crystal int(10) unsigned NOT NULL default '0', planetname varchar(40) NOT NULL default '', last_update datetime NOT NULL default '0000-00-00 00:00:00', user_id smallint(5) unsigned NOT NULL default '0', PRIMARY KEY (galaxy,system,planet), KEY player_id (player_id), KEY moon (moon), KEY moon_2 (moon), KEY last_update (last_update), KEY metal (metal), KEY crystal (crystal) ) DEFAULT CHARSET=utf8"; if (!mysql_query($query)) { echo "\n"; echo "\n"; $error_occured = true; } else { echo "\n"; } // Tabelle fuer die Benutzerverwaltung $query = "CREATE TABLE $utablename ( id smallint(10) unsigned NOT NULL auto_increment, username varchar(20) NOT NULL default '', userpass varchar(32) NOT NULL default '', ogame_playerid int(11) unsigned NOT NULL default '0', email varchar(50) NOT NULL default '', ingame varchar(20) NOT NULL default '', allytag varchar(10) NOT NULL default '', timezone_offset varchar(6) NOT NULL default '+00:00', stylepath varchar(255) NOT NULL default '', is_admin enum('true','false') NOT NULL default 'false', cansearch enum('true','false') NOT NULL default 'false', caninsert enum('true','false') NOT NULL default 'false', statusview enum('true','false') NOT NULL default 'false', probeview enum('true','false') NOT NULL default 'false', userman enum('true','false') NOT NULL default 'false', allyhistory enum('true','false') NOT NULL default 'false', diplomatic enum('true','false') NOT NULL default 'false', status enum('email','admin','active') NOT NULL default 'email', logins smallint(5) unsigned NOT NULL default '0', lastlogin datetime NOT NULL default '0000-00-00 00:00:00', last_action datetime NOT NULL default '0000-00-00 00:00:00', statspage mediumint(8) unsigned NOT NULL default '100', links text NOT NULL, bb_coordinates varchar(25) NOT NULL default 'deeppink', bb_moon varchar(25) NOT NULL default 'burlywood', bb_debris varchar(25) NOT NULL default 'firebrick', bb_ally varchar(25) NOT NULL default 'tomato', bb_allydetails varchar(25) NOT NULL default 'coral', bb_playername varchar(25) NOT NULL default 'teal', bb_banned varchar(25) NOT NULL default 'red', bb_vacation varchar(25) NOT NULL default 'skyblue', bb_noob varchar(25) NOT NULL default 'limegreen', bb_inactive varchar(25) NOT NULL default 'silver', bb_longinactive varchar(25) NOT NULL default 'silver', PRIMARY KEY (id), UNIQUE KEY username (username), KEY last_action (last_action), KEY ingame (ingame), KEY ogame_playerid (ogame_playerid), KEY is_admin (is_admin) ) DEFAULT CHARSET=utf8"; if (!mysql_query($query)) { echo "\n"; echo "\n"; $error_occured = true; } else { echo "\n"; } // Adminuser eintragen $query = "INSERT INTO $utablename (id, username, userpass, stylepath, is_admin, cansearch, caninsert, statusview, probeview, userman, allyhistory, diplomatic, status, links) VALUES (1, 'admin', md5('galatool'),'styles.css', 'true', 'true', 'true', 'true', 'true', 'true', 'true', 'true', 'active', 'Galaxytool;http://www.galaxytool.eu')"; if (!mysql_query($query)) { echo "\n"; echo "\n"; $error_occured = true; } else { echo "\n"; } // Spielertabelle $query = "CREATE TABLE $playertable ( id smallint(5) unsigned NOT NULL auto_increment, playername varchar(30) NOT NULL default '', ogame_playerid int(11) unsigned default NULL, alliance_id smallint(5) unsigned NOT NULL default '0', rank smallint(5) unsigned NOT NULL default '0', points int(10) unsigned NOT NULL default '0', frank smallint(5) unsigned NOT NULL default '0', fpoints int(10) unsigned NOT NULL default '0', rrank smallint(5) unsigned NOT NULL default '0', rpoints int(10) unsigned NOT NULL default '0', last_stats_update datetime NOT NULL default '0000-00-00 00:00:00', user_id smallint(5) unsigned NOT NULL default '0', noob enum('true','false') NOT NULL default 'false', banned enum('true','false') NOT NULL default 'false', vacation enum('true','false') NOT NULL default 'false', inactive enum('true','false') NOT NULL default 'false', long_inactive enum('true','false') NOT NULL default 'false', diplomatic_status enum('nap','ally','war','boycott','neutral','nothing','own','wing') NOT NULL default 'nothing', spiolvl tinyint(3) unsigned NOT NULL default '0', computech tinyint(3) unsigned NOT NULL default '0', waffentech tinyint(3) unsigned NOT NULL default '0', schildtech tinyint(3) unsigned NOT NULL default '0', rpz tinyint(3) unsigned NOT NULL default '0', energytech tinyint(3) unsigned NOT NULL default '0', hypertech tinyint(3) unsigned NOT NULL default '0', vbt tinyint(3) unsigned NOT NULL default '0', impulse tinyint(3) unsigned NOT NULL default '0', hra tinyint(3) unsigned NOT NULL default '0', lasertech tinyint(3) unsigned NOT NULL default '0', iontech tinyint(3) unsigned NOT NULL default '0', plasmatech tinyint(3) unsigned NOT NULL default '0', forschungsnetz tinyint(3) unsigned NOT NULL default '0', expedition tinyint(3) unsigned NOT NULL default '0', gravi tinyint(3) unsigned NOT NULL default '0', last_tech_update datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (id), UNIQUE KEY ogame_playerid (ogame_playerid), KEY alliance_id (alliance_id), KEY noob (noob), KEY banned (banned), KEY vacation (vacation), KEY inactive (inactive), KEY playername (playername), KEY rank (rank), KEY frank (frank), KEY last_stats_update (last_stats_update) ) DEFAULT CHARSET=utf8"; if (!mysql_query($query)) { echo "\n"; echo "\n"; $error_occured = true; } else { echo "\n"; } // Allytabelle $query = "CREATE TABLE $allytable ( id smallint(5) unsigned NOT NULL auto_increment, allyname varchar(30) default NULL, rank smallint(5) unsigned NOT NULL default '0', points int(10) unsigned NOT NULL default '0', frank smallint(5) unsigned NOT NULL default '0', fpoints int(10) unsigned NOT NULL default '0', rrank smallint(5) unsigned NOT NULL default '0', rpoints int(10) unsigned NOT NULL default '0', members smallint(5) unsigned NOT NULL default '0', diplomatic_status enum('nap','ally','war','boycott','neutral','nothing','own','wing') default 'nothing', last_update datetime default '0000-00-00 00:00:00', user_id smallint(5) unsigned NOT NULL default '0', PRIMARY KEY (id), UNIQUE KEY allyname (allyname), KEY last_update (last_update), KEY diplomatic_status (diplomatic_status), KEY rank (rank) ) DEFAULT CHARSET=utf8"; if (!mysql_query($query)) { echo "\n"; echo "\n"; $error_occured = true; } else { echo "\n"; } // Notiztabelle $query = "CREATE TABLE $noticetable ( id int(11) NOT NULL auto_increment, noticetext text NOT NULL, player_id smallint(5) unsigned NOT NULL default '0', last_update datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (id), UNIQUE KEY player_id (player_id) ) DEFAULT CHARSET=utf8"; if (!mysql_query($query)) { echo "\n"; echo "\n"; $error_occured = true; } else { echo "\n"; } // Reporttabelle $query = "CREATE TABLE $reporttable ( id int(10) unsigned NOT NULL auto_increment, galaxy int(2) unsigned NOT NULL default '0', system int(3) unsigned NOT NULL default '0', planet int(2) unsigned NOT NULL default '0', planetname varchar(20) NOT NULL default '', moon enum('true','false') NOT NULL default 'false', metal int(10) unsigned NOT NULL default '0', crystal int(10) unsigned NOT NULL default '0', deuterium int(10) unsigned NOT NULL default '0', energy int(10) unsigned NOT NULL default '0', kt mediumint(8) unsigned NOT NULL default '0', gt mediumint(8) unsigned NOT NULL default '0', lj mediumint(8) unsigned NOT NULL default '0', sj mediumint(8) unsigned NOT NULL default '0', krz mediumint(8) unsigned NOT NULL default '0', ss mediumint(8) unsigned NOT NULL default '0', kolo mediumint(8) unsigned NOT NULL default '0', rec mediumint(8) unsigned NOT NULL default '0', spio mediumint(8) unsigned NOT NULL default '0', bomb mediumint(8) unsigned NOT NULL default '0', zerri mediumint(8) unsigned NOT NULL default '0', ds mediumint(8) unsigned NOT NULL default '0', skrz mediumint(8) unsigned NOT NULL default '0', sat mediumint(8) unsigned NOT NULL default '0', rak mediumint(8) unsigned NOT NULL default '0', ll mediumint(8) unsigned NOT NULL default '0', sl mediumint(8) unsigned NOT NULL default '0', ion mediumint(8) unsigned NOT NULL default '0', gauss mediumint(8) unsigned NOT NULL default '0', plasma mediumint(8) unsigned NOT NULL default '0', ksk mediumint(8) unsigned NOT NULL default '0', gsk mediumint(8) unsigned NOT NULL default '0', arak mediumint(8) unsigned NOT NULL default '0', irak mediumint(8) unsigned NOT NULL default '0', memi tinyint(3) unsigned NOT NULL default '0', krimi tinyint(3) unsigned NOT NULL default '0', deutsyn tinyint(3) unsigned NOT NULL default '0', solar tinyint(3) unsigned NOT NULL default '0', fusion tinyint(3) unsigned NOT NULL default '0', robo tinyint(3) unsigned NOT NULL default '0', nani tinyint(3) unsigned NOT NULL default '0', rawe tinyint(3) unsigned NOT NULL default '0', mesp tinyint(3) unsigned NOT NULL default '0', krissp tinyint(3) unsigned NOT NULL default '0', deutsp tinyint(3) unsigned NOT NULL default '0', folab tinyint(3) unsigned NOT NULL default '0', terra tinyint(3) unsigned NOT NULL default '0', allydep tinyint(3) unsigned NOT NULL default '0', raksilo tinyint(3) unsigned NOT NULL default '0', mbase tinyint(3) unsigned NOT NULL default '0', sensor tinyint(3) unsigned NOT NULL default '0', sprungtor tinyint(3) unsigned NOT NULL default '0', spiolvl tinyint(3) unsigned NOT NULL default '0', computech tinyint(3) unsigned NOT NULL default '0', waffentech tinyint(3) unsigned NOT NULL default '0', schildtech tinyint(3) unsigned NOT NULL default '0', rpz tinyint(3) unsigned NOT NULL default '0', energytech tinyint(3) unsigned NOT NULL default '0', hypertech tinyint(3) unsigned NOT NULL default '0', vbt tinyint(3) unsigned NOT NULL default '0', impulse tinyint(3) unsigned NOT NULL default '0', hra tinyint(3) unsigned NOT NULL default '0', lasertech tinyint(3) unsigned NOT NULL default '0', iontech tinyint(3) unsigned NOT NULL default '0', plasmatech tinyint(3) unsigned NOT NULL default '0', forschungsnetz tinyint(3) unsigned NOT NULL default '0', expedition tinyint(3) unsigned NOT NULL default '0' COMMENT 'Expedition technology', gravi tinyint(3) unsigned NOT NULL default '0', fleet_resis bigint(20) unsigned NOT NULL default '0', defence_resis bigint(20) unsigned NOT NULL default '0', scantime varchar(14) NOT NULL default '', user_id smallint(5) unsigned NOT NULL default '0', scanned enum('ressources','fleet','defence','buildings','research') NOT NULL default 'ressources', min_phalanx int(3) unsigned default NULL, max_phalanx int(3) unsigned default NULL, min_rak int(3) unsigned default NULL, max_rak int(3) unsigned default NULL, PRIMARY KEY (id), UNIQUE KEY coordinates (galaxy,system,planet,moon), KEY scantime (scantime), KEY metal (metal), KEY crystal (crystal), KEY deuterium (deuterium), KEY min_rak (galaxy,min_rak), KEY min_phalanx (galaxy,min_phalanx), KEY user_id (user_id) ) DEFAULT CHARSET=utf8"; if (!mysql_query($query)) { echo "\n"; echo "\n"; $error_occured = true; } else { echo "\n"; } // IP Tabelle $query = "CREATE TABLE $iptablename ( id int(10) unsigned NOT NULL auto_increment, userid smallint(5) unsigned NOT NULL default '0', ip varchar(15) NOT NULL default '', logintime datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (id), KEY userid (userid) ) DEFAULT CHARSET=utf8"; if (!mysql_query($query)) { echo "\n"; echo "\n"; $error_occured = true; } else { echo "\n"; } // Shouttabelle $query = "CREATE TABLE $shouttable ( id mediumint(8) unsigned NOT NULL auto_increment, username varchar(20) NOT NULL default '', shouttext varchar(255) NOT NULL default '', shoutdate datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (id) ) DEFAULT CHARSET=utf8"; if (!mysql_query($query)) { echo "\n"; echo "\n"; $error_occured = true; } else { echo "\n"; } // Allianzgeschichte $query = "CREATE TABLE $allyhistory ( alliance_id smallint(5) unsigned NOT NULL default '0', year smallint(5) unsigned NOT NULL default '0', month tinyint(3) unsigned NOT NULL default '0', day tinyint(3) unsigned NOT NULL default '0', rank smallint(5) unsigned NOT NULL default '0', points int(10) unsigned NOT NULL default '0', frank smallint(5) unsigned NOT NULL default '0', fpoints int(10) unsigned NOT NULL default '0', rrank smallint(5) unsigned NOT NULL default '0', rpoints int(10) unsigned NOT NULL default '0', members smallint(5) unsigned NOT NULL default '0', PRIMARY KEY (alliance_id,year,month,day) ) DEFAULT CHARSET=utf8"; if (!mysql_query($query)) { echo "\n"; echo "\n"; $error_occured = true; } else { echo "\n"; } // Spielergeschichte $query = "CREATE TABLE $playerhistory ( player_id smallint(5) unsigned NOT NULL default '0', alliance_id smallint(5) unsigned NOT NULL default '0', year smallint(5) unsigned NOT NULL default '0', month tinyint(3) unsigned NOT NULL default '0', day tinyint(3) unsigned NOT NULL default '0', rank smallint(5) unsigned NOT NULL default '0', points int(10) unsigned NOT NULL default '0', frank smallint(5) unsigned NOT NULL default '0', fpoints int(10) unsigned NOT NULL default '0', rrank smallint(5) unsigned NOT NULL default '0', rpoints int(10) unsigned NOT NULL default '0', PRIMARY KEY (player_id,year,month,day) ) DEFAULT CHARSET=utf8"; if (!mysql_query($query)) { echo "\n"; echo "\n"; $error_occured = true; } else { echo "\n"; } if (!$error_occured) { echo "\n"; } else { echo "\n"; } } ?>
Table: galaxyfailure
".mysql_error()."
Table: galaxysuccess
Table: usertablefailure
".mysql_error()."
Table: usertablesuccess
Creating Adminuserfailure
".mysql_error()."
Creating Adminusersuccess
Table: playertablefailure
".mysql_error()."
Table: playertablesuccess
Table: allytablefailure
".mysql_error()."
Table: allytablesuccess
Table: noticetablefailure
".mysql_error()."
Table: noticetablesuccess
Table: reporttablefailure
".mysql_error()."
Table: reporttablesuccess
Table: IPtablefailure
".mysql_error()."
Table: IPtablesuccess
Table: shoutboxfailure
".mysql_error()."
Table: shoutboxsuccess
Table: allyhistoryfailure
".mysql_error()."
Table: allyhistorysuccess
Table: playerhistoryfailure
".mysql_error()."
Table: playerhistorysuccess
Installation complete
Installation failed