-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
48 lines (38 loc) · 1.14 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
<?php
/*
* JohnCMS NEXT Mobile Content Management System (http://johncms.com)
*
* For copyright and license information, please see the LICENSE.md
* Installing the system or redistributions of files must retain the above copyright notice.
*
* @link http://johncms.com JohnCMS Project
* @copyright Copyright (C) JohnCMS Community
* @license GPL-3
*/
define('_IN_JOHNCMS', 1);
require('system/bootstrap.php');
$act = isset($_GET['act']) ? trim($_GET['act']) : '';
if (isset($_SESSION['ref'])) {
unset($_SESSION['ref']);
}
if (isset($_GET['err'])) {
$act = 404;
}
switch ($act) {
case '404':
/** @var Johncms\Tools $tools */
$tools = App::getContainer()->get('tools');
$headmod = 'error404';
require('system/head.php');
echo $tools->displayError(_t('The requested page does not exists'));
break;
default:
// Главное меню сайта
if (isset($_SESSION['ref'])) {
unset($_SESSION['ref']);
}
$headmod = 'mainpage';
require('system/head.php');
include 'system/mainmenu.php';
}
require('system/end.php');