GRAYBYTE WORDPRESS FILE MANAGER3660

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /usr/src/litespeed-wp-plugin/6.2.0.1/litespeed-cache/src/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /usr/src/litespeed-wp-plugin/6.2.0.1/litespeed-cache/src//report.cls.php
<?php

/**
 * The report class
 *
 *
 * @since      1.1.0
 * @package    LiteSpeed
 * @subpackage LiteSpeed/src
 * @author     LiteSpeed Technologies <info@litespeedtech.com>
 */

namespace LiteSpeed;

defined('WPINC') || exit();

class Report extends Base
{
	const TYPE_SEND_REPORT = 'send_report';

	/**
	 * Handle all request actions from main cls
	 *
	 * @since  1.6.5
	 * @access public
	 */
	public function handler()
	{
		$type = Router::verify_type();

		switch ($type) {
			case self::TYPE_SEND_REPORT:
				$this->post_env();
				break;

			default:
				break;
		}

		Admin::redirect();
	}

	/**
	 * post env report number to ls center server
	 *
	 * @since  1.6.5
	 * @access public
	 */
	public function post_env()
	{
		$report_con = $this->generate_environment_report();

		// Generate link
		$link = !empty($_POST['link']) ? esc_url($_POST['link']) : '';

		$notes = !empty($_POST['notes']) ? esc_html($_POST['notes']) : '';

		$data = array(
			'env' => $report_con,
			'link' => $link,
			'notes' => $notes,
		);

		$json = Cloud::post(Cloud::API_REPORT, $data);
		if (!is_array($json)) {
			return;
		}

		$num = !empty($json['num']) ? $json['num'] : '--';
		$summary = array(
			'num' => $num,
			'dateline' => time(),
		);

		self::save_summary($summary);

		return $num;
	}

	/**
	 * Gathers the environment details and creates the report.
	 * Will write to the environment report file.
	 *
	 * @since 1.0.12
	 * @access public
	 */
	public function generate_environment_report($options = null)
	{
		global $wp_version, $_SERVER;
		$frontend_htaccess = Htaccess::get_frontend_htaccess();
		$backend_htaccess = Htaccess::get_backend_htaccess();
		$paths = array($frontend_htaccess);
		if ($frontend_htaccess != $backend_htaccess) {
			$paths[] = $backend_htaccess;
		}

		if (is_multisite()) {
			$active_plugins = get_site_option('active_sitewide_plugins');
			if (!empty($active_plugins)) {
				$active_plugins = array_keys($active_plugins);
			}
		} else {
			$active_plugins = get_option('active_plugins');
		}

		if (function_exists('wp_get_theme')) {
			$theme_obj = wp_get_theme();
			$active_theme = $theme_obj->get('Name');
		} else {
			$active_theme = get_current_theme();
		}

		$extras = array(
			'wordpress version' => $wp_version,
			'siteurl' => get_option('siteurl'),
			'home' => get_option('home'),
			'home_url' => home_url(),
			'locale' => get_locale(),
			'active theme' => $active_theme,
		);

		$extras['active plugins'] = $active_plugins;
		$extras['cloud'] = Cloud::get_summary();

		if (is_null($options)) {
			$options = $this->get_options(true);

			if (is_multisite()) {
				$options2 = $this->get_options();
				foreach ($options2 as $k => $v) {
					if ($options[$k] !== $v) {
						$options['[Overwritten] ' . $k] = $v;
					}
				}
			}
		}

		if (!is_null($options) && is_multisite()) {
			$blogs = Activation::get_network_ids();
			if (!empty($blogs)) {
				$i = 0;
				foreach ($blogs as $blog_id) {
					if (++$i > 3) {
						// Only log 3 subsites
						break;
					}
					$opts = $this->cls('Conf')->load_options($blog_id, true);
					if (isset($opts[self::O_CACHE])) {
						$options['blog ' . $blog_id . ' radio select'] = $opts[self::O_CACHE];
					}
				}
			}
		}

		// Security: Remove cf key in report
		$secure_fields = array(self::O_CDN_CLOUDFLARE_KEY, self::O_OBJECT_PSWD);
		foreach ($secure_fields as $v) {
			if (!empty($options[$v])) {
				$options[$v] = str_repeat('*', strlen($options[$v]));
			}
		}

		$report = $this->build_environment_report($_SERVER, $options, $extras, $paths);
		return $report;
	}

	/**
	 * Builds the environment report buffer with the given parameters
	 *
	 * @access private
	 */
	private function build_environment_report($server, $options, $extras = array(), $htaccess_paths = array())
	{
		$server_keys = array(
			'DOCUMENT_ROOT' => '',
			'SERVER_SOFTWARE' => '',
			'X-LSCACHE' => '',
			'HTTP_X_LSCACHE' => '',
		);
		$server_vars = array_intersect_key($server, $server_keys);
		$server_vars[] = 'LSWCP_TAG_PREFIX = ' . LSWCP_TAG_PREFIX;

		$server_vars = array_merge($server_vars, $this->cls('Base')->server_vars());

		$buf = $this->_format_report_section('Server Variables', $server_vars);

		$buf .= $this->_format_report_section('Wordpress Specific Extras', $extras);

		$buf .= $this->_format_report_section('LSCache Plugin Options', $options);

		if (empty($htaccess_paths)) {
			return $buf;
		}

		foreach ($htaccess_paths as $path) {
			if (!file_exists($path) || !is_readable($path)) {
				$buf .= $path . " does not exist or is not readable.\n";
				continue;
			}

			$content = file_get_contents($path);
			if ($content === false) {
				$buf .= $path . " returned false for file_get_contents.\n";
				continue;
			}
			$buf .= $path . " contents:\n" . $content . "\n\n";
		}
		return $buf;
	}

	/**
	 * Creates a part of the environment report based on a section header and an array for the section parameters.
	 *
	 * @since 1.0.12
	 * @access private
	 */
	private function _format_report_section($section_header, $section)
	{
		$tab = '    '; // four spaces

		if (empty($section)) {
			return 'No matching ' . $section_header . "\n\n";
		}
		$buf = $section_header;

		foreach ($section as $k => $v) {
			$buf .= "\n" . $tab;

			if (!is_numeric($k)) {
				$buf .= $k . ' = ';
			}

			if (!is_string($v)) {
				$v = var_export($v, true);
			} else {
				$v = esc_html($v);
			}

			$buf .= $v;
		}
		return $buf . "\n\n";
	}
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
January 01 1970 00:00:00
root / root
0
cdn
--
April 26 2024 00:11:08
root / root
0755
data_structure
--
April 26 2024 00:11:08
root / root
0755
activation.cls.php
14.986 KB
April 25 2024 23:07:02
root / root
0644
admin-display.cls.php
33.175 KB
April 25 2024 23:07:02
root / root
0644
admin-settings.cls.php
9.521 KB
April 25 2024 23:07:02
root / root
0644
admin.cls.php
4.441 KB
April 25 2024 23:07:02
root / root
0644
api.cls.php
11.075 KB
April 25 2024 23:07:02
root / root
0644
avatar.cls.php
6.063 KB
April 25 2024 23:07:02
root / root
0644
base.cls.php
29.958 KB
April 25 2024 23:07:02
root / root
0644
cdn-setup.cls.php
9.805 KB
April 25 2024 23:07:02
root / root
0644
cdn.cls.php
13.131 KB
April 25 2024 23:07:02
root / root
0644
cloud.cls.php
40.857 KB
April 25 2024 23:07:02
root / root
0644
conf.cls.php
18.578 KB
April 25 2024 23:07:02
root / root
0644
control.cls.php
21.247 KB
April 25 2024 23:07:02
root / root
0644
core.cls.php
20.005 KB
April 25 2024 23:07:02
root / root
0644
crawler-map.cls.php
13.974 KB
April 25 2024 23:07:02
root / root
0644
crawler.cls.php
35.217 KB
April 25 2024 23:07:02
root / root
0644
css.cls.php
13.104 KB
April 25 2024 23:07:02
root / root
0644
data.cls.php
16.842 KB
April 25 2024 23:07:02
root / root
0644
data.upgrade.func.php
21.372 KB
April 25 2024 23:07:02
root / root
0644
db-optm.cls.php
9.585 KB
April 25 2024 23:07:02
root / root
0644
debug2.cls.php
11.828 KB
April 25 2024 23:07:02
root / root
0644
doc.cls.php
4.737 KB
April 25 2024 23:07:02
root / root
0644
error.cls.php
6.405 KB
April 25 2024 23:07:02
root / root
0644
esi.cls.php
26.617 KB
April 25 2024 23:07:02
root / root
0644
file.cls.php
10.135 KB
April 25 2024 23:07:02
root / root
0644
gui.cls.php
27.057 KB
April 25 2024 23:07:02
root / root
0644
health.cls.php
2.893 KB
April 25 2024 23:07:02
root / root
0644
htaccess.cls.php
23.919 KB
April 25 2024 23:07:02
root / root
0644
img-optm.cls.php
60.366 KB
April 25 2024 23:07:02
root / root
0644
import.cls.php
4.147 KB
April 25 2024 23:07:02
root / root
0644
instance.cls.php
0.15 KB
April 25 2024 23:07:02
root / root
0644
lang.cls.php
15.386 KB
April 25 2024 23:07:02
root / root
0644
localization.cls.php
3.389 KB
April 25 2024 23:07:02
root / root
0644
media.cls.php
30.858 KB
April 25 2024 23:07:02
root / root
0644
metabox.cls.php
4.205 KB
April 25 2024 23:07:02
root / root
0644
object-cache.cls.php
15.623 KB
April 25 2024 23:07:02
root / root
0644
object.lib.php
33.969 KB
April 25 2024 23:07:02
root / root
0644
optimize.cls.php
36.491 KB
April 25 2024 23:07:02
root / root
0644
optimizer.cls.php
8.69 KB
April 25 2024 23:07:02
root / root
0644
placeholder.cls.php
14.074 KB
April 25 2024 23:07:02
root / root
0644
preset.cls.php
5.428 KB
April 25 2024 23:07:02
root / root
0644
purge.cls.php
29.784 KB
April 25 2024 23:07:02
root / root
0644
report.cls.php
5.328 KB
April 25 2024 23:07:02
root / root
0644
rest.cls.php
7.865 KB
April 25 2024 23:07:02
root / root
0644
root.cls.php
12.591 KB
April 25 2024 23:07:02
root / root
0644
router.cls.php
17.357 KB
April 25 2024 23:07:02
root / root
0644
str.cls.php
1.17 KB
April 25 2024 23:07:02
root / root
0644
tag.cls.php
8.619 KB
April 25 2024 23:07:02
root / root
0644
task.cls.php
5.292 KB
April 25 2024 23:07:02
root / root
0644
tool.cls.php
3.291 KB
April 25 2024 23:07:02
root / root
0644
ucss.cls.php
14.389 KB
April 25 2024 23:07:02
root / root
0644
utility.cls.php
20.633 KB
April 25 2024 23:07:02
root / root
0644
vary.cls.php
19.168 KB
April 25 2024 23:07:02
root / root
0644
vpi.cls.php
7.407 KB
April 25 2024 23:07:02
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF