forked from chrissmartin/torq
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathitem.php
More file actions
248 lines (225 loc) · 6.62 KB
/
item.php
File metadata and controls
248 lines (225 loc) · 6.62 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
<?php
function check($a) {
if ($a==1){
echo "Yes";
}
else{
echo "No";
}
};
include_once("conn.php");
$id=$_GET["id"];
$query="SELECT * FROM models,brands,variants WHERE models.cid=$id AND models.bid=brands.bid AND models.cid=variants.cid ;";
$result = $connection->query($query);
if ($result->num_rows > 0) {
$row = $result->fetch_assoc();
}
else{
echo "Unkown ERROR!!";
}
$connection->close();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<style>
img{
max-width:800px;
max-height:400px;
position:relative;
top:-20px;
left:20px;
}
.imgdiv{
width:800px;
height:300px;
}
</style>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Oswald:300,400,700|Raleway:100,200,300,600,700" rel="stylesheet">
<title>Torq</title>
<!-- Bootstrap -->
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/style.css">
<link href="css/hover.css" rel="stylesheet" media="all">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<?php
include_once("header.php");
?>
<!-- ///////////////////////////1st menu Category///////////////////////// -->
<div class="container">
<div class="row">
<div class="col-sm-8">
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner imgdiv" role="listbox">
<div class="item active">
<img src="car/<?php echo $row['cid'];?>/1.jpg" alt="Image">
<div class="carousel-caption">
<!-- Caption if needed -->
</div>
</div>
<div class="item">
<img src="car/<?php echo $row['cid'];?>/2.jpg" alt="Image">
<div class="carousel-caption">
<!-- Caption if needed -->
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<div class="col-sm-4">
<div class="chead">
<h3><strong><?php echo $row['bname'];?> <?php echo $row['cname'];?></strong></h3>
</div>
<div class="cfeature">
<p>Launched: <?php echo $row['vyear'];?></p>
</div>
<div class="cprice">
<p><h2>₹ <strong><?php echo $row['minprice'];?></strong> - <strong><?php echo $row['maxprice'];?></strong> Lakh <br> </h2></p>
</div>
</div>
</div>
<hr>
</div>
<div class="container text-center">
<h3>Specifications</h3>
<table class="table table-bordered spectable">
<thead>
<tr>
<th class="tablehead text-center">Feature</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>Variant Name</td>
<td><?php echo $row['vname'];?></td>
</tr>
<tr>
<td>Price (Ex Showroom*)</td>
<td>₹ <?php echo $row['price'];?></td>
</tr>
<tr>
<td>Mileage</td>
<td><?php echo $row['eco'];?> KM/L</td>
</tr>
<tr>
<td>Top Speed</td>
<td><?php echo $row['topspeed'];?> KMPH</td>
</tr>
<tr>
<td>Acceleration (100 KMPH)</td>
<td><?php echo $row['acc'];?> sec</td>
</tr>
<tr>
<td>Displacement</td>
<td><?php echo $row['displ'];?> cc</td>
</tr>
<tr>
<td>Max Power</td>
<td><?php echo $row['maxpow'];?></td>
</tr>
<tr>
<td>Max Torque</td>
<td><?php echo $row['maxtorq'];?></td>
</tr>
<tr>
<td>Fuel Type</td>
<td><?php echo $row['fueltype'];?></td>
</tr>
<tr>
<td>Turning Radius</td>
<td><?php echo $row['turnrad'];?> m</td>
</tr>
<tr>
<td>Number of Cylinders</td>
<td><?php echo $row['nocyl'];?></td>
</tr>
<tr>
<td>Turbo</td>
<td><?php check($row['turbo']);?></td>
</tr>
<tr>
<td>Gearbox</td>
<td><?php echo $row['gearbox'];?></td>
</tr>
<tr>
<td>Seat Capacity</td>
<td><?php echo $row['seatcap'];?></td>
</tr>
<tr>
<td>Length</td>
<td><?php echo $row['l'];?> mm</td>
</tr>
<tr>
<td>Width</td>
<td><?php echo $row['w'];?> mm</td>
</tr>
<tr>
<td>Height</td>
<td><?php echo $row['h'];?> mm</td>
</tr>
<tr>
<td>Wheel Base</td>
<td><?php echo $row['wb'];?> mm</td>
</tr>
<tr>
<td>Ground Clearance</td>
<td><?php echo $row['gc'];?> mm</td>
</tr>
<tr>
<td>Kerb Weight</td>
<td><?php echo $row['kerbweight'];?> Kg</td>
</tr>
<tr>
<td>Fuel Capacity </td>
<td><?php echo $row['fuelcap'];?> Litres</td>
</tr>
<tr>
<td>Boot</td>
<td><?php echo $row['boot'];?> Litres</td>
</tr>
<tr>
<td>Tyre Size</td>
<td><?php echo $row['tyresize'];?></td>
</tr>
</tbody>
</table>
<hr>
</div>
<!-- ///////////////////////////Footer Section///////////////////////// -->
<?php
include_once("footer.php");
?>
<!-- ///////////////////////////Footer///////////////////////// -->
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="js/jquery-1.11.3.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.js"></script>
</body>
</html>