!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.4.18 (Ubuntu). PHP/7.0.33-0ubuntu0.16.04.16 

uname -a: Linux digifus 3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC 2015 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/almazenServer/application/controllers/   drwxr-xr-x
Free 10.05 GB of 29.4 GB (34.17%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     perfiles.php (3.31 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php if (!defined('BASEPATH')) {
    exit(
'No direct script access allowed');
}

class 
Perfiles extends CI_Controller {

    public function 
__construct() {
        
parent::__construct();
        
$this->load->model('consultas_model');
        
/* Cargamos la base de datos */
        
$this->load->database();
        
$this->load->library('javascript');
        
/* Cargamos la libreria*/
        
$this->load->library('grocery_crud');
        
$this->load->library('session');
        
/* Añadimos el helper al controlador */
        
$this->load->helper('url');
        
//    $this->load->library('encrypt');
        
error_reporting(E_ALL ^ (E_NOTICE E_WARNING));
    }

    public function 
index() {
        if (
$this->session->userdata('loginuser') == TRUE) {
            try {

                
/* Creamos el objeto */
                
$crud = new grocery_CRUD();

                
/* Seleccionamos el tema */
                
$crud->set_theme('flexigrid');
                
//$crud->set_theme('bootstrap');
                /* Seleccionmos el nombre de la tabla de nuestra base de datos*/
                
$crud->set_table('tbl_usrs');

                
//    $crud->set_relation('nombre','stock_productos','stock');
                /* Le asignamos un nombre */
                
$crud->set_subject('USUARIOS');

                
$listadoPermisos = array(
                    
"ADMINISTRADOR",
                    
"vendedor_externo""AUTORIZADOR""LOGISTICA""facturador",
                    
"vendedor",
                    
"CLIENTE",
                );
                
/* Asignamos el idioma español */
                
$crud->set_language('spanish');
                
$crud->field_type('perfil''set'$listadoPermisos);

                
$crud->required_fields(
                    
'username',
                    
'password',
                    
'perfil'
                
);

                
/* Aqui le indicamos que campos deseamos mostrar */
                
$crud->columns(
                    
'username',
                    
'password',
                    
'perfil'
                
);
                
$crud->callback_before_insert(array($this'encrypt_password'));
                
$crud->callback_before_update(array($this'encrypt_password'));
                
/* Generamos la tabla */
                
$output $crud->render();
                
$data   = array("pepe" => $output,
                    
"contenido"            => "productos/administracion",
                    
"titulo"               => "ADMINISTRACION USUARIOS",
                );

                
/* La cargamos en la vista situada en
                /applications/views/productos/administracion.php */
                
$this->load->view('template'$data);

            } catch (
Exception $e) {
                
/* Si algo sale mal cachamos el error y lo mostramos */
                
show_error($e->getMessage() . ' --- ' $e->getTraceAsString());
            }
        } else {

            
redirect(base_url() . 'login''refresh');
        }
    }

    public function 
encrypt_password($post_array$primary_key null) {
        if (!empty(
$post_array["password"])) {
            
$post_array["password"] = md5($post_array["password"]);
        }
        return 
$post_array;

    }
    public function 
getUsuariosAajax() {
        
$respuesta $this->consultas_model->getUsuariosAajax();
        return 
$respuesta;
    }

}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0054 ]--