MobileCMS | Mobilecms
Какой файл отвечает за главную страницу
TIMI (21.06.2013 в 20:05)
Index
Index
ну и где тут изменить главную:
<?php1:
2: /**
3: * MobileCMS
4: *
5: * Open source content
management system for
mobile sites
6: *
7: * @author MobileCMS
Team
<support@mobilecms.ru>
8: * @copyright Copyright (c)
2011, MobileCMS Team
9: * @link http://mobilecms.ru
Official site
10: * @license http://
opensource.org/licenses/gpl-
license.php GNU Public
License
11: */
12:
13: // Начало подсчета
времени генерации
страницы
14: $start_time = microtime
(true);
15:
16: defined('ROOT') or define
('ROOT', str_replace('\\', '/',
realpath(dirname
(__FILE__))) .'/');
17: define('IN_SYSTEM', TRUE);
18:
19: // Конфигурация
системы
20: if (file_exists
(ROOT .'data_files/
config.php')) {
21: require_once
(ROOT .'data_files/
config.php');
22: }
23: else {
24: header('Location: ./install/
index.php');
25: exit;
26: }
27:
28: // Подключаем
главные функции ядра
29: include_once
(ROOT .'kernel/
general_functions.php');
30: // Конфигурация php
31: include_once
(ROOT .'kernel/ini_set.php');
32: // Подключаем Registry
33: a_import('libraries/
registry');
34:
35: session_name('sid');
36: session_start();
37:
38: // Легкий XSS clean =)
39: $_GET = array_map
('htmlspecialchars_array',
$_GET);
40:
41: // Подключаем MySQL
класс
42: a_import('libraries/mysql');
43: $db = new MySQL();
44: $db->connect();
45: $db->charset('utf8');
46:
47: // Добавяем $db в
Registry
48: Registry::set('db', $db);
49:
50: // Загрузка
конфигурации системы
51: $CONFIG = array();
52: $result = $db->query
("SELECT * FROM a_config");
53: while ($item = $db-
>fetch_array($result))
$CONFIG[$item['module']]
[$item['key']] = $item['value'];
54:
55: define('MAIN_MENU',
$CONFIG['system']
['main_menu']);
56: define('EXT', $CONFIG
['system']['ext']);
57: define
('DEFAULT_MODULE',
$CONFIG['system']
['default_module']);
58:
59: // Добавяем $CONFIG в
Registry
60: Registry::set('config',
$CONFIG);
61:
62: // Показ ошибок
63: if ($CONFIG['system']
['display_errors']) ini_set
('display_errors', 'On');
64: else ini_set
('display_errors', 'Off');
65:
66: // Мини роутинг
67: a_import('libraries/route');
68: $route = new Route;
69:
70: // Загрузка основного
хелпера основного
модуля
71: a_import('modules/main/
helpers/main');
72: // Загрузка хелпера
модулей
73: a_import('modules/
modules/helpers/modules');
74:
75: // Ежедневные
действия в системе
76: a_import('kernel/
everyday');
77:
78: // Подключаем и
инициализируем
контроллер
79: a_import('libraries/
controller');
80: $controller = a_load_class
(ROUTE_CONTROLLER_PATH,
'controller');
81:
82: // Выполняем метод
контроллера
83: if ( ! empty($route-
>action)) {
84: $action_method =
'action_'. $route->action;
85:
86: if (method_exists
($controller, $action_method))
{
87: $controller->
$action_method();
88: }
89: else header('Location: '.
a_url('main/page_not_found', '',
true));
90: }
91: else {
92: if (method_exists
($controller, 'action_index'))
{
93: $controller->action_index
();
94: }
95: else header('Location: '.
a_url('main/page_not_found', '',
true));
96: }
97:
98: // Вывод профайлера
99: if ($CONFIG['system']
['profiler'] == 'on' &&
ACCESS_LEVEL == 10)
a_profiler($start_time);
100: ?>
из админки
![](/views/icon/no_avatar.png)
DELETED
16 июля 2013, в 15:25
Delete