-
Notifications
You must be signed in to change notification settings - Fork 0
/
engine.php
executable file
·37 lines (32 loc) · 1.12 KB
/
engine.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
<?php
include_once 'lib/adianti/util/TAdiantiLoader.class.php';
spl_autoload_register(array('TAdiantiLoader', 'autoload_web'));
$ini = parse_ini_file('application.ini');
date_default_timezone_set($ini['timezone']);
define('APPLICATION_NAME', $ini['application']);
define('OS', strtoupper(substr(PHP_OS, 0, 3)));
define('PATH', dirname(__FILE__));
class TApplication extends TCoreApplication
{
static public function run($debug = FALSE)
{
new TSession;
$lang = TSession::getValue('language') ? TSession::getValue('language') : 'en';
TAdiantiCoreTranslator::setLanguage($lang);
TApplicationTranslator::setLanguage($lang);
if ($_REQUEST)
{
$class = isset($_REQUEST['class']) ? $_REQUEST['class'] : '';
if (!TSession::getValue('logged') AND $class !== 'LoginForm')
{
echo TPage::getLoadedCSS();
echo TPage::getLoadedJS();
new TMessage('error', 'Not logged');
return;
}
parent::run($debug);
}
}
}
TApplication::run(TRUE);
?>