forked from zpanel/zpanel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
67 lines (65 loc) · 2.91 KB
/
index.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
57
58
59
60
61
62
63
64
65
66
67
<?php
/**
*
* ZPanel - A Cross-Platform Open-Source Web Hosting Control panel.
*
* @package ZPanel
* @version $Id$
* @author Bobby Allen - [email protected]
* @copyright (c) 2008-2011 ZPanel Group - http://www.zpanelcp.com/
* @license http://opensource.org/licenses/gpl-3.0.html GNU Public License v3
*
* This program (ZPanel) is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
session_start();
include('conf/zcnf.php');
include('inc/zDataExchange.php');
include('inc/zCoreFunctions.php');
include('inc/zCheckAuth.php');
include('inc/zAccountDetails.php');
include('inc/zWebLoader.php');
include('lang/' . GetPrefdLang($personalinfo['ap_language_vc']) . '.php');
# We check that a module is to be run if not we'll display a list of the module icons.
if (!isset($_GET['p'])) {
$body = "inc/zModuleLoader.php";
echo eval(BuildApp($body, $useraccount, $packageinfo, $quotainfo, $permissionset, $personalinfo));
} else {
if (!isset($_GET['e']) || $_GET['e'] == '') {
if ($_GET['p'] == "modules") {
$body = "inc/zModuleLoader.php";
echo eval(BuildApp($body, $useraccount, $packageinfo, $quotainfo, $permissionset, $personalinfo));
} else {
# Check the permissions before displaying the module content.
require_once('modules/' . $_GET['c'] . '/catinfo.zp.php');
if (CheckModuleCatForPerms($thiscat['level_required'], $permissionset) == 1) {
$body = "modules/" . $_GET['c'] . "/" . $_GET['p'] . "/index.php";
require("modules/" . $_GET['c'] . "/" . $_GET['p'] . "/modinfo.zp.php");
echo eval(BuildApp($body, $useraccount, $packageinfo, $quotainfo, $permissionset, $personalinfo));
} else {
echo $lang['73'];
}
}
} else {
require_once('modules/' . $_GET['c'] . '/catinfo.zp.php');
if (CheckModuleCatForPerms($thiscat['level_required'], $permissionset) == 1) {
$body = "modules/" . $_GET['c'] . "/" . $_GET['p'] . "/" . $_GET['e'] . ".php";
require("modules/" . $_GET['c'] . "/" . $_GET['p'] . "/modinfo.zp.php");
echo eval(BuildApp($body, $useraccount, $packageinfo, $quotainfo, $permissionset, $personalinfo));
} else {
echo $lang['73'];
}
}
}
?>