-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathday.php
More file actions
112 lines (104 loc) · 3.1 KB
/
Copy pathday.php
File metadata and controls
112 lines (104 loc) · 3.1 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
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-animate.js"></script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<link rel="stylesheet" href="assets/css/main.css" />
<noscript><link rel="stylesheet" href="assets/css/noscript.css" /></noscript>
</head>
<body class="no-sidebar is-preload">
<div id="page-wrapper">
<header id="header">
<br>
<nav id="nav">
<ul>
<li>
<a href="index.html">Home</a>
</li>
<li><a href="query.html">Search Appointment</a></li>
</ul>
</nav>
</header>
<div>
<style>
table {
border-collapse: collapse;
width: 100%;
}
th, td {
text-align: left;
padding: 8px;
}
tr:nth-child(even){background-color: #f2f2f2}
th {
background-color: #83D3C9;
color: white;
}
th {text-align: left;}
</style>
</div>
<hr><hr>
</head>
<body>
<?php
$con = mysqli_connect('fuss19pros2.mysql.database.azure.com', 'fusmaster@fuss19pros2', '7I1XAh4k7ZdZ', 'fuss19pro');
if (!$con) {
die('Could not connect: ' . mysqli_error($con));
}
mysqli_select_db($con,"fuss19pro");
$sql="SELECT * FROM appointment_master WHERE (DATE(apt_date) = CURDATE() AND cancel != 1) order by apt_date asc";
$result = mysqli_query($con,$sql);
echo "<table>
<tr>
<th>Client Name</th>
<th>Client Phone</th>
<th>Stylist</th>
<th>Appointment Date</th>
<th>Appointment Type</th>
<th>Cancel</th>
</tr>";
while($row = mysqli_fetch_array($result)) {
echo "<tr>";
echo "<td>" . $row['first_name'] . " " . $row['last_name'] . "</td>";
echo "<td>" . $row['phone'] . "</td>";
if ($row['stylist'] == "5") {
echo "<td>Jon Lee</td>";
}
else if ($row['stylist'] == "4") {
echo "<td>Tim Mullins</td>";
}
else if ($row['stylist'] == "2") {
echo "<td>Joe Wessel</td>";
}
else {
echo "<td>" . $row['stylist'] . "</td>";
}
echo "<td>" . $row['apt_date'] . "</td>";
if ($row['apt_type'] == "hc") {
echo "<td>Haircut</td>";
}
else if ($row['apt_type'] == "nl") {
echo "<td>Nails</td>";
}
else if ($row['apt_type'] == "hccl") {
echo "<td>Haircut and Color</td>";
}
else if ($row['apt_type'] == "cl") {
echo "<td>Coloringt</td>";
}
else if ($row['apt_type'] == "pd") {
echo "<td>Pedicure</td>";
}
else {
echo "<td>" . $row['apt_type'] . "</td>";
}
echo "<td>" . '<a href="delete.php?apt_id='.$row['apt_id'].'">Cancel Appointment</a>' . "<td>";
echo "</tr>";
}
echo "</table>";
mysqli_close($con);
?>
</body>
</html>