!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.74 GB of 61.93 GB (23.79%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     ci_publicidades.php (10.74 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
class ci_publicidades extends toba_ci
{
    protected 
$s__datos_filtro;
    protected 
$s__id_publicidad;
    
#protected $s__secciones;
    
protected $s__datos;

    
//-----------------------------------------------------------------------------------
    //---- Configuraciones --------------------------------------------------------------
    //-----------------------------------------------------------------------------------

    
function conf()
    {
        if (!empty(
$_REQUEST['ai'])){
            
$pos strpos($_REQUEST['ai'], '||')+2;
            
$operacion substr($_REQUEST['ai'],$pos);
            if (
$operacion == '3478'){
                
$this->set_pantalla('pant_edicion');
                
$this->pantalla()->eliminar_evento('volver');
            }
        }  
    }

    
//---- 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)
    {
        
$this->s__datos_filtro $datos;
    }

    function 
evt__filtro__cancelar()
    {
        unset(
$this->s__datos_filtro);
    }

    
//---- Cuadro -----------------------------------------------------------------------

    
function conf__cuadro(toba_ei_cuadro $cuadro)
    {
        if (isset(
$this->s__datos_filtro)) {
            
$this->s__datos $this->dep('datos')->tabla('publicidad')->get_listado($this->s__datos_filtro);
        } else {
            
$this->s__datos $this->dep('datos')->tabla('publicidad')->get_listado();
        }

        
$cuadro->set_datos($this->s__datos);
    }

    function 
evt__cuadro__eliminar($datos)
    {
        
/*
        $this->dep('datos')->resetear();
        $this->dep('datos')->cargar($datos);
        $this->dep('datos')->eliminar_todo();
        $this->dep('datos')->resetear();
        */

        
if($this->dep('datos')->tabla('publicidad')->eliminar_publicidad($datos['id_publicidad'])){
            
toba::notificacion()->agregar("Publicidad ".$seleccion['id_publicidad']." eliminada.""info");
        }
    }

    function 
evt__cuadro__seleccion($datos)
    {
        
$this->s__id_publicidad $datos['id_publicidad'];

        
$this->dep('datos')->cargar($datos);
        
$this->set_pantalla('pant_edicion');
    }

    function 
evt__cuadro__activar_desactivar($datos)
    {
        
$this->dep('datos')->tabla('publicidad')->activar_desactivar($datos['id_publicidad']);
        
$this->resetear();
    }

    function 
conf_evt__cuadro__activar_desactivar($evento$fila)
    {
        if (
$this->s__datos[$fila]['estado'] == 'A') {
            
#$evento->anular();  
            #$evento->set_etiqueta('Desactivar');
            
$evento->set_imagen('no-visible.png');

        }elseif(
$this->s__datos[$fila]['estado'] == 'I') {
            
#$evento->anular();
            #$evento->set_etiqueta('Activar');
            
$evento->set_imagen('visible.png');
        }else{
            
$evento->anular();
        }
    }

    
//---- Formulario -------------------------------------------------------------------

    
function conf__formulario(toba_ei_formulario $form)
    {
        if (
$this->dep('datos')->esta_cargada()) {

            
$datos $this->dep('datos')->tabla('publicidad')->get();    

            
//----Secciones-----------------------------------------------
            /*$secciones = $this->dep('datos')->tabla('seccion_publicidad')->get_filas(null, true);
            
            $array_seleccionados = array();
            if(count($secciones)>0){
                foreach ($secciones as $s){
                    $array_seleccionados[] = $s['id_seccion'];
                }
            }
            
            $datos['secciones'] = $array_seleccionados;*/
            //------------------------------------------------------------


            
$form->set_datos($datos);

        } else {
            
#$this->pantalla()->eliminar_evento('eliminar');
        
}

    }

    function 
evt__formulario__modificacion($datos)
    {
        
        
//subimos archivo de imagen o swf
        
$folder_path "../www/publi/";
        if (empty(
$this->s__id_publicidad)) { //agrega

            //imagen-------------------------------------------------------
            
if (isset($datos['imagen']) and !empty($datos['imagen']['name'])) {// Mover imagen al servidor.
                    
$nombre_imagen date("YmdHis").'_'.$datos['imagen']['name'];
                    
$destino$folder_path.$nombre_imagen;
                    
move_uploaded_file($datos['imagen']['tmp_name'], $destino ) ;
                    if ( 
is_file$destino ) ){// Le asigno solo el nombre al imagen para que se guarde en la base y no de error
                            
$datos['imagen'] = $nombre_imagen;
                    }
            }else{
                    
$datos['imagen'] = $datos['imagen']['name'];
            }


            
//swf---------------------------------------------------------
            
if (isset($datos['swf']) and !empty($datos['swf']['name'])) {// Mover swf al servidor.
                    
$nombre_swf date("YmdHis").'_'.$datos['swf']['name'];
                    
$destino$folder_path.$nombre_swf;
                    
move_uploaded_file($datos['swf']['tmp_name'], $destino ) ;
                    if ( 
is_file$destino ) ){// Le asigno solo el nombre al swf para que se guarde en la base y no de error
                            
$datos['swf'] = $nombre_swf;
                    }
            }else{
                    
$datos['swf'] = $datos['swf']['name'];
            }

            
//swf_imagen----------------------------------------------------
            
if (isset($datos['swf_imagen']) and !empty($datos['swf_imagen']['name'])) {// Mover swf_imagen al servidor.
                    
$nombre_swf_imagen date("YmdHis").'_'.$datos['swf_imagen']['name'];
                    
$destino$folder_path.$nombre_swf_imagen;
                    
move_uploaded_file($datos['swf_imagen']['tmp_name'], $destino ) ;
                    if ( 
is_file$destino ) ){// Le asigno solo el nombre al swf_imagen para que se guarde en la base y no de error
                            
$datos['swf_imagen'] = $nombre_swf_imagen;
                    }
            }else{
                    
$datos['swf_imagen'] = $datos['swf_imagen']['name'];
            }


        }else{ 
//modificacion

            //imagen ----------------------------------------------------------
            
if (isset($datos['imagen']) and !empty($datos['imagen']['name'])) {
                    
$nombre_imagen date("YmdHis").'_'.$datos['imagen']['name']; 
                    
$destino=$folder_path.$nombre_imagen;
                    
move_uploaded_file($datos['imagen']['tmp_name'], $destino ) ;
                    if ( 
is_file$destino ) ){
                            
$datos['imagen'] = $nombre_imagen;
                    }
            }elseif (isset(
$datos['imagen']) and empty($datos['imagen']['name'])) {
                    
$datos['imagen'] = $datos['imagen']['name'];
            }else{
                
                
//Mantener el valor anterior 
                
$url$this->dep('datos')->tabla('publicidad')->get_imagen($this->s__id_publicidad);
                if(empty(
$url['imagen'])){
                        
$datos['imagen'] = $datos['imagen']['name'];
                }else{
                        
$datos['imagen'] = $url['imagen'];
                }
            }

            
//swf ------------------------------------------------------------
            
if (isset($datos['swf']) and !empty($datos['swf']['name'])) {
                    
$nombre_swf date("YmdHis").'_'.$datos['swf']['name']; 
                    
$destino=$folder_path.$nombre_swf;
                    
move_uploaded_file($datos['swf']['tmp_name'], $destino ) ;
                    if ( 
is_file$destino ) ){
                            
$datos['swf'] = $nombre_swf;
                    }
            }elseif (isset(
$datos['swf']) and empty($datos['swf']['name'])) {
                    
$datos['swf'] = $datos['swf']['name'];
            }else{
                
                
//Mantener el valor anterior 
                
$url$this->dep('datos')->tabla('publicidad')->get_swf($this->s__id_publicidad);
                if(empty(
$url['swf'])){
                        
$datos['swf'] = $datos['swf']['name'];
                }else{
                        
$datos['swf'] = $url['swf'];
                }
            }

            
//swf_imagen ------------------------------------------------------------
            
if (isset($datos['swf_imagen']) and !empty($datos['swf_imagen']['name'])) {
                    
$nombre_swf_imagen date("YmdHis").'_'.$datos['swf_imagen']['name']; 
                    
$destino=$folder_path.$nombre_swf_imagen;
                    
move_uploaded_file($datos['swf_imagen']['tmp_name'], $destino ) ;
                    if ( 
is_file$destino ) ){
                            
$datos['swf_imagen'] = $nombre_swf_imagen;
                    }
            }elseif (isset(
$datos['swf_imagen']) and empty($datos['swf_imagen']['name'])) {
                    
$datos['swf_imagen'] = $datos['swf_imagen']['name'];
            }else{
                
                
//Mantener el valor anterior 
                
$url$this->dep('datos')->tabla('publicidad')->get_swf_imagen($this->s__id_publicidad);
                if(empty(
$url['swf_imagen'])){
                        
$datos['swf_imagen'] = $datos['swf_imagen']['name'];
                }else{
                        
$datos['swf_imagen'] = $url['swf_imagen'];
                }
            }
        }

        
        if (empty(
$this->s__id_publicidad)) { //agrego, buscamos el ultimo id
        
$datos['fecha_alta']    = date("Y-m-d H:i:s");
        
$datos['usuario_alta']     = toba::usuario()->get_id();                                     
        }


        
//seteamos secion de secciones
        #$this->s__secciones = $datos['secciones'];


        
$this->dep('datos')->tabla('publicidad')->set($datos);

    }

    function 
resetear()
    {
        
$this->dep('datos')->resetear();
        unset(
$this->s__id_publicidad);
        
#unset($this->s__secciones);
        
$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')->eliminar_todo();
        
$this->resetear();
    }

    function 
evt__guardar()
    {
        
$this->dep('datos')->sincronizar();


        
//-----Secciones----------------------------------------------
        /*
        if (empty($this->s__id_publicidad)) { //agrego, buscamos el ultimo id
            $id_publicidad = $this->dep('datos')->tabla('publicidad')->get_last_publicidad();
        }else{
            $id_publicidad = $this->s__id_publicidad;
            $this->dep('datos')->tabla('seccion_publicidad')->eliminar_fila_publicidad($id_publicidad);
        }
        $this->dep('datos')->tabla('seccion_publicidad')->insertar_fila_publicidad($id_publicidad,$this->s__secciones);  
        */       
        //------------------------------------------------------------

        
$this->resetear();
    }

}

?>

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