deploy awal
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
function chek_session()
|
||||
{
|
||||
$CI = &get_instance();
|
||||
$session = $CI->session->userdata;
|
||||
if ($session['status_login'] != 'oke') {
|
||||
redirect('auth/login');
|
||||
}
|
||||
}
|
||||
|
||||
function chek_role()
|
||||
{
|
||||
$CI = &get_instance();
|
||||
$session = $CI->session->userdata;
|
||||
if ($session['status_login'] != 'oke') {
|
||||
redirect('auth/login');
|
||||
} else if ($session['akses'] != 1) {
|
||||
show_error('Hanya administrator yang dapat mengakses halaman ini', 403, 'akses terlarang');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user