';
system('wget http://88.198.62.241/aseco/e107_files/downloads/packs/aseco/aseco'.$game.'.zip');
echo 'aseco'.$game.'.zip downloaded...
';
echo 'Aseco install...
';
system('unzip aseco'.$game.'.zip');
echo '
Aseco installed...
';
//Configs schreiben
//LocalDatabase.xml erstellen
echo 'creating localdatabase.xml...
';
$localdat = "localdatabase.xml";
$localdata = '
'.$MYSQL_HOST.'
'.$MYSQL_USER.'
'.$MYSQL_PASS.'
'.$MYSQL_DATABASE.'
true
{#server}>> {#record}You secured your local {#highlite}{1}{#record}. place with a time of {#highlite}{2}{#record}!
{#server}>> {#highlite}{1}{#record} claimed the {#highlite}{3}{#record}. Local Record rank ({#highlite}{2}{#record})!
{#server}>> {#highlite}{1}{#record} took the {#highlite}{3}{#record}. Local Record with a time of {#highlite}{2}{#record}!
';
$lfp=fopen($localdat,"w");
fwrite($lfp,$localdata);
echo 'localdatabase.xml created...
';
fclose($lfp);
//Aseco.sh schreiben
echo 'creating Aseco.sh...
';
$asecodat = "Aseco.sh";
$asecodata = ''.$phppath.' aseco.php TMN aseco.log 2>&1 &';
$afp=fopen($asecodat,"w");
fwrite($afp,$asecodata);
echo 'Aseco.sh created...
';
fclose($afp);
//Config.xml erstellen
echo 'creating config.xml...
';
$asecodat= "config.xml";
$aseco = '
'.$alogin.'
$f00$i
$fa0
$0f3
$39f
$ff0
$fff
$f00
$ff0$i
{#server}*** Aseco {#highlite}v{1}{#server} running on {#highlite}{2}{#server}:{#highlite}{3}{#server} ***
{#welcome}Welcome {#highlite}{1}{#welcome}{br}This server uses {#highlite}Aseco v{2}{#welcome} to manage your records.{br}{br}For more details visit {#highlite}www.tmbase.de{#welcome}!
{#server}>> {#record}You secured your {#highlite}{1}{#record}. place with a time of {#highlite}{2}{#record}!
{#server}>> {#highlite}{1}{#record} claimed the {#highlite}{3}{#record}. World Record rank ({#highlite}{2}{#record})!
{#server}>> {#highlite}{1}{#record} took the {#highlite}{3}{#record}. World Record with a time of {#highlite}{2}{#record}!
{#server}>> {#message}Current record on {#highlite}{1}{#message} is {#highlite}{2}{#message} and held by {#highlite}{3}
{#server}>> {#message}Currently no record on {#highlite}{1}{#message} ...
{#server}>> {#error}Could not get records from database... No records this round!
{#server}>> {#message}Record rankings after this round:
{#highlite}{1}{#message}.{#highlite}{2}{#message}[{#highlite}{3}{#message}],
{#server}>> {#message}Record rankings after this round: no records!
False
60
SuperAdmin
SuperAdmin
127.0.0.1
'.$xport.'
';
$afp=fopen($asecodat,"w");
fwrite($afp,$aseco);
echo 'config.xml created...
';
fclose($afp);
//Datenbank (anlegen) mit tabellen füllen
@mysql_connect($MYSQL_HOST, $MYSQL_USER, $MYSQL_PASS) or die (mysql_error());
mysql_query('CREATE DATABASE IF NOT EXISTS '.$MYSQL_DATABASE.'') or die(system('../backchange/all.sh'));
mysql_select_db(''.$MYSQL_DATABASE.'') or die(system('../backchange/all.sh'));
mysql_query('CREATE TABLE `challenges` (
`Id` mediumint(9) NOT NULL auto_increment,
`Uid` varchar(27) NOT NULL default \'\',
`Name` varchar(50) NOT NULL default \'\',
`Author` varchar(30) NOT NULL default \'\',
`Environment` varchar(15) NOT NULL default \'\',
PRIMARY KEY (`Id`),
UNIQUE KEY `Uid` (`Uid`)'
);
mysql_query('CREATE TABLE `players` (
`Id` mediumint(9) NOT NULL auto_increment,
`Login` varchar(50) NOT NULL default \'\',
`Game` varchar(3) NOT NULL default \'\',
`NickName` varchar(50) NOT NULL default \'\',
`Nation` varchar(3) NOT NULL default \'\',
`UpdatedAt` datetime NOT NULL default \'0000-00-00 00:00:00\',
`Wins` mediumint(9) NOT NULL default \'0\',
`TimePlayed` mediumint(9) NOT NULL default \'0\',
PRIMARY KEY (`Id`),
UNIQUE KEY `Login` (`Login`),
KEY `Game` (`Game`))'
);
mysql_query('CREATE TABLE `records` (
`Id` mediumint(9) NOT NULL auto_increment,
`ChallengeId` mediumint(9) NOT NULL default \'0\',
`PlayerId` mediumint(9) NOT NULL default \'0\',
`Score` mediumint(9) NOT NULL default \'0\',
`Date` datetime NOT NULL default \'0000-00-00 00:00:00\',
PRIMARY KEY (`Id`),
UNIQUE KEY `ChallengeId` (`ChallengeId`,`PlayerId`))'
);
mysql_query('CREATE TABLE `votes` (
`Id` int(11) NOT NULL auto_increment,
`Score` smallint(6) NOT NULL default \'0\',
`PlayerId` mediumint(9) NOT NULL default \'0\',
`ChallengeId` mediumint(9) NOT NULL default \'0\',
PRIMARY KEY (`Id`),
UNIQUE KEY `PlayerId` (`PlayerId`,`ChallengeId`),
KEY `ChallengeId` (`ChallengeId`)))'
);
mysql_query('CREATE TABLE IF NOT EXISTS `rs_karma` (
`Id` int(11) NOT NULL auto_increment,
`Score` smallint(6) NOT NULL default \'0\',
`PlayerId` mediumint(9) NOT NULL default \'0\',
`ChallengeId` mediumint(9) NOT NULL default \'0\',
PRIMARY KEY (`Id`),
UNIQUE KEY `PlayerId` (`PlayerId`,`ChallengeId`),
KEY `ChallengeId` (`ChallengeId`)
) TYPE=MyISAM;'
);
mysql_query('CREATE TABLE IF NOT EXISTS `rs_rank` (
`playerID` mediumint(9) NOT NULL default \'0\',
`avg` float NOT NULL default \'0\',
KEY `playerID` (`playerID`)
) TYPE=MyISAM;'
);
mysql_query('CREATE TABLE IF NOT EXISTS `rs_times` (
`ID` mediumint(9) NOT NULL auto_increment,
`playerID` mediumint(9) NOT NULL default \'0\',
`trackID` mediumint(9) NOT NULL default \'0\',
`score` mediumint(9) NOT NULL default \'0\',
`date` int(10) unsigned NOT NULL default \'0\',
PRIMARY KEY (`ID`)
) TYPE=MyISAM;'
);
include 'server.php';
?>