/
tools.php
40 lines (38 loc) · 1.39 KB
/
tools.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
<?php
include 'util/loginCheck.php';
if($_SESSION['usertype'] == "U") { // Disallow regular users from accessing tools page.
header('Location: index.php');
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Tools</title>
<?php include 'includes/globalHead.html' ?>
<link rel="stylesheet" href="res/css/tools.css">
</head>
<body>
<?php
include 'includes/header.php';
include 'includes/nav.php';
?>
<div class="pageContent">
<div class="toolsHomepageNav">
<h1>Tools</h1>
<ul>
<li><a <?php print($toolsTab === "editorpage" ? 'class="active"' : ''); ?> href="/editorpage.php">Editor Page</a></li>
<?php
if($_SESSION['usertype'] === 'A') {
print '
<li><a '.($toolsTab === "usermanagement" ? 'class="active"' : '').' href="/userManagement.php">Manage Users</a></li>
<li><a '.($toolsTab === "articlemanagement" ? 'class="active"' : '').' href="/articleManagement.php">Manage Articles</a></li>
<li><a '.($toolsTab === "commentmanagement" ? 'class="active"' : '').' href="/commentManagement.php">Manage Comments</a></li>
';
}
?>
</ul>
</div>
</div>
<?php include 'includes/footer.html'; ?>
</body>
</html>