GIF89a;
| Direktori : /home/serb/www/ |
| Current File : /home/serb/www/upgrdpayment_process.php |
<?
session_start();
include("lib/globals.php");
include("lib/common.php");
include("lib/functions.php");
?>
<?
if($_POST)
{
$date=date('Y-m-d');
$no_ofweek=$_POST['prmadPrice'];
$sql_adprice="SELECT * FROM premium_ad_price WHERE no_of_weeks='$no_ofweek'";
$res_adprice=execute_query($sql_adprice);
$row_adprice=mysql_fetch_array($res_adprice);
$adprice=$row_adprice['ad_price'];
$premium_ads='Yes';
$noofdays=explode(' ',$no_ofweek);
$daay=$noofdays[0];
$expiry = date("Y-m-d", time() + $daay*24*60*60 );
$sql_update="UPDATE escort_details SET ft_ad_day='$no_ofweek',ft_ad_expair='$expiry',ft_ad_price='$adprice',ft_ad_status='Yes' WHERE user_id='".$_GET['userid']."'";
execute_query($sql_update);
$sql_email="SELECT * FROM user_info WHERE userid='".$_GET['userid']."'";
$res_email=execute_query($sql_email);
$row_email=mysql_fetch_array($res_email);
$sql_postid="SELECT * FROM escort_details where user_id='".$_GET['userid']."'";
$res_postid=execute_query($sql_postid);
$row_postid=mysql_fetch_array($res_postid);
$_SESSION['SH_ESCORT_ID'] = $row_postid['id'];
$plain_txt = $_POST['cridNo'];
//$encrypted_txt = encrypt_decrypt('encrypt', $plain_txt);
$encrypted_txt =base64_encode($plain_txt);
$expdate=$_POST['expMonth'].'/'.$_POST['year'];
$sql="INSERT INTO payment_dtls(id,post_id,fname,lname,email,address,zipcode,city,state,exp_date,creditcard_no,cvc_code,amount,status) VALUES ('','".$row_postid['id']."','".$_POST['fName']."','".$_POST['lstName']."','".$row_email['email']."','".$_POST['locDtls']."','".$_POST['zipCode']."','".$_POST['city']."','".$_POST['state']."','$expdate','$encrypted_txt','".$_POST['scCode']."','$adprice','u')";
execute_query($sql);
?>
<script language="javascript">
/*alert("Your ad has been posted, and will be viewable soon.");*/
location.href="upgrade_pay.php";
</script>
<?
}
?>