HEX
Server: Apache/2.4.41 (Amazon) OpenSSL/1.0.2k-fips PHP/5.6.40
System: Linux ip-172-31-40-18 4.14.146-93.123.amzn1.x86_64 #1 SMP Tue Sep 24 00:45:23 UTC 2019 x86_64
User: apache (48)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: //var/www/html/pmw24/pmw_live_testing/app/application/controllers/admin/Log.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Log extends MY_Controller {

	public function __construct() {
		parent::__construct();
		$this->redirect_guest();
		$this->load->model('admin/mlog');
	}
	public function index() { 
		$this->_load_list_view();
	}
	public function all_content_list(){
		$list = $this->mlog->get_datatables();
        $data = array();
        $no = $_POST['start'];
		$i=1;
        foreach ($list as $person) {
            $no++;
            $row = array();
			$row[]=$i;
		    
		    $row[] = $person->action_type;
            $row[] = $person->log_title;
            $row[] = $person->log_description;
            $row[] = $person->name;
            $row[] = $person->log_ts;
            $row[] = '<a href="'.base_url($person->log_link).'" title="Details">'.$person->icon.' Details</a>';
            
            $data[] = $row;
			$i++;
        }
        $output = array(
                        "draw" => $_POST['draw'],
                        "recordsTotal" => $this->mlog->count_all(),
                        "recordsFiltered" => $this->mlog->count_filtered(),
                        "data" => $data,
                );
        echo json_encode($output);
	}
	
	private function _load_list_view() {
		$data['content'] = 'admin/log/list';
		$this->load->view('admin/layouts/index', $data);
	}
	
}