-
Notifications
You must be signed in to change notification settings - Fork 0
/
reports.php
177 lines (143 loc) · 5.52 KB
/
reports.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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<?php
require_once('auth.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>International Amani Lodge</title>
<input type="button" onClick="window.print()" value="print">
<input type="button" onClick="clear.print()" value="exit">
<link href="css/styles.css" rel="stylesheet" type="text/css" />
<!--sa poip up-->
<link href="src/facebox.css" media="screen" rel="stylesheet" type="text/css" />
<script src="lib/jquery.js" type="text/javascript"></script>
<script src="src/facebox.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',
closeImage : 'src/closelabel.png'
})
})
</script>
<!--sa validate from-->
<style type="text/css">
#apDiv1 {
position:absolute;
width:200px;
height:115px;
z-index:1;
left: 383px;
top: 11px;
}
</style>
<script type="text/javascript">
function validateForm()
{
var y=document.forms["login"]["user"].value;
var a=document.forms["login"]["password"].value;
if ((y==null || y===""))
{
alert("you must enter your username");
return false;
}
if ((a==null || a===""))
{
alert("you must enter your password");
return false;
}
}
</script>
<link rel="stylesheet" href="./febe/style.css" type="text/css" media="screen" charset="utf-8">
<script src="argiepolicarpio.js" type="text/javascript" charset="utf-8"></script>
<script src="./js/application.js" type="text/javascript" charset="utf-8"></script>
<style type="text/css">
#apDiv1 {
position:absolute;
width:200px;
height:115px;
z-index:1;
left: 383px;
top: 11px;
}
body,td,th {
font-size: 14px;
}
</style>
</head>
<body>
<div id="apDiv1">
<?php
require_once 'admin_menu.php';
?>
</div> <div style="width:600px; margin:0 auto; position:relative; border:3px solid rgba(0,0,0,0); -webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; -webkit-box-shadow:0 0 18px rgba(0,0,0,0.4); -moz-box-shadow:0 0 18px rgba(0,0,0,0.4); box-shadow:0 0 18px rgba(0,0,0,0.4); margin-top:10%;">
<br /><label style="margin-left:12px;">search</label> <input type="text" name="filter" value="" id="filter" /><br />
<table cellpadding="1" cellspacing="1" id="resultTable">
<tbody>
<table id="mytable" cellspacing="0">
<tr>
<td width="93" id="label">Arrival</td>
<td width="44" id="label">Departure</td>
<td width="100" id="label">Quantity Reserve</td>
<td width="149" id="label">Room Type</td>
<td width="80" id="label">Status</td>
</tr>
<?php
$con = mysqli_connect("localhost", "root", "");
if (!$con)
{
die('Could not connect: ' . mysqli_connect_error());
}
mysqli_select_db($con, "argie_tamera");
$result3 = mysqli_query($con,"SELECT * FROM reservation where status != 'out'");
while($row3 = mysqli_fetch_array($result3))
{
echo '<tr>';
echo '<td>'.$row3['arrival'].'</td>';
echo '<td>'.$row3['departure'].'</td>';
echo '<td>'.$row3['no_room'].'</td>';
echo '<td>';
$ro=$row3['room_id'];
$result4 = mysqli_query($con,"SELECT * FROM room where room_id='$ro'");
while($row4 = mysqli_fetch_array($result4))
{
echo $row4['type'];
}
echo '</td>';
echo '<td>'.$row3['status'].'</td>';
echo '</tr>';
}
$result5 = mysqli_query($con,"SELECT sum(no_room) FROM reservation where status != 'out' and room_id='12'");
while($row5 = mysqli_fetch_array($result5))
{
echo 'Total reserve Room of Superior Room: ';
echo $row5['sum(no_room)'] ? $row5['sum(no_room)'] : "0";
echo '<br>';
}
$result6 = mysqli_query($con,"SELECT sum(no_room) FROM reservation where status != 'out' and room_id='11'");
while($row6 = mysqli_fetch_array($result6))
{
echo 'Total reserve Room of Deluxe Room: ';
echo $row6['sum(no_room)'] ? $row6['sum(no_room)'] : "0";
echo '<br>';
}
$result7 = mysqli_query($con,"SELECT sum(no_room) FROM reservation where status != 'out' and room_id='10'");
while($row7 = mysqli_fetch_array($result7))
{
echo 'Total reserve Room of Standard Single Room: ';
echo $row7['sum(no_room)'] ? $row7['sum(no_room)'] : "0";
echo '<br>';
}
$result8 = mysqli_query($con,"SELECT sum(no_room) FROM reservation where status != 'out' and room_id='9'");
while($row8 = mysqli_fetch_array($result8))
{
echo 'Total reserve Room of Standard Single Room: ';
echo $row8['sum(no_room)'] ? $row8['sum(no_room)'] : "0";
echo '<br>';
}
?>
</table><br />
</div>
</body>
</html>