-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustomer.php
144 lines (97 loc) · 3.23 KB
/
customer.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
<?php
require_once "../hotel/db/db.php";
$hotelRooms = getRooms();
// foreach($hotelRooms as $ht){
// var_dump($ht);
// }
$mainHotel = getHotel();
$customers = getUser();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- bootstrap link -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<!-- bootstrap link -->
<link rel="stylesheet" href="./css/styles.css">
<link rel="icon" href="./images/company.jpg" />
<!-- //cdn fontawesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta2/css/all.min.css" integrity="sha512-YWzhKL2whUzgiheMoBFwW8CKV4qpHQAEuvilg9FAn5VJUDwKZZxkJNuGM4XkWuk94WCrrwslk8yWNGmY1EduTA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<title>Room Booking</title>
</head>
<body>
<!-- header include from footer folder-->
<header>
<?php
include('./header/header.php');
?>
</header>
<!-- header include from footer folder-->
<!-- main -->
<main>
<div class="container">
<h1 class="text-center text-bg-light ">Customers </h1>
<div class="headerrip">
<?php
if ($mainHotel->num_rows > 0) {
// output data of each row
while ($row = $mainHotel->fetch_assoc()) {
?>
<div class="words">
<h2><?= $row["hotel_name"] ?></h2>
</div>
<?php
}
} else {
echo "0 results";
}
?>
</div>
<div class="container">
<table class="table mt-5">
<h3 class="text-center pt-3">Customer Details</h3>
<thead>
<tr>
<th scope="col ">id</th>
<th scope="col"> Customer Name</th>
<th scope="col"> Surname</th>
<th scope="col">Address</th>
<th scope="col">Zipcode</th>
<th scope="col">Phone number</th>
</tr>
</thead>
<?php
if ($customers->num_rows > 1) {
// output data of each row
while ($row = $customers->fetch_assoc()) {
?>
<tbody>
<tr>
<td class="text-danger"><?= $row["id"] ?></td>
<td><?= $row["user_name"] ?></td >
<td><?= $row["user_surname"] ?></td>
<td><?= $row["user_address"] ?></td>
<td><?= $row["user_zipcode"]?></td>
<td><?= $row["user_phone"] ?></td>
</tr>
<?php
}
} else {
echo "0 results";
}
?>
</tbody>
</table>
</main>
<!-- main -->
<footer>
<?php
include('./footer/footer.php')
?>
</footer>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
</body>
</html>