| Server IP : 210.245.233.93 / Your IP : 216.73.216.226 Web Server : Apache/2.2.15 (CentOS) System : Linux webserver2.onesolution.com.hk 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 User : apache ( 48) PHP Version : 5.3.3 Disable Function : exec, shell_exec, system, passthru, popen, proc_open, pcntl_exec MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/hkosl.com/dirsignage/html/ |
Upload File : |
<?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 slideshow where status = ? and deleted = ? order by sort ASC";
$parameters = array("1", "0");
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()));
}
if($sth->rowCount() > 0){
$has_slideshow = 1;
$slideshow_info = $sth->fetchAll();
}else{
$has_slideshow = 0;
}
$width = "1080";
$height = "950";
?>
<!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>XXX</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"
});
expand_box();
});
})(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 search_result(search_word, action){
$.ajax({url: 'search_result.php',
type: 'GET',
data:{search_word:search_word, action: action},
dataType: 'html',
timeout: 1000,
error: function(){
//alert('Error loading PHP document');
search_result(search_word, action);
},
success: function(result){
//console.log(result);
if(parseInt(action) != 4){
$("#search_result .result_list").empty();
}else{
$("#search_result").empty();
//reset search bar
$("#search_word").val("");
}
if(result == "" || result == null){
$("#search_result").html("<?php if($langcode == "en") echo "No matched result."; else echo "沒有相關搜尋結果。"?>");
}else{
$("#search_result").html(result);
}
}
});
}
/*function gofloor(floor_num){
if(floor_num == 0){
window.location.href='main.php?langcode=<?=$langcode?>';
}else{
window.location.href='main.php?langcode=<?=$langcode?>&floor='+floor_num;
}
}*/
</script>
<script src="js/idle-timer.js"></script>
<script type="text/javascript">
<?php if($has_slideshow == 1){ ?>
$(function() {
//$('#inactive_content').show();
//$('#active_content').hide();
// idleTimer() takes an optional numeric argument that defines just the idle timeout
// timeout is in milliseconds
//Define default
var docTimeout = <?=(int)($idle_time."000"); ?>;
$( document ).on( "idle.idleTimer", function(event, elem, obj){
// function you want to fire when the user goes idle
$('#language_btn').css('visibility', 'hidden');
$('#inactive_content').show();
$('#active_content').hide();
});
$( document ).on( "active.idleTimer", function(event, elem, obj, triggerevent){
// function you want to fire when the user becomes active again
$('#language_btn').css('visibility', 'visible');
$('#inactive_content').hide();
$('#active_content').show();
});
$(document).idleTimer(docTimeout);
});
<?php } ?>
$(function() {
//Define textarea settings
var taTimeout = <?=(int)($idle_time2."000"); ?>;
/*
Handle raised idle/active events
*/
$('body').on("idle.idleTimer", function (event, elem, obj) {
//If you dont stop propagation it will bubble up to document event handler
event.stopPropagation();
//clear search bar text
$("#search_word").val("");
});
$('body').on("active.idleTimer", function (event) {
//If you dont stop propagation it will bubble up to document event handler
event.stopPropagation();
});
//Clear value if there was one cached & start time
$('body').val('').idleTimer(taTimeout);
});
</script>
<link rel="stylesheet" href="js/bjqs.css">
<script src="js/bjqs-1.3.js"></script>
<script type="text/javascript">
jQuery(document).ready(function ($) {
$('#slideshow').bjqs({
height : <?=$height?>,
width : <?=$width?>,
animtype : 'fade', // accepts 'fade' or 'slide'
animduration : 450, // how fast the animation are
animspeed : <?=(int)($slide_speed."000"); ?>, // the delay between each slide
automatic : true, // automatic
showcontrols : false,
hoverpause : false,
showmarkers : false
});
});
</script>
<script type="text/javascript">
$(function(){
$("body").attr("oncontextmenu", "return false;");
});
function focus_input(){
$('#search_word').bind('focusout', function(e) {
e.preventDefault();
$(this).focus();
});
$('#search_word').on('focusout', function(e) {
e.preventDefault();
$(this).focus();
});
$("#search_word").on('blur', function() {
$(this).focus();
});
//$('#search_word').focus();
}
$(window).bind("load", function() {
$('#search_word').focus();
//focus_input();
});
$(function() {
setTimeout(function() {
$('#search_word').focus();
//focus_input();
}, 1000);
setInterval(function(){
$('#search_word').focus();
//focus_input();
}, 1000);
//$('#search_word').focus();
/*$('#search_word').focusout(function(){
$('#search_word').focus();
});*/
//focus_input();
//setInterval(focus_input(), 2000);
/*$('#search_word').blur(function ()
{
$('#search_word').focus();
});
*/
});
</script>
</head>
<body class="bg-6" style="overflow-x: hidden;overflow-y: hidden;">
<div class="clearfix"></div>
<div id="wrapper" >
<div class="search_block">
<div style="background: url(../html/images/search_bar.png) no-repeat;">
<input type="text" id="search_word" placeholder="<?php if($langcode == "en") echo 'Search Keyword...'; else echo '輸入關鍵字...'; ?>" autocomplete="off" onkeyup="search_result(this.value, 1);" onfocus="this.value = this.value;" />
</div>
<div style="position: relative;">
<div id="reset_search_text" onclick="document.getElementById('search_word').value = '';"></div>
</div>
</div><!-- .search_block ends -->
<div style="text-align: right;">
<?php
if(isset($_GET["floor"]) && !empty($_GET["floor"]))
$floor = $_GET["floor"];
else
$floor = "";
if(isset($_GET["id"]) && $_GET["id"] > 0)
$id = $_GET["id"];
else
$id = "";
if($langcode == 'tc'){
echo "<button id='language_btn' type='button' onclick=\"window.location.href='main.php?langcode=en&floor=".$floor."&id=".$id."'\">English</button>";
}else if($langcode == 'en'){
echo "<button id='language_btn' type='button' onclick=\"window.location.href='main.php?langcode=tc&floor=".$floor."&id=".$id."'\">中文</button>";
}else{
}
?>
</div>
<div id="active_content">
<div id="floor_box">
<div id="floor_upward">
<img src="../html/images/upward.png" />
</div>
<div>
<div id="floor_top" >
<div id="floor_all" onclick="search_result('all', 3);" style="<?php if(!isset($_GET["floor"])) echo "color: #33deb9;"; if($langcode == "en") echo 'left: 69px;'?>">
<?php if($langcode == "en") echo 'All'; else echo '所有'; ?>
</div>
</div>
<ul id="floor_box_ul" >
<?php
/*$sql = "select max(floor) as max_floor from company where status = ? and deleted = ?";
$parameters = array("1", "0");
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()));
}
$result = $sth->fetch(PDO::FETCH_ASSOC);*/
$max_floor = $result{"max_floor"};
if(empty($max_floor) || $max_floor > 29){
$max_floor = 29;
}
$all_disable_floor = explode(",", $disable_floor);
for($i = 1; $i <= $max_floor; $i++){
foreach($all_disable_floor as $this_disable_floor){
if($i == $this_disable_floor){
continue 2;
}
}
if(isset($_GET["floor"]) && $_GET["floor"] == $i)
$color = "color: #33deb9;";
else
$color = "";
echo "<li class='floor_middle' onclick=\"search_result(".$i.", 2);\" style='".$color."'>
<div class='floor_middle_text'>
".str_pad($i, 2, "0", STR_PAD_LEFT).'/F
</div>
</li>';
}
?>
</ul>
<div id="floor_bottom" >
</div>
</div>
<div id="floor_downward">
<img src="../html/images/downward.png"/>
</div>
</div>
<div id="search_result">
<!--<div id="ajax_loading" style="display: none;"><img src="images/loading.gif" /> </div>-->
<ul id="result_list_ul" class="result_list letter_option" style="font-size: 33px;">
<?php
$sql = "select * from company where status = ? and deleted = ? ";
$parameters = array("1", "0");
$all_disable_floor = explode(",", $disable_floor);
foreach($all_disable_floor as $this_disable_floor){
$sql.=" and floor != ?";
$parameters[] = $this_disable_floor;
}
$sql.=" order by companyname_en ASC";
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()));
}
if($sth->rowCount() > 0){
while($company_info = $sth->fetch(PDO::FETCH_ASSOC)){
if(empty($company_info{"companyname_".$langcode})){
if($langcode == "en"){
$company_name = $company_info{"companyname_tc"};
}else{
$company_name = $company_info{"companyname_en"};
}
}else{
$company_name = $company_info{"companyname_".$langcode};
}
echo '<li class="rl_item" onclick="search_result('.$company_info{"id"}.',4)">
<div style="width: 90%; float: left;">
'.$company_name.'
</div>
<div style=" width: 2%;float: right;">
»
</div>
</li>';
}
}else{
if($langcode == "en"){
echo "No Record.";
}else{
echo "沒有記錄。";
}
}
?>
</ul>
</div>
</div>
<div style="clear: both;"></div>
</div><!-- /// #wrapper ends /// -->
<div id="inactive_content" style="display: none; width:<?=$width?>px; margin: 0 auto;margin-top: -128px; ">
<!-- slideshow -->
<div id="slideshow">
<ul class="bjqs">
<?php
foreach($slideshow_info as $this_slide){
/*echo '<li>
<div style="width:100%; height: 921px; background: url(images/slideshow/'.$slideshow_info{"slideimg_".$_SESSION["langcode"]}.') repeat center center;" class="slideimg" > </div>
</li>';*/
if(!empty($this_slide{"slideimg_".$_SESSION["langcode"]})){
echo '<li>
<div class="slideshow_img" style="background: url(images/slideshow/'.$this_slide{"slideimg_".$_SESSION["langcode"]}.') center center no-repeat; background-size:100%;"></div>
</li>';
}
}
?>
</ul><!-- .new_pdt_list ends -->
</div>
</div>
<div class="clearfix"></div>
<!-- Placeholder IE Support -->
<script src="../html/js/jquery.placeholder.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('input, textarea').placeholder();
});
</script>
<!-- added by kelvin -->
<script type="text/javascript">
var floor_box_ul_height = 0;
function expand_box(){
if(parseInt($(window).height()) > 1300){ //for large, change height, using scroll
$("#floor_box_ul").css("height", "1040px");
$("#search_result").css("height", "1150px");
$(".mCSB_draggerRail").css("height", "1110px");
floor_box_ul_height = 1040;
}else{
$("#floor_box_ul").css("height", "650px");
$("#search_result").css("height", "740px");
$(".mCSB_draggerRail").css("height", "690px");
floor_box_ul_height = 650;
}
}
$(function(){
expand_box();
$(window).resize(function() {
expand_box();
});
$( "#floor_box ul li" ).on( "click", function() {
$("#floor_box ul li").css("color", "#ffffff");
$("#floor_all").css("color", "#ffffff");
$(this).css("color", "#33deb9");
});
$( "#floor_all" ).on( "click", function() {
$("#floor_box ul li").css("color", "#ffffff");
$(this).css("color", "#33deb9");
});
var scrolled=0;
$("#floor_downward").on("click" ,function(){
if(scrolled+floor_box_ul_height <= 55*<?=$max_floor?>)
scrolled=scrolled+(55*5);
$("#floor_box_ul").animate({
scrollTop: scrolled
});
});
$("#floor_upward").on("click" ,function(){
if(scrolled < 0 )
scrolled = 0;
else
scrolled=scrolled-(55*5);
$("#floor_box_ul").animate({
scrollTop: scrolled
});
});
});
</script>
</body>
</html>