-
Notifications
You must be signed in to change notification settings - Fork 0
/
AssignmentToCourier.php
100 lines (74 loc) · 1.93 KB
/
AssignmentToCourier.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
<?php
include 'CheckifLogin.php';
include('connection.php');
$sid = $_GET['id'];
$c_id = $_GET['c_id'];
$sh_id = explode (',',$sid);
$sql = "select m_id from manager";
$stmt = $connect->query($sql);
$result = $stmt->FETCH_ASSOC();
$m_id = $result['m_id'];
for ($i=0 ; $i<count($sh_id); $i++) {
# code...
$id = (int)$sh_id[$i];
$sql = "INSERT INTO `assign`(`m_id`, `sh_id`, `c_id`) VALUES ($m_id , $id , $c_id )";
$connect->query($sql);
$sql = "UPDATE `shipment` SET `c_id`= $c_id , `status` = 'assign' WHERE sh_id = $id";
$connect->query($sql);
}
echo "<script>alert('Shipment Has been Assigned');</script>";
echo "<script>location.href='Dashboard.php'</script>";
?>
<!-- <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
display:flex;
justify-content:center;
align-items:center;
}
div {
padding:50px 0px;
width:30%;
height:auto;
display:flex;
flex-direction:column;
justify-content:center;
align-items:center;
border: solid black 5px;
}
p {
font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
font-weight:bolder;
font-size:500;
}
button {
width: 120px;
font-weight: bold;
font-size: 20px;
height: 40px;
background-color: black;
border: none;
border-radius: 8px;
box-shadow: black;
}
a {
/* color: #37bc9b; */
/* color: cornflowerblue; */
color: white;
text-decoration: none;
}
</style>
<title>Document</title>
</head>
<body>
<div>
<p>Shipment Has Been Assign</p>
<button><a href="AssignShipment.php">Go Back</a></button>
</div>
</body>
</html>
-->