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