!C99Shell v. 1.0 pre-release build #13!

Software: Apache. PHP/5.5.15 

uname -a: Windows NT SVR-DMZ 6.1 build 7600 (Windows Server 2008 R2 Enterprise Edition) i586 

SYSTEM 

Safe-mode: OFF (not secure)

E:\xampp\xampp\htdocs\portel_dama\administracion\clases_herramientas\   drwxrwxrwx
Free 7.26 GB of 239.26 GB (3.03%)
Detected drives: [ a ] [ c ] [ d ] [ e ] [ f ]
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     class_tree.php (7.49 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
class tree {  
       
    function 
tree($patron$link$imagen_nivel_1$imagen_nivel_2$fuente$size$x_y$user)
    {
        
        
// 0. Validación 
        // Se usa para determinar el nivel del usuario dentro de la clase y por ende hacer operaciones con él
        
if (isset($x_y)) {
            
$uid = new password($x_y$user2);
        }else{
            
$uid = new password($y$x1);
        }
        
$user $uid->USER;
        
$x_y $uid->UID;

        
$this->PATRON $patron;
        
$this->LINK $link;
        
$this->IMAGEN_NIVEL_1 $imagen_nivel_1;
        
$this->IMAGEN_NIVEL_2 $imagen_nivel_2;
        
$this->FUENTE $fuente;
        
$this->SIZE $size;
        
        
// 1. Operaciones sobre el patron
        
            // 1.1 Si el patron es de un solo digito que le asigne un punto
            
$largo_patron strlen($this->PATRON);
            if (
$largo_patron == 1) {
                
$this->PATRON $this->PATRON ".";
            }
            
            
// 1.2 Calcular el siguiente nivel
            
$largo_patron_next $largo_patron 2;
            
            
// 1.3 Calcular todos los anteriores niveles
            
$r = ($largo_patron 2) - 1;
            
            
$acumulado 2;
            
$resta 0;
            
$sub_query "";
            
            for (
$i 0$i $r$i++) {
                
$largo_patron_anterior $largo_patron $acumulado;
                
$patron_anterior substr ($this->PATRON0$largo_patron_anterior);
                
$largo_patron_nivel $largo_patron $resta;
                
$sub_query $sub_query "or (categoria_tema_id like '" $patron_anterior "%' and length(categoria_tema_id)<=" $largo_patron_nivel ") ";
                
$acumulado $acumulado 2;
                
$resta $resta 2;
            }
        
        
// 2. Query constante
        
$seleccion "categoria_tema_id, categoria_tema_desc, categoria_id";
        
$desde "contenido_categoria";
        
$cuando "(categoria_tema_id like '" $this->PATRON "%' and length(categoria_tema_id)<=$largo_patron_next)" $sub_query "order by categoria_tema_id";
        
$numero_campos 3;
        
$numero_paginacion 0;
        
                
// 2.1 Definir Query Real (encuentra los resultados deseados)
                
$query "select " $seleccion " from " $desde " where " $cuando;
                
$select = new Select($query$numero_campos$inicio ,$numero_paginacion);
        
                
// 2.3 Extrae los resultados en un arreglo de dos dimensiones
                
$resultados $select->RESULTADO;
        
        
// 3 Definir Variables que quiero imprimir, las cuales se deben sustituir por las que esten en $texto
        
$variables[0] = "(tema_id)";
        
$variables[1] = "(tema_desc)";
        
$variables[2] = "(carpeta)";
        
        
// 4 Uso $texto para imprimir cualquier formato y sustituyo los nombres de variables por aquellos dados en los nonmbres de variables
        // del numeral 3
        
        
for ($i 0$i $select->NUMERO_REGISTROS$i++) {
                
            
// 4.1 Buscar coincidencia en la categoria para destacarla
            
if ($resultados[$i][0] == $patron) {
                
$destacado_inicio "<b>";
                
$destacado_fin "</b>";
            }else{
                
$destacado_inicio "";
                
$destacado_fin "";
            }
            
            
// 4.2 Formato de cada nivel
            
                    // 4.2.0 Filtro temático de categorias
                    // Este procedimiento analiza si el usuario tiene permiso para trabajar esta categoria y si así es le da la opción de editarla,
                    // de lo contrario solo la muestra con fines de navegación
                    
$patron_buscar $resultados[$i][0];
                    
//echo $patron_buscar;
                    
include('../clases_herramientas/validar_tema.php');
                    
                        
// 4.2.0.1 Da la posibilidad de observar y editar solo las categorias asignadas
                        
if ($permiso != 0) {
                            
$menu_categoria "[<a href=\"contenido_links_administracion.php?&categoria_id=(tema_id)&accion=9&id_app=21&x_y=" $x_y "&user=" $user "\">v</a>][<a href=\"$link&categoria_id=(carpeta)&accion=-1&patron=(tema_id)\">e</a>]";
                            
$editable 1;
                        }else{
                            
$menu_categoria "";
                            
$editable 0;
                        }    
                    
                    
// 4.2.1 Largo 4, Categoria
                    
$tema_id_largo strlen($resultados[$i][0]);
                    
//echo $tema_id_largo;    
                    
if ($tema_id_largo <= 5) {
                        
$t "";
                        if (
$tema_id_largo == 5) {
                            
$t $t "<img src=\"../imagenes/tabulador_categorias.gif\" width=\"12\" height=\"6\">";
                        }
                        
// Previene que si el usuario no tiene suficientes privilegios no pueda eliminar una categoria
                        
if ($uid->usr_tipo or $editable == 0) {
                            
$a->CONTROL "";
                        }else{
                            
$a = new prevenir($resultados[$i][0],$resultados[$i][2],$link);
                        }
                        
$b = new share($resultados[$i][0],$resultados[$i][1]);
                        
$id $resultados[$i][2];
                        
$texto "$t<img src=\"../imagenes/carpeta_1.gif\"><img src=\"$this->IMAGEN_NIVEL_1\" width=\"12\" height=\"12\"> <a href=\"$this->LINK&patron=$b->SHARE_T\"><font size=\"$this->SIZE\" face=\"$this->FUENTE\">$destacado_inicio$b->SHARE_N$destacado_fin</font></a> $menu_categoria $a->CONTROL<br>";
                    }
                    
                    
// 4.2.2 Largo 6, SubCategoria    
                    
if ($tema_id_largo == or $tema_id_largo == 7) {
                        
// Previene que si el usuario no tiene suficientes privilegios no pueda eliminar una categoria
                        
if ($uid->usr_tipo or $editable == 0) {
                            
$a->CONTROL "";
                        }else{
                            
$a = new prevenir($resultados[$i][0],$resultados[$i][2],$link);
                        }
                        
$b = new share($resultados[$i][0],$resultados[$i][1]);
                        
$id $resultados[$i][2];
                        
$texto "<ul class=\"nivel1\"><img src=\"../imagenes/carpeta.gif\"><img src=\"$this->IMAGEN_NIVEL_2\" width=\"8\" height=\"8\"> <a href=\"$this->LINK&patron=$b->SHARE_T\"><font size=\"$this->SIZE\" face=\"$this->FUENTE\">$destacado_inicio$b->SHARE_N$destacado_fin</font></a> $menu_categoria $a->CONTROL<br></ul>";
                    }
                    
                    
// 4.2.3 Largo 8, SubSubCategoria    
                    
if ($tema_id_largo == or $tema_id_largo == 9) {
                        
// Previene que si el usuario no tiene suficientes privilegios no pueda eliminar una categoria
                        
if ($uid->usr_tipo or $editable == 0) {
                            
$a->CONTROL "";
                        }else{
                            
$a = new prevenir($resultados[$i][0],$resultados[$i][2],$link);
                        }
                        
$b = new share($resultados[$i][0],$resultados[$i][1]);
                        
$id $resultados[$i][2];
                        
$texto "<ul class=\"nivel2\"><img src=\"../imagenes/carpeta.gif\"><img src=\"$this->IMAGEN_NIVEL_2\" width=\"8\" height=\"8\"> <a href=\"$this->LINK&patron=$b->SHARE_T\"><font size=\"$this->SIZE\" face=\"$this->FUENTE\">$destacado_inicio$b->SHARE_N$destacado_fin</font></a> $menu_categoria $a->CONTROL<br></ul>";
                    }
                    
                    
// 4.2.4 Largo 10, SubSubSubCategoria    
                    
if ($tema_id_largo >= 11) {
                        
$t "";
                        
$t_i_l $tema_id_largo;
                        
$s $t_i_l 11;
                        if (
$s != 0) {
                            for (
$i_1 1$i_1 <= $s$i_1++) {
                                
$t $t "<img src=\"../imagenes/carpeta.gif\"><img src=\"../imagenes/tabulador_categorias.gif\" width=\"12\" height=\"6\">";
                            }
                        }
                        
                         
                        
// Previene que si el usuario no tiene suficientes privilegios no pueda eliminar una categoria
                        
if ($uid->usr_tipo or $editable == 0) {
                            
$a->CONTROL "";
                        }else{
                            
$a = new prevenir($resultados[$i][0],$resultados[$i][2],$link);
                        }
                         
$b = new share($resultados[$i][0],$resultados[$i][1]);
                         
$id $resultados[$i][2];
                        
$texto "<ul class=\"nivel3\">$t<img src=\"$this->IMAGEN_NIVEL_2\" width=\"8\" height=\"8\"> <a href=\"$this->LINK&patron=$b->SHARE_T\"><font size=\"$this->SIZE\" face=\"$this->FUENTE\">$destacado_inicio$b->SHARE_N$destacado_fin</font></a> $menu_categoria $a->CONTROL<br></ul>";
                    }
            
            
// 4.3 Imprimir cada uno
            
$resultados_1[0][0] = $resultados[$i][0];
            
$resultados_1[0][1] = $resultados[$i][1];
            
$resultados_1[0][2] = $resultados[$i][2];
            
            
$pagina = new listar(1$texto$resultados_1$variables);
        }
    }
}
?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0468 ]--