-
Notifications
You must be signed in to change notification settings - Fork 0
/
top-menu.php
62 lines (48 loc) · 1.62 KB
/
top-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
<?php
require_once "config/database.php";
$query = mysqli_query($mysqli, "SELECT id_user, name_user, foto, permisos_acceso FROM usuarios WHERE id_user='$_SESSION[id_user]'")
or die('error: '.mysqli_error($mysqli));
$data = mysqli_fetch_assoc($query);
?>
<li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<?php
if ($data['foto']=="") { ?>
<img src="images/user/user-default.png" class="user-image" alt="User Image"/>
<?php
}
else { ?>
<img src="images/user/<?php echo $data['foto']; ?>" class="user-image" alt="User Image"/>
<?php
}
?>
<span class="hidden-xs"><?php echo $data['name_user']; ?> <i style="margin-left:5px" class="fa fa-angle-down"></i></span>
</a>
<ul class="dropdown-menu">
<li class="user-header">
<?php
if ($data['foto']=="") { ?>
<img src="images/user/user-default.png" class="img-circle" alt="User Image"/>
<?php
}
else { ?>
<img src="images/user/<?php echo $data['foto']; ?>" class="img-circle" alt="User Image"/>
<?php
}
?>
<p>
<?php echo $data['name_user']; ?>
<small><?php echo $data['permisos_acceso']; ?></small>
</p>
</li>
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a style="width:80px" href="?module=perfil" class="btn btn-default btn-flat">Perfil</a>
</div>
<div class="pull-right">
<a style="width:80px" data-toggle="modal" href="#logout" class="btn btn-default btn-flat">Salir</a>
</div>
</li>
</ul>
</li>