1<?php html_msgarea() ?>
2
3<?php
4if (tpl_getConf('topbar') == 'never') {
5    $top_bar = false;
6} else if (tpl_getConf('topbar') == 'connected' && empty($_SERVER['REMOTE_USER'])) {
7    $top_bar = false;
8} else {
9    $top_bar = true;
10}
11?>
12
13<?php if (class_exists('Ld_Ui') && method_exists('Ld_Ui', 'top_bar') && $top_bar) : ?>
14    <?php
15    $loginUrl = Ld_Ui::getAdminUrl(array(
16        'module' => 'default', 'controller' => 'auth', 'action' => 'login',
17    ));
18    if (empty($loginUrl)) {
19        $loginUrl = wl($ID,'do=login&amp;sectok='.getSecurityToken());
20    }
21    if (empty($logoutUrl)) {
22        $logoutUrl = wl($ID,'do=logout&amp;sectok='.getSecurityToken());
23    }
24    ?>
25    <?php Ld_Ui::top_bar(array('loginUrl' => $loginUrl, 'logoutUrl' => $logoutUrl)); ?>
26<?php else : ?>
27  <div class="user-info">
28      <?php tpl_userinfo()?>
29      <?php tpl_actionlink('subscription') ?>
30      <?php tpl_actionlink('profile') ?>
31      <?php tpl_actionlink('admin') ?>
32      <?php tpl_actionlink('login'); ?>
33  </div>
34<?php endif ?>
35