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


Viewing file:     formulario_consola.php (1.67 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

class formulario_consola
{
    private 
$interface;
    private 
$titulo;
    private 
$campos;
    private 
$valores;
    
    function 
__construct(  $manejador_interface$titulo )
    {
        
$this->interface $manejador_interface;
        
$this->titulo $titulo;
    }
    
    function 
agregar_campo$parametros )
    {
        if ( !isset( 
$parametros['id'] ) || !isset( $parametros['nombre'] ) ) {
            throw new 
toba_error("CONSOLA: Formulario mal definido");
        }
        
$this->campos$parametros['id'] ] = $parametros;
    }
    
    function 
procesar()
    {
        
$this->get_valores();
        do {
            
$this->listar_valores();
            
$this->interface->enter();
            
$ok $this->interface->dialogo_simple('Los valores ingresados son correctos?');
            if ( ! 
$ok ) {
                
//$this->corregir_valores();            
                
$this->get_valores();
            }
        } while ( ! 
$ok );
        
// Devuelvo el resultado
        
foreach( $this->campos as $campo ) {
            
$datos$campo['id'] ] = $campo['valor'];    
        }
        return 
$datos;
    }
    
    function 
get_valores()
    {
        
$this->interface->enter();
        
$this->interface->subtitulo$this->titulo );
        foreach( 
array_keys$this->campos ) as $campo ) {
            
$obligatorio = (! isset($this->campos[$campo]['obligatorio']) || $this->campos[$campo]['obligatorio']);
            
$valor $this->interface->dialogo_ingresar_texto$this->campos[$campo]['nombre'], $obligatorio);
            
$this->campos[$campo]['valor'] = $valor;
        }
    }

    function 
listar_valores()
    {
        
$this->interface->enter();
        
$this->interface->subtitulo'Valores recolectados' );
        foreach( 
$this->campos as $campo ) {
            unset( 
$campo['id'] );
            
$datos[] = $campo;    
        }
        
$this->interface->tabla$datos, array( 'Campo''Valor'));
    }
    
    
// Deberia ser una forma mas copada de get_valores
    
function corregir_valores()
    {
    }    
}
?>

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