!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/inet-tech.org.ua/smarty/plugins/   drwxr-xr-x
Free 116.95 GB of 200.55 GB (58.32%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     function.html_image.php (4.41 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * Smarty plugin
 * 
 * @package Smarty
 * @subpackage PluginsFunction
 */

/**
 * Smarty {html_image} function plugin
 * 
 * Type:     function<br>
 * Name:     html_image<br>
 * Date:     Feb 24, 2003<br>
 * Purpose:  format HTML tags for the image<br>
 * Examples: {html_image file="/images/masthead.gif"}<br>
 * Output:   <img src="/images/masthead.gif" width=400 height=23><br>
 * Params:
 * <pre>
 * - file        - (required) - file (and path) of image
 * - height      - (optional) - image height (default actual height)
 * - width       - (optional) - image width (default actual width)
 * - basedir     - (optional) - base directory for absolute paths, default is environment variable DOCUMENT_ROOT
 * - path_prefix - prefix for path output (optional, default empty)
 * </pre>
 * 
 * @link http://www.smarty.net/manual/en/language.function.html.image.php {html_image}
 *      (Smarty online manual)
 * @author Monte Ohrt <monte at ohrt dot com> 
 * @author credits to Duda <duda@big.hu> 
 * @version 1.0
 * @param array                    $params   parameters
 * @param Smarty_Internal_Template $template template object
 * @return string 
 * @uses smarty_function_escape_special_chars()
 */
function smarty_function_html_image($params$template)
{
    require_once(
SMARTY_PLUGINS_DIR 'shared.escape_special_chars.php');
 
    
$alt '';
    
$file '';
    
$height '';
    
$width '';
    
$extra '';
    
$prefix '';
    
$suffix '';
    
$path_prefix '';
    
$server_vars $_SERVER;
    
$basedir = isset($server_vars['DOCUMENT_ROOT']) ? $server_vars['DOCUMENT_ROOT'] : '';
    foreach(
$params as $_key => $_val) {
        switch (
$_key) {
            case 
'file':
            case 
'height':
            case 
'width':
            case 
'dpi':
            case 
'path_prefix':
            case 
'basedir':
                $
$_key $_val;
                break;

            case 
'alt':
                if (!
is_array($_val)) {
                    $
$_key smarty_function_escape_special_chars($_val);
                } else {
                    throw new 
SmartyException ("html_image: extra attribute '$_key' cannot be an array"E_USER_NOTICE);
                } 
                break;

            case 
'link':
            case 
'href':
                
$prefix '<a href="' $_val '">';
                
$suffix '</a>';
                break;

            default:
                if (!
is_array($_val)) {
                    
$extra .= ' ' $_key '="' smarty_function_escape_special_chars($_val) . '"';
                } else {
                    throw new 
SmartyException ("html_image: extra attribute '$_key' cannot be an array"E_USER_NOTICE);
                } 
                break;
        } 
    } 

    if (empty(
$file)) {
        
trigger_error("html_image: missing 'file' parameter"E_USER_NOTICE);
        return;
    } 

    if (
substr($file01) == '/') {
        
$_image_path $basedir $file;
    } else {
        
$_image_path $file;
    } 

    if (!isset(
$params['width']) || !isset($params['height'])) {
        if (!
$_image_data = @getimagesize($_image_path)) {
            if (!
file_exists($_image_path)) {
                
trigger_error("html_image: unable to find '$_image_path'"E_USER_NOTICE);
                return;
            } else if (!
is_readable($_image_path)) {
                
trigger_error("html_image: unable to read '$_image_path'"E_USER_NOTICE);
                return;
            } else {
                
trigger_error("html_image: '$_image_path' is not a valid image file"E_USER_NOTICE);
                return;
            } 
        } 
        if (isset(
$template->smarty->security_policy)) {
            if (!
$template->smarty->security_policy->isTrustedResourceDir($_image_path)) {
                return;
            } 
        } 

        if (!isset(
$params['width'])) {
            
$width $_image_data[0];
        } 
        if (!isset(
$params['height'])) {
            
$height $_image_data[1];
        } 
    } 

    if (isset(
$params['dpi'])) {
        if (
strstr($server_vars['HTTP_USER_AGENT'], 'Mac')) {
            
$dpi_default 72;
        } else {
            
$dpi_default 96;
        } 
        
$_resize $dpi_default $params['dpi'];
        
$width round($width $_resize);
        
$height round($height $_resize);
    } 

    return 
$prefix '<img src="' $path_prefix $file '" alt="' $alt '" width="' $width '" height="' $height '"' $extra ' />' $suffix;


?>

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