-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdashboard.php
More file actions
45 lines (40 loc) · 1.11 KB
/
dashboard.php
File metadata and controls
45 lines (40 loc) · 1.11 KB
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
<?php
session_start();
include_once "php/config.php";
if($_SESSION['admin'] != 1){
header("location: login.php");
}
$_SESSION['addc'] == 0;
?>
<?php include_once "header.php"; ?>
<body>
<div class="wrapper">
<section class="users">
<header>
<a href="dashboard.php?type=user" class="btn">Users</a>
<a href="dashboard.php?type=service" class="btn">Services</a>
<a href="php/logout.php?type=user" class="btn">Logout</a>
</header>
<?php
if(!isset($_GET['type'])){
$_SESSION['type'] = "user";
}else{
$_SESSION['type'] = mysqli_real_escape_string($conn, $_GET['type']);
}
//$_SESSION['type'] = 'user';
?>
<div class="users-list">
</div>
<?php
if($_SESSION['type']=="service"){
echo '<br>
<div style="display: flex; justify-content: center;">
<a class="btn" href="addservice.php">Add Service</a>
</div>';
}
?>
</section>
</div>
<script src="javascript/admin.js"></script>
</body>
</html>