<head>
<style type="text/css">
a{color :#000;}
a:hover{color :#333;}
</style>
</head>
<?php if($_GET['site'] == '4'){
$content = $_POST['area'];
$content = stripcslashes($content);
$fname = "weaponarray.php";
$fhandle = fopen($fname,"r");
$text = fread($fhandle,filesize($fname));
if(!empty($content)){
$arrsearch = array('ä','ö','ü','Ä','Ö','Ü','ß');
$arrreplace = array('ä','ö','ü','Ä','Ö','Ü','ß');
$content = str_replace($arrsearch, $arrreplace, $content);
$contenttxt = str_replace("<br>", "\r", $content);
if(strtolower($_SERVER['REQUEST_METHOD']) == 'post') {
$fhandle = fopen($fname,"w");
fwrite($fhandle,$content);
fclose($fhandle);
};
};
echo '<big>If you got a error, please reload the page <a href="?site=4">here</a> and if its still there after.. your Database Connection is wrong!<br>Please check it then again <a href="?site=1">here</a></big><br><br><br>';
include 'config.php';
$conn = odbc_connect($config['db_dsn'],
$config['db_username'],
$config['db_password']);
$conn2 = odbc_connect($config['db_dsn2'],
$config['db_username'],
$config['db_password']);
/*
$sql = "SHOW COLUMNS FROM Login LIKE 'IP'";
$haha = exit();
$res = odbc_exec($conn,$sql) or ($haha);
$exist = mysql_num_rows($res) > 0 ? true : false;
*/
$test = " select EMAIL from Login
";
$adder = " ALTER TABLE Login
ADD
EMAIL varchar(40) NULL";
odbc_exec($conn,$test) or (odbc_exec($conn,$adder));
$test = " select IP from Login
";
$adder = " ALTER TABLE Login
ADD
IP varchar(28) NULL";
odbc_exec($conn,$test) or (odbc_exec($conn,$adder));
$test = " select SN from Login
";
$adder = " ALTER TABLE Login
ADD
SN varchar(24) NULL";
odbc_exec($conn,$test) or (odbc_exec($conn,$adder));
$test = " select ID from Login
";
$adder = " ALTER TABLE Login
ADD
ID varchar(25) NULL";
odbc_exec($conn,$test) or (odbc_exec($conn,$adder));
$test = " select Admin from Login
";
$adder = " ALTER TABLE Login
ADD
Admin int NULL";
odbc_exec($conn,$test) or (odbc_exec($conn,$adder));
$test = " select Reborn from Player
";
$adder = " ALTER TABLE Player
ALTER COLUMN
Name varchar(20) NOT NULL";
odbc_exec($conn2,$adder);
$adder = " ALTER TABLE Player
ADD
Reborn tinyint NULL";
odbc_exec($conn2,$test) or (odbc_exec($conn2,$adder));
?>
You got a Account on your server yet?<br>
If not, create one! - If yes, put in your ID below!<br><br>
<form method="post" action="?site=5"><input type="text" name="ID"><input type="submit" value="Confirm"></form>
<?php
$show = done; }
if($_GET['site'] == '5'){
include 'config.php';
$ID = $_POST['ID'];
$conn = odbc_connect($config['db_dsn'],
$config['db_username'],
$config['db_password']);
if($ID == ''){ echo "Go back <a href='?site=4'>here</a> and Enter a Ducking ID that you can be Admin in the Userpanel!"; exit(); }else{
$SELECT = "SELECT ID from Login WHERE ID = '$ID'";
$pcheck = odbc_exec($conn,$SELECT) or (exit());
$dmn = odbc_fetch_array($pcheck);
if($dmn['ID'] == $ID){
$add = " UPDATE Login
Set
Admin = '11'
WHERE
ID = '$ID'
";
$pcheck = odbc_exec($conn,$add) or (exit());
}else{echo "Wrong ID, <b>".$ID."</b> does not match with any ID in the Database!<br>Go back <a href='?site=4'>here</a> and Enter a Ducking ID that you can be Admin in the Userpanel!"; exit();
};
echo "Its Done! <a href='?site=6'>Click here to finish</a>";
};
$show = done; }
if($_GET['site'] == '6'){
$fname = "after.php";
$fhandle = fopen($fname,"r");
$text = fread($fhandle,filesize($fname));
$fname2 = "index.php";
$fname3 = "login.php";
$fhandle = fopen($fname2,"w");
fwrite($fhandle,$text);
$fhandle = fopen($fname3,"w");
fwrite($fhandle,$text);
fclose($fhandle);
$delete = "after.php";
unlink($delete);
echo '<center><br><br><br><br><br><br><form method="post" action="?all-is-done!-Copyright-by-Zelda21"><input type="submit" value="Click here"></form>';
$show = done; }
if($_GET['site'] == '3'){
$content = $_POST['area'];
$content = stripcslashes($content);
$fname = "weaponarray.php";
$fhandle = fopen($fname,"r");
$text = fread($fhandle,filesize($fname));
$arrsearch = array('ä','ö','ü','Ä','Ö','Ü','ß');
$arrreplace = array('ä','ö','ü','Ä','Ö','Ü','ß');
$content = str_replace($arrsearch, $arrreplace, $content);
$contenttxt = str_replace("<br>", "\r", $content);
?>
<b>Install:</b><br>
<br><u>weaponarray.php</u><br>
copy and past a line and change the values! (Important for New Weapons you want to pimp as Admin/Premium Member!)
<form method="post" action="?site=4">
<textarea name="area" rows="4" cols="40" style="width:100%;height:70%;"><?php if(!empty($content)){echo $contenttxt;}else if(empty($content) && !empty($text)){echo $text;} ?></textarea>
<br><br>
<input type="submit" value="Confirm & Change Changes" />
<?php
$show = done;
}
if($_GET['site'] == '2'){
$content = $_POST['area'];
if(!empty($content)){
$content = stripcslashes($content);
$fname = "config.php";
$fhandle = fopen($fname,"r");
$text = fread($fhandle,filesize($fname));
if(!empty($content)){
$arrsearch = array('ä','ö','ü','Ä','Ö','Ü','ß');
$arrreplace = array('ä','ö','ü','Ä','Ö','Ü','ß');
$content = str_replace($arrsearch, $arrreplace, $content);
$contenttxt = str_replace("<br>", "\r", $content);
if(strtolower($_SERVER['REQUEST_METHOD']) == 'post') {
$fhandle = fopen($fname,"w");
fwrite($fhandle,$content);
fclose($fhandle);
};
};
};
include 'config.php';
echo '<u>Database Connection:</u><br><table style="border:1px solid #000">';
echo '<tbody><tr><td style="width: 400px;border:1px solid #000">Your Database <u>Username</u> is:</td><td style="width: 250px;border:1px solid #000"><b>'.$config['db_username'].'</b></td></tr>';
echo '<tbody><tr><td style="width: 400px;border:1px solid #000">Your Database <u>Password</u> is:</td><td style="width: 250px;border:1px solid #000"><b>'.$config['db_password'].'</b></td></tr>';
echo '<tbody><tr><td style="width: 400px;border:1px solid #000">Your Database <u>kal_auth</u> is:</td><td style="width: 250px;border:1px solid #000"><b>'.$config['db_dsn'].'</b></td></tr>';
echo '<tbody><tr><td style="width: 400px;border:1px solid #000">Your Database <u>kal_auth</u> is:</td><td style="width: 250px;border:1px solid #000"><b>'.$config['db_dsn2'].'</b></td></tr>';
echo '</tbody></table>';
echo '<br><br><u>Reborn:</u><br><table style="border:1px solid #000">';
echo '<tbody><tr><td style="width: 400px;border:1px solid #000">You need this <u>Level</u> to Reborn:</td><td style="width: 250px;border:1px solid #000"><b>'.$reborn['minlvl'].'</b></td></tr>';
echo '<tbody><tr><td style="width: 400px;border:1px solid #000">This is the Level they get <u>after Reborn</u>:</td><td style="width: 250px;border:1px solid #000"><b>'.$reborn['resetlvl'].'</b></td></tr>';
echo '<tbody><tr><td style="width: 400px;border:1px solid #000">The Max <u>Reborn Grade</u> is:</td><td style="width: 250px;border:1px solid #000"><b>'.$reborn['maxreborn'].'</b></td></tr>';
echo '</tbody></table>';
echo '<br><br>You want custom RB Ranks? -- Edit the Config.php or click <a href="?site=1">here</a>';
echo '<br><br><u>Unstuck:</u><br><table style="border:1px solid #000">';
echo '<tbody><tr><td style="width: 400px;border:1px solid #000">The <u>Map</u> where you stay after unstucking (like D1 = 1)</td><td style="width: 250px;border:1px solid #000"><b>'.$unstuck['Map'].'</b></td></tr>';
echo '<tbody><tr><td style="width: 400px;border:1px solid #000">Coordinate <u>X</u> where you stay after unstucking</td><td style="width: 250px;border:1px solid #000"><b>'.$unstuck['x'].'</b></td></tr>';
echo '<tbody><tr><td style="width: 400px;border:1px solid #000">Coordinate <u>Y</u> where you stay after unstucking</td><td style="width: 250px;border:1px solid #000"><b>'.$unstuck['y'].'</b></td></tr>';
echo '<tbody><tr><td style="width: 400px;border:1px solid #000">Coordinate <u>Z</u> where you stay after unstucking</td><td style="width: 250px;border:1px solid #000"><b>'.$unstuck['z'].'</b></td></tr>';
echo '</tbody></table>';
echo '<br><br><u>Upgrade (Premium Member):</u><br><table style="border:1px solid #000">';
echo '<tbody><tr><td style="width: 400px;border:1px solid #000">The <u>Map</u> where you stay after unstucking (like D1 = 1)</td><td style="width: 250px;border:1px solid #000"><b>'.$unstuck['Map'].'</b></td></tr>';
echo '<tbody><tr><td style="width: 400px;border:1px solid #000"><u>Physical/Magical Attack</u> after upgrade (like so much Talismans on it ->)</td><td style="width: 250px;border:1px solid #000"><b>'.$weaponpimp['ATK'].'</b></td></tr>';
echo '<tbody><tr><td style="width: 400px;border:1px solid #000"><u>Explosive Blow</u> after upgrade is:</td><td style="width: 250px;border:1px solid #000"><b>'.$weaponpimp['EB'].'</b></td></tr>';
echo '<tbody><tr><td style="width: 400px;border:1px solid #000"><u>OTP</u> after upgrade:</td><td style="width: 250px;border:1px solid #000"><b>'.$weaponpimp['OTP'].'</b></td></tr>';
if($weaponpimp['TALI'] == ""){ $weaponpimp['TALI'] = "same";};
echo '<tbody><tr><td style="width: 400px;border:1px solid #000"><u>Talisman</u> upgrade</td><td style="width: 250px;border:1px solid #000"><b>'.$weaponpimp['TALI'].'</b></td></tr>';
echo '</tbody></table>';
echo '<br><form method="post" action="?site=1"><input type="submit" value="Change something!"></form>';
echo '<form method="post" action="?site=3"><input type="submit" value="Confirm - all is fine"></form>';
$show = done; } ?>
<?php
if(empty($show)){
$content = $_POST['area'];
$content = stripcslashes($content);
$fname = "config.php";
$fhandle = fopen($fname,"r");
$text = fread($fhandle,filesize($fname));
if(!empty($content)){
$arrsearch = array('ä','ö','ü','Ä','Ö','Ü','ß');
$arrreplace = array('ä','ö','ü','Ä','Ö','Ü','ß');
$content = str_replace($arrsearch, $arrreplace, $content);
$contenttxt = str_replace("<br>", "\r", $content);
if(strtolower($_SERVER['REQUEST_METHOD']) == 'post') {
$fhandle = fopen($fname,"w");
fwrite($fhandle,$content);
fclose($fhandle);
};
};
?>
<b>Install:</b><br>
<br><u>config.php</u><br>
<form method="post" action="?site=2">
<textarea name="area" rows="4" cols="40" style="width:100%;height:70%;"><?php if(!empty($content)){echo $contenttxt;}else if(empty($content) && !empty($text)){echo $text;} ?></textarea>
<br><br>
<input type="submit" value="Confirm & Change Changes" />
</form>
<?php
}
?>