-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
59 lines (51 loc) · 1.75 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
<?php
/**
* @package JohnCMS
* @link http://johncms.com
* @copyright Copyright (C) 2008-2011 JohnCMS Community
* @license LICENSE.txt (see attached file)
* @version VERSION.txt (see attached file)
* @author http://johncms.com/about
*/
define('_IN_JOHNCMS', 1);
require('incfiles/core.php');
if (isset($_SESSION['ref']))
unset($_SESSION['ref']);
if (isset($_GET['err']))
$act = 404;
switch ($act) {
case '404':
/*
-----------------------------------------------------------------
Сообщение об ошибке 404
-----------------------------------------------------------------
*/
$headmod = 'error404';
require('incfiles/head.php');
echo functions::display_error($lng['error_404']);
break;
default:
/*
-----------------------------------------------------------------
Главное меню сайта
-----------------------------------------------------------------
*/
if (isset($_SESSION['ref']))
unset($_SESSION['ref']);
$headmod = 'mainpage';
require('incfiles/head.php');
include 'pages/mainmenu.php';
/*
-----------------------------------------------------------------
Карта сайта
-----------------------------------------------------------------
*/
if (isset($set['sitemap'])) {
$set_map = unserialize($set['sitemap']);
if ($set_map['forum'] && ($set_map['users'] || !$user_id) && ($set_map['browsers'] || !$is_mobile)) {
$map = new sitemap();
echo '<div class="sitemap">' . $map->site() . '</div>';
}
}
}
require('incfiles/end.php');