-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathadmin.php
36 lines (30 loc) · 1.03 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
<?php
// +------------------------------------------------------------------------+
// | @author Olakunlevpn (Olakunlevpn)
// | @author_url 1: http://www.maylancer.cf
// | @author_url 2: https://codecanyon.net/user/gr0wthminds
// | @author_email: olakunlevpn@live.com
// +------------------------------------------------------------------------+
// | PonziPedia - Peer 2 Peer 50% ROI Donation System
// | Copyright (c) 2018 PonziPedia. All rights reserved.
// +------------------------------------------------------------------------+
require_once 'app/init.php';
require_once 'app/class.admin.php';
if (isset($_GET['logout'])) {
Auth::logout();
redirect_to( App::url('admin.php') );
}
if (Auth::guest()) {
echo View::make('admin.login')->render();
exit;
}
if (!Auth::userCan('dashboard')) {
echo View::make('admin.restricted')->render();
exit;
}
$page = isset($_GET['page']) ? $_GET['page'] : 'dashboard';
if (View::exists("admin.{$page}")) {
echo View::make('admin.'.$page)->render();
} else {
echo View::make('admin.404')->render();
}