summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorraul2014-06-24 16:58:54 +0200
committerMichael Pereira Neves2014-07-11 15:01:59 +0200
commit2ee30c8128a464386f87be428f3ab3061d073e40 (patch)
tree85af1f5d429668d99dae06fb9cdd3b081829ad84 /index.php
parent[i18n] add i18n support, WIP (diff)
downloadslx-admin-2ee30c8128a464386f87be428f3ab3061d073e40.tar.gz
slx-admin-2ee30c8128a464386f87be428f3ab3061d073e40.tar.xz
slx-admin-2ee30c8128a464386f87be428f3ab3061d073e40.zip
[i18n] implemented translator logic
Diffstat (limited to 'index.php')
-rw-r--r--index.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/index.php b/index.php
index e5782e6a..a3f5384e 100644
--- a/index.php
+++ b/index.php
@@ -3,7 +3,9 @@
require_once 'config.php';
require_once 'dictionary.php';
+Dictionary::build();
+require_once('inc/user.inc.php');
/**
* Page class which all "modules" must be extending from
@@ -115,8 +117,11 @@ if (AJAX) {
Page::preprocess();
// Generate Main menu
-$menu = new Menu;
-Render::addTemplate('main-menu', $menu);
+//$menu = new Menu;
+if(User::getName() === false) Render::addTemplate('main-menu-login');
+else Render::addTemplate('main-menu-logout',array(
+ 'user' => User::getName()
+ ));
Message::renderList();