-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathEquipment_available.php
More file actions
355 lines (314 loc) · 14.8 KB
/
Equipment_available.php
File metadata and controls
355 lines (314 loc) · 14.8 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
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
<?php
include("connect.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Equipment Available</title>
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<meta content="" name="keywords">
<meta content="" name="description">
<!-- Facebook Opengraph integration: https://developers.facebook.com/docs/sharing/opengraph -->
<meta property="og:title" content="">
<meta property="og:image" content="">
<meta property="og:url" content="">
<meta property="og:site_name" content="">
<meta property="og:description" content="">
<!-- Twitter Cards integration: https://dev.twitter.com/cards/ -->
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="">
<meta name="twitter:title" content="">
<meta name="twitter:description" content="">
<meta name="twitter:image" content="">
<!-- Fav and touch icons -->
<link rel="shortcut icon" href="img/logo.png" type="image/png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="img/icons/114x114.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="img/icons/72x72.png">
<link rel="apple-touch-icon-precomposed" href="img/icons/default.png">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Roboto:400,100,300,500,700,900" rel="stylesheet">
<!-- Bootstrap CSS File -->
<link href="lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Libraries CSS Files -->
<link href="lib/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link href="lib/owlcarousel/owl.carousel.min.css" rel="stylesheet">
<link href="lib/owlcarousel/owl.theme.min.css" rel="stylesheet">
<link href="lib/owlcarousel/owl.transitions.min.css" rel="stylesheet">
<!-- Main Stylesheet File -->
<link href="css/style.css" rel="stylesheet">
<!--Your custom colour override - predefined colours are: colour-blue.css, colour-green.css, colour-lavander.css, orange is default-->
<link href="#" id="colour-scheme" rel="stylesheet">
</head>
<body class="page-elements">
<!--Change the background class to alter background image, options are: benches, boots, buildings, city, metro -->
<div id="background-wrapper" class="benches" data-stellar-background-ratio="0.8">
<!-- ======== @Region: #navigation ======== -->
<div id="navigation" class="wrapper">
<!--Hidden Header Region-->
<div class="header-hidden collapse">
<div class="header-hidden-inner container">
<div class="row">
<div class="col-md-3">
<h3>
About Us
</h3>
<p>Flexor is a super flexible responsive theme with a modest design touch.</p>
<a href="about.html" class="btn btn-more"><i class="fa fa-plus"></i> Learn more</a>
</div>
<div class="col-md-3">
<!--@todo: replace with company contact details-->
<h3>
Contact Us
</h3>
<address>
<strong>Tech2Check</strong>
<abbr title="Address"><i class="fa fa-pushpin"></i></abbr>
Sunshine House, Sunville. SUN12 8LU.
<br>
<abbr title="Phone"><i class="fa fa-phone"></i></abbr>
019223 8092344
<br>
<abbr title="Email"><i class="fa fa-envelope-alt"></i></abbr>
info@tech2check.com
</address>
</div>
<div class="col-md-6">
<!--Colour & Background Switch for demo - @todo: remove in production-->
<h3>
Theme Variations
</h3>
<div class="switcher">
<div class="cols">
Backgrounds:
<br>
<a href="#benches" class="background benches active" title="Benches">Benches</a> <a href="#boots" class="background boots " title="Boots">Boots</a> <a href="#buildings" class="background buildings " title="Buildings">Buildings</a>
<a
href="#city" class="background city " title="City">City</a> <a href="#metro" class="background metro " title="Metro">Metro</a>
</div>
<div class="cols">
Colours:
<br>
<a href="#orange" class="colour orange active" title="Orange">Orange</a> <a href="#green" class="colour green " title="Green">Green</a> <a href="#blue" class="colour blue " title="Blue">Blue</a> <a href="#lavender" class="colour lavender "
title="Lavender">Lavender</a>
</div>
</div>
<p>
<small>Selection is not persistent.</small>
</p>
</div>
</div>
</div>
</div>
<!--Header & navbar-branding region-->
<?php
include ("navbar.php");
?>
</div>
</div>
<!-- ======== @Region: #content ======== -->
<!-- START OF TEST AREA -->
<div class="container">
<div class="row">
<div class="col-lg-3">
<h1 class="my-4">Available Equipment</h1>
<div class="list-group">
<a href="#tab1" class="list-group-item" data-toggle="tab">Laptops</a>
<a href="#tab2" class="list-group-item" data-toggle="tab">Tablets</a>
<a href="#tab3" class="list-group-item" data-toggle="tab">Cameras</a>
<a href="#tab4" class="list-group-item" data-toggle="tab">Other</a>
</div>
</div>
<!-- /.col-lg-3 -->
<div class="tab-content">
<div class="col-lg-9 tab-pane fade in active" id="tab1">
<br>
<br>
<div class="row">
<?PHP
$EquipmentList = "SELECT make.make, model.model, rental_length.rental_length, model.file_path, SUBSTRING(model.description,1,100) as description, model.model_id
FROM model
JOIN make ON model.make_id = make.make_id
JOIN type ON model.type_id = type.type_id
JOIN rental_length ON type.rental_length_id = rental_length.rental_length_id
WHERE type.type_id = 1
ORDER BY make.make, model.model";
$Equipment = mysql_query($EquipmentList);
while($row = mysql_fetch_array($Equipment)){
echo"<div class='col-lg-4 col-md-6 mb-4'>";
echo"<div class='card h-100'>";
echo"<a href='item_details.php?model=" . $row['model_id'] . "&type=" . $row['type_id']."'><img class='card-img-top' src='" . $row['file_path']."' alt=''></a>";
echo"<div class='card-body'>";
echo"<h4 class='card-title'>";
echo"<a href='item_details.php?model=" . $row['model_id']."'>" . $row['make'] . " " . $row['model']."</a>";
echo"</h4>";
echo"<h5>" . $row['rental_length'] . " Day Rental" . "</h5>";
echo"<p class='card-text'>". $row['description'] . "..." . "</p>";
echo"</div>";
echo"<div class='card-footer'>";
echo"</div>";
echo"</div>";
echo"</div>";
}
?>
</div>
<!-- /.row -->
</div>
<!-- /.col-lg-9 -->
<div class="col-lg-9 tab-pane fade" id="tab2">
<br>
<br>
<div class="row">
<?PHP
$EquipmentList = "SELECT make.make, model.model, rental_length.rental_length, model.file_path, SUBSTRING(model.description,1,100) as description, model.model_id
FROM model
JOIN make ON model.make_id = make.make_id
JOIN type ON model.type_id = type.type_id
JOIN rental_length ON type.rental_length_id = rental_length.rental_length_id
WHERE type.type_id = 2
ORDER BY make.make, model.model";
$Equipment = mysql_query($EquipmentList);
while($row = mysql_fetch_array($Equipment)){
echo"<div class='col-lg-4 col-md-6 mb-4'>";
echo"<div class='card h-100'>";
echo"<a href='item_details.php?model=" . $row['model_id']."'><img class='card-img-top' src='" . $row['file_path']."' alt=''></a>";
echo"<div class='card-body'>";
echo"<h4 class='card-title'>";
echo"<a href='item_details.php?model=" . $row['model_id']."'>" . $row['make'] . " " . $row['model']."</a>";
echo"</h4>";
echo"<h5>" . $row['rental_length'] . " Day Rental" . "</h5>";
echo"<p class='card-text'>". $row['description'] . "..." . "</p>";
echo"</div>";
echo"<div class='card-footer'>";
echo"</div>";
echo"</div>";
echo"</div>";
}
?>
</div>
<!-- /.row -->
</div>
<div class="col-lg-9 tab-pane fade" id="tab3">
<br>
<br>
<div class="row">
<?PHP
$EquipmentList = "SELECT make.make, model.model, rental_length.rental_length, model.file_path, SUBSTRING(model.description,1,100) as description, model.model_id
FROM model
JOIN make ON model.make_id = make.make_id
JOIN type ON model.type_id = type.type_id
JOIN rental_length ON type.rental_length_id = rental_length.rental_length_id
WHERE type.type_id = 3
ORDER BY make.make, model.model";
$Equipment = mysql_query($EquipmentList);
while($row = mysql_fetch_array($Equipment)){
echo"<div class='col-lg-4 col-md-6 mb-4'>";
echo"<div class='card h-100'>";
echo"<a href='item_details.php?model=" . $row['model_id']."'><img class='card-img-top' src='" . $row['file_path']."' alt=''></a>";
echo"<div class='card-body'>";
echo"<h4 class='card-title'>";
echo"<a href='item_details.php?model=" . $row['model_id']."'>" . $row['make'] . " " . $row['model']."</a>";
echo"</h4>";
echo"<h5>" . $row['rental_length'] . " Day Rental" . "</h5>";
echo"<p class='card-text'>". $row['description'] . "..." . "</p>";
echo"</div>";
echo"<div class='card-footer'>";
echo"</div>";
echo"</div>";
echo"</div>";
}
?>
</div>
<!-- /.row -->
</div>
<div class="col-lg-9 tab-pane fade" id="tab4">
<br>
<br>
<div class="row">
<?PHP
$EquipmentList = "SELECT make.make, model.model, rental_length.rental_length, model.file_path, SUBSTRING(model.description,1,100) as description, model.model_id
FROM model
JOIN make ON model.make_id = make.make_id
JOIN type ON model.type_id = type.type_id
JOIN rental_length ON type.rental_length_id = rental_length.rental_length_id
WHERE type.type_id > 3
ORDER BY make.make, model.model";
$Equipment = mysql_query($EquipmentList);
while($row = mysql_fetch_array($Equipment)){
echo"<div class='col-lg-4 col-md-6 mb-4'>";
echo"<div class='card h-100'>";
echo"<a href='item_details.php?model=" . $row['model_id']."'><img class='card-img-top' src='" . $row['file_path']."' alt=''></a>";
echo"<div class='card-body'>";
echo"<h4 class='card-title'>";
echo"<a href='item_details.php?model=" . $row['model_id']."'>" . $row['make'] . " " . $row['model']."</a>";
echo"</h4>";
echo"<h5>" . $row['rental_length'] . " Day Rental" . "</h5>";
echo"<p class='card-text'>". $row['description'] . "..." . "</p>";
echo"</div>";
echo"<div class='card-footer'>";
echo"</div>";
echo"</div>";
echo"</div>";
}
?>
</div>
<!-- /.row -->
</div>
</div>
</div>
<!-- /.row -->
</div>
<!-- END OF TEST AREA -->
<div class="container">
<div class="block">
<hr>
<hr>
<h4 class="block-title">
Other Equipment
</h4>
<div class="item-carousel" data-toggle="owlcarousel" data-owlcarousel-settings='{"items":4, "pagination":false, "navigation":true, "itemsScaleUp":true}'>
<?PHP
$ModelList = "SELECT make, model, file_path, model_id FROM model JOIN make on model.make_id = make.make_id ORDER BY Rand() LIMIT 10";
$Models = mysql_query($ModelList);
while($row = mysql_fetch_array($Models)){
echo "<div class='item'>";
echo "<a href='item_details.php?model=" . $row['model_id']."' class='overlay-wrapper'>";
echo "<img src='" . $row['file_path'] ."' alt='Project 1 image' class='img-responsive underlay'>";
echo "<span class='overlay'>";
echo "<span class='overlay-content'> <span class='h4'>" . $row['make'] . " " . $row['model'] . "</span>" . "</span>";
echo "</span>";
echo "</a>";
echo "<div class='item-details bg-noise'>";
echo "<h4 class='item-title'>";
echo "<a href='item_details.php?model=" . $row['model_id']."'>" . $row['make'] . " " . $row['model'] . "</a>";
echo "</h4>";
echo "<a href='item_details.php?model=" . $row['model_id']."' class='btn btn-more'><i class='fa fa-plus'></i>Read more</a>";
echo "</div>";
echo "</div>";
}
?>
</div>
</div>
</div>
<!-- ======== @Region: #footer ======== -->
<?php
include("footer.php");
?>
<!-- Required JavaScript Libraries -->
<script src="lib/jquery/jquery.min.js"></script>
<script src="lib/bootstrap/js/bootstrap.min.js"></script>
<script src="lib/owlcarousel/owl.carousel.min.js"></script>
<script src="lib/stellar/stellar.min.js"></script>
<script src="lib/waypoints/waypoints.min.js"></script>
<script src="lib/counterup/counterup.min.js"></script>
<script src="contactform/contactform.js"></script>
<!-- Template Specific Custom Javascript File -->
<script src="js/custom.js"></script>
<script src="/Project/js/freelancer.min.js"></script>
<script src="/Project/lib/jquery-easing/jquery.easing.min.js"></script>
<!--Custom scripts demo background & colour switcher - OPTIONAL -->
<script src="js/color-switcher.js"></script>
<!--Contactform script -->
<script src="contactform/contactform.js"></script>
</body>
</html>