-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathadmin.php
More file actions
38 lines (28 loc) · 974 Bytes
/
admin.php
File metadata and controls
38 lines (28 loc) · 974 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Admin extends CI_Controller {
var $data = array();
function __construct()
{
// Call the Controller constructor
parent::__construct();
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
$this->load->model('m_user');
if ($this->m_user->is_logged_in() === FALSE) {
$this->m_user->remove_pass();
redirect('login/noaccess');
} else {
// is_logged_in also put user data in session
$this->data['user'] = $this->session->userdata('user');
}
}
public function index()
{
$this->load->view('admin/v_admin_home', $this->data);
}
}
/* End of file admin.php */
/* Location: ./application/controllers/admin.php */