-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmenu.php
More file actions
20 lines (19 loc) · 816 Bytes
/
menu.php
File metadata and controls
20 lines (19 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
include "config/koneksi.php";
if ($_SESSION['leveluser']=='admin'){
$query = "SELECT * FROM modul WHERE aktif='Y' ORDER BY urutan";
$hasil = mysqli_query($konek, $query);
while ($m=mysqli_fetch_array($hasil)){
echo "<li><a class=\"ajax-link\" href=\"$m[link]\"><i
class=\"glyphicon glyphicon-align-justify\"></i><span> $m[nama_modul] </span></a></li>";
}
}
elseif ($_SESSION['leveluser']=='user'){
$query = "SELECT * FROM modul WHERE status='user' and aktif='Y' ORDER BY urutan";
$hasil = mysqli_query($konek, $query);
while ($m=mysqli_fetch_array($hasil)){
echo "<li><a class=\"ajax-link\" href=\"$m[link]\"><i
class=\"glyphicon glyphicon-align-justify\"></i><span> $m[nama_modul] </span></a></li>";
}
}
?>