-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathadminxeorx.php
More file actions
610 lines (497 loc) · 19.4 KB
/
adminxeorx.php
File metadata and controls
610 lines (497 loc) · 19.4 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
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
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Basic -->
<meta charset="utf-8">
<title>Campus Online</title>
<meta name="keywords" content="WebSite Template" />
<meta name="description" content="Porto - Multipurpose Website Template">
<meta name="author" content="okler.net">
<!-- Favicon -->
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
<link rel="apple-touch-icon" href="img/apple-touch-icon.png">
<!-- Mobile Metas -->
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, shrink-to-fit=no">
<!-- Web Fonts -->
<link id="googleFonts" href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700,800%7CShadows+Into+Light%7CPlayfair+Display:400&display=swap" rel="stylesheet" type="text/css">
<!-- Vendor CSS -->
<link rel="stylesheet" href="vendor/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="vendor/fontawesome-free/css/all.min.css">
<link rel="stylesheet" href="vendor/animate/animate.compat.css">
<link rel="stylesheet" href="vendor/simple-line-icons/css/simple-line-icons.min.css">
<link rel="stylesheet" href="vendor/owl.carousel/assets/owl.carousel.min.css">
<link rel="stylesheet" href="vendor/owl.carousel/assets/owl.theme.default.min.css">
<link rel="stylesheet" href="vendor/magnific-popup/magnific-popup.min.css">
<link rel="stylesheet" href="vendor/bootstrap-star-rating/css/star-rating.min.css">
<link rel="stylesheet" href="vendor/bootstrap-star-rating/themes/krajee-fas/theme.min.css">
<!-- Theme CSS -->
<link rel="stylesheet" href="css/theme.css">
<link rel="stylesheet" href="css/theme-elements.css">
<link rel="stylesheet" href="css/theme-blog.css">
<link rel="stylesheet" href="css/theme-shop.css">
<!-- Skin CSS -->
<link id="skinCSS" rel="stylesheet" href="css/skins/default.css">
<!-- Theme Custom CSS -->
<link rel="stylesheet" href="css/custom.css">
<!-- latest css -->
<link rel="stylesheet" href="css/latest.css">
<!-- <link rel="stylesheet" href="css/profile.css"> -->
<style>
body::after {
content: "";
display: table;
clear: both;
background-color: lightgreen;
}
.left-section {
float: left;
width: 30%;
/* Takes up 1/3 of the available space */
box-sizing: border-box;
}
.left-section-top {
background-color: white;
color: black;
text-align: center;
padding: 20px;
margin: 5px;
min-height: 40px;
max-height: 70px;
line-height: 70px;
/* Set line-height equal to max-height to vertically center text */
display: flex;
align-items: center;
justify-content: center;
border-radius: 5px;
margin-left: 30px;
}
.left-section-top img {
vertical-align: middle;
/* Vertically center the image */
/* Adjust margin as needed */
margin-left: -70px;
/* Adjust margin as needed to move the image slightly to the left */
}
.left-section-top h4 {
margin: 0;
color: black;
/* Remove default margin for h1 */
}
.left-section-bottom {
background-color: white;
color: white;
text-align: center;
padding: 20px;
margin: 5px;
min-height: 450px;
border-radius: 5px;
margin-left: 30px;
}
.right-section {
float: left;
width: 70%;
/* Takes up 2/3 of the available space */
box-sizing: border-box;
}
.right-section-inner {
background-color: white;
/* Adjust the color as needed */
color: black;
/* Set the text color to be visible */
text-align: center;
/* Center the text horizontally */
padding: 20px;
margin: 5px;
margin-right: 200px;
border-radius: 5px;
margin-right: 40px;
margin-bottom: 20px;
}
.profile-menu {
list-style: none;
padding: 10px;
margin: 20px;
margin-right: 30px;
}
.profile-menu li {
margin-bottom: 20px;
margin-top: 20px;
}
.profile-menu a {
text-decoration: none !important;
/* Added !important */
color: #0088cc;
display: flex;
/* Use flex to align icon and text horizontally */
align-items: center;
/* Center items vertically */
padding: 10px;
border-radius: 5px;
transition: background-color 0.3s;
font-size: larger;
}
.profile-menu a svg {
margin-right: 10px;
/* Add margin to separate icon from text */
}
.profile-menu a:hover {
background-color: #0088cc;
color: white;
text-decoration: none !important;
/* Added !important */
}
.form-group {
display: flex;
flex-direction: column;
margin-bottom: 15px;
}
.form-labell {
margin-bottom: 5px;
text-align: left;
font-weight: bold;
}
.form-control-container {
position: relative;
width: 70%;
/* Reduced width */
}
.form-control {
width: 100%;
padding: 8px;
box-sizing: border-box;
}
.edit-save-text {
position: absolute;
top: -20px;
/* Adjust as needed */
right: 5px;
font-size: 12px;
color: #007bff;
cursor: pointer;
}
.accordion {
display: flex;
flex-direction: column;
width: 600px;
}
.question {
border-radius: 5px;
padding: 10px;
margin: 10px;
cursor: pointer;
border: 1px solid #ddd;
text-align: left;
}
.answer {
display: none;
padding: 10px;
text-align: start;
}
.question.active {
background-color: #ddd;
}
.answer.active {
display: block;
}
/* Button Container */
.button-container {
text-align: center;
justify-content: space-evenly;
text-align: center;
/* Center buttons horizontally within the container */
}
/* Save Changes Button */
.custom-btn.primary-btn {
background-color: #007bff;
color: #fff;
border: 1px solid #007bff;
/* Adjusted padding for reduced width */
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s;
width: 120px;
/* Set desired width */
height: 40px;
/* Set desired height */
display: inline-block;
/* Ensure inline-block to apply width and height */
line-height: 40px;
text-align: center;
/* Center text vertically */
}
.custom-btn.primary-btn:hover {
background-color: #0056b3;
color: #fff;
}
/* Cancel Button */
.custom-btn.default-btn {
background-color: #fff;
color: #007bff;
border: 1px solid #007bff;
/* Adjusted padding for reduced width */
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s, color 0.3s;
width: 120px;
/* Set desired width */
height: 40px;
/* Set desired height */
display: inline-block;
/* Ensure inline-block to apply width and height */
line-height: 40px;
/* Center text vertically */
}
.custom-btn.default-btn:hover {
background-color: #f0f0f0;
color: #0056b3;
}
</style>
</style>
</head>
<body data-plugin-page-transition>
<?php include 'header.php'; ?>
<div class="body">
<div class="left-section">
<div class="left-section-top">
<a href="img/12.png"> <img src="img/12.png" alt="12" width="100" height="100"> </a>
Hello
<h4>Admin</h4>
</div>
<div class="left-section-bottom">
<ul class="profile-menu">
<li class="">
<a href="#" id="generalLink">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-cart3" viewBox="0 0 16 16">
<path d="M11 5a3 3 0 1 1-6 0 3 3 0 0 1 6 0m-9 8c0 1 1 1 1 1h5.256A4.5 4.5 0 0 1 8 12.5a4.5 4.5 0 0 1 1.544-3.393Q8.844 9.002 8 9c-5 0-6 3-6 4m9.886-3.54c.18-.613 1.048-.613 1.229 0l.043.148a.64.64 0 0 0 .921.382l.136-.074c.561-.306 1.175.308.87.869l-.075.136a.64.64 0 0 0 .382.92l.149.045c.612.18.612 1.048 0 1.229l-.15.043a.64.64 0 0 0-.38.921l-.074-.136c-.306-.561.308-1.175.869-.87l.136.075a.64.64 0 0 0 .92-.382zM14 12.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0" />
</svg>
Ecommerce
</a>
<ul class="submenu" id="submenu1">
<li><a href="#">Verify Product</a></li>
<li><a href="adminstdetails.php">Students Details</a></li>
</ul>
</li>
<li class="">
<a href="#" id="changePasswordLink">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-cart-fill" viewBox="0 0 16 16">
<path d="M0 1.5A.5.5 0 0 1 .5 1H2a.5.5 0 0 1 .485.379L2.89 3H14.5a.5.5 0 0 1 .491.592l-1.5 8A.5.5 0 0 1 13 12H4a.5.5 0 0 1-.491-.408L2.01 3.607 1.61 2H.5a.5.5 0 0 1-.5-.5M5 12a2 2 0 1 0 0 4 2 2 0 0 0 0-4m7 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4m-7 1a1 1 0 1 1 0 2 1 1 0 0 1 0-2m7 0a1 1 0 1 1 0 2 1 1 0 0 1 0-2" />
</svg>
Events
</a>
<ul class="submenu" id="submenu2">
<li><a href="adminaddevents.php">Add Events</a></li>
<li><a href="#">Add Poll</a></li>
</ul>
</li>
<li>
<a href="adminxeorx.php">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-suit-heart-fill" viewBox="0 0 16 16">
<path d="M4 1c2.21 0 4 1.755 4 3.92C8 2.755 9.79 1 12 1s4 1.755 4 3.92c0 3.263-3.234 4.414-7.608 9.608a.513.513 0 0 1-.784 0C3.234 9.334 0 8.183 0 4.92 0 2.755 1.79 1 4 1" />
</svg>
Xerox
</a>
</li>
<li class="">
<a href="adminaddfood.php">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-bag-heart-fill" viewBox="0 0 16 16">
<path d="M11.5 4v-.5a3.5 3.5 0 1 0-7 0V4H1v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4zM8 1a2.5 2.5 0 0 1 2.5 2.5V4h-5v-.5A2.5 2.5 0 0 1 8 1m0 6.993c1.664-1.711 5.825 1.283 0 5.132-5.825-3.85-1.664-6.843 0-5.132" />
</svg>
Food
</a>
</li>
</ul>
</div>
</div>
</div>
<script>
// JavaScript to handle dropdown menu functionality
// Function to toggle the visibility of the submenu when its corresponding link is clicked
function toggleSubMenu(submenuId, linkId) {
var submenu = document.getElementById(submenuId);
submenu.classList.toggle("show");
// Get the height of the submenu
var submenuHeight = submenu.clientHeight;
// Get the elements below the dropdown
var elementsBelow = document.querySelectorAll(".move-down");
// Adjust the position of each element below the dropdown
elementsBelow.forEach(function(element) {
element.style.marginTop = submenu.classList.contains("show") ? submenuHeight + "px" : "0";
});
}
// Function to close the submenu when clicking outside of it
function closeSubMenu(submenuId, linkId) {
var submenu = document.getElementById(submenuId);
var link = document.getElementById(linkId);
if (!submenu.contains(event.target) && !link.contains(event.target)) {
submenu.classList.remove("show");
// Reset the position of the elements below the dropdown
var elementsBelow = document.querySelectorAll(".move-down");
elementsBelow.forEach(function(element) {
element.style.marginTop = "0";
});
}
}
// Add event listeners to handle the dropdown menus
document.getElementById("generalLink").addEventListener("click", function(e) {
e.preventDefault();
toggleSubMenu("submenu1", "generalLink");
});
document.getElementById("changePasswordLink").addEventListener("click", function(e) {
e.preventDefault();
toggleSubMenu("submenu2", "changePasswordLink");
});
// Add event listener to close the submenu when clicking outside of it
document.addEventListener("click", function(e) {
closeSubMenu("submenu1", "generalLink");
closeSubMenu("submenu2", "changePasswordLink");
});
</script>
<style>
.submenu {
display: none;
position: absolute;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
padding: 10px;
z-index: 1;
min-width: 150px; /* Adjust as needed */
text-align: left;
}
.submenu.show {
display: block;
}
.submenu li {
display: block;
}
.submenu li a {
padding: 8px 16px;
color: #333;
text-decoration: none;
display: block;
transition: background-color 0.3s ease;
}
.submenu li a:hover {
background-color: #0088cc;
}
table {
width: 90%;
border-collapse: collapse;
font-family: Arial, sans-serif;
}
/* CSS for table header */
th {
background-color: #f2f2f2;
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
}
/* CSS for table body */
td {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
}
/* Alternating row colors */
tr:nth-child(even) {
background-color: #f9f9f9;
}
/* Hover effect */
tr:hover {
background-color: #f2f2f2;
}
</style>
<div class="right-section">
<div class="right-section-inner">
<div role="main" class="main shop pb-4">
<section class="card card-admin">
<header class="card-header">
<h4 style="color: #0088cc;" class="card-title">Xeorox Orders</h4 style="color: #0088cc;">
</header>
<div class="card-body">
<div class="row">
</div>
<table >
<thead style=" width: 500px !important;">
<tr>
<th> S.No</th>
<th>Time & Date</th>
<th> File Name</th>
<th>Category</th>
<th>Printing Sides</th>
<th>Cover</th>
<th>No.of pages</th>
<th>Amount Paid</th>
<th>Phone Number</th>
<th>Download</th>
</tr>
</thead>
<tbody >
<?php
// Include the file to establish a database connection
include 'connect.php';
// Write your SQL query
// Write your SQL query
$sql = "SELECT *, users.phonenumber
FROM xeorx
INNER JOIN users ON xeorx.reg_no = users.reg_no";
// Execute the query
$result = mysqli_query($conn, $sql);
// Check if there are any results
if (mysqli_num_rows($result) > 0) {
// Output data of each row
while ($row = mysqli_fetch_assoc($result)) {
// Output the HTML structure with product details
?>
<tr data-item-id="1">
<td><?php echo $row['id']; ?></td>
<td><?php echo $row['time']; ?></td>
<td><?php echo $row['file']; ?></td>
<td><?php echo $row['category']; ?></td>
<td><?php echo $row['category1']; ?></td>
<td><?php echo $row['category2']; ?></td>
<td><?php echo $row['pages']; ?></td>
<td><?php echo $row['total']; ?></td>
<td><?php echo $row['phonenumber']; ?></td>
<td><a href="uploads/<?php echo $row['file']; ?>" download>Download</a></td>
<td class="actions">
<a href="#" class="on-default edit-row"><i class="fas fa-pencil-alt"></i></a>
</td>
</tr>
</tbody>
<?php
}
} else {
echo "0 results";
}
// Close the database connection
mysqli_close($conn);
?>
</table>
</div>
</section>
</div>
</div>
</div>
<?php include 'footer.php'; ?>
<!-- Vendor -->
<script src="vendor/plugins/js/plugins.min.js"></script>
<script src="vendor/bootstrap-star-rating/js/star-rating.min.js"></script>
<script src="vendor/bootstrap-star-rating/themes/krajee-fas/theme.min.js"></script>
<script src="vendor/jquery.countdown/jquery.countdown.min.js"></script>
<!-- Theme Base, Components and Settings -->
<script src="js/theme.js"></script>
<!-- Current Page Vendor and Views -->
<script src="js/views/view.shop.js"></script>
<!-- Theme Custom -->
<script src="js/custom.js"></script>
<!-- Theme Initialization Files -->
<script src="js/theme.init.js"></script>
<!--
// Assuming you have a variable selectedProductCount that represents the count
const selectedProductCount = 1;
// Update the count badge text
document.querySelector('.count-badge').textContent = selectedProductCount.toString(); -->
</body>
</html>