-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
43 lines (35 loc) · 1.98 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
<?php
require_once 'init.php';
FormDinHelper::setFormDinMinimumVersion($ini['system']['formdin_min_version']);
$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);
//---FORMDIN 5 -------------------------
$content = str_replace('{head_title}', $ini['general']['application'], $content);
$content = str_replace('{formdin_version}', FormDinHelper::version(), $content);
$content = str_replace('{system_version}', $ini['system']['version'], $content);
$content = str_replace('{system_name}', $ini['system']['system_name'], $content);
$content = str_replace('{system_name_sub}', $ini['system']['system_name_sub'], $content);
$content = str_replace('{logo-mini}', $ini['system']['logo-mini'], $content);
$content = str_replace('{logo-lg}', $ini['system']['logo-lg'], $content);
$content = str_replace('{logo-link-class}', $ini['system']['logo-link-class'], $content);
$content = str_replace('{login-link}', $ini['system']['login-link'], $content);
//---FIM FORMDIN 5 -----------------------
$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);
$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);
} else {
AdiantiCoreApplication::loadPage('AjudaView', null, null);
}