!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/zt-tsou.org.ua/modules-alien/smarty/libs/plugins/   drwxr-xr-x
Free 117.17 GB of 200.55 GB (58.43%)
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_options.php (3.71 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
* Smarty plugin

* @package Smarty
* @subpackage PluginsFunction
*/

/**
* Smarty {html_options} function plugin

* Type:     function<br>
* Name:     html_options<br>
* Purpose:  Prints the list of <option> tags generated from
*            the passed parameters

* @link http://smarty.php.net/manual/en/language.function.html.options.php {html_image}
      (Smarty online manual)
* @author Monte Ohrt <monte at ohrt dot com> 
* @param array $params parameters
* Input:<br>
*            - name       (optional) - string default "select"
*            - values     (required if no options supplied) - array
*            - options    (required if no values supplied) - associative array
*            - selected   (optional) - string default not set
*            - output     (required if not options supplied) - array
* @param object $smarty Smarty object
* @param object $template template object
* @return string 
* @uses smarty_function_escape_special_chars()
*/

function smarty_function_html_options($params$smarty$template)
{
    require_once(
SMARTY_PLUGINS_DIR 'shared.escape_special_chars.php');
    
//$smarty->loadPlugin('Smarty_shared_escape_special_chars');

    
$name null;
    
$values null;
    
$options null;
    
$selected = array();
    
$output null;

    
$extra '';

    foreach(
$params as $_key => $_val) {
        switch (
$_key) {
            case 
'name':
                $
$_key = (string)$_val;
                break;

            case 
'options':
                $
$_key = (array)$_val;
                break;

            case 
'values':
            case 
'output':
                $
$_key array_values((array)$_val);
                break;

            case 
'selected':
                $
$_key array_map('strval'array_values((array)$_val));
                break;

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

    if (!isset(
$options) && !isset($values))
        return 
'';
    
/* raise error here? */

    
$_html_result '';

    if (isset(
$options)) {
        foreach (
$options as $_key => $_val)
        
$_html_result .= smarty_function_html_options_optoutput($_key$_val$selected);
    } else {
        foreach (
$values as $_i => $_key) {
            
$_val = isset($output[$_i]) ? $output[$_i] : '';
            
$_html_result .= smarty_function_html_options_optoutput($_key$_val$selected);
        } 
    } 

    if (!empty(
$name)) {
        
$_html_result '<select name="' $name '"' $extra '>' "\n" $_html_result '</select>' "\n";
    } 

    return 
$_html_result;


function 
smarty_function_html_options_optoutput($key$value$selected)
{
    if (!
is_array($value)) {
        
$_html_result '<option value="' .
        
smarty_function_escape_special_chars($key) . '"';
        if (
in_array((string)$key$selected))
            
$_html_result .= ' selected="selected"';
        
$_html_result .= '>' smarty_function_escape_special_chars($value) . '</option>' "\n";
    } else {
        
$_html_result smarty_function_html_options_optgroup($key$value$selected);
    } 
    return 
$_html_result;


function 
smarty_function_html_options_optgroup($key$values$selected)
{
    
$optgroup_html '<optgroup label="' smarty_function_escape_special_chars($key) . '">' "\n";
    foreach (
$values as $key => $value) {
        
$optgroup_html .= smarty_function_html_options_optoutput($key$value$selected);
    } 
    
$optgroup_html .= "</optgroup>\n";
    return 
$optgroup_html;


?>

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