/var/www/hkosl.com/thebh/20161004/banquet/location.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
<?php
    $page_settings 
= array(
        
'formid'     => 'location'//for nav menu
        
'section'    => '婚宴場地'//for page title
    
);

    require_once 
'../include/header.php';

    require_once 
'../include/navigation.php';

    
//default
    
$first_branch Location::whereRaw("deleted=? and status=?", array(01))->orderBy('sort''ASC')->first();
    
$first_site Shop::whereRaw("deleted=? and status=? and location_id=?", array(01$first_branch['id']))->orderBy('sort''ASC')->first();

    
$id $first_site['id'];
    if (isset(
$_GET['id']))
        
$id $_GET['id'];

    
//selected
    
$current_site Shop::whereRaw("deleted=? and status=? and id=?", array(01$id))->first();
    
$current_branch Location::whereRaw("deleted=? and status=? and id=?", array(01$current_site['location_id']))->first();
    
    
$branches Location::whereRaw("deleted=? and status=?", array(01))->orderBy('sort''ASC')->get();

    
$gallery Image::whereRaw("imageable_type=? and imageable_id=? and deleted=?", array('Shop_gallery'$id0))->orderBy('sort''ASC')->get();
    
    
$floorplan Image::whereRaw("imageable_type=? and imageable_id=? and deleted=?", array('Shop_floorplan'$id0))->orderBy('sort''ASC')->get();
    
$first_floorplan $floorplan->first();

    
$menu Image::whereRaw("imageable_type=? and imageable_id=? and deleted=?", array('Shop_menu'$id0))->orderBy('sort''ASC')->get();
    
$first_menu $menu->first();
?>
    <link href="../css/bootstrapGold.min.css" rel="stylesheet">
    <link href="../css/styleGold.css" rel="stylesheet">

    <script type="text/javascript" src="../js/jquery-1.11.0.min.js"></script>
    <script type="text/javascript" src="../js/jquery.sliderPro.min.js"></script>
    <script type="text/javascript" src="../js/location.js"></script>
    <link rel="stylesheet" type="text/css" href="../css/slider-pro.min.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="../css/mapstyle.css" media="screen" />

    <div id='locationMenu'>
        <ul>
        <?php
        
foreach ($branches as $branch) {

            
$sites Shop::whereRaw("deleted=? and status=? and location_id=?", array(01$branch['id']))->orderBy('sort''ASC')->get();
            
            if (
count($sites) != 0){      
                
$link "#";
                
$caret " <span class='caret'></span>";
                if (
count($sites) == 1){            
                    
$only $sites->first();
                    
$link $_SERVER['PHP_SELF'].'?id='.$only['id'];
                    
$caret "";
                }

                echo 
"<li><a href='".$link."'>".$branch['name_tc'].$caret."</a>";

                if (
count($sites) > 1) {
                    echo 
"  <ul>";
                    foreach (
$sites as $site) {
                        echo 
"  <li><a href='".$_SERVER['PHP_SELF']."?id=".$site['id']."'>".$site['name_tc']."</a></li>";
                    }
                    echo 
"  </ul>";
                }

                echo 
"</li>";
            }

        }
        
?>
        </ul>
    </div>

    <div class="MapSlider">
        <div id="map360" class="slider-pro">
            <div class="sp-slides">
            <?php
                
if (trim($current_site['google_streetview']) != ""){
            
?>
                <div class="sp-slide" id="GoogleMap">
                    <iframe src="<?= $current_site['google_streetview'?>" frameborder="0" style="border:0" allowfullscreen>
                    </iframe>
                </div>
            <?php
                
}

                if (
trim($current_site['google_map']) != ""){
            
?>
                <div class="sp-slide" id="GoogleMap">
                    <iframe src="<?= $current_site['google_map'?>" frameborder="0" style="border:0" allowfullscreen>
                    </iframe>
                </div>
            <?php
                
}

                foreach (
$gallery as $img){
                    
$fullpath $img['path'].$img['src'];
                    echo 
"<div class=\"sp-slide\" id=\"SliderImg\">";
                    echo 
"<img src=\"$fullpath\" />";
                    echo 
"</div>";
                }
            
?>

            </div>

            <div class="sp-thumbnails">
            <?php
                
if (trim($current_site['google_streetview']) != "")
                    echo 
'<img class="sp-thumbnail" src="../images/mapslider/1.jpg" />';

                if (
trim($current_site['google_map']) != "")
                    echo 
'<img class="sp-thumbnail" src="../images/mapslider/2.jpg" />';
            
?>
                
            <?php
                
foreach ($gallery as $img){
                    
$fullpath $img['path'].$img['src'];
                    echo 
"<img class=\"sp-thumbnail\" src=\"$fullpath\" />";
                }
            
?>
            </div>
        </div>
    </div>

    <div class="Brief">
        <div class="container">
            <h1 class="headTitle"><img src="../images/title/goldLeft.png">簡介<img src="../images/title/goldRight.png"></h1>
            <?= nl2br(_h($current_site['desc_tc'])) ?>
        </div>
    </div>

    <div class="locationDetail" style="background-image:url(../images/background/image-2.jpg)">
        <div class="container">
            <div class="Details">
                <div id="StageTitle">
                    <img src="../images/location/stage.png">舞台
                    <div class="FuncationIMG"><img src="../images/location/open.png" class="StageArrow-img">
                    </div>
                </div>
                <div id="StageData"><?= _h($current_site['spec_stage']) ?></div>

                <div id="HeightTitle"><img src="../images/location/height.png">樓底
                    <div class="FuncationIMG"><img src="../images/location/open.png" class="HeightArrow-img">
                    </div>
                </div>
                <div id="HeightData"><?= _h($current_site['spec_height']) ?></div>

                <div id="ChairTitle"><img src="../images/location/chair.png">圍數
                    <div class="FuncationIMG"><img src="../images/location/open.png" class="ChairArrow-img" id="magic-toggle">
                    </div>
                </div>
                <div id="ChairtData"><?= _h($current_site['spec_table']) ?></div>

                <div id="EquipmentTitle"><img src="../images/location/karaoke.png">器材設備
                    <div class="FuncationIMG"><img src="../images/location/close.png" class="EquipmentArrow-img">
                    </div>
                </div>
                <div id="EquipmentData"><?= _h($current_site['spec_equipment']) ?></div>

                <div id="ContactTitle"><img src="../images/location/contact.png">聯絡資料
                    <div class="FuncationIMG"><img src="../images/location/open.png" class="ContactArrow-img">
                    </div>
                </div>
                <div id="ContactData"><?= nl2br(_h($current_site['spec_contact'])) ?></div>


            </div>
        </div>
    </div>

    <div class="PopupData">
        <div class="container">
            <div class="row">
                <div class="col-sm-3 col-xs-6" id="popupContent">
                    <img src="../images/location/phone-gold.png" id="CallingIMGBTN">
                    <br>
                    <button id="CallingBTN">宴會熱線</button>
                    <div id="CallingSection" class="LocationPopUp">
                        <div class="LocationPopUp-content">
                            <div class="LocationPopUp-header">
                                <span class="CallingClose"><img src="../images/cross.png"></span>
                                <h2>宴會熱線</h2>
                            </div>
                            <div class="LocationPopUp-body">
                                <p><?= $current_branch['name_tc'?>熱線</p>
                                <p><a href="tel:<?= _h($current_site['hotline']) ?>"><?= _h($current_site['hotline']) ?></a>
                                </p>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="col-sm-3 col-xs-6" id="popupContent">
                    <img src="../images/location/floorplan-gold.png" id="FloorIMGBTN">
                    <br>
                    <button id="FloorBTN">場地平面圖</button>
                    <div id="FloorSection" class="LocationPopUp">
                        <div class="LocationPopUp-content">
                            <div class="LocationPopUp-header">
                                <span class="FloorClose"><img src="../images/cross.png"></span>
                                <h2>場地平面圖</h2>
                            </div>
                            <div class="LocationPopUp-body" id="floorPlanIMG">

                                <img id="img1" src="<?= $first_floorplan['path'].$first_floorplan['src'?>">
                                <br>
                                <div class="floorthumbnail">
                                <?php
                                    
foreach ($floorplan as $img) {
                                        
$fullpath $img['path'].$img['src'];
                                        echo 
"<img src=\"$fullpath\" onclick='changeImage1(\"$fullpath\");'>";
                                    }
                                
?>            
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="col-sm-3 col-xs-6" id="popupContent">
                    <img src="../images/location/menu-gold.png" id="MenuIMGBTN">
                    <br>
                    <button id="MenuBTN">菜單及酒水套餐</button>
                    <div id="MenuSection" class="LocationPopUp">
                        <div class="LocationPopUp-content">
                            <div class="LocationPopUp-header">
                                <span class="MenuClose"><img src="../images/cross.png"></span>
                                <h2>菜單及酒水套餐</h2>
                            </div>
                            <div class="LocationPopUp-body" id="floorPlanIMG">
                                <img id="img2" src="<?= $first_menu['path'].$first_menu['src'?>">
                                <br>
                                <div class="floorthumbnail">
                                <?php
                                    
foreach ($menu as $img) {
                                        
$fullpath $img['path'].$img['src'];
                                        echo 
"<img src=\"$fullpath\" onclick='changeImage2(\"$fullpath\");'>";
                                    }
                                
?>            
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="col-sm-3 col-xs-6" id="popupContent">
                    <img src="../images/location/pencentage-gold.png" id="SaleIMGBTN">
                    <br>
                    <button id="SaleBTN">基本優惠</button>
                    <div id="SaleSection" class="LocationPopUp">
                        <div class="LocationPopUp-content">
                            <div class="LocationPopUp-header">
                                <span class="SaleClose"><img src="../images/cross.png"></span>
                                <h2>基本優惠</h2>
                            </div>
                            <div class="LocationPopUp-body">
                                <?= nl2br(_h($current_site['basic_offer'])) ?>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>

    <?php
        $current_directory 
basename(__DIR__);
        require_once 
'../include/comment.php';

        require_once 
'../include/footer.php';
    
?>

    <script>
        function changeImage1(a) {
            document.getElementById("img1").src = a;
        }

        function changeImage2(a) {
            document.getElementById("img2").src = a;
        }

        var swiper = new Swiper('.swiper-container', {
            pagination: '.swiper-pagination',
            paginationClickable: true,
            spaceBetween: 30,
        });
    </script>


</body>

</html>