-
Notifications
You must be signed in to change notification settings - Fork 6
/
_menu.php
31 lines (27 loc) · 1012 Bytes
/
_menu.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
<?php
// Default menu items
$menu=new htmlList('ul',array('class' => 'menu'));
$menu->listItem($CONFIG['site']['name'],array('class' => 'menu-text'));
$menu->listItem('<a href="index.php">Dashboard</a>');
if($USER->auth>0) {
// Logged in
$menu->listItem('<a href="publications.php">All publications</a>');
$menu->listItem('<a href="researchers.php">Researchers and Labs</a>');
$menu->listItem('<a href="users.php">Users</a>');
$user_status_button="<li>".$USER->data['user_email']." </li><li><button type=\"button\" class=\"small button\" onclick=\"location.href='logout.php'\">Logout</button></li>";
} else {
// Not logged in
$user_status_button="<li><button type=\"button\" class=\"small button\" onclick=\"location.href='login.php'\">Login</button></li>";
}
?>
<div class="top-bar">
<div class="top-bar-left">
<?php echo $menu->render(); ?>
</div>
<div class="top-bar-right">
<ul class="menu">
<?php echo $user_status_button; ?>
</ul>
</div>
</div>
<?php echo $ALERTS->render(); ?>