-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathindex.php
More file actions
31 lines (29 loc) · 1.07 KB
/
index.php
File metadata and controls
31 lines (29 loc) · 1.07 KB
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
<!-- DEVELOPER BY CMSNT.CO | FB.COM/CMSNT.CO | ZALO.ME/0947838128 | MMO Solution -->
<?php
define("IN_SITE", true);
require_once(__DIR__.'/libs/db.php');
require_once(__DIR__.'/config.php');
require_once(__DIR__.'/libs/helper.php');
require_once(__DIR__.'/libs/database/users.php');
$CMSNT = new DB();
if ($CMSNT->site('status') != 1 && !isset($_SESSION['admin_login'])) {
require_once(__DIR__.'/views/common/maintenance.php');
exit();
}
$module = !empty($_GET['module']) ? check_string($_GET['module']) : 'client';
$home = $module == 'client' ? $CMSNT->site('home_page') : 'home';
$action = !empty($_GET['action']) ? check_string($_GET['action']) : $home;
if($action == 'footer' || $action == 'header' || $action == 'sidebar' || $action == 'nav'):
require_once(__DIR__.'/views/common/404.php');
exit();
endif;
$path = "views/$module/$action.php";
if (file_exists($path)) {
require_once(__DIR__.'/'.$path);
exit();
} else {
require_once(__DIR__.'/views/common/404.php');
exit();
}
?>
<!-- Dev By CMSNT.CO | FB.COM/CMSNT.CO | ZALO.ME/0947838128 | MMO Solution -->