/BMTmobile-master/application/controllers/backup/log.php
PHP | 52 lines | 25 code | 4 blank | 23 comment | 1 complexity | eedf483a2cf2ae8a65db3249fd0ab41c MD5 | raw file
- <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
- include_once('base.php');
- class log extends base {
- function __construct(){
- parent::__construct();
- $this->load->model('Log_model');
- }
- //TODO would have to utilize the "Last activity" = 1353148039 field to determine
- //if session is inactive, default would've been 7200 and automatic
- //but I wanted to save the UserAgent etc for binding to Logs
- //without the need for a seperate table.
- //I could also parse By UserName or whatever else I can stuff in the "User Data" Field
- //
- // I could also Parse Out this users session that accesses the Admin Page
- // but would like to find a solution that allows mobile web Access as well as App Logging.
- // $this->log_Model->getSessionEquals();
- //----------------------------------------------
- //Show Session Table provides access/sessions based on session config
- //http://localhost/index.php/log/gCrudAccess
- public function gCrudAccess($output = null){
- $this->load->library('grocery_CRUD');
- $crud = new grocery_CRUD();
- //$crud->set_theme('datatables');
- $crud->set_table('ci_sessions');
- //$crud->set_subject('Access');
- //$crud->required_fields('Log');
- //$crud->columns('Log', 'Data', 'TimeStamp');
- //$crud->fields('Log');
- $output = $crud->render();
- $this->load->view('gLogView',$output);
- }
-
- //show Log Table, shows data for actual Logs made
- //http://localhost/index.php/log/gCrudLog
- public function gCrudLog($output = null){
- $this->load->library('grocery_CRUD');
- $crud = new grocery_CRUD();
- //$crud->set_theme('datatables');
- $crud->set_table('Logs');
- $crud->set_subject('Log');
- $crud->required_fields('Msg');
- $crud->columns('Msg', 'Data', 'TimeStamp');
- //$crud->fields('Log');
- $output = $crud->render();
- $this->load->view('gLogView',$output);
- }
- }
- /* End of file welcome.php */
- /* Location: ./application/controllers/welcome.php */