<?php
parth1tr();
parth1('25%', 1, 1);
echo 'Re-Stat Script, made by SexyReplay';
parth2();
parth2tr();
part1tr();
part1('25%', 1, 1, 'left');
?>
<table align=center border=0>
<tr>
<br><td>Enter Char Nick:</td>
<td>
<form action='' method=post>
<input type=text name=namen maxlength="14" size="14">
</tr>
<tr>
<td align="right">Password: </td>
<td>
<form action='' method=post>
<input type=password name=namen2 maxlength="12" size="12">
</tr>
<tr>
<td colspan=2 align=center><input type=submit value=Go></form></td>
</table>
<?php
$msconnect=odbc_connect("$dbname","$dbuser","$dbpass");
if(isset($_POST['namen']))
{
$IGN = trim($_POST['namen']);
$IGN = str_replace("\'","",$IGN);
$pass = trim($_POST['namen2']);
$pass = str_replace("\'","",$pass);
$ses=$_SESSION['sesuser'];
$ExistCheck = odbc_exec($msconnect, "SELECT COUNT(*) FROM userdata WHERE struserid = '$IGN'");
$msExistCheck = odbc_result($ExistCheck, 1);
if($msExistCheck<=0){
echo'<br><br>No Such Char Try Again<br><br>';
}else{
$getinfo="select strpasswd from tb_user where straccountid ='$ses'";
$msgetinfo = odbc_exec($msconnect , $getinfo) or die('error');
while (odbc_fetch_row($msgetinfo))
$pass_2 = odbc_result($msgetinfo, 1);
if ($pass != $pass_2) {
echo 'Wrong Password.';
} else {
$getinfo2="select struserid from userdata where struserid = '$IGN'";
$msgetinfo2 = odbc_exec($msconnect , $getinfo2) or die('error');
while (odbc_fetch_row($msgetinfo2))
$CoolNick = odbc_result($msgetinfo2, 1);
$GO="exec statduzelt $IGN";
$msresult=odbc_exec($msconnect,$GO) or die(odbc_error());
echo "Your Character $CoolNick has been RE-stated";
}}}
?>