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


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

class toba_abm
{
    static protected function 
get_valor_sql($valor
    {
        if (
$valor === null) {
            return 
'NULL';
        } elseif (
is_bool($valor)) {
            return 
$valor 'true' 'false';
        } else {
            return 
quote($valor);
        }
    }
    
    static function 
get_sql_alta($tabla$datos)
    {
        
$campos implode(', 'array_keys($datos));
        
$valores = array();
        foreach (
$datos as $clave => $valor) {
            
$valores[$clave] = self::get_valor_sql($valor);
        }
        
$valores implode(", "$valores);
        
$sql "INSERT INTO $tabla ($campos) VALUES ($valores)";
        return 
$sql;
    }

    static function 
get_sql_baja($tabla$clave)
    {        
        
$where self::get_where_de_clave($clave);
        
$sql "DELETE FROM $tabla WHERE $where";
        return 
$sql;
    }

    static function 
get_sql_modificacion($tabla$datos$clave)
    {
        
$where self::get_where_de_clave($clave);
        
$valores = array();
        foreach (
$datos as $campo => $valor) {
            
$valores[] = $campo ' = 'self::get_valor_sql($valor);
        }
        
$valores implode(', '$valores);

        
$sql "UPDATE $tabla SET $valores WHERE $where";
        return 
$sql;
    }

    
/**
     * Determina si una tabla contiene registro/s con una clave dada
     * Una pavada, pero para ahorrar 3 lineas de codigo sirve!
     */
    
static function get_sql_cant_registros($tabla$clave$clave_excluir=null)
    {
        
$where self::get_where_de_clave($clave);
        if (isset(
$clave_excluir)) {
            
$where .= ' AND NOT ('.self::get_where_de_clave($clave_excluir).')';
        }
        
$sql "SELECT COUNT(*) as cant FROM $tabla WHERE $where";
        return 
$sql;
    }


    static function 
get_where_de_clave($clave)
    {
        
$where 'TRUE';
        if (! empty(
$clave)) {
            
$where = array();
            foreach (
$clave as $campo => $valor) {
                
$where[] = $campo ' = ' quote($valor);
            }
            
$where implode(' AND '$where);
        }
        return 
$where;
    }
    
}
?>

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