-
Notifications
You must be signed in to change notification settings - Fork 3
/
laporan.php
47 lines (45 loc) · 1.16 KB
/
laporan.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
<?php
if (!isset($_SESSION)) { session_start(); }
include('inc/conn.php');
include('inc/fungsi.php');
//menu ini hanya bole diakses oleh pengguna sudah login sahaja
if (isset($_SESSION['user'])) {
if (!empty($_GET['menu'])) {
switch($_GET['menu']) {
case "senarai":
include('tmp/header.php');
//jika admin, paparkan semua pelajar
if ($tm['ulevel'] == 1) {
include('tmp/laporan_koko1.php');
}
//jika guru biasa, paparkan murid kelas berkenaan sahaja
else {
include('tmp/laporan_koko2.php');
}
include('tmp/footer.php');
break;
case "pelajar":
if (!empty($_GET['id']) && is_numeric($_GET['id']) && strlen($_GET['id']) == 12) {
include('tmp/laporan_pelajar.php');
}
break;
default:
include('tmp/header.php');
echo '<meta http-equiv="Refresh" content="0;url=index.php">';
include('tmp/footer.php');
break;
}
}
else {
include('tmp/header.php');
echo '<meta http-equiv="Refresh" content="0;url=index.php">';
include('tmp/footer.php');
}
}
//jika belum login
else {
include('tmp/header.php');
echo '<meta http-equiv="Refresh" content="0;url=index.php">';
include('tmp/footer.php');
}
?>