forked from poojapauskar/vanisha-honda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproduct_detail.php
456 lines (416 loc) · 18.4 KB
/
product_detail.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
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
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="css/slideshow.css">
<script src="https://code.getmdl.io/1.2.1/material.min.js"></script>
<link rel="stylesheet" href="https://code.getmdl.io/1.2.1/material.indigo-pink.min.css">
<!-- Material Design icon font -->
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/style2.css">
<script src="js/index.js"></script>
<style type="text/css">
#ul1 li{
display: inline;
}
#ul1 li{
margin-left:7%;
}
#ul1{
margin-top:10%;
}
#ul2 li{
display: inline;
}
#ul2{
margin-top:25%;
}
#ul4 li{
display: inline;
}
</style>
</head>
<body style="background-color:#E4E5E7">
<?php
if($_POST['mobile'] != ''){
$url_web_enquiry = 'https://vanisha-honda.herokuapp.com/web_app_enquiry/?access_token=YbZtBg6XuWWbZ39R3BIn9Mb1XOn7uy';
$options_web_enquiry = array(
'http' => array(
'header' => array(
'EMAIL: '.$_POST['email'],
'MOBILE: '.$_POST['mobile'],
'V-ID: '.$_POST['v_id']
),
'method' => 'GET',
),
);
$context_web_enquiry = stream_context_create($options_web_enquiry);
$output_web_enquiry = file_get_contents($url_web_enquiry, false,$context_web_enquiry);
/*var_dump($output_types_subtypes);*/
$arr_web_enquiry = json_decode($output_web_enquiry,true);
if($arr_web_enquiry['status'] == 200){
echo "<script>alert('New Enquiry Created')</script>";
}
}
?>
<?php
$url_types_subtypes = 'https://vanisha-honda.herokuapp.com/get_vehicle_types_subtypes/?access_token=YbZtBg6XuWWbZ39R3BIn9Mb1XOn7uy';
$options_types_subtypes = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'GET',
),
);
$context_types_subtypes = stream_context_create($options_types_subtypes);
$output_types_subtypes = file_get_contents($url_types_subtypes, false,$context_types_subtypes);
/*var_dump($output_types_subtypes);*/
$arr_types_subtypes = json_decode($output_types_subtypes,true);
?>
<?php
$url_details_of_selected_vehicle = 'http://vanisha-honda.herokuapp.com/get_details_of_selected_vehicle/?access_token=YbZtBg6XuWWbZ39R3BIn9Mb1XOn7uy';
$options_details_of_selected_vehicle = array(
'http' => array(
'header' => array(
'V-ID: '.$_GET['v_id'],
),
'method' => 'GET',
),
);
$context_details_of_selected_vehicle = stream_context_create($options_details_of_selected_vehicle);
$output_details_of_selected_vehicle = file_get_contents($url_details_of_selected_vehicle, false,$context_details_of_selected_vehicle);
/*var_dump($output_details_of_selected_vehicle);*/
$arr_details_of_selected_vehicle = json_decode($output_details_of_selected_vehicle,true);
/*echo $arr_details_of_selected_vehicle[0]['v_details']['vehicle'];*/
?>
<div style="" class="demo-layout-transparent mdl-layout mdl-js-layout">
<header style="background-color:#F1524B;height:80px" class="mdl-layout__header mdl-layout__header--transparent">
<div class="mdl-layout__header-row" style="margin-top:2%">
<!-- Title -->
<img style="margin-top:-2%" src="images/honda_logo_white.png"></img>
<span style="margin-left:1%;font-size:18px;" lass="mdl-layout-title">Vanisha Honda</span>
<!-- Add spacer, to align navigation to the right -->
<div class="mdl-layout-spacer"></div>
<!-- Navigation -->
<nav class="mdl-navigation">
<a class="mdl-navigation__link" href="index.php">Home</a>
<div class="mdl-navigation__link dropdown" style="">
<a href="#" class="btn dropdown-toggle" style="color:white" data-toggle="dropdown">Products<span class="caret"></span></a>
<ul class="dropdown-menu">
<li>
<?php for($x=0;$x<count($arr_types_subtypes);$x++){?>
<a class="trigger right-caret"><?php echo $arr_types_subtypes[$x]['vehicle_type'] ?></a>
<ul class="dropdown-menu sub-menu">
<?php for($y=0;$y<count($arr_types_subtypes[$x]['subtype']);$y++){?>
<li><a href="product_detail.php?v_id=<?php echo $arr_types_subtypes[$x]['subtype'][$y]['v_id'] ?>"><?php echo $arr_types_subtypes[$x]['subtype'][$y]['vehicle'] ?></a></li>
<?php } ?>
</ul>
<?php } ?>
</li>
</ul>
</div>
<div class="mdl-navigation__link dropdown" style="">
<a href="#" class="btn dropdown-toggle" style="color:white" data-toggle="dropdown">Services<span class="caret"></span></a>
<ul id="ul_service" class="dropdown-menu">
<li><a href="book_service.php">Book Servicing</a></li>
<li><a href="insurance.php">Renew Insurance</a></li>
<li><a href="finance.php">Get Finance</a></li>
</ul>
</div>
<a class="mdl-navigation__link" href="enquiry.php">Contact Us</a>
</nav>
</div>
</header>
<div class="mdl-layout__drawer">
<span class="mdl-layout-title">Vanisha Honda</span>
<nav class="mdl-navigation">
<a class="mdl-navigation__link" href="index.php">Home</a>
<a class="mdl-navigation__link" href="product_types.php">Products</a>
<a class="mdl-navigation__link" href="customer_services.php">Services</a>
<a class="mdl-navigation__link" href="enquiry.php">Contact Us</a>
</nav>
</div>
<main class="mdl-layout__content">
<div class="row" style="text-align:left;background-color:white">
<div class="container">
<div class="col-sm-6">
<h3><?php echo $arr_details_of_selected_vehicle[0]['v_details']['vehicle']; ?></h3>
<p><?php echo $arr_details_of_selected_vehicle[0]['v_details']['description']; ?></p>
<div class="row" style="margin-left:-4%">
<div class="col-sm-2">
<img style="transform:scale(0.80);" src="images/CBS.png"></img>
</div>
<div class="col-sm-10">
<img style="transform:scale(0.80)" src="images/HET.png"></img>
</div>
</div>
</div>
<div style="text-align:right" class="col-sm-6">
<img src="<?php echo 'http://res.cloudinary.com/hb3ayjpuz/image/upload/v1478944737/vanishahonda/'.$arr_details_of_selected_vehicle[0]['image_details']['link']; ?>"></img>
</div>
</div>
</div>
<!-- <div class="col-sm-6">
<div id="slider1" class="csslider2 infinity2">
<input type="radio" name="slides" id="slides_1">
<input type="radio" name="slides" id="slides_2">
<input type="radio" name="slides" checked="checked" id="slides_3">
<input type="radio" name="slides" id="slides_4">
<input type="radio" name="slides" id="slides_5">
<ul>
<li><img src="images/bike.jpg"></img></li>
<li><img src="images/bike.jpg"></img></li>
<li><img src="images/bike.jpg"></img></li>
<li><img src="images/bike.jpg"></img></li>
<li><img src="images/bike.jpg"></img></li>
</ul>
<div class="arrows">
<label for="slides_1"></label>
<label for="slides_2"></label>
<label for="slides_3"></label>
<label for="slides_4"></label>
<label for="slides_5"></label>
<label for="slides_1" class="goto-first"></label>
<label for="slides_5" class="goto-last"></label>
</div>
<div class="navigation">
<div>
<label for="slides_1"></label>
<label for="slides_2"></label>
<label for="slides_3"></label>
<label for="slides_4"></label>
<label for="slides_5"></label>
</div>
</div>
</div>
</div> -->
<div class="container" style="background-color:#E4E5E7">
<div class="row">
<div class="col-sm-6">
<table class="mdl-data-table mdl-js-data-table mdl-shadow--2dp" style="background-color:white;margin-top:9%;">
<thead>
<th><h5>Specifications</h5></th>
</thead>
<tbody>
<tr>
<th>Price</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['price']; ?></td>
</tr>
<tr>
<th>Engine Displacement</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['engine_displacement']; ?></td>
</tr>
<tr>
<th>Power</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['power']; ?></td>
</tr>
<tr>
<th>Torque</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['torque']; ?></td>
</tr>
<tr>
<th>Mileage</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['mileage']; ?></td>
</tr>
<tr>
<th>Length</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['length']; ?></td>
</tr>
<tr>
<th>Width</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['width']; ?></td>
</tr>
<tr>
<th>Height</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['height']; ?></td>
</tr>
<tr>
<th>Front Suspension</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['front_suspension']; ?></td>
</tr>
<tr>
<th>Rear Suspension</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['rear_suspension']; ?></td>
</tr>
<tr>
<th>Wheel Base</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['wheel_base']; ?></td>
</tr>
<tr>
<th>Ground Clearance</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['ground_clearance']; ?></td>
</tr>
<tr>
<th>Kerb Tank</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['kerb_tank']; ?></td>
</tr>
<tr>
<th>Fuel Tank Capacity</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['fuel_tank_capacity']; ?></td>
</tr>
<tr>
<th>Engine Type</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['engine_type']; ?></td>
</tr>
<tr>
<th>Bore</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['bore']; ?></td>
</tr>
<tr>
<th>Stroke</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['stroke']; ?></td>
</tr>
<tr>
<th>Compassion Ratio</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['compassion_ratio']; ?></td>
</tr>
<tr>
<th>Valve System</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['valve_system']; ?></td>
</tr>
<tr>
<th>No. of Gears</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['no_of_gears']; ?></td>
</tr>
<tr>
<th>Gear Pattern</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['gear_pattern']; ?></td>
</tr>
<tr>
<th>Max Speed</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['max_speed']; ?></td>
</tr>
<tr>
<th>Tyre Size Front</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['tyre_size_front']; ?></td>
</tr>
<tr>
<th>Tyre Size Rear</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['tyre_size_rear']; ?></td>
</tr>
<tr>
<th>Tyre Type Front</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['tyre_type_front']; ?></td>
</tr>
<tr>
<th>Tyre Type Rear</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['tyre_type_rear']; ?></td>
</tr>
<tr>
<th>Brake Type/Size Front</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['brake_type_size_front']; ?></td>
</tr>
<tr>
<th>Brake Type/Size Rear</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['brake_type_size_rear']; ?></td>
</tr>
<tr>
<th>Frame Type</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['frame_type']; ?></td>
</tr>
<tr>
<th>Frame Type front</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['frame_type_front']; ?></td>
</tr>
<tr>
<th>Frame Type rear</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['frame_type_rear']; ?></td>
</tr>
<tr>
<th>Battery</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['battery']; ?></td>
</tr>
<tr>
<th>Head Lamp</th>
<td><?php echo $arr_details_of_selected_vehicle[0]['v_details']['head_lamp']; ?></td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-6">
<form action="#" method="post" style="width:320px;margin-top:9%;background-color:white;padding:5px 5px 5px 5px">
<h5 style="color:gray">Request Quotation</h5>
<div class="mdl-textfield mdl-js-textfield">
<input class="mdl-textfield__input" type="text" id="name" name="name">
<label class="mdl-textfield__label" for="name">Full Name</label>
</div>
<div class="mdl-textfield mdl-js-textfield">
<input class="mdl-textfield__input" type="text" id="email" name="email">
<label class="mdl-textfield__label" for="email">Email Address</label>
</div>
<div class="mdl-textfield mdl-js-textfield">
<input class="mdl-textfield__input" type="text" id="mobile" name="mobile">
<label class="mdl-textfield__label" for="mobile">Mobile</label>
</div>
<input class="mdl-textfield__input" type="hidden" id="v_id" name="v_id" value="<?php echo $_GET['v_id'] ?>">
<input class="mdl-textfield__input" type="hidden" id="address" name="address">
<input class="mdl-textfield__input" type="hidden" id="enquiry_type" name="enquiry_type">
<input class="mdl-textfield__input" type="hidden" id="finance" name="finance">
<input class="mdl-textfield__input" type="hidden" id="exchange" name="exchange">
<input class="mdl-textfield__input" type="hidden" id="message" name="message">
<input class="mdl-textfield__input" type="hidden" id="pincode" name="pincode">
<input class="mdl-textfield__input" type="hidden" id="duration" name="duration">
<br>
<div style="text-align:right">
<button type="submit" style="background-color:blue;color:white" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect">
Submit
</button>
</div>
</form>
</div>
</div>
</div>
<div style="background-color:#607D8B;border-bottom:1px solid #688491;margin-top:3%" class="row">
<div class="col-sm-1" style="color:white;">
</div>
<div class="col-sm-3" style="color:white;">
<div style="margin-top:5%">
<img style="width:25%;height:25%" src="images/honda_logo_red.png"></img>
<h5 style="margin-top:-6%;margin-left:29%">Vanisha Honda</h5>
</div>
</div>
<div class="col-sm-5" style="color:white">
<ul id="ul1">
<li><a style="color:white" href="index.php">Home</a></li>
<li><a style="color:white" href="product_types.php">Products</a></li>
<li><a style="color:white" href="customer_services.php">Services</a></li>
<li><a style="color:white" href="enquiry.php">Contact Us</a></li>
</ul>
</div>
<div class="col-sm-2" style="color:white;text-align:right">
<ul id="ul2">
<li><img src="images/twitter.png"></img></li>
<li><img src="images/facebook.png"></img></li>
<li><img src="images/google-plus.png"></img></li>
</ul>
</div>
<div class="col-sm-1">
</div>
</div>
<div style="background-color:#607D8B;border-bottom:1px solid #688491" class="row">
<div class="col-sm-1" style="color:white;">
</div>
<div class="col-sm-3" style="color:white;margin-top:3%">
<ul id="ul3" style="list-style: none;margin-left:-14%">
<li>+91-9987654321</li>
<li>+91-8314208821</li>
<li>[email protected]</li>
</ul>
</div>
<div class="col-sm-2" style="color:white">
</div>
<div class="col-sm-5" style="color:#97A8B0;text-align:right">
<ul id="ul4" style="margin-top:17%">
<li>PRIVACY POLICY</li>
<li style="margin-left:10%">TERMS AND CONDITIONS</li>
</ul>
</div>
<div class="col-sm-1">
</div>
</div>
</main>
</body>
</html>