Hello, I this script after exchanging is changing OnlineHours to <NULL> and now when im ingame it's also <NULL> and I can't exchange anymore hours.
Can someone edit this script to change hours to 0, not <NULL>, please
Can someone edit this script to change hours to 0, not <NULL>, please
function online_hours()
{
global $resethours;
$character = secure($_POST['character']);
$account = secure($_POST['login']);
$password = secure($_POST['password']);
check_inject();
$query = mssql_query("Select memb___id,OnlineHours,ConnectTM,DisConnectTM from MEMB_STAT where memb___id='$account'");
$row = mssql_fetch_row($query);
$querypass = mssql_query("Select memb___id,memb__pwd,memb_name,bloc_code,vip From MEMB_INFO where memb___id='$account' and memb__pwd='$password'");
$char = mssql_fetch_row($querypass);
$queryonline = mssql_query("Select * from MEMB_STAT where memb___id='$account' and connectstat='1'");
$onlinecheck = mssql_num_rows($queryonline);
if($account != $char[0] || $password != $char[1]) { echo"<font color='orange'>Your $char[0] Account or PASSWORD is not correct!</font><br>"; $error=1; }
else
{
if($error != 1) {
$onhourss = $char[3];
$creditshourss = $row[1] * 5;
if($row[1] <= 0) { echo"<font color='orange'>Account <font color=green>$account</font> must have<font color=green> minimum 1 Online hour in game</font> !</font></font><br>"; $error=2;}
if($onlinecheck >= 1) { echo"<font color='red'>Account $account is online !<br></font><font color=orange> Please LogOff First!</font><br>"; $error=2;}
else
{
if($error != 2)
{
echo"<font color='green'>All the hours spent in game were removed and you earned <font color=orange>$creditshourss </font> <font color=green>credits !</font><br>";
$a = mssql_query("DELETE FROM MEMB_STAT Where memb___id='$account'");
$b = mssql_query("Update MEMB_CREDITS set credits = credits+$creditshourss WHERE memb___id='$account'");
}
}
}
}
}