-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathprofil.php
63 lines (58 loc) · 1.19 KB
/
profil.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
<?php
if (!isset($_SESSION)) { session_start(); }
include('inc/conn.php');
include('inc/fungsi.php');
include('tmp/header.php');
//jika dah login
if (isset($_SESSION['user'])) {
if (!empty($_GET['menu'])) {
switch($_GET['menu']) {
case "logout":
include('inc/logout.php');
break;
case "daftar":
if (!empty($_POST['nokp'])) {
include('inc/profil_daftar.php');
}
else {
include('tmp/profil_daftar.php');
}
break;
case "maklumat":
include('tmp/profail_maklumat.php');
break;
case "katalaluan":
if (!empty($_POST['pass2'])) {
include('inc/profail_pass.php');
}
else {
include('tmp/profail_pass.php');
}
break;
default:
echo '<meta http-equiv="Refresh" content="0;url=index.php">';
break;
}
}
else {
echo '<meta http-equiv="Refresh" content="0;url=index.php">';
}
}
//jika belum login
else {
if (!empty($_GET['menu'])) {
switch($_GET['menu']) {
case "login":
include('inc/login.php');
break;
default:
echo '<meta http-equiv="Refresh" content="0;url=index.php">';
break;
}
}
else {
echo '<meta http-equiv="Refresh" content="0;url=index.php">';
}
}
include('tmp/footer.php');
?>