-
Notifications
You must be signed in to change notification settings - Fork 1
/
menu.php
87 lines (76 loc) · 3.45 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
/*
IM - Infrastructure Manager
Copyright (C) 2011 - GRyCAP - Universitat Politecnica de Valencia
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
require_once 'user.php';
require 'config.php' ;
if (!isset($menu)) {
$menu = "";
}
?>
<div id="caja_menu_lateral">
<div id="caja_menu">
<div id='cssmenu'>
<ul>
<li><a <?php echo $menu == "Infrastructures" ? 'class="seleccionado"' : ""; ?> href='list.php'><span><img style="vertical-align: middle;" src="images/icon_infra.png" />  Infrastructures</span></a></li>
<li><a <?php echo $menu == "Credentials" ? 'class="seleccionado"' : ""; ?> href='credentials.php'><span><img style="vertical-align: middle;" src="images/icon_creden.png" />  Credentials</span></a></li>
<li><a <?php echo $menu == "RADL" ? 'class="seleccionado"' : ""; ?> href='radl_list.php'><span><img style="vertical-align: middle;" src="images/icon_radl.png" />  Topologies</span></a></li>
<?php
if ($recipes_db != "") {
?>
<li><a <?php echo $menu == "Recipes" ? 'class="seleccionado"' : ""; ?> href='recipe_list.php'><span><img style="vertical-align: middle;" src="images/icon_recipes.png" />  Recipes</span></a></li>
<?php
}
if (check_admin_user()) {
$admin = false;
$user_style = "";
$group_style = "";
if ($menu == "Users" || $menu == "Groups") {
$admin = true;
$user_style = "height:36px;";
$group_style = "height:36px;";
}
if ($menu == "Users") {
$user_style = "height:36px;background-color:#DDD;font-weight:bold;";
}
if ($menu == "Groups") {
$group_style = "height:36px;background-color:#DDD;font-weight:bold;";
}
?>
<li class='<?php echo $admin ? 'seleccionado' : 'has-sub'; ?>'><a href='#'><span><img style="vertical-align: middle;" src="images/icon_admin.png" />  Admin               <img style="vertical-align: middle;" src="images/icon_admin_desp.png" /></span></a>
<?php
if (!$admin) {
?>
<ul>
<?php
}
?>
<li style=<?php echo $user_style;?>><a href='user_list.php'><span style="font-size: 13px;"><img style="vertical-align: middle; padding-left:26px;" src="images/icon_users.png" />  Users</span></a></li>
<li style=<?php echo $group_style;?> class='last'><a href='group_list.php'><span style="font-size: 13px;"><img style="vertical-align: middle; padding-left:26px;" src="images/icon_groups.png" />  Groups</span></a></li>
<?php
if (!$admin) {
?>
</ul>
<?php
}
?>
</li>
<?php
}
?>
<li></li>
</ul>
</div>
</div>
</div>