This repository has been archived by the owner on Jul 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathadmin.php
56 lines (53 loc) · 1.5 KB
/
admin.php
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* @package Script Pulsa Online
* @version 1
* @author Engky Datz
* @link http://okepulsa.id
* @link http://facebook.com/Engky09
* @link http://okepulsa.id
* @link https://www.bukalapak.com/engky09
* @copyright 2015 -2016
*/
define('ADM_PANEL', true);
include ('includes/base.php');
define('ADM_URL', SITE_URL . basename(__file__)); // http://domain.tld/admin.php
define('ADM_INC', dirname(__file__) . '/admin-inc');
$page_title = 'Admin Panel | ' . $set['site_name'];
$c = isset($_GET['c']) ? $_GET['c'] : '';
$a = isset($_GET['a']) ? $_GET['a'] : '';
$id = isset($_GET['id']) ? abs(intval($_GET['id'])) : '';
$adm_user = isset($_SESSION['adm_user']) ? $_SESSION['adm_user'] : '';
$adm_pass = isset($_SESSION['adm_pass']) ? base64_decode($_SESSION['adm_pass']) :
'';
$admin = json_decode(get_set('admin'));
if (($adm_user != $admin->username || $adm_pass != base64_decode($admin->
password)) && $c != 'masuk')
{
header("Location: " . ADM_URL . "?c=masuk");
exit();
}
$controllers = array(
'berita',
'operator',
'keluar',
'masuk',
'transaksi',
'setelan',
'index',
'quick_action',
'sms',
'testimonial',
'feedback',
'actions',
);
if (in_array($c, $controllers) && file_exists(ADM_INC . '/' . $c . '.php') &&
is_file(ADM_INC . '/' . $c . '.php'))
{
include (ADM_INC . '/' . $c . '.php');
}
else
{
include (ADM_INC . '/index.php');
}
include (APP_PATH . '/includes/footer.php');