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


Viewing file:     ci_usuarios_clientes.php (7.12 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
class ci_usuarios_clientes extends toba_ci
{
        protected 
$s__datos_filtro;
        protected 
$s__usuario;
        protected 
$s__datos;
        const 
clave_falsa "xS34Io9gF2JD"//La clave no se envia al cliente

        #protected $s__clientes = true;

        //-----------------------------------------------------------------------------------
        //---- Configuraciones --------------------------------------------------------------
        //-----------------------------------------------------------------------------------
        /*function conf()
        {
                
                if (!empty($_REQUEST['ai'])){
                
                        $pos = strpos($_REQUEST['ai'], '||')+2;
                        $operacion = substr($_REQUEST['ai'],$pos);

                        if ($operacion == '3476'){ //Administración > Usuarios > clientes
                                $this->s__clientes = true;
                        }
                }

        }*/
        
        //---- Filtro -----------------------------------------------------------------------
        
        
function conf__filtro(toba_ei_formulario $filtro)
        {
                if (isset(
$this->s__datos_filtro)) {
                        
$filtro->set_datos($this->s__datos_filtro);
                }
        }
        
        function 
evt__filtro__filtrar($datos)
        {
                if (
array_no_nulo($datos)) {
                        
$this->s__datos_filtro $datos;
                } else {
                        
toba::notificacion()->agregar('El filtro no posee valores');
                }
        }
        
        function 
evt__filtro__cancelar()
        {
                unset(
$this->s__datos_filtro);
        }
        
        
//---- Cuadro -----------------------------------------------------------------------
        
        
function conf__cuadro(toba_ei_cuadro $cuadro)
        {
                if (isset(
$this->s__datos_filtro)) { $filtro $this->s__datos_filtro; }
                
                
#if($this->s__clientes){ 
                        
$filtro['usuario_grupo_acc'] = 'cliente';  
                
#}else{
                #        $filtro['grupo_empresa'] = 'empresa';
                #}
                
                
$datos $this->dep('datos')->tabla('apex_usuario')->get_listado($filtro);
               
                
$cuadro->set_datos($datos);
        }
        
        function 
evt__cuadro__seleccion($datos)
        {
                
$this->s__usuario $datos[usuario];
                
$this->set_pantalla('pant_edicion');
        }
        
        function 
evt__cuadro__eliminar($datos)
        {
                
$this->dep('datos')->tabla('apex_usuario')->eliminar_usuario($datos['usuario']);
                
$this->resetear();
        }

        
//---- Formulario -------------------------------------------------------------------
        
        
function conf__formulario(toba_ei_formulario $form)
        {
                if (isset(
$this->s__usuario)) { //Va a modificar
                        
$datos $this->dep('datos')->tabla('apex_usuario')->get_datos($this->s__usuario);
                        if (isset(
$datos)) {
                                
$datos['clave'] = self::clave_falsa;
                        }
                        
                        
//---------------------------------------------------
                        //Rubros
                        /*
                        $rubros = $this->dep('datos')->tabla('rubro_proveedor')->get_rubros_proveedor($this->s__usuario);

                        $array_seleccionados = array();
                        if(count($rubros)>0){
                                foreach ($rubros as $r){
                                        $array_seleccionados[] = $r['id_rubro'];
                                }
                        }

                        $datos['rubros'] = $array_seleccionados;*/

                        //----------------------------------------------------

                        
$form->set_datos($datos);

                } else { 
//Va a agregar
                        
$this->pantalla()->eliminar_evento('eliminar');
                }
        }
        
        function 
evt__formulario__modificacion($datos)
        {
                
//Seteo datos fijos
                
$datos['proyecto']  ='tdfonline';
                
$datos['grupos'][0] = 'cliente';
                if (
$datos['clave'] == self::clave_falsa ) {
                        unset(
$datos['clave']);
                }
                
$this->s__datos $datos;
        }
        
        function 
resetear()
        {
                
$this->dep('datos')->resetear();
                unset(
$this->s__datos);
                unset(
$this->s__usuario);
                
$this->set_pantalla('pant_seleccion');
        }
        
        
//---- EVENTOS CI -------------------------------------------------------------------
        
        
function evt__agregar()
        {
                
$this->set_pantalla('pant_edicion');
        }
        
        function 
evt__volver()
        {
                
$this->resetear();
        }
        
        function 
evt__eliminar()
        {
                
$this->dep('datos')->tabla('apex_usuario')->eliminar_usuario($this->s__usuario);
                
$this->resetear();
        }
        
        function 
evt__guardar()
        {
                
//Modificar
                
if (isset($this->s__usuario)) {
                        
                        if ( 
$this->dep('datos')->tabla('apex_usuario')->modificar($this->s__datos) ){
                                if ( 
$this->dep('datos')->tabla('apex_usuario_proyecto')->eliminar_agregar($this->s__datos) ){
                                        
$this->resetear();
                                }else{
                                        
toba::notificacion()->agregar("Error: Falla en la modificación del perfil del usuario. Contacte al administrador del sistema.""info");
                                }
                        }else{     
toba::notificacion()->agregar("Error: Falla en la modificación del usuario. Contacte al administrador del sistema.""info");                  }
                        
                        
//Agregar
                
} else {
                        
                        if ( 
$this->dep('datos')->tabla('apex_usuario')->agregar($this->s__datos) ){
                                if ( 
$this->dep('datos')->tabla('apex_usuario_proyecto')->eliminar_agregar($this->s__datos) ){
                                        
$this->resetear();
                                }else{
                                        
toba::notificacion()->agregar("Falla en el alta del perfil del usuario. Contacte al administrador del sistema.""error");
                                }
                        }else{     
toba::notificacion()->agregar("Ya existe el usuario ".$this->s__datos['usuario'].". Por favor, seleccione otro nombre de usuario.""info");     }
                }
                

        }

}
?>

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