-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathviewDeparture.php
More file actions
149 lines (103 loc) · 2.8 KB
/
viewDeparture.php
File metadata and controls
149 lines (103 loc) · 2.8 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
<div style='min-height:620px;'>
<?php
include "koneksi.php";
if(isset($_SESSION['nama_klien'])){
$nama_klien = $_SESSION['nama_klien'];
}
$nik[] = null;
?>
<style>
table {
border-collapse: collapse;
width: 100%;
}
th, td {
text-align: left;
padding: 8px;
}
tr:nth-child(even){background-color: #e6ecff}
th {
background-color: #3366ff;
color: white;
}
</style>
<div class="row">
<div class="col-md-12">
<table class='table table-striped' id="tblData">
<br><br><br><br><br>
<center><legend><h2>Pemberangkatan </h2></legend></center>
<br>
<div class="row space-form ">
<div class="col-sm-8 col-sm-offset-0">
</div>
<div class="col-sm-4">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-search-plus"></i></span>
<input class="form-control" id="search" type="text" placeholder="Pencarian">
</div>
</div>
</div>
<br>
<tr>
<th>No.</th>
<th>No Invoice</th>
<th>Nama Klien</th>
<th>Tanggal Berangkat/Check In</th>
<th>Kategori</th>
<th>Respon</th>
</tr>
<?php
$i = 1;
$date = date("Y-m-d");
$query ="SELECT * FROM pesan WHERE tgl_pesan AND konfirm = 1 ";
// AND a.tgl LIKE '$date%'
$result = mysqli_query($connect, $query);
//echo mysqli_error();
$row_total = mysqli_num_rows($result);
// tampilkan data menu selama masih ada
if($row_total > 0){
while($data=mysqli_fetch_array($result,MYSQLI_BOTH)) {
?>
<tr>
<td><?php echo $i ?>.</td>
<td><?php echo $data['invoice']; ?></td>
<td><?php echo $data['nama_klien']; ?></td>
<td><?php echo $data['tgl']; ?></td>
<td><?php echo $data['kategori']; ?></td>
<?php
//action before and after bayar
$count = "SELECT uploads FROM pesan WHERE id_pesan ='".$data['id_pesan']."' ";
$query = mysqli_query($connect,$count);
$rc = mysqli_fetch_array($query);
?>
<td>
<?php
//condition block response
if($rc['uploads']== NULL ){
echo "<i>Is not actived</i>";
}else{
?>
<form action="actionResponse.php?id=<?php echo $data['id_pesan']; ?>" method="POST">
<select name="respon" >
<option value="Sedang diproses">Sedang diproses</option>
<option value="Sudah diproses">Sudah diproses</option>
</select>
<button type="submit" class="btn btn-info">Response</button>
</form>
<?php } ?>
</td>
<?php
// $id_kirim[$i] = $data['id_kirim'];
$i++;
}
}else{
echo "
<tr>
<td colspan='7'><center> Tidak ada pengiriman masuk hari ini </center></td>
</tr>";
}
$_SESSION['nik'] = $nik;
?>
</table>
</div>
</div>