'.$lang['alrup'].'
';
if(is_file('install.php') or is_file('update_0-02.php') or is_file('update_0-10.php') or is_file('update_0-11.php')) {
unlink('install.php');
unlink('update_0-02.php');
unlink('update_0-10.php');
unlink('update_0-11.php');
unlink('update_0-12.php');
echo ''.sprintf($lang['updel'],'install.php
update_0-02.php
update_0-10.php
update_0-11.php
update_0-12.php
update_0-13.php').'';
}
} elseif (!is_writable('./other/dbconfig.php') || substr(sprintf('%o', fileperms('./icons/')), -4)!='0777') {
echo '',$lang['isntwichm'],'';
} elseif($currvers=='0.12-beta') {
echo sprintf($lang['updb'],'0.13','0-13');
echo '';
} else {
echo sprintf($lang['updb'],'0.13','0-13');
echo '';
}
if(isset($_POST['updateranksystem13'])) {
$errcount = 1;
if($mysqlcon->exec("INSERT INTO $dbname.cleanclients SET timestamp='1'") === false) {
echo $lang['insttberr'].''.print_r($mysqlcon->errorInfo()).'.';
$errcount++;
}
if($mysqlcon->exec("ALTER TABLE $dbname.config ADD (showhighest int(1) NOT NULL default '0')") === false) {
echo $lang['insttberr'].''.print_r($mysqlcon->errorInfo()).'.';
$errcount++;
}
if($mysqlcon->exec("UPDATE $dbname.config SET showhighest='1'") === false) {
echo $lang['insttberr'].''.print_r($mysqlcon->errorInfo()).'.';
$errcount++;
}
if ($errcount == 1) {
if($mysqlcon->exec("UPDATE $dbname.config set currvers='0.13-beta'") === false) {
echo $lang['insttberr'].''.print_r($mysqlcon->errorInfo()).'.';
$errcount++;
}
if ($errcount == 1) {
echo''.$lang['upsucc'].'
';
if(is_file('install.php') or is_file('update_0-02.php') or is_file('update_0-10.php')) {
unlink('install.php');
unlink('update_0-02.php');
unlink('update_0-10.php');
unlink('update_0-11.php');
unlink('update_0-12.php');
echo ''.sprintf($lang['updel'],'install.php
update_0-02.php
update_0-10.php
update_0-11.php
update_0-12.php
update_0-13.php').'';
}
}
}
if ($errcount > 1) {
echo "Error by Updating the Database for the Ranksystem. Please run the following SQL Statements yourself and be sure all works correctly:
INSERT INTO $dbname.cleanclients SET timestamp='1'
ALTER TABLE $dbname.config ADD (showhighest int(1) NOT NULL default '0')
UPDATE $dbname.config SET showhighest='1'
UPDATE $dbname.config set currvers='0.13-beta';
";
}
}
if(isset($_POST['updateranksystem12u13'])) {
$errcount = 1;
if($mysqlcon->exec("CREATE TABLE $dbname.cleanclients (timestamp bigint(11) NOT NULL default '0')") === false) {
echo $lang['insttberr'].''.print_r($mysqlcon->errorInfo()).'.';
$errcount++;
}
if($mysqlcon->exec("INSERT INTO $dbname.cleanclients SET timestamp='1'") === false) {
echo $lang['insttberr'].''.print_r($mysqlcon->errorInfo()).'.';
$errcount++;
}
if($mysqlcon->exec("ALTER TABLE $dbname.config ADD (cleanclients int(1) NOT NULL default '0',cleanperiod bigint(11) NOT NULL default '0',showhighest int(1) NOT NULL default '0')") === false) {
echo $lang['insttberr'].''.print_r($mysqlcon->errorInfo()).'.';
$errcount++;
}
if($mysqlcon->exec("UPDATE $dbname.config SET cleanclients='1', cleanperiod='86400', showhighest='1'") === false) {
echo $lang['insttberr'].''.print_r($mysqlcon->errorInfo()).'.';
$errcount++;
}
if ($errcount == 1) {
if($mysqlcon->exec("UPDATE $dbname.config set currvers='0.13-beta'") === false) {
echo $lang['insttberr'].''.print_r($mysqlcon->errorInfo()).'.';
$errcount++;
}
if ($errcount == 1) {
echo''.$lang['upsucc'].'
';
if(is_file('install.php') or is_file('update_0-02.php') or is_file('update_0-10.php')) {
unlink('install.php');
unlink('update_0-02.php');
unlink('update_0-10.php');
unlink('update_0-11.php');
unlink('update_0-12.php');
echo ''.sprintf($lang['updel'],'install.php
update_0-02.php
update_0-10.php
update_0-11.php
update_0-12.php
update_0-13.php').'';
}
}
}
if ($errcount > 1) {
echo "Error by Updating the Database for the Ranksystem. Please run the following SQL Statements yourself and be sure all works correctly:
CREATE TABLE $dbname.cleanclients (timestamp bigint(11) NOT NULL default '0')
INSERT INTO $dbname.cleanclients SET timestamp='1'
ALTER TABLE $dbname.config ADD (cleanclients int(1) NOT NULL default '0',cleanperiod bigint(11) NOT NULL default '0',showhighest int(1) NOT NULL default '0')
UPDATE $dbname.config SET cleanclients='1', cleanperiod='86400', showhighest='1'
UPDATE $dbname.config set currvers='0.13-beta';
";
}
}
?>