-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin-dashboard.html
40 lines (40 loc) · 1.48 KB
/
admin-dashboard.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Dashboard - Digital Store</title>
<link rel="stylesheet" href="admin.css">
</head>
<body>
<header>
<!-- <h1>Admin Dashboard</h1> -->
</header>
<main>
<div class="product-form">
<h2>Add New Product</h2>
<form id="product-form">
<label for="product-name">Product Name:</label>
<input type="text" id="product-name" name="product-name" required>
<label for="product-description">Description:</label>
<textarea id="product-description" name="product-description" required></textarea>
<label for="product-image">Product Image:</label>
<input type="file" id="product-image" name="product-image" accept="image/*" required>
<button type="submit">Add Product</button>
</form>
</div>
</main>
<button id="logout-button">Logout</button>
<script src="admin-dashboard.js"></script>
<script>
// Periksa apakah pengguna telah login saat halaman dimuat
window.onload = function() {
var isLoggedIn = sessionStorage.getItem('isLoggedIn');
if (!isLoggedIn) {
// Jika pengguna belum login, arahkan ke halaman login
window.location.href = 'login.html';
}
};
</script>
</body>
</html>