-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin.php
449 lines (388 loc) · 21.3 KB
/
admin.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
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
<?php
session_start();
if(!isset($_SESSION['name'])){
?>
<script>
alert("You are logged out");
</script>
<?php
header('location:login.php');
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Panel</title>
<link rel="stylesheet" href="admin_panel/style.css">
<link rel="stylesheet" href="admin_panel/laptopmode.css">
<link rel="stylesheet" href="admin_panel/tabletmode.css">
<link rel="stylesheet" href="admin_panel/mobilemode.css">
<link rel="stylesheet" href="admin_panel/laptop1024pxless.css">
<script src="admin_panel/script.js"></script>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"
integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous">
</script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"
integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous">
</script>
<script src="admin_panel/jquery/jquery-3.6.1.min.js"></script>
<script src="https://kit.fontawesome.com/b90099deb6.js" crossorigin="anonymous"></script>
</head>
<body>
<div class="container-fluid p-0">
<div class="wrapper" style="max-width: 100%;">
<div class="toggle-button btn">
<span class="fas fa-bars toggler-icon"></span>
</div>
<nav class="sidebar bg-primary">
<ul class="main_side multi-work-ul m-0">
<div class="text">
<div class="image-upload">
<label for="file-input">
<img src="admin_panel/img/profile-img.png" alt="" class="img-responsive">
<div id="display-image"></div>
</label>
<input type="file" id="file-input" accept="image/jpeg, image/png, image/jpg">
<p class="profile-name">Abc <i class="fa-solid fa-angle-right"></i></p>
</div>
<style>
#display-image {
width: 56px;
height: 56px;
/* border: 1px solid black; */
background-position: center;
background-size: cover;
position: absolute;
border-radius: 50%;
top: 15px;
left: 27px;
}
.profile-name {
display: inline-block;
}
.image-upload>input {
display: none;
}
.image-upload img {
width: 80px;
cursor: pointer;
}
</style>
<script>
const image_input = document.querySelector("#file-input");
image_input.addEventListener("change", function() {
const reader = new FileReader();
reader.addEventListener("load", () => {
const uploaded_image = reader.result;
document.querySelector("#display-image").style.backgroundImage =
`url(${uploaded_image})`;
});
reader.readAsDataURL(this.files[0]);
});
</script>
</div>
<li class="active1"><a href="admin.php"><i class="fas fa-fw fa-tachometer-alt"></i> Admin</a>
</li>
<li><a href="display.php"><i class="fa-solid fa-display"></i> Display Data</a>
</li>
<!-- <li><a href="#"><i class="fas fa-fw fa-tachometer-alt"></i> Items</a>
</li>
<li>
<a href="#" id="1"><i class="fas fa-fw fa-folder"></i> Sale
<span class="span-down fa-solid fa-angle-right"></span>
</a>
<ul class="item-show-1 multi-work-ul">
<li><a href="#" class="pt-2">Sale Invoices</a></li>
<li><a href="#" class="pb-2">Estimate/ Quotation</a></li>
<li><a href="#" class="pb-2">Payment In</a></li>
<li><a href="#" class="pb-2">Sale Order</a></li>
<li><a href="#" class="pb-2">Delivery Challan</a></li>
<li><a href="#" class="pb-2">Sale Return/ Cr.Note</a></li>
</ul>
</li>
<li>
<a href="#" id="2"><i class="fa-sharp fa-solid fa-user-tie"></i> Purchase
<span class="span-down fa-solid fa-angle-right"></span>
</a>
<ul class="item-show-2 multi-work-ul">
<li><a href="#" class="pt-2">Purchase Bills</a></li>
<li><a href="#" class="pb-2">Payment Out</a></li>
<li><a href="#" class="pb-2">Payment Order</a></li>
<li><a href="#" class="pb-2">Purchase Return/ Dr. Note</a></li>
</ul>
</li>
<li><a href="#"><i class="fa-solid fa-users"></i> Expenses</a></li>
<li>
<a href="#" id="3"><i class="fas fa-fw fa-table"></i> Cash & Bank
<span class="span-down fa-solid fa-angle-right"></span>
</a>
<ul class="item-show-3 multi-work-ul">
<li><a href="#" class="pt-2">Bank Accounts</a></li>
<li><a href="#" class="pt-2">Cash In Hand</a></li>
<li><a href="#" class="pb-2">Cheques</a></li>
<li><a href="#" class="pb-2">Loan Accounts</a></li>
</ul>
</li>
<li><a href="#"><i class="fas fa-fw fa-chart-area"></i> My Online Store</a></li>
<li class="mb-3"><a href="#"><i class="fa-solid fa-file-pen"></i> Reports</a></li>
<li class="pt-3"><a href="#"><i class="fa-solid fa-file-pen"></i> Other Products</a></li>
<li><a href="#"><i class="fa-solid fa-file-pen"></i> Sync</a></li>
<li>
<a href="#" id="4"><i class="fas fa-fw fa-table"></i> Backup/Restore
<span class="span-down fa-solid fa-angle-right"></span>
</a>
<ul class="item-show-4 multi-work-ul">
<li><a href="#" class="pt-2">Auto Backup</a></li>
<li><a href="#" class="pt-2">Backup To Computer</a></li>
<li><a href="#" class="pb-2">Backup to Drive</a></li>
<li><a href="#" class="pb-2">Restore Backup</a></li>
</ul>
</li>
<li>
<a href="#" id="5"><i class="fas fa-fw fa-table"></i> Utilities
<span class="span-down fa-solid fa-angle-right"></span>
</a>
<ul class="item-show-5 multi-work-ul">
<li><a href="#" class="pt-2">Generate Barcode</a></li>
<li><a href="#" class="pt-2">Import Items</a></li>
<li><a href="#" class="pb-2">Bulk Update Items</a></li>
<li><a href="#" class="pb-2">Import Parties</a></li>
<li><a href="#" class="pb-2">Export To Tally</a></li>
<li><a href="#" class="pb-2">Export Items</a></li>
<li><a href="#" class="pb-2">Verify My Data</a></li>
<li><a href="#" class="pb-2">Recycle Bin</a></li>
<li><a href="#" class="pb-2">Close Financial Year</a></li>
</ul>
</li>
<li class="mb-3"><a href="#"><i class="fa-solid fa-file-pen"></i> Settings</a></li>
<li class="pt-3"><a href="#"><i class="fa-solid fa-file-pen"></i> Trial Info</a></li>
<li><a href="#"><i class="fa-solid fa-file-pen"></i> Request A Demo</a></li>
<li><a href="#"><i class="fa-solid fa-file-pen"></i> Share Feedback</a></li> -->
</ul>
</nav>
<div class="content">
<div class="search-content">
<form action="" class="search-form">
<div class="input-group">
<input type="search" name="" id="" class="search-top-input" placeholder="Search for...">
<button class="btn btn-primary" type="button">
<i class="fas fa-search fa-sm"></i>
</button>
</div>
</form>
<i class="fas fa-search fa-sm small-search-icon"></i>
<div class="side-item d-inline-block">
<ul class="navbar-nav" style="flex-direction: row;">
<li class="nav-item">
<a href="#" class="top-badge-a nav-link">
<i class="fas fa-bell fa-fw" style="color: #d1d3e2;"></i>
<span class="badge badge-danger badge-counter">3+</span>
</a>
</li>
<li class="nav-item">
<a href="#" class="top-badge-a nav-link">
<i class="fas fa-envelope fa-fw" style="color: #d1d3e2;"></i>
<span class="badge badge-danger badge-counter">7</span>
</a>
</li>
<div class="vr"></div>
<li class="nav-item dropdown no-arrow">
<a href="#" class="loger d-inline-block nav-link dropdown-toggle" id="userDropdown"
data-bs-toggle="dropdown" aria-expanded="false">
<p class="loger-name"><?php echo $_SESSION['name']; ?></p>
<img src="admin_panel/img/undraw_profile.svg" alt="" width="30"
class="img-responsive me-3">
</a>
<div class="dropdown-menu dropdown-menu-right border-0 shadow"
aria-labelledby="userDropdown">
<a href="#" class="dropdown-item drop-user-a"><i
class="drop-user-profile fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i> Profile</a>
<a class="dropdown-item drop-user-a" href="#">
<i
class="drop-user-profile fas fa-cogs fa-sm fa-fw mr-2 text-gray-400"></i>
Settings
</a>
<a class="dropdown-item drop-user-a" href="#">
<i
class="drop-user-profile fas fa-list fa-sm fa-fw mr-2 text-gray-400"></i>
Activity Log
</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item drop-user-a" href="logout.php" data-toggle="modal"
data-target="#logoutModal">
<i
class="drop-user-profile fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
Logout
</a>
</div>
</li>
</ul>
</div>
</div>
<!-- <div class="dashboard">
<p class="dashboard-word d-inline-block">Dashboard</p>
<a href="#" class="btn-primary shadow-sm generate-report-btn"><i
class="fas fa-download fa-sm text-white-50"></i> Generate Report</a>
<div class="four-earning-data container-fluid ps-4 pe-4">
<div class="row">
<div class="col-lg-3 col-md-6 col-sm-6 col-12">
<div class="earning-col border-left-primary">
<p class="earning-word text-primaryy">Earnings (Monthly)</p><br>
<p class="earning-price">$40,000</p>
<i class="fas fa-calendar fa-2x text-gray-300"></i>
</div>
</div>
<div class="col-lg-3 col-md-6 col-sm-6 col-12">
<div class="earning-col border-left-success">
<p class="earning-word text-successs">Earnings (Annual)</p><br>
<p class="earning-price">$215,000</p>
<i class="fas fa-dollar-sign fa-2x text-gray-300"></i>
</div>
</div>
<div class="col-lg-3 col-md-6 col-sm-6 col-12">
<div class="earning-col border-left-info">
<p class="earning-word text-infoo">Tasks</p><br>
<p class="earning-price">50%</p>
<i class="fas fa-clipboard-list fa-2x text-gray-300"></i>
</div>
</div>
<div class="col-lg-3 col-md-6 col-sm-6 col-12">
<div class="earning-col border-left-warning">
<p class="earning-word text-warningg">Pending Requests</p><br>
<p class="earning-price">18</p>
<i class="fas fa-comments fa-2x text-gray-300"></i>
</div>
</div>
</div>
</div>
</div> -->
<!-- <div class="graphs">
<php include 'linegraph.php'; ?>
<php include 'piegraph.php'; ?>
</div> -->
<style>
h1.top-header {
font-family: 'Cairo', sans-serif;
font-size: 26px;
text-align: center;
border-bottom: 4px solid black;
display: block;
margin: 61px auto 20px auto;
width: 247px;
font-weight: bold;
}
* {
font-family: 'poppins', sans-serif;
}
body {
background-color: #c2d7ca;
}
tr {
line-height: 34px;
}
@media screen and (min-width: 480px) {
th,
td {
padding-left: 26px !important;
padding-right: 26px !important;
}
}
td a .vi {
color: #a3a3ff;
font-weight: bold !important;
}
td a .ed {
color: #7fff7f;
font-weight: bold !important;
}
td a .del {
color: #ff595b;
font-weight: bold !important;
}
</style>
<div class="main-div">
<h1 class="top-header">Contact data of CodeWithGautam.in</h1>
<div class="center-div">
<div class="table-responsive">
<table class="table table-primary table-striped">
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>Email</th>
<th>Message</th>
<th colspan="3">Operation</th>
</tr>
</thead>
<tbody>
<?php
include 'conn.php';
$selectquery = " select * from gautamcontactinfo ";
$query = mysqli_query($conn,$selectquery);
// $nums = mysqli_num_rows($query);
// echo $nums;
// $res = mysqli_fetch_array($query);
// echo $res[1];
while($res = mysqli_fetch_array($query) ){
// echo $res['name'] . "<br>";
?>
<tr>
<td><?php echo $res['ID']; ?></td>
<td><?php echo $res['Name']; ?></td>
<td><?php echo $res['Email']; ?></td>
<td><?php echo $res['Message']; ?></td>
<td><a href="view.php?id=<?php echo $res['ID']; ?>" data-bs-toggle="tooltip"
data-bs-placement="bottom" data-bs-title="View"><i
class="fa-solid fa-eye vi" aria-hidden="true"></i></a></td>
<td><a href="update.php?id=<?php echo $res['ID']; ?>" data-bs-toggle="tooltip"
data-bs-placement="bottom" data-bs-title="Edit"><i class="fa fa-edit ed"
aria-hidden="true"></i></a></td>
<td><a href="delete.php?id=<?php echo $res['ID']; ?>" data-bs-toggle="tooltip"
data-bs-placement="bottom" data-bs-title="Delete"><i class="fa fa-trash del"
aria-hidden="true"></i></a></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<Script>
$('.toggle-button').click(function() {
$(this).toggleClass("click");
$('.sidebar').toggleClass("show");
});
$('.sidebar .multi-work-ul li a').click(function() {
var id = $(this).attr('id');
$('nav .multi-work-ul li .multi-work-ul.item-show-' + id).toggleClass("show");
$('nav .multi-work-ul li #' + id + ' span').toggleClass("rotate");
});
$('nav .multi-work-ul li').click(function() {
$(this).addClass("active1").siblings().removeClass("active1");
});
$(document).ready(function() {
$("button").click(function() {
$("p").toggleClass("main");
});
});
</script>
<script src="jquery/jquery-3.6.1.min.js"></script>
<!-- Statement to initialize tooltip code -->
<script>
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
var tooltipList = tooltipTriggerList.map(function(tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl)
})
</script>
</body>
</html>