Hello,
i need Help at anti Food on Shout and GuestBook.
i tryed at Shout bt it didnt work.
here the Code:
i need Help at anti Food on Shout and GuestBook.
i tryed at Shout bt it didnt work.
here the Code:
PHP Code:
//////////////////////////////////////////shout
else if($action=="shout")
{
$shtxt = $_POST["shtxt"];
addonline(getuid_sid($sid),"Shouting","");
$pstyle = gettheme($sid);
echo xhtmlhead("Shout",$pstyle);
echo "<p align=\"center\">";
if(getplusses(getuid_sid($sid))<75)
{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>You should have at least 75 plusses to shout!";
}
$whonick = getnick_uid($who);
$shtm = time();
$lastst = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_shouts WHERE id='".$uid."'"));
$stfl = $lastst[0]+getpmaf();
if($byuid==1)$stfl=0;
if($stfl>$shtm)
{
$rema = $stfl - $shtm;
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>";
echo "Flood control: $rema Seconds<br/><br/>";
}
else{
$shtxt = $shtxt;
//$uid = getuid_sid($sid);
$shtm = time();
$res = mysql_query("INSERT INTO ibwf_shouts SET shout='".$shtxt."', shouter='".$uid."', shtime='".$shtm."'");
if($res)
{
$shts = mysql_fetch_array(mysql_query("SELECT shouts from ibwf_users WHERE id='".$uid."'"));
$shts = $shts[0]+1;
mysql_query("UPDATE ibwf_users SET shouts='".$shts."' WHERE id='".$uid."'");
$cow = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
$cow = $cow[0]-3;
mysql_query("UPDATE ibwf_users SET plusses='".$cow."' WHERE id='".$uid."'");
echo "3 plusses have been deducted";
echo "<br/>";
echo "<img src=\"images/ok.gif\" alt=\"O\"/>Shout added successfully";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
}
}
echo "<br/><br/><a href=\"index.php?action=main\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo xhtmlfoot();
exit();
}
Comment