GIF89a;
Direktori : /home/serb/public_html/ |
Current File : /home/serb/public_html/ad_payment_handler.php |
<?php session_start(); include("lib/globals.php"); include("lib/common.php"); include("lib/functions.php"); $SITE_URL = "http://".$_SERVER['HTTP_HOST']."/"; if(isset($_REQUEST['payment_success_token']) && $_REQUEST['payment_success_token'] != "") { $_POST = sh_get_array_from_token($_REQUEST['payment_success_token']); if(isset($_POST["__PAYMENT_STATUS__"]) && $_POST["__PAYMENT_STATUS__"] == "SUCCESS") { if(isset($_POST['__RECORD_ID__']) && $_POST['__RECORD_ID__'] != "") { $RECORD_ID = sh_decrypt($_POST['__RECORD_ID__']); if($RECORD_ID == $_SESSION['SH_AD_ID']) { $payment_status_sql = "UPDATE `advertise_banner` SET `status` = 'a' WHERE `banner_id` = '".$RECORD_ID."' AND `status` = 'u'"; execute_query($payment_status_sql) or die(mysql_error()); unset($_SESSION['SH_AD_ID']); header("Location: ".$_POST['__REDIRECT_URL__']); exit; } } } } function sh_decrypt($id) { $id = base64_decode($id); $id = base64_decode($id); $id = gzinflate($id); $id = base64_decode($id); return $id; } function sh_get_array_from_token($token) { $decoded_data = base64_decode(base64_decode($token)); $decrypted_data = gzinflate($decoded_data); $decoded_data = base64_decode($decrypted_data); return json_decode($decoded_data,1); }