GIF89a;
| Direktori : /home/serb/www/m/admin/ |
| Current File : /home/serb/www/m/admin/update_postad.php |
<?
include("sessionout.php");
include("../lib/globals.php");
include("../lib/common.php");
include("../lib/functions.php");
?>
<?
$id=$_GET['id'];
$sql="SELECT * FROM escort_details WHERE id='$id'";
$res=execute_query($sql);
$row=mysql_fetch_array($res);
$status=$row['status'];
if($status=='a')
{
$newstatus='u';
}
else
{
$newstatus='a';
}
$sql2="UPDATE escort_details SET status='$newstatus' WHERE id='$id'";
execute_query($sql2);
if($newstatus=='a')
{
$sql_email="select * from escort_details where id='$id'";
$res_email=execute_query($sql_email);
$row_email=mysql_fetch_array($res_email);
$to = $row_email['email'];
// $to = "subhrajyoti.mca11@gmail.com";
$subject="Welcome to Escortservice.org";
$body="Welcome to escortservice.org. Your Ad is live now";
$headers = 'From: escortservice<support@escortservice.org>' . "\r\n" .
'Reply-To: support@escortservice.org' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $body, $headers);
}
?>
<script language="javascript">
location.href="list_post_ad.php";
</script>