Guys pls do fix this out..It is working but the problem is when you clear the lucky9 challenge and its your turn it prompts the message something like this one.
You Cannot Clear The Challenge When Its Your Turn!!Lucky9 Challenge Cleared Successfully.
instead of "You cannot clear the challenge when its your turn" only
heres the code of lucky9 clear challenge..
when you clear the challenge the challenge still cleared even it is your turn, pls guys help me to fix it,thanks a lot in advance.!
You Cannot Clear The Challenge When Its Your Turn!!Lucky9 Challenge Cleared Successfully.
instead of "You cannot clear the challenge when its your turn" only
heres the code of lucky9 clear challenge..
PHP Code:
}else if ($do=="clucky9")
{
echo "<head>";
echo "<title>Lucky9</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"$theme[0]\"/>";
echo "</head>";
addonline($uid,"Chatting at Lucky9","index.php?do=chat");
echo "<div align=\"center\"><div class=\"head\">Clear Challenge</div>";
echo "<br/>";
$isgame = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_lucky9 WHERE chatter='".$uid."'"));
if($isgame[0]>=1)
{
$sino = mysql_fetch_array(mysql_query("SELECT time, accepted, time2 FROM ibwf_lucky9 WHERE chatter='".$uid."'"));
if($sino[1]=='1')
{
$shtfl = $sino[0]+120;
}else if($sino[1]=='2')
{
echo "You cannot clear the challenge if its your turn!";
}else if($sino[1]=='3')
{
$shtfl = $sino[2]+120;
}
$tm = time();
if($shtfl<$tm)
{
$res = mysql_query("DELETE FROM ibwf_lucky9 WHERE chatter='".$uid."'");
if($res)
{
echo "Lucky9 challenge cleared successfully";
}else{
echo "Database Error!";
}
}else{
$tm = time();
$rema = $shtfl - $tm;
$num = $rema/86400;
$days = intval($num);
$num2 = ($num - $days)*24;
$hours = intval($num2);
$num3 = ($num2 - $hours)*60;
$mins = intval($num3);
$num4 = ($num3 - $mins)*500;
$secs = intval($num4);
echo "Please wait after ";
if($mins==6)
{
echo $secs."s.";
}else if(($days==0) and ($hours==0))
{
echo $mins."min(s), ";
echo $secs."s.";
}
}
}else{
echo "You Are Not In Game!";
}
echo "<br/><br/><a href=\"chat.php?sid=$sid&rid=$rid&rpw=&time=".time()."\">Back To Room</a><br/>";
echo "<a href=\"index.php?do=chat&sid=$sid\">Chatrooms</a> <a href=\"index.php?do=forums&sid=$sid\">Forums</a> <a href=\"index.php?do=main&sid=$sid\">Home</a>";
echo "<div class=\"foot\">PinoyGsm.Net</div>";
echo "<br/>Page Took ";
$load = microtime();
print (number_format($load,2));
echo " Seconds";
echo "</div>";
echo "</body>";
Comment