Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.12 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Loader)
  6. *
  7. * @ Version : 2.0.0.4
  8. * @ Author : DeZender
  9. * @ Release on : 21.10.2015
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function this_template_install_lcn() {
  15.  
  16. if (isset($_SERVER["HTTP_CF_CONNECTING_IP"]))
  17. {
  18. $_SERVER["REMOTE_ADDR"] = $_SERVER["HTTP_CF_CONNECTING_IP"];
  19. }
  20. $ioncube_ver = function_exists("ioncube_loader_version") ? (ioncube_loader_version()) : "none";
  21. $url = API_LINK . "/validate";
  22. $post_data = array("product" => PRODUCT_SLUG, "license" => LICENSE_KEY, "hash" => HASH_CODE, "version" => THEME_VERSION, "domain" => $_SERVER["HTTP_HOST"], "wp_url" => get_option("siteurl"), "wpemail" => get_option("admin_email"), "userip" => $_SERVER["REMOTE_ADDR"], "setupdir" => $_SERVER["SCRIPT_FILENAME"], "software" => $_SERVER["SERVER_SOFTWARE"], "serverip" => $_SERVER["SERVER_ADDR"], "php_ver" => PHP_VERSION, "php_major_ver" => PHP_MAJOR_VERSION, "ioncube_ver" => $ioncube_ver);
  23. $lcn_details = wp_safe_remote_post($url, array("body" => $post_data));
  24. if (!is_wp_error($lcn_details))
  25. {
  26. if (isset($lcn_details["response"]["code"]) && $lcn_details["response"]["code"] == 200)
  27. {
  28. $lcn_data = json_decode($lcn_details["body"]);
  29. if (isset($lcn_data->response_code) && $lcn_data->response_code == 200)
  30. {
  31. update_option(DB_PREFIX . "_lcn_data", serialize($lcn_data));
  32. update_option(DB_PREFIX . "TimeChecker", time());
  33. update_option(DB_PREFIX . "_validation_request_message", "success");
  34. return null;
  35. }
  36. update_option(DB_PREFIX . "_validation_request_message", $lcn_data);
  37. return null;
  38. }
  39. update_option(DB_PREFIX . "_validation_request_message", $lcn_details["response"]);
  40. return null;
  41. }
  42. update_option(DB_PREFIX . "_validation_request_message", $lcn_details->get_error_message());
  43. return;
  44. }
  45.  
  46. function this_template_uninstall() {
  47.  
  48. delete_option(DB_PREFIX . "_lcn_data");
  49. delete_option(DB_PREFIX . "TimeChecker");
  50. update_option(DB_PREFIX . "_validation_request_message");
  51. return;
  52. }
  53.  
  54. function validate_license_hourly() {
  55.  
  56. $timeChecker = get_option(DB_PREFIX . "TimeChecker");
  57. if ($timeChecker && !empty($timeChecker))
  58. {
  59. if (3600 < time() - $timeChecker)
  60. {
  61. this_template_install_lcn();
  62. return null;
  63. }
  64. }
  65. this_template_install_lcn();
  66. return;
  67. }
  68.  
  69. function force_validate_license() {
  70.  
  71. if (isset($_GET["lcnAction"]) && $_GET["lcnAction"] == "forceValidate")
  72. {
  73. $obj = new stdClass();
  74. if (isset($_POST["forceCode"]) && $_POST["forceCode"] == hash("sha256", LICENSE_KEY . HASH_CODE))
  75. {
  76. this_template_uninstall();
  77. this_template_install_lcn();
  78. $obj->result = "success";
  79. $obj->message = "License Validated";
  80. echo json_encode($obj, JSON_PRETTY_PRINT);
  81. }
  82. else
  83. {
  84. $obj->result = "error";
  85. $obj->message = "Invalid Security Code";
  86. echo json_encode($obj, JSON_PRETTY_PRINT);
  87. }
  88. exit();
  89. }
  90. return;
  91. }
  92.  
  93. function this_template_validate_js() {
  94.  
  95. wp_register_script("my_ajax_script", get_bloginfo("template_directory") . "/js/validate.js", array("jquery"));
  96. wp_localize_script("my_ajax_script", "myAjax", array("ajaxurl" => admin_url("admin-ajax.php")));
  97. wp_enqueue_script("my_ajax_script");
  98. return;
  99. }
  100.  
  101. function my_ajax() {
  102.  
  103. this_template_install_lcn();
  104. return;
  105. }
  106.  
  107. function deactivate_license() {
  108.  
  109. echo "<style type=\"text/css\">
  110. html, body, div, span, applet, object, iframe, figure,h1, h2, h3, h4, h5, h6, p, blockquote, pre,a, abbr, acronym, address, big, cite, code,del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var,b, u, i, center, dl, dt, dd, ol, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent;}
  111. html{padding-top: 32px;}
  112. .clearfix::after { clear: both; content: \"\"; display: block; }
  113. body { background-color: #EEEEEE; font: normal 13px/1.5 tahoma; }
  114. ...............................................................................
  115. .............................................
  116. ...............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement