-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPlace-details.php
165 lines (158 loc) · 5.32 KB
/
Place-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
160
161
162
163
164
165
<?php
$menu = "place";
$page_title = "Travel Place";
$placeId = (isset($_GET['place']) ? $_GET['place']: $_GET['p']);
include("header.php");
$TravelPlace = new TravelPlace();
$travelPlace = $TravelPlace->setFromId($placeId);
$travelSpots = array();
if( isset($travelPlace->tourist_spot['spots']) && !empty($travelPlace->tourist_spot['spots'])){
$travelSpots=$travelPlace->tourist_spot['spots'];
}
?>
<section class="banner-w3layouts-bottom py-lg-5 py-3">
<div class="container py-lg-4 py-3">
<div class="row">
<!--left-->
<div class="col-lg-8 left-blog-info text-left">
<div class="blog-grid-top">
<div class="b-grid-top">
<div class="blog_info_left_grid">
<a href="">
<img src="<?php echo $travelPlace->thumbnail; ?>" class="img-fluid" alt="">
</a>
</div>
</div>
<h3>
<a href=""><?php echo $travelPlace->name; ?></a>
</h3>
<div class="details_contents">
<p><?php echo $travelPlace->details; ?></p>
</div>
<div class="google_map">
<iframe src="<?php echo $travelPlace->gmap; ?>" width="600" height="450" frameborder="0" style="border:0;" allowfullscreen="" aria-hidden="false" tabindex="0"></iframe>
</div>
<div class="nearby_place">
<div class="loader">
<i class="fas fa-spinner fa-spin"></i>
</div>
<div class="search_top">
<h3>Nearby Spot</h3>
<form action="#" method="post" class="ban-form row">
<input type="hidden" id="place_id" name="id" value="<?php echo $placeId; ?>">
<div class="col-md-4 banf">
<select id="spot_from" name="to" class="form-control">
<?php
if(isset($travelPlace->tourist_spot['spots']) && is_array($travelPlace->tourist_spot['spots'])){
foreach ($travelPlace->tourist_spot['spots'] as $key => $value) {
echo '<option>'.$value.'</option>';
}
}
?>
</select>
</div>
<div class="col-md-1 banf">
<label for="" class="btn btn-info">To</label>
</div>
<div class="col-md-4 banf">
<select id="spot_to" name="to" class="form-control">
<?php
if(isset($travelPlace->tourist_spot['spots']) && is_array($travelPlace->tourist_spot['spots'])){
foreach ($travelPlace->tourist_spot['spots'] as $key => $value) {
echo '<option>'.$value.'</option>';
}
}
?>
</select>
</div>
<div class="col-md-3 banf">
<a href="" class="btn btn-info btn-block" id="btn_spot_details"><i class="fa fa-search"></i></a>
</div>
</form>
<ul class="rs_list mt-4" id="vehiclesList">
</ul>
</div>
</div>
<br>
<br>
<div class="nearby_tour_places">
<h4 class="title">Nearby Tour Places</h4>
<div class="row">
<?php
$column = "col-md-4";
$onlyTitle = true;
$nearByPlace = $travelPlace->nearby_tour_place;
foreach ($nearByPlace as $keyPlace => $valuePlace) {
$tempTrabelPlace = new TravelPlace();
$travel = $tempTrabelPlace->setFromId($valuePlace);
include('inc/template/place_loop.php');
}
?>
</div>
</div>
</div>
</div>
<!--//left-->
<!--right-->
<aside class="col-lg-4 right-blog-con text-right">
<div class="right-blog-info text-left">
<div class="tech-btm rs_sidebar_box">
<h4 class="title">Popular Foods</h4>
<ul class="rs_list">
<?php
foreach ($travelPlace->populer_foods as $key => $valueFoods) {
?>
<li>
<h2><?php echo $valueFoods['name']; ?></h2>
<strong><?php echo $valueFoods['price']; ?></strong>
<p><?php echo $valueFoods['details']; ?></p>
</li>
<?php
}
?>
</ul>
</div>
<div class="tech-btm rs_sidebar_box">
<h4 class="title">Nearby Hotel</h4>
<div class="row">
<?php
$column = "col-md-6";
$onlyTitle = true;
$rsGlobal = new RsGlobal($travelPlace->db->con,'');
$nearbyHotels = implode(',', $travelPlace->nearby_hotel);
$allHotels = $rsGlobal->Query("SELECT * FROM hotel where id IN($nearbyHotels)");
if( isset($allHotels->num_rows) AND $allHotels->num_rows>=1){
while ($row = $allHotels->fetch_assoc()) {
$hotel = $row;
include('inc/template/hotel_loop.php');
}
}
?>
</div>
</div>
<div class="tech-btm rs_sidebar_box">
<h4 class="title">Nearby Restaurants</h4>
<div class="row">
<?php
$column = "col-md-6";
$onlyTitle = true;
$nearby_restaurants = implode(',', $travelPlace->nearby_restaurants);
$all_restaurant = $rsGlobal->Query("SELECT * FROM restaurant where id IN($nearby_restaurants)");
if( isset($all_restaurant->num_rows) AND $all_restaurant->num_rows>=1){
while ($row = $all_restaurant->fetch_assoc()) {
$restaurant = $row;
include('inc/template/restaurant_loop.php');
}
}
?>
</div>
</div>
</div>
</aside>
<!--//right-->
</div>
</div>
</section>
<?php
include("footer.php");
?>