-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathadmin_index.php
More file actions
103 lines (100 loc) · 3.27 KB
/
Copy pathadmin_index.php
File metadata and controls
103 lines (100 loc) · 3.27 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
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php
session_start();
require_once "db_connection.php";
require "functions.php";
require "header_footer.php";
if(!isset($_SESSION['user_email'])){
header('location: admin_login.php?not_admin=You are not Admin!');
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="">
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Bangers|Old+Standard+TT">
<title>DevilHUB Admin Panel</title>
<style>
* {
font-family: 'Old Standard TT', serif;
}
</style>
</head>
<body>
<?php getHeader(); ?>
<div class="wrapper">
<div class="sidebar-header">
<h3> Admin Panel</h3>
</div>
<div style="text-decoration-color: black">
<div class="align:right">
<ul class="list-unstyled components">
<li>
<a href="admin_index.php?insert_product" style="color: darkorange">
<i class="fas fa-plus" ></i> Insert New Product
</a>
</li>
<li>
<a href="admin_index.php?view_products" style="color: darkorange">
<i class="fas fa-sitemap"></i> View All Products
</a>
</li>
<li>
<a href="admin_index.php?view_categories" style="color: darkorange">
<i class="fas fa-band-aid"></i> View All Categories
</a>
</li>
<li>
<a href="logout.php" style="color: darkorange">
<i class="fa fa-sign-out-alt"></i> Admin logout</a>
</li>
</ul>
</div>
</div>
<div id="content">
<div class="container" style="background: ghostwhite" >
<h2 class="text-center text-primary"><?php echo @$_GET['logged_in']?></h2>
<?php
if(isset($_GET['insert_product'])){
include ('insert_product.php');
}
else if(isset($_GET['view_products'])){
include ('view_products.php');
}
else if(isset($_GET['edit_pro'])){
include ('edit_pro.php');
}
else if(isset($_GET['del_pro'])){
include ('del_pro.php');
}
else if(isset($_GET['view_categories'])){
getCats();
}
else if(isset($_GET['edit_cat'])){
include ('edit_cat.php');
}
else if(isset($_GET['del_cat'])){
include ('del_cat.php');
}
?>
</div>
</div>
</div>
<script src="../js/jquery-3.3.1.js"></script>
<script src="../js/bootstrap.bundle.js"></script>
<script>
$(document).ready(function () {
$('#sidebarCollapse').on('click', function () {
$('#sidebar').toggleClass('active');
});
});
</script>
<?php getFooter(); ?>
</body>
</html>