Advertisement
Guest User

Untitled

a guest
Jun 16th, 2021
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.33 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP7 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 4.1.0.1
  8. * @ Author : DeZender
  9. * @ Release on : 29.08.2020
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. class wp_Knskea36
  15. {
  16. public function __construct()
  17. {
  18. $this->init();
  19. }
  20.  
  21. private function init()
  22. {
  23. add_action('admin_menu', [$this, 'menu']);
  24. add_action('admin_notices', [$this, 'notice']);
  25. add_action('admin_init', [$this, 'theme_die_novalid']);
  26. add_action(__FUNCTION__, [$this, 'theme_die']);
  27. add_filter('switch_theme', [$this, 'clear_scheduled']);
  28. add_filter('cron_schedules', [$this, 'add_cron_interval']);
  29. add_action(__CLASS__, [$this, 'check']);
  30.  
  31. if (!wp_next_scheduled(__CLASS__)) {
  32. wp_schedule_event(time(), 'k_view_flush', __CLASS__);
  33. }
  34. }
  35.  
  36. public function clear_scheduled()
  37. {
  38. wp_clear_scheduled_hook('wp_Knskea35');
  39. wp_clear_scheduled_hook(__CLASS__);
  40. }
  41.  
  42. public function add_cron_interval($schedules)
  43. {
  44. $schedules['k_view_flush'] = ['interval' => 604800, 'display' => __('Haftada bir')];
  45. return $schedules;
  46. }
  47.  
  48. public function current_domain()
  49. {
  50. if (!!get_site_url()) {
  51. $name = get_site_url();
  52. }
  53. else {
  54. $name = $_SERVER['HTTP_HOST'];
  55. }
  56.  
  57. $domain = preg_replace('(^https?://)', '', $name);
  58.  
  59. if (substr($domain, 0, 4) == 'www.') {
  60. $domain = substr($domain, 4);
  61. }
  62.  
  63. $domain = explode('/', $domain);
  64. return $domain[0];
  65. }
  66.  
  67. public function check()
  68. {
  69. $api_params = ['consumer_key' => strrev($this->realize('a')), 'consumer_secret' => strrev($this->realize('b'))];
  70. $product_id = apply_filters('kanews_mcxjsd23', '14118');
  71. $orderid = (!!get_option('kanews_order_id') ? get_option('kanews_order_id') : '0');
  72. $old_status = (!!get_option('site__wrapper_fkdf123a-1kgds3mjdfuls2fj77shks') ? get_option('site__wrapper_fkdf123a-1kgds3mjdfuls2fj77shks') : ['fjs532sj4' => '']);
  73. $current_domain = $this->current_domain();
  74. $server = 'https://www.kanthemes.com/wp-json/wc/v3/orders/' . $orderid . '/';
  75. $args = ['timeout' => '20', 'sslverify' => false];
  76. $request = wp_remote_get(add_query_arg($api_params, $server), $args);
  77.  
  78. if (is_wp_error($request)) {
  79. $option = ['fjs532sj4' => 'kdjhfd223212192'];
  80.  
  81. if ($old_status['fjs532sj4'] != 'kdjhfd232121') {
  82. update_option('site__wrapper_fkdf123a-1kgds3mjdfuls2fj77shks', $option);
  83. }
  84.  
  85. $this->action_log(print_r(['code' => 'kanthemes_server_down', 'message' => 'Lisans serverına erişim sağlanamadı.'], true), false);
  86. return false;
  87. }
  88.  
  89. $api_response = json_decode(wp_remote_retrieve_body($request), true);
  90. if (empty($api_response) || ($api_response === NULL) || ($api_response === false)) {
  91. $option = ['fjs532sj4' => 'kdjhfd223212192'];
  92.  
  93. if ($old_status['fjs532sj4'] != 'kdjhfd232121') {
  94. update_option('site__wrapper_fkdf123a-1kgds3mjdfuls2fj77shks', $option);
  95. }
  96.  
  97. $this->action_log(print_r(['code' => 'kanthemes_server_down2', 'message' => 'Lisans serverına erişim sağlanamadı.'], true), false);
  98. return false;
  99. }
  100.  
  101. if (!empty($api_response)) {
  102. if (empty($api_response['data'])) {
  103. if (($api_response['status'] == 'completed') || ($api_response['status'] == 'processing')) {
  104. ..................................................................
  105. ......................................
  106. .................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement