-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin.php
78 lines (66 loc) · 2.25 KB
/
admin.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
<?php
include_once 'epic.php';
if (signed_in()) {
if ( !( unserialize($_SESSION['user'])->isAdmin() ) ) {
header("Location: index.php");
}
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta content="author" name="Markus Benjamin Kretsch">
<meta content="author" name="Frank Kevin Zey">
<link href="styles/admin.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="head_background">
<a href='index.php'>EWAProject</a> <font id="re">We etablish your Events!</font>
<font id="re2">Administrationarea</font>
<?php
if (signed_in()) {
if ( ( unserialize($_SESSION['user'])->isAdmin() ) ) {
echo '<a href="logout.php"><p id="logout">Logout</p><a>';
}
} else {
header('Location: 404.html');
}
?>
<hr>
</div>
<div id="navbar">
<a href="admin.php"><p id="navItem">Dashboard</p></a>
<a href="admin.php?users"><p id="navItem">User</p></a>
<a href="admin.php?videos"><p id="navItem">Video</p></a>
<a href="admin.php?events"><p id="navItem">Event</p></a>
<!--
<a href="admin.php?item"><p id="navItem">Item</p></a>
Here are space for more nav items!
-->
</div>
<div id="dashboard">
<noscript>
<strong>Please activate JavaScript for full functionallity!</strong>
</noscript>
<?php
if (isset($_GET['users'])) {
include 'partial/admin_users.php'; # displays all users
} else if (isset($_GET['videos'])) {
include 'partial/admin_videos.php'; # displays all videos
} else if (isset($_GET['events'])) {
include 'partial/admin_events.php'; # displays all events
} else if (isset($_GET['event'])) {
include 'partial/admin_event.php'; # displays all events
} else if (isset($_GET['user'])) {
include 'partial/admin_user.php'; # displays all events
} else if (isset($_GET['video'])) {
include 'partial/admin_video.php'; # displays all events
} else { # all unknown GET parameters will display dashboard
include 'partial/admin_dashboard.php'; # displays dashboard
}
?>
</div>
<div id="footer"><br><br><br>created and © by Frank Kevin Zey & Markus Benjamin Kretsch</div>
</body>
</html>