diff --git a/core/class/dzz/Tpsqli.php b/core/class/dzz/Tpsqli.php index f8b0abe..665abad 100644 --- a/core/class/dzz/Tpsqli.php +++ b/core/class/dzz/Tpsqli.php @@ -32,7 +32,7 @@ class Tpsqli extends Tpdb { $this->linkID[$linkNum] = DB::linknum(); if (!isset($this->linkID[$linkNum])) { if (empty($config)) $config = $this->config; - $this->linkID[$linkNum] = new mysqli($config['hostname'], $config['username'], $config['password'], $config['database'], $config['hostport'] ? intval($config['hostport']) : 3306); + $this->linkID[$linkNum] = new \mysqli($config['hostname'], $config['username'], $config['password'], $config['database'], $config['hostport'] ? intval($config['hostport']) : 3306); if (mysqli_connect_errno()) { echo "数据库连接错误"; exit;//E(mysqli_connect_error()); diff --git a/core/class/dzz/dzz_app.php b/core/class/dzz/dzz_app.php index c2ee187..2aa58d5 100644 --- a/core/class/dzz/dzz_app.php +++ b/core/class/dzz/dzz_app.php @@ -176,17 +176,21 @@ class dzz_app extends dzz_base { $sitepath = preg_replace("/\/archiver/i", '', $sitepath); } $_G['isHTTPS'] = $this->is_HTTPS();//($_SERVER['HTTPS'] && strtolower($_SERVER['HTTPS']) != 'off') ? true : false; - if(strpos($_SERVER['HTTP_HOST'],':')!==false){ - list($host,$siteport) = explode(':',$_SERVER['HTTP_HOST']); - $_G['siteport']=':'.intval($siteport); - $host=$_SERVER['HTTP_HOST']; - }else{ - $_G['siteport'] = (empty($_SERVER['SERVER_PORT']) || $_SERVER['SERVER_PORT'] == '80' || $_SERVER['SERVER_PORT'] == '443' || $_SERVER['HTTP_X_FORWARDED_PORT'] == '443')? '' : ':'.$_SERVER['SERVER_PORT']; - $host=preg_replace("/:\d+$/",'',$_SERVER['HTTP_HOST']).$_G['siteport']; - } - $_G['siteurl'] = dhtmlspecialchars('http'.($_G['isHTTPS'] ? 's' : '').'://'.$host.$sitepath.'/'); + $port = (!empty($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] !='80') ? ':'.$_SERVER['SERVER_PORT']:''; + if ($_G['isHTTPS'] && $port == ':443') {$port = '';} // 忽略https 443端口; + $host = $_SERVER['SERVER_NAME'].$port; + if (isset($_SERVER['HTTP_HOST'])){$host = $_SERVER['HTTP_HOST'];} + if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {//proxy + $hosts = explode(',', $_SERVER['HTTP_X_FORWARDED_HOST']); + $host = trim($hosts[0]); + } else if (isset($_SERVER['HTTP_X_FORWARDED_SERVER'])) { + $host = $_SERVER['HTTP_X_FORWARDED_SERVER']; + } + $_G['siteurl'] = dhtmlspecialchars('http'.($_G['isHTTPS'] ? 's' : '').'://'.trim($host,'/').$sitepath.'/'); + $url = parse_url($_G['siteurl']); $_G['siteroot'] = isset($url['path']) ? $url['path'] : ''; + $_G['siteport'] = $port; if (defined('SUB_DIR')) { $_G['siteurl'] = str_replace(SUB_DIR, '/', $_G['siteurl']); @@ -609,7 +613,6 @@ class dzz_app extends dzz_base { } private function _init_setting() { - global $_G; if ($this->init_setting) { if (empty($this->var['setting'])) { $this->cachelist[] = 'setting'; diff --git a/core/class/helper/helper_page.php b/core/class/helper/helper_page.php index 40f7bf6..5fb5ce7 100644 --- a/core/class/helper/helper_page.php +++ b/core/class/helper/helper_page.php @@ -9,6 +9,9 @@ class helper_page { public static function multi($num, $perpage, $curpage, $mpurl, $classname = '', $maxpages = 0, $page = 5, $autogoto = FALSE, $simple = FALSE, $jsfunc = FALSE) { global $_G; + $num = max(0, intval($num)); + $perpage = max(1, intval($perpage)); + $curpage = max(1, intval($curpage)); $ajaxtarget = !empty($_GET['ajaxtarget']) ? " ajaxtarget=\"" . dhtmlspecialchars($_GET['ajaxtarget']) . "\" " : ''; $a_name = ''; diff --git a/core/language/zh-cn/lang.php b/core/language/zh-cn/lang.php index cd099bb..7b7b4e2 100644 --- a/core/language/zh-cn/lang.php +++ b/core/language/zh-cn/lang.php @@ -1610,6 +1610,10 @@ $_G[siteurl]', 'cloud_no_available' => '云盘已关闭', 'cloud_no_info' => '云盘信息不存在', 'panel_notice_title' => '通知中心', + 'supportted' => '支持', + 'unsupportted' => '不支持', + 'am' => '上午', + 'pm' => '下午', ); ?> \ No newline at end of file diff --git a/dzz/appmanagement/language/zh-cn/lang.php b/dzz/appmanagement/language/zh-cn/lang.php index afaca41..e8bdec5 100644 --- a/dzz/appmanagement/language/zh-cn/lang.php +++ b/dzz/appmanagement/language/zh-cn/lang.php @@ -1,8 +1,6 @@ '管理', - 'supportted' => '支持', - 'unsupportted' => '不支持', 'php_version_too_low' => 'php版本太低啦,请先升级php到5.3以上,建议使用php5.4及以上', 'step_env_check_desc' => '环境以及文件目录权限检查', 'advice_mysql_connect' => '请检查 mysql 模块是否正确加载', diff --git a/dzz/shares/ajax.php b/dzz/shares/ajax.php index 060d898..a67c4fe 100644 --- a/dzz/shares/ajax.php +++ b/dzz/shares/ajax.php @@ -341,9 +341,12 @@ if ($do == 'uploads') {//上传新文件(指新建) } $rids[] = $v; } - $path = C::t('resources_path')->fetch_pathby_pfid($share['pfid'], true); - if ($path['path']) { - $first_path = $path['path']; + $first_path = ''; + if (!$_G['adminid'] && $share['uid'] !== $_G['uid']) { + $path = C::t('resources_path')->fetch_pathby_pfid($share['pfid'], true); + if ($path['path']) { + $first_path = $path['path']; + } } $propertys = C::t('resources')->get_property_by_rid($rids, true, $first_path); } diff --git a/user/profile/template/profile.htm b/user/profile/template/profile.htm index 66c5194..40af1fb 100644 --- a/user/profile/template/profile.htm +++ b/user/profile/template/profile.htm @@ -138,22 +138,33 @@ -
- -
- - -

{lang current_time} : - -

-

{lang time_zone_state}

-
-
- +
+ +
+ + +

{lang current_time} : + +

+ {lang time_zone_state} +
+
+ +
+ +
+ +
+
value="{lang submit_audit}"value="{lang save}">