| Server IP : 103.48.194.25 / Your IP : 216.73.217.33 Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.33 System : Linux VMHostDefault 3.10.0-1160.42.2.el7.x86_64 #1 SMP Tue Sep 7 14:49:57 UTC 2021 x86_64 User : sieuthimay ( 1016) PHP Version : 8.2.20 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/khonguyenlieu.vn/public_html/webadmin/controllers/ |
Upload File : |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class logs extends CI_Controller
{
protected $_templates;
function __construct()
{
parent::__construct();
$this->load->model('logs_model','logs');
$this->permit_library->check_permit();
$this->session->set_userdata(array('Url'=>uri_string()));
}
function index(){
$this->listlogs();
}
function listlogs()
{
$data['title'] = 'Lịch sử thao tác của: '.$this->logs->get_admin_by_id($this->uri->segment(3))->login_name;
$config['base_url'] = base_url().'logs/listlogs/'.$this->uri->segment(3);
$config['total_rows'] = $this->logs->get_num_log($this->uri->segment(3));
$data['num'] = $config['total_rows'];
$config['per_page'] = 30;
$config['uri_segment'] = 4;
$this->pagination->initialize($config);
$data['list'] = $this->logs->get_all_log($this->uri->segment(3),$config['per_page'],$this->uri->segment(4));
$data['pagination'] = $this->pagination->create_links();
$this->_templates['page'] = 'logs/list';
$this->site->load($this->_templates['page'],$data);
}
function del(){
$AdminID = $this->uri->segment(3);
$this->db->where('admin_id',$AdminID);
if($this->db->delete('logs')){
$this->session->set_flashdata('message','Xóa thành công');
}else{
$this->session->set_flashdata('message','Xóa không thành công');
}
redirect('logs/listlogs/'.$AdminID);
}
}
?>