-
Notifications
You must be signed in to change notification settings - Fork 0
/
schedule_tomorrow.php
161 lines (98 loc) · 3 KB
/
schedule_tomorrow.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
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
<?php
include"header.php";?>
<?php
if(!isset($_SESSION['cusid'])) {
?>
<script type="text/javascript">
<!--
function Redirect() {
window.location="login.php";
}
document.write("<center>You will be redirected to main page in 2 sec.</center>");
setTimeout('Redirect()', 0;
//-->
</script>
<?php
}
?>
<div class="container">
<div class="row">
<div class="col-md-2">
</div>
<?php
$date = date("Y-m-d");
$tomorrow = date("Y-m-d", strtotime('tomorrow'));
$beauty_id = $_SESSION['beauty_id'];
$product_query = "SELECT * FROM appointment where (date(appointment.date) between '$tomorrow' and '$tomorrow') and beautician = $beauty_id ";
$run_query = mysqli_query($con,$product_query);
if(mysqli_num_rows($run_query) > 0){?>
<div class="col-cd-6">
<br><br>
<center> <h3> Tomorrow's Schedule </h3></center><hr/>
<table class="table">
<thead>
<tr>
<th>SL</th>
<th>Customer Name</th>
<th>Date </th>
<th>Time</th>
<th>Service</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<?php
$sl = 0;
while($row = mysqli_fetch_array($run_query)){
$sl++;
$id = $row['id'];
$name = $row['name'];
$date = $row['date'];
$time = $row['time'];
$service = $row['service'];
$status = $row['status'];
?>
<tr>
<td><?php echo $sl; ?></td>
<td><?php echo $name; ?></td>
<td><?php echo date("F d, Y ", strtotime($date)) ?></td>
<td><?php echo date(" h:i A", strtotime($time)) ?></td>
<td><?php echo $service; ?></td>
<td><?php
if($row['status']==0)
{
echo" <a class='btn btn-default'>Pending<a/>";
}
if($row['status']==1)
{
echo"<a class='btn btn-success'>Accepted<a/>";
}
if($row['status']==2)
{
echo" <a class='btn btn-danger'>Rejected</a>";
}
if($row['status']==3)
{
echo" <a class='btn btn-success'>Completed</a>";
}
if($row['status']==4)
{
echo" <a class='btn btn-danger'>Cancelled</a>";
}
?>
</td>
</tr>
<?php
}
}
else
{?>
<div class="h1"><br><h1>🤵:> You have no appointment Schedule yet..!</h1></div><br><br><br><br><br><br><br><br><br>
<?php }
?>
</tbody>
</table>
</div>
</div>
</div>
<?php include"footer.php";?>