GIF89a;
| Direktori : /home/serb/www/ |
| Current File : /home/serb/www/favioritescort-process.php |
<? session_start();
include("lib/globals.php");
include("lib/common.php");
include("lib/functions.php");
?>
<?
$postid=$_GET['estid'];
$sql_flw="select * from faviorites_escorts where postid='$postid' AND follower_id='".$_SESSION['userid']."'";
$res_flw=execute_query($sql_flw);
$num_flw=mysql_num_rows($res_flw);
if($num_flw>0)
{
$sql_escort="SELECT * FROM escort_details where id='$postid'";
$res_escort=execute_query($sql_escort);
$row_escort=mysql_fetch_array($res_escort);
?>
<script language="javascript">
alert('You have already Faviorit this escort');
location.href="escort-service-dtls.php?name=<?=$row_escort['nickname']?>&phone=<?=$row_escort['tel_national']?>&cityname=<?=$row_escort['escort_city']?>";
</script>
<?
}
else
{
$sql_escort="SELECT * FROM escort_details where id='$postid'";
$res_escort=execute_query($sql_escort);
$row_escort=mysql_fetch_array($res_escort);
$userid=$row_escort['user_id'];;
$fwid=$_SESSION['userid'];
$inser_query="INSERT into faviorites_escorts(id,postid,userid,follower_id)VALUES('','$postid','$userid','$fwid')";
execute_query($inser_query);
?>
<script language="javascript">
location.href="escort-service-dtls.php?name=<?=$row_escort['nickname']?>&phone=<?=$row_escort['tel_national']?>&cityname=<?=$row_escort['escort_city']?>";
</script>
<?
}
?>