-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathworker.php
More file actions
32 lines (30 loc) · 739 Bytes
/
Copy pathworker.php
File metadata and controls
32 lines (30 loc) · 739 Bytes
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
<?php
require 'user.php';
require 'db.php';
CheckIfWorkerLoggedIn();
// Give this order to the current worker
if (isset ($_POST['order'])) {
$sql = 'Update orders set workerID=:id where id=:orderID';
$sthPro = $db->prepare ($sql);
$sthPro->bindParam (':id', $_SESSION['id']);
$sthPro->bindParam (':orderID', $_POST['order']);
$sthPro->execute ();
}
function OrderNotYetShipped(){
require 'worker-common.php';
$sql = 'SELECT * FROM orders WHERE workerID is null AND shipped=0';
commonWorkerSearch($sql);
}
?>
<?php
include 'Geeksforsaletop.php';
?>
<div id="content">
<?php include 'worker-buttons.php'; ?>
<?php
echo "<p>Orders not shipped or taken yet";
OrderNotYetShipped();
?>
</div>
</BODY>
</HTML>