/var/www/hkosl.com/thebh/20171017/banquet/_session.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
<?php
    $page_settings 
= array(
        
'formid'     => 'contact'//for nav menu
        
'section'    => '聯絡我們'//for page title
    
);

    require_once 
'../webadmin/configure.php';

    
var_dump($_SESSION);
    exit;
?>
    <link href="../css/bootstrapGold.min.css" rel="stylesheet">
    <link href="../css/styleGold.css" rel="stylesheet">

    <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>

    <div class="contactusHead" style="background-image:url(../images/background/image-8.jpg)">
        <div class="contactTopTxT">
            <h2>聯絡我們</h2>
            <br>
            <a href="index.html">主頁</a> / 聯絡我們
            <hr>
        </div>
    </div>

    <div class="DifferentLocation">
        <div class="container">

        <?php foreach ($locations as $location) { ?>
            <div class="col-md-3 col-sm-6 col-xs-6">
                <div class="ContactLocation" onclick="newLocation(<?= _h($location['map_lat']) ?><?= _h($location['map_lng']) ?>)">
                    <span class="glyphicon glyphicon-map-marker"></span>
                    <h2><?= _h($location["name_tc"]) ?></h2> <?= _h($location["address_tc"]) ?>
                    <br> <?= _h($location["tel"]) ?>
                </div>
            </div>
        <?php ?>

        </div>
    </div>

    <div class="ContactMap">
        <div class="container">
            <div class="col-sm-12">
                <div id="MultiMap"></div>
            </div>
        </div>
    </div>

    <div class="ContactForm">
        <div class="container">
            <form action="../include/enquiry.php?page=banquest" id="enquiryForm" method="POST" enctype="multipart/form-data">
                <div class="col-md-3 col-sm-6 col-xs-12" id="contactText">
                    姓名<font color="#ae408a">*</font>
                    <br>
                    <input type="text" placeholder="姓名" id="name" name="txtName">
                </div>
                <div class="col-md-3 col-sm-6 col-xs-12" id="contactText">
                    電子郵件<font color="#ae408a">*</font>
                    <br>
                    <input type="text" placeholder="電子郵件" id="email" name="txtEmail">
                </div>
                <div class="col-md-3 col-sm-6 col-xs-12" id="contactText">
                    電話<font color="#ae408a">*</font>
                    <br>
                    <input type="text" placeholder="電話" id="tel" name="txtTel">
                </div>
                <div class="col-md-3 col-sm-6 col-xs-12" id="contactText">
                    主題<font color="#ae408a">*</font>
                    <br>
                    <input type="text" placeholder="主題" id="title" name="txtTitle">
                </div>
                <div class="col-sm-12 col-xs-12" id="contactText">
                    你的信息<font color="#ae408a">*</font>
                    <br>
                    <textarea placeholder="你的信息" id="message" name="txtMessage"></textarea>
                </div>
                <div class="col-md-3 col-sm-6 col-xs-12" id="contactText">
                    驗證碼<font color="#ae408a">*</font>
                    <input type="text" class="form-control" name="verification" id="verify" />
                </div>
                <div class="col-md-3 col-sm-6 col-xs-12" id="contactText">
                    <img src="../js/verification_code/captcha/vCodeImage.php?_=1" alt="按圖像重新載入"
                         id="verify_code" width="150" height="60" border="0"
                         onclick="document.getElementById('verify_code').src='../js/verification_code/captcha/vCodeImage.php?' + 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>
                </div>
                <div class="col-sm-6 col-xs-12">
                    <input type="submit" value="發送" class="sendMsgBTN" style="margin-top:15px;">
                </div>

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

    <?php
        
if (isset($_GET["msg"]))
        echo 
"<script>alert('你的查詢已成功發出');</script>";

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

    <script type="text/javascript">

        //input form checking
        $("#enquiryForm").submit(function() {

            var message = "";

            if ($.trim($("#name").val()) == "")
                message += "請輸入姓名\r\n"

            if ($.trim($("#email").val()) == "")
                message += "請輸入電子郵件\r\n"

            if ($.trim($("#tel").val()) == "")
                message += "請輸入電話\r\n"

            if ($.trim($("#title").val()) == "")
                message += "請輸入主題\r\n"

            if ($.trim($("#message").val()) == "")
                message += "請輸入你的信息\r\n"

            if ($.trim($("#verify").val()) == "")
                message += "請輸入驗證碼\r\n"

            if (message == "")
                return true;
            else
                alert(message);

            return false;
        });

        //trigger for maps
        $(document).ready(function(){
            $("#MultiMap").mouseleave(function(){
                map.setOptions({'scrollwheel': false});
            });
            $("#MultiMap").mousedown(function(){
                map.setOptions({'scrollwheel': true});
            });
        });

        function newLocation(newLat, newLng)
        {
            map.setCenter({
                lat : newLat,
                lng : newLng
            });

            map.setZoom(18);
            map.setOptions({'scrollwheel': true});
        }

        //Google maps
        var locations = [
        <?php foreach ($locations as $location) {
            echo 
"['"._h($location['name_tc'])."', "._h($location['map_lat']).", "._h($location['map_lng'])."],";
        } 
?>

        ];

        var map = new google.maps.Map(document.getElementById('MultiMap'), {
            zoom: 12,
            scrollwheel: false,
            center: new google.maps.LatLng(22.298226, 114.17828),
            mapTypeId: google.maps.MapTypeId.ROADMAP
        });

        var infowindow = new google.maps.InfoWindow();
        var marker, i;

            for (i = 0; i < locations.length; i++) {
                marker = new google.maps.Marker({
                    position: new google.maps.LatLng(locations[i][1], locations[i][2]),
                    map: map
            });

            google.maps.event.addListener(marker, 'click', (function(marker, i) {
            return function() {
                infowindow.setContent(locations[i][0]);
                infowindow.open(map, marker);
                }
            })(marker, i));
        }

    </script>


</body>
</html>