Uname:Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64

Base Dir : /var/www/html

User : gavin


403WebShell
403Webshell
Server IP : 68.183.124.220  /  Your IP : 216.73.216.141
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : gavin ( 1000)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : 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,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/wp-content/plugins/wp-statistics/includes/classes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/wp-content/plugins/wp-statistics/includes/classes/class-wp-statistics-welcome.php
<?php

/**
 * Class WP_Statistics_Welcome
 */
class WP_Statistics_Welcome {
	/**
	 * Initial
	 */
	public static function init() {
		global $WP_Statistics;

		// Check Show WelCome Page
		if ( $WP_Statistics->get_option( 'show_welcome_page', false ) and ( strpos( $_SERVER['REQUEST_URI'], '/wp-admin/index.php' ) !== false or ( isset( $_GET['page'] ) and $_GET['page'] == 'wps_overview_page' ) ) ) {
			// Disable show welcome page
			$WP_Statistics->update_option( 'first_show_welcome_page', true );
			$WP_Statistics->update_option( 'show_welcome_page', false );

			// Redirect to welcome page
			wp_redirect( WP_Statistics_Admin_Pages::admin_url( 'wps_welcome' ) );
		}

		if ( ! $WP_Statistics->get_option( 'first_show_welcome_page', false ) ) {
			$WP_Statistics->update_option( 'show_welcome_page', true );
		}
	}

	/**
	 * Register menu
	 */
	public static function menu() {
		add_submenu_page( __( 'WP-Statistics Welcome', 'wp-statistics' ), __( 'WP-Statistics Welcome', 'wp-statistics' ), __( 'WP-Statistics Welcome', 'wp-statistics' ), 'administrator', 'wps_welcome', 'WP_Statistics_Welcome::page_callback' );
	}

	/**
	 * Welcome page
	 */
	public static function page_callback() {

		// Create Default Variable
		$error   = null;
		$plugins = array();

		// Check List Plugins if in Plugins Tab
		if ( isset( $_GET['tab'] ) and $_GET['tab'] == "addons" ) {
			$response      = wp_remote_get( 'https://wp-statistics.com/wp-json/plugin/addons' );
			$response_code = wp_remote_retrieve_response_code( $response );
			if ( is_wp_error( $response ) ) {
				$error = $response->get_error_message();
			} else {
				if ( $response_code == '200' ) {
					$plugins = json_decode( $response['body'] );
				} else {
					$error = $response['body'];
				}
			}
		}

		include( WP_Statistics::$reg['plugin-dir'] . "includes/templates/welcome.php" );
	}

	/**
	 * @param $upgrader_object
	 * @param $options
	 */
	public static function do_welcome( $upgrader_object, $options ) {
		$current_plugin_path_name = 'wp-statistics/wp-statistics.php';

		if ( isset( $options['action'] ) and $options['action'] == 'update' and isset( $options['type'] ) and $options['type'] == 'plugin' and isset( $options['plugins'] ) ) {
			foreach ( $options['plugins'] as $each_plugin ) {
				if ( $each_plugin == $current_plugin_path_name ) {
					global $WP_Statistics;

					// Enable welcome page in database
					$WP_Statistics->update_option( 'show_welcome_page', true );

					// Run the upgrader
					WP_Statistics_Updates::do_upgrade();
				}
			}
		}
	}

	/**
	 * Show change log
	 */
	public static function show_change_log() {
		$response = wp_remote_get( 'https://api.github.com/repos/wp-statistics/wp-statistics/releases/latest' );

		// Check response
		if ( is_wp_error( $response ) ) {
			return;
		}

		$response_code = wp_remote_retrieve_response_code( $response );

		if ( $response_code == '200' ) {
			$data      = json_decode( $response['body'] );
			$Parsedown = new Parsedown();

			echo $Parsedown->text( nl2br( $data->body ) );
		}
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit