403Webshell
Server IP : 38.190.208.107  /  Your IP : 216.73.217.46
Web Server : nginx/1.28.1
System : Linux ht2026040333114 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.37-1 (2023-07-03) x86_64
User : root ( 0)
PHP Version : 8.2.28
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv,eval,assert,passthru,system,exec,shell_exec,popen,proc_open
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /www/wwwroot/test20.chuangfenglink.xyz/wp-content/plugins/chatway-live-chat/app/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/test20.chuangfenglink.xyz/wp-content/plugins/chatway-live-chat/app/Base.php
<?php
/**
 * Chatway admin base
 *
 * @author  : Chatway
 * @license : GPLv3
 * */

namespace Chatway\App;

class Base {
    use Singleton;
    
    public function __construct() {
        add_action( 'admin_init', [$this, 'plugin_redirect'] );
    }

    /**
     * Redirects to the Chatway admin page if the chatway_redirection option is set and DOING_AJAX is not defined.
     * This function checks if the chatway_redirection option is set to true. If it is, it deletes the option and redirects
     * to the admin.php?page=chatway URL using wp_redirect function. It then exits the script execution.
     *
     * @return void
     */
    public function plugin_redirect() {
        if ( ! defined( "DOING_AJAX" ) && get_option( 'chatway_redirection', false ) ) {
            delete_option( 'chatway_redirection' );
            exit( wp_redirect( admin_url("admin.php?page=chatway") ) );
        }
    }

    /**
     * Activates the plugin by setting up a temporary redirection key.
     * The user will be redirected to the Plugin Page on installation.
     * The temporary redirection key is removed as soon as it's called for the first time.
     *
     * @return void
     */
    public function activate() {
        ExternalApi::update_plugins_status( 'install' );
        /**
         * We want to take the user to the Plugin Page on installation.
         * Hence setting up a temporary redirection key.
         * It gets removed as soon as it's called for the first time.
         * Ussage at : plugin_redirect, and called with admin_init
         */

        if(function_exists('chatway_clear_all_caches'))   {
            chatway_clear_all_caches();
        }

        if ( ! defined( "DOING_AJAX" ) ) {
            add_option( 'chatway_redirection', true );
        }

    }

    public function deactivate() {
        ExternalApi::update_plugins_status( 'uninstall' );
        ExternalApi::sync_wp_plugin_version(\Chatway::is_woocomerce_active(), 0);
        User::clear_chatway_keys();
        if(function_exists('chatway_clear_all_caches'))   {
            chatway_clear_all_caches();
        }

        delete_option( 'chatway_redirection' );
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit