Advertisement
Guest User

Untitled

a guest
Oct 24th, 2017
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.99 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 3.0.8.0
  8. * @ Author : DeZender
  9. * @ Release on : 25.09.2017
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function searchKeywords($url)
  15. {
  16. $parts = parse_url( $url );
  17. $host = ((isset( $parts['host'] ) ? str_replace( 'www.', '', $parts['host'] ) : ''));
  18. $keywords = '';
  19.  
  20. if (isset( $parts['query'] )) {
  21. parse_str( $parts['query'], $vars );
  22.  
  23. if (strpos( ' ' . $host, 'google' )) {
  24. $keywords = urldecode( $vars['q'] );
  25. }
  26. else if (strpos( ' ' . $host, 'yahoo' )) {
  27. $keywords = urldecode( $vars['p'] );
  28. }
  29. else if (strpos( ' ' . $host, 'live' )) {
  30. $keywords = urldecode( $vars['q'] );
  31. }
  32. else if ($vars['keywords']) {
  33. $keywords = urldecode( $vars['keywords'] );
  34. }
  35. else if ($vars['query']) {
  36. $keywords = urldecode( $vars['query'] );
  37. }
  38. else {
  39. $keywords = urldecode( $vars['q'] );
  40. }
  41. }
  42.  
  43. return $keywords;
  44. }
  45.  
  46. function showTemplate($filename)
  47. {
  48. global $sys_domain;
  49. global $sys_default_email;
  50. global $sys_paypal_primary;
  51. global $sys_support_address;
  52. global $sys_fraud_address;
  53. global $sys_script_folder;
  54. global $sys_template_folder;
  55. global $sys_item_name;
  56. global $sys_item_number;
  57. global $sys_item_cost;
  58. global $sys_item_percent;
  59. global $sys_oto;
  60. global $sys_oto_name;
  61. global $sys_oto_number;
  62. global $sys_oto_cost;
  63. global $sys_oto_percent;
  64. global $sys_expire_hours;
  65. global $sys_giveaway_product;
  66. global $sys_max_sales;
  67. $filename = $sys_template_folder . $filename;
  68. include $filename;
  69. }
  70.  
  71. function getIPSalesRecord($oto = false)
  72. {
  73. global $sys_template_folder;
  74. global $sys_oto_number;
  75. $ip = $_SERVER['REMOTE_ADDR'];
  76. $sales = @file( $sys_template_folder . 'ipn.txt' );
  77. $sales = array_reverse( $sales );
  78. $output = '';
  79.  
  80. foreach ($sales as $sale) {
  81. $sale = explode( '|', str_replace( array(
  82. "\r",
  83. "\n"
  84. ), '', $sale ) );
  85.  
  86. if ($sale[14] == $ip) {
  87. $valid = true;
  88. if ($oto && ($sale[2] != $sys_oto_number)) {
  89. $output = '';
  90. $valid = false;
  91. }
  92. if ($valid) {
  93. if (time( ) < $sale[9]) {
  94. $output = $sale;
  95. break;
  96. }
  97.  
  98. $output = '';
  99. }
  100. }
  101. }
  102.  
  103. return $output;
  104. }
  105.  
  106. function getOTOSalesRecord($affemail)
  107. {
  108. global $sys_template_folder;
  109. global $sys_oto_number;
  110. $sales = @file( $sys_template_folder . 'ipn.txt' );
  111. $output = '';
  112.  
  113. foreach ($sales as $sale) {
  114. while ($sale[4] == $affemail) {
  115. $sale = explode( '|', str_replace( array(
  116. "\r",
  117. "\n"
  118. ), '', $sale ) );
  119. $valid = true;
  120.  
  121. if ($sale[2] != $sys_oto_number) {
  122. $output = '';
  123. $valid = false;
  124. }
  125. if ($valid) {
  126. $output = $sale;
  127. break;
  128. }
  129. }
  130. }
  131.  
  132. return $output;
  133. }
  134.  
  135. function sys_download_url($oto)
  136. {
  137. $id = ((isset( $_GET['id'] ) ? $_GET['id'] : ''));
  138. $transaction = getTransaction( $id );
  139. return 'index.php?action=dlid&oto=' . $oto . '&id=' . $transaction['id'];
  140. }
  141.  
  142. function getPaymentEmail($itemnumber, $percent)
  143. {
  144. global $sys_template_folder;
  145. global $sys_default_email;
  146. global $sys_paypal_primary;
  147.  
  148. if (!(empty( $_COOKIE['aff'] ))) {
  149. $sales = @file( $sys_template_folder . 'ipn.txt' );
  150. $afftotal = 0;
  151. $affsales = 0;
  152.  
  153. foreach ($sales as $sale) {
  154. $sale = explode( '|', $sale );
  155.  
  156. if (($sale[2] == $itemnumber) && (strtolower( $sale[13] ) == strtolower( urldecode( $_COOKIE['aff'] ) ))) {
  157. ++$afftotal;
  158.  
  159. if ((strtolower( $sale[3] ) != $sys_default_email) && (strtolower( $sale[3] ) != $sys_paypal_primary)) {
  160. ++$affsales;
  161. }
  162. }
  163. }
  164.  
  165. if (0 < $afftotal) {
  166. $affper = ($affsales / $afftotal) * 100;
  167. }
  168. else {
  169. $affper = 0;
  170. }
  171.  
  172. if ((0 < $percent) && ($affper <= $percent)) {
  173. $email = urldecode( $_COOKIE['aff'] );
  174. }
  175. else {
  176. $email = $sys_default_email;
  177. }
  178.  
  179. return $email;
  180. }
  181.  
  182. return $sys_default_email;
  183. }
  184.  
  185. function getTransaction($id = '')
  186. {
  187. global $sys_domain;
  188. global $sys_script_folder;
  189. global $sys_template_folder;
  190. global $sys_item_number;
  191. global $sys_oto_number;
  192. global $sys_expire_hours;
  193. global $sys_giveaway_product;
  194. global $action;
  195. global $filename;
  196.  
  197. if ($id == '') {
  198. $id = ((isset( $_COOKIE['7ds_id'] ) && !(empty( $_COOKIE['7ds_id'] )) ? $_COOKIE['7ds_id'] : ''));
  199. $ip = $_SERVER['REMOTE_ADDR'];
  200. }
  201.  
  202. $transaction = array( );
  203. $transaction['id'] = '';
  204. $transaction['status'] = 'invalid';
  205. $transaction['oto'] = 0;
  206.  
  207. if (($id == '') && isset( $_COOKIE['giveaway'] ) && $sys_giveaway_product) {
  208. $transaction['status'] = 'valid';
  209. return $transaction;
  210. }
  211.  
  212. if (($id == '') && ($action == 'downloadoto')) {
  213. $oto = 1;
  214. }
  215. else {
  216. $oto = 0;
  217. }
  218.  
  219. $fh = @fopen( $sys_template_folder . 'ipn.txt', 'r' );
  220.  
  221. while ($rec = @fgets( $fh )) {
  222. $rec = str_replace( "\n", '', $rec );
  223.  
  224. if (trim( $rec )) {
  225. $record = explode( '|', $rec );
  226.  
  227. if ($id != '') {
  228. if ($record[0] == $id) {
  229. .......................................................
  230. ...........................
  231. ........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement