-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
25 lines (22 loc) · 1.07 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
<?php
require_once 'init.php';
$theme = $ini['general']['theme'];
new TSession;
$content = file_get_contents("app/templates/{$theme}/layout.html");
$menu_string = AdiantiMenuBuilder::parse('menu.xml', $theme);
$content = str_replace('{MENU}', $menu_string, $content);
$content = ApplicationTranslator::translateTemplate($content);
$content = str_replace('{LIBRARIES}', file_get_contents("app/templates/{$theme}/libraries.html"), $content);
$content = str_replace('{class}', isset($_REQUEST['class']) ? $_REQUEST['class'] : '', $content);
$content = str_replace('{template}', $theme, $content);
$content = str_replace('{MENU}', $menu_string, $content);
$content = str_replace('{lang}', $ini['general']['language'], $content);
$css = TPage::getLoadedCSS();
$js = TPage::getLoadedJS();
$content = str_replace('{HEAD}', $css.$js, $content);
echo $content;
if (isset($_REQUEST['class']))
{
$method = isset($_REQUEST['method']) ? $_REQUEST['method'] : NULL;
AdiantiCoreApplication::loadPage($_REQUEST['class'], $method, $_REQUEST);
}