-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdetails.php
executable file
·159 lines (131 loc) · 3.56 KB
/
details.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
<?php
session_start();
error_reporting(E_ERROR);
include 'dbconfig.php';
if (empty($_SESSION['username'])){
header('location:customerlogin.php');
}
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Booking History</title>
<!DOCTYPE html>
<html lang="en">
<link rel="stylesheet" href="css/bootstrap.min.css" />
<!-- sweet alert -->
<link rel="stylesheet" href="css/sweetalert.css">
<script src="js/sweetalert.js"></script>
<script src="js/jquery.js"></script>
<!-- FontAwesome -->
<link rel="stylesheet" href="css/all.min.css" />
<link rel="stylesheet" href="css/fontawesome.min.css" />
<!--Animate Css-->
<link rel="stylesheet" href="css/animate.min.css" />
<!-- Css -->
<link rel="stylesheet" href="css/history.css"/>
</head>
<body>
<div class="overlay">
<main>
<section>
<header id="heady">
<nav class="navbar navbar-expand-md navbar-light bg-transparent mb-4">
<a id="logo" href="customerDashBoard.php" class="navbar-brand"
><img src="img/logo.png" alt="" ALIGN="CENTER"
/></a>
<button
type="button"
class="navbar-toggler"
data-toggle="collapse"
data-target="#navbarCollapse"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<div class="navbar-nav">
<li class="nav-item active">
<a class="nav-link active" id="hmu" href="customerDashBoard.php">DashBoard</a>
</li>
<li class="nav-item">
<a class="nav-link " id="hmu" href="pendingpayments.php">Payments</a>
</li>
<li class="nav-item">
<a class="nav-link " id="hmu" href="customerEdit.php">Edit Profile</a>
</li>
<li class="nav-item">
<a class="nav-link " id="hmu" href="messages.php" class="">Messages.</a>
</li>
</div>
<a href="customerlogout.php" class="btn btn-outline-danger ml-auto">Sign Out </a>
</div>
</nav>
</header>
</section>
<section id="gaid">
<div class="container">
<div id="printableArea" class="">
<h2 style="text-align: center"><em><img id="label" src="img/logo.png" alt="" ALIGN="CENTER"
/> Booking History</em></h2>
<hr/>
<table class="table table-bordered" id="mytable">
<thead>
<tr>
<th>Username</th>
<th>Service Ordered</th>
<th>Location</th>
<th>House Name</th>
<th>Email Address</th>
<th>Phone Number</th>
<th>Date</th>
<th>Action</th>
<?php
include "dbconfig.php";
$id = $_GET['id'];
$cart="SELECT * FROM `bookings` WHERE `book_id` = '$id';";
$query = mysqli_query($conn, $cart);
if(mysqli_num_rows($query) > 0)
{
while ($row = mysqli_fetch_assoc($query)){
?>
<tr>
<td> <?php echo $row['username'] ?> </td>
<td> <?php echo $row['service'] ?> </td>
<td> <?php echo $row['location'] ?> </td>
<td> <?php echo $row['house_name'] ?> </td>
<td> <?php echo $row['email'] ?> </td>
<td> <?php echo $row['phone'] ?> </td>
<td> <?php echo $row['bookdate'] ?> </td>
</tr>
<?php
}}else{
echo "No record was found";
}
?>
</tbody>
</table>
</div>
</div>
</section>
<div class="divu">
<a href="#"><h4><span class="printer" onclick="printDiv('printableArea')"><i class="fas fa-print"></i> Print</h4></span></a>
</div>
</div>
</main>
<!-- PRINTING SCRIPT -->
<script>
function printDiv(divName) {
var printContents = document.getElementById(divName).innerHTML;
var originalContents = document.body.innerHTML;
document.body.innerHTML = printContents;
window.print();
document.body.innerHTML = originalContents;
}
</script>
<!-- END OF PRINTING SCRIPT -->
<script src="js/jquery-2.1.4.min.js"></script>
<script src="js/jquery-3.4.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>