PageRenderTime 27ms CodeModel.GetById 16ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

/BMTmobile-master/application/controllers/backup/log.php

https://gitlab.com/webservers/codeigniter_mobile_dev_server
PHP | 52 lines | 25 code | 4 blank | 23 comment | 1 complexity | eedf483a2cf2ae8a65db3249fd0ab41c MD5 | raw file
 1<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 2include_once('base.php');
 3class log extends base {
 4
 5    function __construct(){
 6        parent::__construct();
 7        $this->load->model('Log_model');
 8    }
 9//TODO would have to utilize the "Last activity" = 1353148039   field  to determine
10//if session is inactive, default would've been 7200 and automatic
11//but I wanted to save the UserAgent etc for binding to Logs
12//without the need for a seperate table.
13//I could also parse By UserName or whatever else I can stuff in the "User Data" Field
14//
15// I could also Parse Out this users session that accesses the Admin Page
16// but would like to find a solution that allows mobile web Access as well as App Logging.
17
18// $this->log_Model->getSessionEquals();
19//----------------------------------------------
20	//Show Session Table provides access/sessions based on session config
21	//http://localhost/index.php/log/gCrudAccess
22    public function gCrudAccess($output = null){
23        $this->load->library('grocery_CRUD');        
24        $crud = new grocery_CRUD();
25        //$crud->set_theme('datatables');
26        $crud->set_table('ci_sessions');
27        //$crud->set_subject('Access');
28        //$crud->required_fields('Log');
29        //$crud->columns('Log', 'Data', 'TimeStamp');
30        //$crud->fields('Log');
31        $output = $crud->render();
32        $this->load->view('gLogView',$output);
33    }   
34	
35	//show Log Table, shows data for actual Logs made
36	//http://localhost/index.php/log/gCrudLog 
37    public function gCrudLog($output = null){
38        $this->load->library('grocery_CRUD');        
39        $crud = new grocery_CRUD();
40        //$crud->set_theme('datatables');
41        $crud->set_table('Logs');
42        $crud->set_subject('Log');
43        $crud->required_fields('Msg');
44        $crud->columns('Msg', 'Data', 'TimeStamp');
45        //$crud->fields('Log');
46        $output = $crud->render();
47        $this->load->view('gLogView',$output);
48    }
49}
50
51/* End of file welcome.php */
52/* Location: ./application/controllers/welcome.php */