Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for ionCube Encoder)
- *
- * @ Version : 4.1.0.1
- * @ Author : DeZender
- * @ Release on : 29.08.2020
- * @ Official site : http://DeZender.Net
- *
- */
- class wp_Knskea36
- {
- public function __construct()
- {
- $this->init();
- }
- private function init()
- {
- add_action('admin_menu', [$this, 'menu']);
- add_action('admin_notices', [$this, 'notice']);
- add_action('admin_init', [$this, 'theme_die_novalid']);
- add_action(__FUNCTION__, [$this, 'theme_die']);
- add_filter('switch_theme', [$this, 'clear_scheduled']);
- add_filter('cron_schedules', [$this, 'add_cron_interval']);
- add_action(__CLASS__, [$this, 'check']);
- if (!wp_next_scheduled(__CLASS__)) {
- wp_schedule_event(time(), 'k_view_flush', __CLASS__);
- }
- }
- public function clear_scheduled()
- {
- wp_clear_scheduled_hook('wp_Knskea35');
- wp_clear_scheduled_hook(__CLASS__);
- }
- public function add_cron_interval($schedules)
- {
- $schedules['k_view_flush'] = ['interval' => 604800, 'display' => __('Haftada bir')];
- return $schedules;
- }
- public function current_domain()
- {
- if (!!get_site_url()) {
- $name = get_site_url();
- }
- else {
- $name = $_SERVER['HTTP_HOST'];
- }
- $domain = preg_replace('(^https?://)', '', $name);
- if (substr($domain, 0, 4) == 'www.') {
- $domain = substr($domain, 4);
- }
- $domain = explode('/', $domain);
- return $domain[0];
- }
- public function check()
- {
- $api_params = ['consumer_key' => strrev($this->realize('a')), 'consumer_secret' => strrev($this->realize('b'))];
- $product_id = apply_filters('kanews_mcxjsd23', '14118');
- $orderid = (!!get_option('kanews_order_id') ? get_option('kanews_order_id') : '0');
- $old_status = (!!get_option('site__wrapper_fkdf123a-1kgds3mjdfuls2fj77shks') ? get_option('site__wrapper_fkdf123a-1kgds3mjdfuls2fj77shks') : ['fjs532sj4' => '']);
- $current_domain = $this->current_domain();
- $server = 'https://www.kanthemes.com/wp-json/wc/v3/orders/' . $orderid . '/';
- $args = ['timeout' => '20', 'sslverify' => false];
- $request = wp_remote_get(add_query_arg($api_params, $server), $args);
- if (is_wp_error($request)) {
- $option = ['fjs532sj4' => 'kdjhfd223212192'];
- if ($old_status['fjs532sj4'] != 'kdjhfd232121') {
- update_option('site__wrapper_fkdf123a-1kgds3mjdfuls2fj77shks', $option);
- }
- $this->action_log(print_r(['code' => 'kanthemes_server_down', 'message' => 'Lisans serverına erişim sağlanamadı.'], true), false);
- return false;
- }
- $api_response = json_decode(wp_remote_retrieve_body($request), true);
- if (empty($api_response) || ($api_response === NULL) || ($api_response === false)) {
- $option = ['fjs532sj4' => 'kdjhfd223212192'];
- if ($old_status['fjs532sj4'] != 'kdjhfd232121') {
- update_option('site__wrapper_fkdf123a-1kgds3mjdfuls2fj77shks', $option);
- }
- $this->action_log(print_r(['code' => 'kanthemes_server_down2', 'message' => 'Lisans serverına erişim sağlanamadı.'], true), false);
- return false;
- }
- if (!empty($api_response)) {
- if (empty($api_response['data'])) {
- if (($api_response['status'] == 'completed') || ($api_response['status'] == 'processing')) {
- ..................................................................
- ......................................
- .................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement