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


Viewing file:     example_3.php (2.75 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * Example of usage for HTML_Template_Sigma, building the template from multiple files
 * 
 * PHP versions 4 and 5
 *
 * LICENSE: This source file is subject to version 3.01 of the PHP license
 * that is available through the world-wide-web at the following URI:
 * http://www.php.net/license/3_01.txt If you did not receive a copy of
 * the PHP License and are unable to obtain it through the web, please
 * send a note to license@php.net so we can mail you a copy immediately.
 *
 * @category    HTML
 * @package     HTML_Template_Sigma
 * @author      Alexey Borzov <avb@php.net>
 * @version     CVS: $Id: example_3.php,v 1.2 2007/05/19 13:31:19 avb Exp $
 * @ignore
 */

/**
 * Template class
 */
require_once 'HTML/Template/Sigma.php';

// various data to substitute
$addBlockAry = array(
    
'&lt;!-- INCLUDE --&gt;' => 'Includes a file from within a template',
    
'addBlockfile()'         => 'Creates a new block in place of a variable placeholder',
    
'replaceBlockfile()'     => 'Replaces the existing block with a new content'
);
$replaceBlockAry = array(
    
'foo''bar''baz''quux'
);

// instantiate the template object, templates will be loaded from the
// 'templates' directory, no caching will take place
$tpl =& new HTML_Template_Sigma('./templates');

// No errors are expected to happen here
$tpl->setErrorHandling(PEAR_ERROR_DIE);

// default behaviour is to remove unknown variables and empty blocks 
// from the template
$tpl->loadTemplateFile('example_3.html');

// 2. Using addBlockfile()
// addblockfile placeholder will be gone, new_block block will appear in its place
$tpl->addBlockfile('addblockfile''new_block''example_3_add.html');
foreach (
$addBlockAry as $name => $desc) {
    
$tpl->setVariable(array(
        
'func_name'        => $name,
        
'func_description' => $desc
    
));
    
$tpl->parse('added_block');
}

// 3. Using replaceBlockfile()
// 3.1 Keeping the previously parsed contents
for ($i 0$i count($replaceBlockAry); $i++) {
    if (
== $i) {
        
// note the third argument, this is done to prevent clearing the parsed contents
        
$tpl->replaceBlockfile('replace_block_1''example_3_replace_1.html'true);
    }
    
$tpl->setVariable('item_title'$replaceBlockAry[$i]);
    
$tpl->parse('replace_block_1');
// for

// 3.2 Discarding the previously parsed contents
$tpl->setVariable('item_title''This will be discarded');
$tpl->parse('replace_block_2');
// default behaviour is to discard parsed contents
$tpl->replaceBlockfile('replace_block_2''example_3_replace_2.html');
foreach (
$replaceBlockAry as $item) {
    
$tpl->setVariable('item_title'$item);
    
$tpl->parse('replace_block_2_item');
}

// output the results
$tpl->show();

?>

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