-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
35 lines (31 loc) · 968 Bytes
/
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
<?php
require_once 'init.php';
$theme = $ini['general']['theme'];
$class = isset($_REQUEST['class']) ? $_REQUEST['class'] : '';
$public = in_array($class, $ini['permission']['public_classes']);
new TSession;
if ( TSession::getValue('logged') )
{
$content = file_get_contents("app/templates/{$theme}/layout.html");
$menu_string = AdiantiMenuBuilder::parse('menu.xml', $theme);
$content = str_replace('{MENU}', $menu_string, $content);
}
else
{
$content = file_get_contents("app/templates/{$theme}/login.html");
}
$content = ApplicationTranslator::translateTemplate($content);
$content = AdiantiTemplateParser::parse($content);
echo $content;
if (TSession::getValue('logged') OR $public)
{
if ($class)
{
$method = isset($_REQUEST['method']) ? $_REQUEST['method'] : NULL;
AdiantiCoreApplication::loadPage($class, $method, $_REQUEST);
}
}
else
{
AdiantiCoreApplication::loadPage('LoginForm', '', $_REQUEST);
}