-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
148 lines (126 loc) · 4.13 KB
/
Copy pathindex.php
File metadata and controls
148 lines (126 loc) · 4.13 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="homepage.css">
</head>
<body>
<?php
require_once 'connector.php';
?>
<div class="container">
<div class="menu">
<div class="title">
<img src="aset/warehouse.png" width="70px" height="70px">
<h4>PT Amatoa Jaya Gemilang</h4>
</div>
<ul>
<li class="menuicon">
<a href="#" onclick="loadContent('users.php', 'content')">
<img src="aset/user.png" alt="User Icon">
Users
</a>
</li>
<li class="menuicon">
<a href="#" onclick="loadContent('categories.php', 'content')">
<img src="aset/application.png" alt="Category Icon">
Categories
</a>
</li>
<li class="menuicon">
<a href="#" onclick="loadContent('items.php', 'content')">
<img src="aset/order.png">
Items
</a>
</li>
<li class="menuicon">
<a href="#" onclick="loadContent('suppliers.php', 'content')">
<img src="aset/supplier.png">
Suppliers</a>
</li>
<li class="menuicon">
<a href="#" onclick="loadContent('transactions.php', 'content')">
<img src="aset/transaction.png">
Transactions
</a>
</li>
<li class="menuicon">
<a href="#" onclick="loadContent('transaction_recap.php', 'content')">
<img src="aset/recap.png">
Transaction Recap
</a>
</li>
<li class="menuicon">
<a href="#" onclick="loadContent('notes.php', 'content')">
<img src="aset/note.png">
Notes
</a>
</li>
<li class="menuicon">
<a href="login.php" class="login-button">
<img src="aset/account.png" alt="login">
Login</a>
</li>
<li class="menuicon">
<a href="#" onclick="logout()">
<img src="aset/power.png" alt="Logout Icon">
Logout
</a>
</li>
</ul>
</div>
<div class="content" id="content">
<div class="header">
<div class="titleHeader">
<h1>Welcome Back, John Doe </h1>
<img src="aset/waving-hand.png">
</div>
<div class="WrapBox">
<div aria-label="Orange and tan hamster running in a metal wheel" role="img" class="wheel-and-hamster">
<div class="wheel"></div>
<div class="hamster">
<div class="hamster__body">
<div class="hamster__head">
<div class="hamster__ear"></div>
<div class="hamster__eye"></div>
<div class="hamster__nose"></div>
</div>
<div class="hamster__limb hamster__limb--fr"></div>
<div class="hamster__limb hamster__limb--fl"></div>
<div class="hamster__limb hamster__limb--br"></div>
<div class="hamster__limb hamster__limb--bl"></div>
<div class="hamster__tail"></div>
</div>
</div>
<div class="spoke"></div>
</div>
</div>
</div>
</div>
</div>
<script>
function loadContent(url, targetId) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById(targetId).innerHTML = this.responseText;
}
};
xhttp.open("GET", url, true);
xhttp.send();
}
function logout() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
window.location.href = "bye.php";
}
};
xhttp.open("GET", "logout.php", true);
xhttp.send();
}
</script>
</body>
</html>