/var/www/hkosl.com/thebh/20171017/banquet/latestnews2.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
<?php
    
use Illuminate\Database\Capsule\Manager as DB;

    
$page_settings = array(
        
'formid'     => 'news'//for nav menu
        
'section'    => '最新消息'//for page title
    
);

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

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

    
$slideshows Slideshow::whereRaw("slidetype=? and deleted=? and status=?", array('BANQUET_NEWS'01))->orderBy('sort''ASC')->get();

    
$branches Location::whereRaw("deleted=?", array(0))->orderBy('sort''ASC')->get();

    
$category MasterTypeCode::whereRaw("deleted=? and typeid=?", array(0'NEWSCATEGORY_BANQUET'))->orderBy('sort''ASC')->get();

    
$news DB::select('SELECT distinct n.id, n.name_tc, n.shortdesc_tc, n.desc_tc FROM news n inner join news_newscategory c ON n.id=c.news_id inner join master_type_code m ON c.newscategory_code=m.code WHERE m.typeid=? and n.deleted=? and n.status=? ORDER BY n.docdate DESC limit ?', array("NEWSCATEGORY_BANQUET"0110));
?>
    <link href="../css/bootstrapGold.min.css" rel="stylesheet">
    <link rel="stylesheet" href="../css/swiperGold.min.css">
    <link href="../css/styleGold.css" rel="stylesheet">

    <script async>
        function fp_ready() {

            var calendars = document.getElementsByClassName("flatpickr").flatpickr();

            // Date format
            var fpInstance = new Flatpickr(document.createElement("input")),
                formatOutput = document.getElementById("dateFormatOutput"),
                now = new Date();

            //never use it?
            if (document.getElementById("dateFormatComposer")) {
                document.getElementById("dateFormatComposer").addEventListener("keyup", function(e) {
                    formatOutput.textContent = fpInstance.formatDate(e.target.value, now);
                });
            }

        }
    </script>
    <script async src="../js/picktime.js" onload="fp_ready()"></script>
    <script async id="locale_script"></script>
    <link rel="stylesheet" id=cal_style type="text/css" href="../css/picktime.css">
    <script type="text/javascript" src="../js/jquery-1.10.1.min.js"></script>
    <!-- Add fancyBox main JS and CSS files -->
    <script type="text/javascript" src="../js/jquery.mousewheel-3.0.6.pack.js"></script>
    <script type="text/javascript" src="../js/jquery.fancybox.js"></script>
    <link rel="stylesheet" type="text/css" href="../css/jquery.fancybox.css?v=2.1.5" media="screen" />


    <script type="text/javascript">
        $(document).ready(function() {
            /*
             *  Simple image gallery. Uses default settings
             */

            $('.fancybox').fancybox();

            /*
             *  Button helper. Disable animations, hide close button, change title type and content
             */

            $('.fancybox-buttons').fancybox({
                openEffect: 'none',
                closeEffect: 'none',

                prevEffect: 'none',
                nextEffect: 'none',

                closeBtn: false,

                helpers: {
                    title: {
                        type: 'inside'
                    },
                    buttons: {}
                },

                afterLoad: function() {
                    this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
                }
            });

            /*
             *  Media helper. Group items, disable animations, hide arrows, enable media and button helpers.
             */
            $('.fancybox-media')
                .attr('rel', 'media-gallery')
                .fancybox({
                    openEffect: 'none',
                    closeEffect: 'none',
                    prevEffect: 'none',
                    nextEffect: 'none',
                    arrows: false,
                    helpers: {
                        media: {},
                        buttons: {}
                    }
                });

        });
    </script>

    <div class="swiper-container">
        <div class="swiper-wrapper">
        <?php
            
foreach ($slideshows as $slideshow) {
                if (
$slideshow['has_application_form'] == 1){
        
?>
                <div class="swiper-slide" id="slideStyle" style="background-image:url(../images/slider/<?= $slideshow['slideimg_tc'?>)">
                    <div class="container">
                        <div class="LatestContactForm">
                            <h2><?= $slideshow['slidecontent_tc'?></h2>
                            <form action="../include/application.php?id=<?= $slideshow['slideid'?>" method="POST" enctype="multipart/form-data">
                                <input class="flatpickr data-enable-time=true" placeholder="請選擇日期及時間" name="txtDate">
                                <input type="text" placeholder="姓名" name="txtName" class="NewsContactInput">
                                <br>
                                <input type="text" placeholder="電話" name="txtTel" class="NewsContactInput">
                                <br>
                                <input type="text" placeholder="電子郵件" name="txtEmail" class="NewsContactInput">

                                <br>
                                <input type="text" placeholder="驗證碼" name="verification" class="verifyInput">
                                <img src="../js/verification_code/captcha/vCodeImage.php?id=<?= $slideshow['slideid'?>&_=1" alt="按圖像重新載入"
                                     id="verify_code<?= $slideshow['slideid'?>" width="150" height="60" border="0"
                                     onclick="document.getElementById('verify_code<?= $slideshow['slideid'?>').src='../js/verification_code/captcha/vCodeImage.php?id=<?= $slideshow['slideid'?>&' + Math.random();" style="FILTER: wave(add=0,freq=3,lightstrength=50,phase=0,strength=3);cursor:pointer;padding-top: 5px;"/>
                                <br/>
                                <span style="font-size: 12px; color: #808080;">按圖像重新載入</span>

                                <br>
                                <input type="submit" value="遞交" class="SliderBTN">
                            </form>
                        </div>
                    </div>
                </div>
        <?php
                
} else{
                    echo 
'<div class="swiper-slide"><a href="'.$link.'" target="_blank"><img src="../images/slider/'.$slideshow['slideimg_tc'].'"></a></div>';
                }
            }
        
?>
        </div>
        <!-- Add Pagination -->
        <div class="swiper-pagination"></div>
        <!-- Add Arrows -->
        <div class="swiper-button-next"></div>
        <div class="swiper-button-prev"></div>
    </div>

    <div class="AllNews">
        <div class="container">
            <div class="checkboxDiv" id="branchOpts">
                <?php
                    
foreach ($branches as $branch) {
                
?>
                    <div class="divBox">
                        <input type="checkbox" id="b<?= $branch['id'?>" name="branch" value="<?= $branch['id'?>" />
                        <label for="b<?= $branch['id'?>"></label> <?= _h($branch['name_tc']) ?>
                    </div>
                <?php
                    
}
                
?>
            </div>
            <br>
            <div class="checkboxDiv" id="categoryOpts">
                <?php
                    
foreach ($category as $each) {
                
?>
                    <div class="divBox">
                        <input type="checkbox" id="c<?= $each['id'?>" name="category" value="<?= $each['code'?>" />
                        <label for="c<?= $each['id'?>"></label> <?= _h($each['name_tc']) ?>
                    </div>
                <?php
                    
}
                
?>
            </div>
        </div>
    </div>

    <div class="PostSection">
        <div class="container">
            <!-- <div class="row"> -->
            <div class="row" id="tx_history">
<!--                 <?php
                    
foreach ($news as $each) {
                
?>
                        <div class="item">
                            <a class="fancybox fancybox.iframe" href="post.php?id=<?= $each['id'?>">
                                <div class="Post" data-toggle="modal" data-target="#myModal" target="myiframe">
                                    <h3><?= _h($each['name_tc']) ?></h3>
                                    <?= $each['shortdesc_tc'?>
                                </div>
                            </a>
                        </div>
                <?php
                    
}
                
?>   -->
<!--
                <div class="item">
                    <a class="fancybox fancybox.iframe" href="popup-news/post.html">
                        <div class="Post" data-toggle="modal" data-target="#myModal" target="myiframe">
                            <h3>香港婚紗暨結婚用品博覽2016</h3>
                            <img src="../images/PopupPost/image-1.jpg">
                            <p>2016年06月23日
                                <br> 香港婚紗暨結婚用品博覽2016
                                <br> 7月份一連3日於香港會議展覽中心舉行婚展會,期待你們的來臨我們御苑皇宴攤位!
                                <br>

                            </p>
                        </div>
                    </a>
                </div>

                <div class="item">
                    <div class="PostII">
                        <img src="../images/latestNews/image-2.jpg" class="NewsImgRoundConer">
                        <h3>最新優惠</h3>
                        <p>預訂婚宴酒席, 酒水優惠只需$288
                            <br> 飲品套餐包括: 紅白餐酒、生力啤酒、百事可樂、七喜、鮮橙汁
                            <br> *晚上8時至11時無限量供應
                            <br> 只適用於2016年6月1日或之後預訂的客戶, 有關詳情請向分店職員查詢!
                        </p>
                    </div>
                </div>

                <div class="item">
                    <div class="PostII">
                        <img src="../images/latestNews/image-2.jpg" class="NewsImgRoundConer">
                        <h3>最新優惠</h3>
                        <p>預訂婚宴酒席, 酒水優惠只需$288
                            <br> 飲品套餐包括: 紅白餐酒、生力啤酒、百事可樂、七喜、鮮橙汁
                            <br> *晚上8時至11時無限量供應
                            <br> 只適用於2016年6月1日或之後預訂的客戶, 有關詳情請向分店職員查詢!
                        </p>
                    </div>
                </div> -->

            </div>
        </div>
       <!--  <div id="loading" style="display: none;">加載中...</div> -->
    </div>

    <a href="#" class="back-to-top"></a>

    <div class="footer">
        御苑皇宴 © 2016 All Rights Reserved Terms of Use and Privacy Policy
    </div>

    <script src="../js/bootstrap.min.js"></script>
    <script src="../js/swiper.min.js"></script>
    <script src="../js/modernizr.js"></script>
    <script src="../js/tabs.js"></script>
    <script src="../js/script.js"></script>

<script type="text/javascript" src="../js/jqueryscrollpagination/scripts/scrollpagination.js"></script>
<script>

    var $checkboxesBranch = $("#branchOpts input:checkbox");
    var $checkboxesCategory = $("#categoryOpts input:checkbox");

    function getBranchFilterOptions(){
        var branch = [];
        $checkboxesBranch.each(function(){
          if(this.checked){
            branch.push(this.value);
          }
        });

        return branch;
    }

    function getFilterCategoryOptions(){
        var opts = [];
        $checkboxesCategory.each(function(){
          if(this.checked){
            opts.push(this.value);
          }
        });

        return opts;
    }


    var $checkboxes = $("input:checkbox");
    var opts;
    var branch;
    $checkboxes.on("change", function(){
        branch = getBranchFilterOptions();
        opts = getFilterCategoryOptions();
        $("#tx_history").html("");
        updateFilter(branch, opts);
    });


    // var offset;
    function updateFilter(branch, opts){
        $('#tx_history').html('');
        // offset = 0;
        var offset = 0;
        // $('#tx_history').destory();
        $('#tx_history').scrollPagination({
            'contentPage': 'more.php', // the url you are fetching the results
            'contentData': {rpr:5}, // these are the variables you can pass to the request, for example: children().size() to know which page you are
            'scrollTarget': $(window), // who gonna scroll? in this example, the full window
            'heightOffset': 100, // it gonna request when scroll is 10 pixels before the page ends
            'beforeLoad': function(){ // before load function, you can display a preloader div
                //$('#loading').fadeIn();
                this.contentPage = "more.php?offset=" + offset;
                this.contentData.filterOpts = opts;
                this.contentData.branchOpts = branch;
                //console.log(this.contentData);
            },
            'afterLoad': function(elementsLoaded){ // after loading content, you can use this function to animate your new elements
                // adjust_history_layout();
                //$('#loading').fadeOut();
                offset += 5;
                $(elementsLoaded).fadeInWithDelay();
            }
        });
    }

    // code for fade in element by element
    $.fn.fadeInWithDelay = function(){
        var delay = 0;
        return this.each(function(){
            $(this).delay(delay).animate({opacity:1}, 200);
            delay += 100;
        });
    };

$(function(){
    updateFilter(null);
});
</script>

</body>

</html>