-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathadmin.php
36 lines (32 loc) · 1.07 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
/**
* Admin page for jaws
*
* @category Application
* @package Core
* @copyright 2005-2024 Jaws Development Group
* @license http://www.gnu.org/copyleft/lesser.html
*/
define('JAWS_SCRIPT', 'admin');
define('BASE_SCRIPT', basename(__FILE__));
// Redirect to the installer if JawsConfig can't be found.
require_once 'include/Jaws/Utils.php';
if (!file_exists(__DIR__ . '/config/JawsConfig.php')) {
header('Location: '. Jaws_Utils::getBaseURL('/'). 'install/index.php');
exit;
} else {
require __DIR__ . '/config/JawsConfig.php';
if (!defined('ROOT_JAWS_PATH')) {
header('Location: '. Jaws_Utils::getBaseURL('/'). 'upgrade/index.php');
}
}
require_once ROOT_JAWS_PATH . 'include/Jaws/InitApplication.php';
$jawsApp = Jaws::getInstance();
$result = Jaws_Gadget::ExecuteMainRequest();
if (!$result['standalone']) {
$result['return'] = Jaws_Gadget::getInstance('ControlPanel')
->action
->loadAdmin('ControlPanel')
->Layout($result['gadget'], $result['return'], $result['version']);
}
terminate($result['return']);