!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/apex_led/php/nucleo/menu/   drwxrwxr-x
Free 14.78 GB of 61.93 GB (23.86%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     toba_menu.php (4.45 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/**
 * Clase base de los menus de aplicacion
 *
 * @package SalidaGrafica
 */
abstract class toba_menu
{
    protected 
$items = array();
    protected 
$prof 1;
    protected 
$modo_prueba false;
    protected 
$celda_memoria 'paralela';
    protected 
$imagen_nodo ;
    protected 
$imagen_nueva_ventana;
    protected 
$abrir_nueva_ventana false;
    protected 
$hay_algun_item false;
    
    function 
__construct($carga_inicial true)
    {
        if (
$carga_inicial) {
            
$this->items $this->items_de_menu();        
        }
        
$this->imagen_nodo toba_recurso::imagen_toba('nucleo/menu_nodo_css.gif'false);
        
$this->imagen_nueva_ventana toba_recurso::imagen_toba('nucleo/abrir_nueva_ventana.gif'false);
    }
    
    
/**
     * Ventana para retornar nombre de los .css a incluir
     * @ventana
     */
    
function plantilla_css()
    {
        return 
"";
    }
    
    
/**
     * Muestra el contenido del menu
     */
    
abstract function mostrar();
    
    protected function 
items_de_menu()
    {
        return 
toba::proyecto()->get_items_menu();
    }
    
    function 
set_abrir_nueva_ventana($imagen='nucleo/abrir_nueva_ventana.gif')
    {
        if (
toba::memoria()->get_celda_memoria_actual_id() != $this->celda_memoria) {
            
$this->abrir_nueva_ventana true;
            
$this->imagen_nueva_ventana toba_recurso::imagen_toba($imagenfalse);
        }
    }
    
    protected function 
buscar_raiz()
    {
        for (
$i=0;$i<count($this->items);$i++) {
            
//--- Se recorre el primer nivel
            
if ($this->items$i ]['es_primer_nivel']) {
               
$this->get_padres($i);
            }
        }
    }
    
    protected function 
item_abre_popup($nodo)
    {
        
$siempre_abre_popup = (!isset($this->items[$nodo]['js']) && $this->abrir_nueva_ventana);
        
$item_abre_popup = (isset($this->items[$nodo]['en_popup']) && $this->items[$nodo]['en_popup'] === true);
        return (
$siempre_abre_popup || $item_abre_popup);
    }
    
    function 
set_datos_opcion($id_item$datos)
    {
        
$ok false;
        for (
$i 0$i count($this->items); $i++) {
            if (
$this->items[$i]['item'] == $id_item) {
                
$this->items[$i] = array_merge($this->items[$i], $datos);
                
$ok true;                
            }
        }
        if (! 
$ok) {
            
toba::logger()->warning("Se intento modificar la opción de menú '$id_item', pero la misma no se encuenta en el menú");
        }
    }
    
    function 
agregar_opcion($datos)
    {
        if (! isset(
$datos['carpeta'])) {
            
$datos['carpeta'] = false;
        }
        if (! isset(
$datos['es_primer_nivel'])) {
            
$datos['es_primer_nivel'] = false;
        }        
        if (! isset(
$datos['padre'])) {
            
$datos['es_primer_nivel'] = true;
            
$datos['padre'] = null;
        }        
        if (! isset(
$datos['proyecto'])) {
            
$datos['proyecto'] = toba::proyecto()->get_id();
        }    
        if (! isset(
$datos['item'])) {
            
$datos['item'] = toba::solicitud()->get_datos_item('item');
        }    
        
$this->items[] = $datos;
    }
    
    function 
quitar_opcion($id_item)
    {
        
$ok false;
        for (
$i 0$i count($this->items); $i++) {
            if (
$this->items[$i]['item'] == $id_item) {
                
array_splice($this->items$i1);
                
$ok true;                
            }
        }
        if (! 
$ok) {
            
toba::logger()->warning("Se intento quitar la opción de menú '$id_item', pero la misma no se encuenta en el menú");
        }
    }
    
    
/**
     * @ignore
     */
    
function set_modo_prueba()
    {
        
$this->modo_prueba true;
    }
    
    protected function 
get_hijos($nodo)
    {
        
$hijos = array();
        for (
$i=0;$i<count($this->items);$i++) {
            if (
$this->items$i ]['padre'] == $this->items$nodo ][ 'item' ])  {
                
$hijos[] = $i;
            }
        }
        return 
$hijos;
    }
    
    protected function 
recorrer_hijos($nodo
    {
        
$rs $this->get_hijos ($nodo);
        for (
$i=0;$i<count($rs);$i++) {
            
$this->prof++;
            
$this->get_padres($rs$i ]);
            
$this->prof--;
        }    
    }
    
    
/**
     * Muestra una confirmación antes de navegar a cualquier opción del menú
     *
     * @param string $mensaje Mensaje que se utiliza para la confirmación
     * @param boolean $forzar Si es verdadero siempre muestra la confirmación, sino depende de si algún ef de algún formulario fue modificado 
     */
    
function set_modo_confirmacion($mensaje$forzar=true)
    {
        if (
$this->menu_enviado) {
                    echo 
toba_js::abrir();
                    if (
$forzar) {
                        
$confirmar "var confirmar = true;";
                    } else {
                        
$confirmar "
                            var confirmar = toba.hay_cambios();
                        "
;
                    }

                    echo 
"
                        function confirmar_cambios(proyecto, operacion, url, es_popup) {
                            if (! es_popup || typeof(es_popup) == 'undefined') {
                                
$confirmar
                                if (confirmar) {
                                    return confirm('
$mensaje');
                                } else {
                                    return true;
                                }
                            } else {
                                return true;
                            }
                        }
                        toba.set_callback_menu(confirmar_cambios);
                    "
;
                    echo 
toba_js::cerrar();
            }
    }
    
}
?>

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