| 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/webadmin/ |
Upload File : |
<?php
if (session_id() === "") { session_start(); }
//new pdo
$dbh = new PDO("mysql:host=192.168.155.13;dbname=dirsignagedb", "admin", "PHac7dru");
$dbh->exec("set names utf8");
date_default_timezone_set("Asia/Hong_Kong");
$nowdate = date("Y-m-d H:i:s");
if (!function_exists('random_string')) {
function random_string( $length = 8 ) {
$chars = "abcdefghijkmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ23456789abcdefghijkmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ23456789";
$random_string = substr( str_shuffle( $chars ), 0, $length );
return $random_string;
}
}
error_reporting(E_ALL);
ini_set('display_errors', 0);
if (!function_exists('startsWith')) {
function startsWith($haystack, $needle){
$length = strlen($needle);
return (substr($haystack, 0, $length) === $needle);
}
}
if (!function_exists('check_upload_path')) {
function check_upload_path($img_file){
$session_path_str = "/web/uploader/".$_SESSION['KCFINDER']['uploadURL'];
$session_path_long = strlen($session_path_str);
$path_error = 0;
foreach($img_file as $key2=>$pathname){
if($key2 && $pathname){
$submit_path_str = substr($pathname,0,$session_path_long);
$submit_path_long = strlen($submit_path_str);
$file = str_replace('..' ,'' ,$pathname);
if($session_path_long <> $submit_path_long || $session_path_str <> $submit_path_str || !startsWith($file, $session_path_str)){
$path_error = 1;
}
}
}
}
}
$sql00 = "SELECT * FROM sys_lang WHERE langstatus = '1' ORDER BY langsort ASC ";
if (!($sth00 = $dbh->prepare($sql00))) {
throw new Exception('[' . $sth00->errorCode() . ']: ' . print_r($sth00->errorInfo()));
}
if (!$sth00->execute()) {
throw new Exception('[' . $sth00->errorCode() . ']: ' . print_r($sth00->errorInfo()));
}
while ($row00 = $sth00->fetch(PDO::FETCH_ASSOC)) {
$arraylangcode[$row00{'langcode'}] = $row00{'langname'};
}
$sql = "select * from config order by id ASC";
$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()));
}
$config_info = $sth->fetchAll();
foreach($config_info as $this_config){
if($this_config{"id"} == 1)
$slide_speed = $this_config['config_value'];
if($this_config{"id"} == 2)
$idle_time = $this_config['config_value'];
if($this_config{"id"} == 3)
$disable_floor = $this_config['config_value'];
if($this_config{"id"} == 4)
$idle_time2 = $this_config['config_value'];
}
?>