i want to increase battle points from 100 to 500 but it doesnt increases.it remains 100 only after updating battle points.it also show that battle points updated successfully but they not increasing. anybody please help me in this error
PHP Code:
//////////////////////////////////////////Give GPs
else if($action=="batp")
{
addonline(getuid_sid($sid),"Giving Game Plusses","");
$who = $_GET["who"];
$ptg = $_POST["ptbp"];
$giv = $_POST["giv"];
echo "<head>";
echo "<title>$sitename</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
//$uid = getuid_sid($sid);
$judg = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_judges WHERE uid='".getuid_sid($sid)."'"));
$gpst = mysql_fetch_array(mysql_query("SELECT battlep FROM ibwf_users WHERE id='".$who."'"));
if(ismod(getuid_sid($sid))||$judg[0]>0)
{
if ($giv=="1")
{
$gpst = $gpst[0]+$ptg;
}else{
$gpst = $gpst[0]-$ptg;
if($gpst<0)$gpst=0;
}
$res = mysql_query("UPDATE ibwf_users SET battlep='".$gpst."' WHERE id='".$who."'");
if($res)
{
$vnick = getnick_uid($who);
if ($giv=="1")
{
$ms1 = " Added $ptg points to ";
}else{
$ms1 = " removed $ptg points from ";
}
mysql_query("INSERT INTO ibwf_mlog SET action='bpoints', details='<b>".getnick_uid(getuid_sid($sid))."</b> $ms1 $vnick', actdt='".time()."'");
echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Battle Points Updated Successfully<br/>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Database Error!<br/>";
}
}else{
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>You can't do this<br/>";
}
echo "<br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
echo "</body>";
}
Comment