GIF89a;
Direktori : /home/serb/www/ |
Current File : /home/serb/www/reject-post.php |
<? session_start(); if(!($_SESSION['authislogin'])) { ?> <script language="javascript"> location.href="index.php"; </script> <? } include("lib/globals.php"); include("lib/common.php"); include("lib/functions.php"); $page="my_account"; $id=$_GET['id']; ?> <? include "includes/header_top.php";?> <script language="javascript"> function validate() { if (document.rejectfrm.reject_type.value=="" ) { alert("Select Your Reject type"); document.rejectfrm.reject_type.focus(); return false; } } </script> <? if($_POST) { $sql_escort="SELECT * FROM escort_details WHERE id='".$_GET['id']."'"; $res_escort=execute_query($sql_escort); $row_escort=mysql_fetch_array($res_escort); $sql_username="SELECT * FROM user_info WHERE userid='".$row_escort['user_id']."'"; $res_username=execute_query($sql_username); $row_username=mysql_fetch_array($res_username); $deltmsg_sql="SELECT * FROM delete_message WHERE del_category='".$_POST['reject_type']."'"; $res_delmsg=execute_query($deltmsg_sql); $row_delmsg=mysql_fetch_array($res_delmsg); $aditionaltext=addslashes($_POST['additional']); $to=$row_escort['email']; $subject="Your Ad is Rejected"; $bycontan=$row_delmsg['contain'].'. '.$aditionaltext; //$from="escortservice.org@p3189889.pubip.peer1.net"; //mail($to, $subject, $body, $from); $body="<html> <head> <title>Ad is Rejected</title> </head> <body> <table style='padding:10px; color:#000;'> <tr><th></th></tr> <tr><td><br/></td></tr> <tr> <td>Your Ad is rejected</td> </tr> <tr> <td>Below You will find your the Reason</td> </tr> <tr> <td>Description:".$bycontan."</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"; sendEmail($to, $subject, $body); //mail($to, $subject, $body, $headers); $del_sq="DELETE from escort_details where id='".$_GET['id']."'"; execute_query($del_sq); /* $del_sq="DELETE from escort_details where id='".$_GET['id']."'"; execute_query($del_sq); $del_userid="delete from user_info where userid='".$row_escort['user_id']."'"; execute_query($del_userid);*/ $del_photo="delete from escort_photo where postid='".$_GET['id']."'"; execute_query($del_photo); $sql_twdelete="delete from tweet where postid='".$_GET['id']."'"; execute_query($sql_twdelete); $del_userid="delete from user_info where userid='".$row_escort['user_id']."'"; execute_query($del_userid); ?> <script language="javascript"> location.href="reject-post.php?msg=success"; </script> <? } ?> <body> <? include "includes/header.php";?> <div class="main_bg"> <div style="height:32px;"></div> <div style="width:1000px; margin:0 auto;"> <div class="statedetails"> <div class="stdtls_header"> <span style="color:#000;">Reject Post Ad </div> <div class="stdtls_midder"> <div style="height:10px;"></div> <div style=" width:950px; margin:0 auto; font-family:'Open Sans',sans-serif; font-size:14px; color:#000;"> <div style="width:500px; margin:0 auto; height:350px;"> <? if($_GET['msg']=="success"){ ?> <p style="font:bold 16px/20px 'Open Sans',sans-serif; color:#527750; text-align:center; padding:10px 0;">You have successfully Deleted This Ad.</p> <? } ?> <form action="<?=$_SERVER['PHP_SELF'];?>?id=<?=$_GET['id']?>" method="post" enctype="multipart/form-data" name="rejectfrm" onSubmit="return validate();"> <input name="submit_form" value="1" type="hidden"> <table border="0" cellpadding="0" cellspacing="0" align="center" width="100%"> <tr> <td style="font-size:18px; color:#333333;" colspan="2">Reject Type:</td> <td > <select id="reject_type" class="drp_img3" name="reject_type"> <option value="">- Select -</option> <option value="001" >001-Identification </option> <option value="002" >002-Inappropriate content</option> <option value="003">003-Other</option> </select> </td> </tr> <tr height="10"></tr> <tr> <td style="font-size:18px; color:#333333;" colspan="2">Additional Explanation:</td> <td> <textarea name="additional" class="main_input" style="width:240px !important; height:180px !important;"></textarea> </td> </tr> <tr height="25"> </tr> <tr> <td></td> <td></td> <td style="text-align:center;"> <input type="image" src="images/submit.png" /> </td> </tr> </table> </form> </div> </div> </div> <div class="stdtls_footer"></div> </div> <br class="spacer" /> </div> <br/> </div> <? include "includes/footer.php";?>