-
Notifications
You must be signed in to change notification settings - Fork 0
/
appointments.php
103 lines (84 loc) · 4.72 KB
/
appointments.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> Happy Paws Clinic </title>
<link rel="stylesheet" href="css/appointements-design.css">
</head>
<?php include 'header.php';
include 'database_connect.php'; ?>
<body class="body_appointements" style="background-image: url(image//design19.png); ">
<h1 class="title_appointements">
Appointments
</h1>
<?php
$date_no= date("Y-m-d");
$user_i=$_SESSION['id'];
echo '
<h2 >
Upcoming
</h2>';
$sql_request_appointement = "select * from request_appointement where day>'$date_no' and user_id='$user_i'";
$Result_request_appointement = mysqli_query($conn, $sql_request_appointement);
$upcom_app=1;
while ($row_request_appointement = mysqli_fetch_object($Result_request_appointement))
{
if($row_request_appointement->status=="accept")
{
echo '
<ul>
<div>
<li>
<details>
<summary> Appointment:'.$upcom_app.' </summary>
<ul>
<li>Date : '.$row_request_appointement->day.'</li>
<li>Time :'.$row_request_appointement->time.'</li>
<li>Pet nama :'.$row_request_appointement->pet.'</li>
<li>Service:'.$row_request_appointement->service.'</li>
</ul>
</details>
</li>
</div>
</ul>';
$upcom_app=$upcom_app+1;
}
}
echo '
<h2>
Prevoius
</h2> ';
$sql_request_appointement = "select * from request_appointement where day<'$date_no' and user_id='$user_i'";
$Result_request_appointement = mysqli_query($conn, $sql_request_appointement);
$prev_app=1;
while ($row_request_appointement = mysqli_fetch_object($Result_request_appointement))
{
if($row_request_appointement->status=="accept")
{
echo '
<ul>
<div>
<li>
<details>
<summary> Appointment:'.$prev_app.'
<a href="review.php?id_request='.$row_request_appointement->id.'&share=user" target="_blank" class="r-icon1" title="go review your last appointement">
<img src="image//review.png" alt="review icon" height="30" width="30"></a>
</summary>
<ul>
<li>Date : '.$row_request_appointement->day.'</li>
<li>Time :'.$row_request_appointement->time.'</li>
<li>Pet nama :'.$row_request_appointement->pet.'</li>
<li>Service:'.$row_request_appointement->service.'</li>
</ul>
</details>
</li>
</div>
</ul>
';
$prev_app=$prev_app+1;
}
}
?>
</body>
</html>
<!--