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


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

class consultas
{
    
/**
    *    Lista de Jurisdicciones
    */
    
function get_jurisdicciones()
    {
        
$sql "SELECT id_jurisdiccion, nombre
                FROM jurisdiccion
                ORDER by nombre"
;
        return 
toba::db()->consultar($sql);
    }
    
    
/**
    *    Lista de Unidades Académicas
    */
    
function get_ua($institucion)
    {
        
$sql "SELECT     id_ua, nombre
                FROM ua
                WHERE 
                    id_institucion = "
.quote($institucion).
                
" ORDER by nombre";
        return 
toba::db()->consultar($sql);
    }

    
/**
    *    Lista de tipos de Unidad Académica
    */
    
function get_ua_tipos()
    {
        
$sql "SELECT     id_ua_tipo, nombre
                FROM ua_tipo
                ORDER BY nombre"
;
        return 
toba::db()->consultar($sql);
    }
    
    
//---Pais, provincia, localidad -----------------------------------------

    /**
    *    Lista de Paises
    */
    
function get_paises()
    {
        
$sql "SELECT     id_pais, nombre
                FROM pais 
                ORDER BY nombre"
;
        return 
toba::db()->consultar($sql);
    }
    
    
/**
    *    Lista de Provincias
    */
    
function get_provincias($pais=null)
    {
        
$where "";
        if (isset(
$pais) && !is_null($pais)) {
            
$where .= " AND p.id_pais = "quote($pais);
        }
        
$sql "SELECT     p.id_provincia,
                        p.nombre,
                        pp.nombre as            pais_nombre
                FROM     provincia p,
                        pais pp
                WHERE     pp.id_pais = p.id_pais
                    
$where
                ORDER BY nombre"
;
        return 
toba::db()->consultar($sql);
    }

    
/**
    *    Lista de Localidades
    */
    
function get_localidades($pais$provincia)
    {
        
$sql "SELECT     cp, nombre
                FROM localidad
                WHERE 
                        id_provincia = "
quote($provincia)."
                    AND    id_pais = "
quote($pais).
                
"ORDER by 2";
        return 
toba::db()->consultar($sql);
    }

    
//-- Carga de columnas externas ---------------------------------

    /**
    *    Devuelve el pais correspondiente a una localidad
    */
    
function get_pais_localidad($localidad)
    {
        
$sql "SELECT     id_pais 
                FROM localidad
                WHERE cp = "
.quote($localidad);
        
$salida toba::db()->consultar_fila($sql);
        return 
$salida['id_pais'];
    }
    
    
/**
    *    Devuelve la provincia correspondiente a una localidad
    */
    
function get_provincia_localidad($localidad)
    {
        
$sql "SELECT     id_provincia
                FROM localidad
                WHERE cp = "
.quote($localidad);
        
$salida toba::db()->consultar_fila($sql);
        return 
$salida['id_provincia'];
    }

    
/**
    *    Lista de Instituciones
    */
    
function get_instituciones($where=null)
    {
        
$where = isset($where) ? " WHERE $where " '';
        
$sql "SELECT     id_institucion, 
                        nombre,
                        sigla
                FROM institucion                
                
$where
                ORDER BY nombre"
;
        return 
toba::db()->consultar($sql);
    }

    
/**
    *    Lista de Sedes
    */
    
function get_sedes($where=null)
    {
        
$where = isset($where) ? " WHERE $where " '';
        
$sql "SELECT     id_institucion, 
                        id_sede,
                        nombre,
                        cp
                FROM sede                
                
$where
                ORDER BY nombre"
;
        return 
toba::db()->consultar($sql);
    }

    function 
reporte_instituciones($where='true')
    {
        
$sql "SELECT     ua.id_ua,
                        ua.nombre             as ua_nombre,
                        ua_tipo.nombre         as ua_tipo_nombre,
                        inst.id_institucion,
                        inst.nombre            as inst_nombre,
                        inst.sigla            as inst_sigla
                FROM    institucion as inst,
                        ua as ua,
                        ua_tipo    as ua_tipo
                WHERE
                        inst.id_institucion = ua.id_institucion
                    AND    ua.id_ua_tipo = ua_tipo.id_ua_tipo 
                    AND        
                        
$where
                ORDER BY inst.nombre"
;
        
toba::logger()->debug($sql);
        return 
toba::db()->consultar($sql);
    }
}
?>

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