Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 3.0.8.0
- * @ Author : DeZender
- * @ Release on : 25.09.2017
- * @ Official site : http://DeZender.Net
- *
- */
- function searchKeywords($url)
- {
- $parts = parse_url( $url );
- $host = ((isset( $parts['host'] ) ? str_replace( 'www.', '', $parts['host'] ) : ''));
- $keywords = '';
- if (isset( $parts['query'] )) {
- parse_str( $parts['query'], $vars );
- if (strpos( ' ' . $host, 'google' )) {
- $keywords = urldecode( $vars['q'] );
- }
- else if (strpos( ' ' . $host, 'yahoo' )) {
- $keywords = urldecode( $vars['p'] );
- }
- else if (strpos( ' ' . $host, 'live' )) {
- $keywords = urldecode( $vars['q'] );
- }
- else if ($vars['keywords']) {
- $keywords = urldecode( $vars['keywords'] );
- }
- else if ($vars['query']) {
- $keywords = urldecode( $vars['query'] );
- }
- else {
- $keywords = urldecode( $vars['q'] );
- }
- }
- return $keywords;
- }
- function showTemplate($filename)
- {
- global $sys_domain;
- global $sys_default_email;
- global $sys_paypal_primary;
- global $sys_support_address;
- global $sys_fraud_address;
- global $sys_script_folder;
- global $sys_template_folder;
- global $sys_item_name;
- global $sys_item_number;
- global $sys_item_cost;
- global $sys_item_percent;
- global $sys_oto;
- global $sys_oto_name;
- global $sys_oto_number;
- global $sys_oto_cost;
- global $sys_oto_percent;
- global $sys_expire_hours;
- global $sys_giveaway_product;
- global $sys_max_sales;
- $filename = $sys_template_folder . $filename;
- include $filename;
- }
- function getIPSalesRecord($oto = false)
- {
- global $sys_template_folder;
- global $sys_oto_number;
- $ip = $_SERVER['REMOTE_ADDR'];
- $sales = @file( $sys_template_folder . 'ipn.txt' );
- $sales = array_reverse( $sales );
- $output = '';
- foreach ($sales as $sale) {
- $sale = explode( '|', str_replace( array(
- "\r",
- "\n"
- ), '', $sale ) );
- if ($sale[14] == $ip) {
- $valid = true;
- if ($oto && ($sale[2] != $sys_oto_number)) {
- $output = '';
- $valid = false;
- }
- if ($valid) {
- if (time( ) < $sale[9]) {
- $output = $sale;
- break;
- }
- $output = '';
- }
- }
- }
- return $output;
- }
- function getOTOSalesRecord($affemail)
- {
- global $sys_template_folder;
- global $sys_oto_number;
- $sales = @file( $sys_template_folder . 'ipn.txt' );
- $output = '';
- foreach ($sales as $sale) {
- while ($sale[4] == $affemail) {
- $sale = explode( '|', str_replace( array(
- "\r",
- "\n"
- ), '', $sale ) );
- $valid = true;
- if ($sale[2] != $sys_oto_number) {
- $output = '';
- $valid = false;
- }
- if ($valid) {
- $output = $sale;
- break;
- }
- }
- }
- return $output;
- }
- function sys_download_url($oto)
- {
- $id = ((isset( $_GET['id'] ) ? $_GET['id'] : ''));
- $transaction = getTransaction( $id );
- return 'index.php?action=dlid&oto=' . $oto . '&id=' . $transaction['id'];
- }
- function getPaymentEmail($itemnumber, $percent)
- {
- global $sys_template_folder;
- global $sys_default_email;
- global $sys_paypal_primary;
- if (!(empty( $_COOKIE['aff'] ))) {
- $sales = @file( $sys_template_folder . 'ipn.txt' );
- $afftotal = 0;
- $affsales = 0;
- foreach ($sales as $sale) {
- $sale = explode( '|', $sale );
- if (($sale[2] == $itemnumber) && (strtolower( $sale[13] ) == strtolower( urldecode( $_COOKIE['aff'] ) ))) {
- ++$afftotal;
- if ((strtolower( $sale[3] ) != $sys_default_email) && (strtolower( $sale[3] ) != $sys_paypal_primary)) {
- ++$affsales;
- }
- }
- }
- if (0 < $afftotal) {
- $affper = ($affsales / $afftotal) * 100;
- }
- else {
- $affper = 0;
- }
- if ((0 < $percent) && ($affper <= $percent)) {
- $email = urldecode( $_COOKIE['aff'] );
- }
- else {
- $email = $sys_default_email;
- }
- return $email;
- }
- return $sys_default_email;
- }
- function getTransaction($id = '')
- {
- global $sys_domain;
- global $sys_script_folder;
- global $sys_template_folder;
- global $sys_item_number;
- global $sys_oto_number;
- global $sys_expire_hours;
- global $sys_giveaway_product;
- global $action;
- global $filename;
- if ($id == '') {
- $id = ((isset( $_COOKIE['7ds_id'] ) && !(empty( $_COOKIE['7ds_id'] )) ? $_COOKIE['7ds_id'] : ''));
- $ip = $_SERVER['REMOTE_ADDR'];
- }
- $transaction = array( );
- $transaction['id'] = '';
- $transaction['status'] = 'invalid';
- $transaction['oto'] = 0;
- if (($id == '') && isset( $_COOKIE['giveaway'] ) && $sys_giveaway_product) {
- $transaction['status'] = 'valid';
- return $transaction;
- }
- if (($id == '') && ($action == 'downloadoto')) {
- $oto = 1;
- }
- else {
- $oto = 0;
- }
- $fh = @fopen( $sys_template_folder . 'ipn.txt', 'r' );
- while ($rec = @fgets( $fh )) {
- $rec = str_replace( "\n", '', $rec );
- if (trim( $rec )) {
- $record = explode( '|', $rec );
- if ($id != '') {
- if ($record[0] == $id) {
- .......................................................
- ...........................
- ........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement