Code:
////////////////////
else if($action=="thank")
{
$thank= mysql_real_escape_string( $_REQUEST["thank"] );
$who = mysql_real_escape_string( $_REQUEST["who"] );
addonline(getuid_sid($sid),"thanking a member","");
if ($uid==$who)
{
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\">";
echo "You Cant thank yourself silly <br/>";
echo "</p></body></html>";
exit();
}
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\">";
$tha = mysql_fetch_array(mysql_query("SELECT thank FROM dave_users WHERE id='".$uid."'"));
$tha = $tha[0]+1;
mysql_query("UPDATE dave_users SET thank='".$tha."' WHERE id='".$uid."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"o\"/> thanked successfully<br/>";
}else {
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>You have thanked this user before<br/>";
}
echo "<br/><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></body>";
}
prob something simple but am shattered .
Comment