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
|
<?php include_once ("webadmin/configure.php");
if(!isset($_GET["langcode"])){ $langcode = "tc"; $_SESSION["langcode"] = "tc"; }else{ $langcode = $_GET["langcode"];
$_SESSION["langcode"] = $langcode; }
$sql = "select * from rolling_text"; $parameters = array(); if (!($sth = $dbh->prepare($sql))) { throw new Exception('[' . $sth->errorCode() . ']: ' . print_r($sth->errorInfo())); }
if (!$sth->execute($parameters)) { throw new Exception('[' . $sth->errorCode() . ']: ' . print_r($sth->errorInfo())); }
$all_rolling_text_info = $sth->fetchAll();
$lastupdate_string = ""; foreach($all_rolling_text_info as $rolling_text_info){ $lastupdate_string .= $rolling_text_info{"lastupdate"}." "; } ?>
<!DOCTYPE html> <!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]--> <!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]--> <!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]--> <!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]--> <head> <title>Dirsignage</title>
<!-- Basic Page Needs ================================================== --> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<!-- Favicons ================================================== --> <link rel="shortcut icon" href="../html/images/favicon.ico">
<!-- CSS ================================================== --> <link href="../html/css/style.css" rel="stylesheet" type="text/css" media="screen"> <!-- use font awesome --> <link href="../html/css/font-awesome.min.css" rel="stylesheet" type="text/css" media="screen"> <!-- styles needed by jScrollPane --> <link type="text/css" href="../html/css/jquery.mCustomScrollbar.css" rel="stylesheet" media="all" />
<!-- Use jQuery ================================================== --> <script src="../html/js/jquery-1.11.1.min.js"></script>
<!-- the mousewheel plugin - optional to provide mousewheel support --> <script type="text/javascript" src="../html/js/jquery.mousewheel.js"></script>
<!-- the jScrollPane script --> <script type="text/javascript" src="../html/js/jquery.mCustomScrollbar.js"></script>
<!-- General Script --> <script src="../html/js/general.js"></script>
<!-- IE Support ================================================== --> <!--[if lt IE 9]> <!--<link href="../html/css/ie.css" rel="stylesheet" type="text/css" media="screen">--> <script src="../html/js/html5shiv.js"></script> <script src="../html/js/selectivizr-and-extra-selectors.min.js"></script> <![endif]-->
<!-- jScrollPane --> <script> (function($){ $(window).load(function(){
$("#search_result").mCustomScrollbar({ scrollButtons:{enable:true}, theme:"light-thick", scrollbarPosition:"outside" });
}); })(jQuery); </script>
<!-- Jquery Marquee --> <script defer src="../html/js/jquery.marquee.js"></script> <script type="text/javascript">
$(function () { $('.marquee').marquee('pointer').mouseover(function () { $(this).trigger('stop'); }).mouseout(function () { $(this).trigger('start'); }).mousemove(function (event) { /*if ($(this).data('drag') == true) { this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX); }*/ }).mousedown(function (event) { //$(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft); }).mouseup(function () { //$(this).data('drag', false); }); }); </script>
<script type="text/javascript"> $(function(){ $("body").attr("oncontextmenu", "return false;"); });
</script>
<script type="text/javascript"> var lastupdate_string = '<?=$lastupdate_string; ?>';
function check_rolling_text(lastupdate_string){
$.ajax({url: 'ajax_rolling_text.php',
type: 'POST',
data:{lastupdate_string:lastupdate_string},
dataType: 'html',
timeout: 1000,
error: function(){ //alert('Error loading PHP document'); check_rolling_text(); },
success: function(result){
if(result != "2"){ $(".marquee_list").empty(); $(".marquee_list").html(result); } }
}); }
setInterval(function () { check_rolling_text(lastupdate_string); }, 30000); </script>
</head>
<body class="bg-6" style="overflow-x: hidden;overflow-y: hidden;">
<div id="marquee_container">
<div id="head_companyname"> 新都廣場 METROPOLE SQUARE </div>
<div id="marquee_container_bg"> <div id="marquee_wrapper" >
<nav class="marquee"> <ul class="marquee_list"> <?php foreach($all_rolling_text_info as $rolling_text_info){ echo '<li>'.$rolling_text_info{"content_en"}.'</li>'; } ?>
</ul> </nav><!-- .marquee ends /******/ -->
</div><!-- /// #marquee_wrapper ends /// --> </div>
</div>
<div class="clearfix"></div>
</body> </html>
|