!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/lampp/lib/php/doc/HTML_CSS/examples/   drwxr-xr-x
Free 13.66 GB of 61.93 GB (22.05%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     CSS_Logger.php (5.96 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * ErrorHandler with logger example
 *
 * This example show how to use a class with all necessary methods
 * as an error handler for HTML_CSS.
 * It used the new plug-in system introduces in version 1.0.0RC1
 *
 * PHP versions 4 and 5
 *
 * @category   HTML
 * @package    HTML_CSS
 * @subpackage Examples
 * @author     Klaus Guenther <klaus@capitalfocus.org>
 * @author     Laurent Laville <pear@laurent-laville.org>
 * @copyright  2005-2009 Klaus Guenther, Laurent Laville
 * @license    http://www.opensource.org/licenses/bsd-license.php  BSD
 * @version    CVS: $Id: CSS_Logger.php,v 1.10 2009/01/19 23:22:38 farell Exp $
 * @link       http://pear.php.net/package/HTML_CSS
 * @since      File available since Release 1.0.0RC1
 * @ignore
 */

require_once 'HTML/CSS.php';
require_once 
'PEAR.php';

/**
 * This class creates a css error object
 *
 * @category   HTML
 * @package    HTML_CSS
 * @subpackage Examples
 * @author     Klaus Guenther <klaus@capitalfocus.org>
 * @author     Laurent Laville <pear@laurent-laville.org>
 * @copyright  2005-2009 Klaus Guenther, Laurent Laville
 * @license    http://www.opensource.org/licenses/bsd-license.php  BSD
 * @link       http://pear.php.net/package/HTML_CSS
 * @since      File available since Release 1.0.0RC1
 * @ignore
 */
class MyErrorHandler
{
    var 
$_display;

    
/**
     * class constructor
     *
     * @param null|array $display (optional) display options hash
     */
    
function MyErrorHandler($display null)
    {
        
$default = array('lineFormat' => '<b>%1$s</b>: %2$s %3$s',
                         
'contextFormat' => ' in <b>%3$s</b> ' .
                             
'(file <b>%1$s</b> at line <b>%2$s</b>)',
                         
'eol' => "\n"
                         
);

        if (
is_array($display)) {
            
$this->_display array_merge($default$display);
        } else {
            
$this->_display $default;
        }
    }

    
/**
     * HTML_CSS push_callback that won't die on Exception
     *
     * @param integer $code  Error code.
     * @param string  $level The error level of the message.
     *
     * @return void
     */
    
function _handleError($code$level)
    {
        return 
null;
    }

    
/**
     * Global PEAR error callback
     *
     * @param object $err PEAR_Error instance
     *
     * @return void
     */
    
function errorCallback($err)
    {
        
$display_errors ini_get('display_errors');
        
$log_errors     ini_get('log_errors');

        
$info      $err->getUserInfo();
        
$level     = isset($info['errorLevel']) ? $info['errorLevel'] : 'notice';
        
$message   $err->getMessage();
        
$backtrace $err->getBacktrace();

        if (
$display_errors) {
            
$this->display($message$level$backtrace);
        }
        if (
$log_errors) {
            
$this->log($message$level);
        }
    }

    
/**
     * Print the current error in user log file
     *
     * @param string $message error message body
     * @param string $level   error level
     *
     * @return void
     */
    
function log($message$level)
    {
        
$log = array('eol' => "\n",
                     
'lineFormat' => '%1$s %2$s [%3$s] %4$s',
                     
'timeFormat' => '%b %d %H:%M:%S'
                     
);

        
$msg sprintf($log['lineFormat'] . $log['eol'],
                       
strftime($log['timeFormat'], time()),
                       
$_SERVER['REMOTE_ADDR'],
                       
$level,
                       
$message);

        
error_log($msg3'htmlcss.log');
    }

    
/**
     * Print the current error to main output (browser)
     *
     * @param string $message   error message body
     * @param string $level     error level
     * @param array  $backtrace call context
     *
     * @return void
     */
    
function display($message$level$backtrace)
    {
        
$backtrace array_pop($backtrace);

        if (
$backtrace) {
            
$file $backtrace['file'];
            
$line $backtrace['line'];

            if (isset(
$backtrace['class'])) {
                
$func  $backtrace['class'];
                
$func .= $backtrace['type'];
                
$func .= $backtrace['function'];
            } else {
                
$func $backtrace['function'];
            }
        }

        
$lineFormat    $this->_display['lineFormat'] . $this->_display['eol'];
        
$contextFormat $this->_display['contextFormat'];
        
$contextExec   sprintf($contextFormat$file$line$func);

        
printf($lineFormatucfirst($level), $message$contextExec);
    }
}


$myErrorHandler = new MyErrorHandler();
PEAR::setErrorHandling(PEAR_ERROR_CALLBACK,
    array(&
$myErrorHandler'errorCallback'));

ini_set('display_errors'1);
ini_set('log_errors'1);

$includes       get_included_files();
$display_errors ini_get('display_errors');
$log_errors     ini_get('log_errors');

echo 
'<pre>';
print_r($includes);
printf("display_errors = %s\n"$display_errors);
printf("log_errors = %s\n"$log_errors);
echo 
'<hr />';
echo 
'</pre>';

/**
 * avoid script to die on HTML_CSS API exception; line 155 will be reached
 * @see HTML_CSS::setXhtmlCompliance()
 */
$prefs = array('push_callback' => array(&$myErrorHandler'_handleError'));

$css = new HTML_CSS(null$prefs);

$group1 $css->createGroup('body, html''grp1');
$group2 $css->createGroup('p, html''grp1');

echo 
'<hr />';

$options = array('lineFormat' => '<b>%1$s :</b> %2$s <br />%3$s',
                 
'contextFormat' => '<b>Function :</b> %3$s <br/>'.
                     
'<b>File :</b> %1$s <br /><b>Line :</b> %2$s <br/>'
                 
);

$myErrorHandler = new MyErrorHandler($options);
PEAR::setErrorHandling(PEAR_ERROR_CALLBACK,
    array(&
$myErrorHandler'errorCallback'));

$css->setXhtmlCompliance('true');  // generate an API exception

print '<hr />';
print 
"still alive";
?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.4804 ]--