-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.php
More file actions
59 lines (48 loc) · 1.77 KB
/
Copy pathadmin.php
File metadata and controls
59 lines (48 loc) · 1.77 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
<?php
/**
* Created by PhpStorm.
* User: OMAR BARA
* Date: 09/01/2018
* Time: 06:08 PM
*/
include 'header.php';
include 'functions.php';
include 'classes.php';
if (isset($_GET['number']) && !empty($_GET['number'])) {
$id = $_GET['number'];
// Change Status to Served
changeStatus($id);
}
if (isset($_GET['order']) && !empty($_GET['order'])) {
//function to delete line
$id = $_GET['order'];
deleteAdmin($id);
}
display_admin();
// admin control panel
// change order status
echo '<div class="container" style="border-top:solid #ccc;border-bottom:solid #ccc .8px ;margin: 15px;">
<h3>Admin Control Panel</h3>
<form class="form-horizontal" action="admin.php" method="get">
<div class="form-group">
<label class="control-label col-sm-3" for="number">Change Status to Served :</label>
<div class="col-sm-3">
<input type="number" class="form-control" placeholder="Enter order No#" name="number">
</div></div>';
echo '<div class="form-group">
<div class="col-sm-offset-3 col-sm-4">
<button type="submit" class="btn btn-default btn-success">Change</button>
</div></div></form></div>';
//delete order
echo '<form class="form-horizontal" action="admin.php" method="get">
<div class="form-group">
<label class="control-label col-sm-3" for="order">Delete an order :</label>
<div class="col-sm-3">
<input type="number" class="form-control" placeholder="Enter order No#" name="order">
</div></div>';
echo '<div class="form-group">
<div class="col-sm-offset-3 col-sm-4">
<button type="submit" class="btn btn-default btn-success">Delete</button>
</div></div></form>';
?>
<?php include 'footer.php';?>