Merge branch 'master' of github.com:zyx0814/dzzoffice

This commit is contained in:
zyx0814 2024-10-24 11:45:54 +08:00
commit 949374c804
9 changed files with 27 additions and 24 deletions

View File

@ -161,7 +161,7 @@ class perm_check{
//$arr=array('uid','gid','desktop');其中这几项必须
function checkperm($action,$arr,$bz=''){ //检查某个图标是否有权限;
global $_G;
if ($arr['preview']) {
if ($arr['preview'] && ($action=='read') || $action=='copy' || $action=='download') {
return true;
}
if($_G['uid']<1){ //游客没有权限

View File

@ -889,6 +889,8 @@ class table_resources extends dzz_table
if ($currentfolder = C::t('folder')->fetch($fileinfo['oid'])) {
$fileinfo['isgroup'] = ($currentfolder['flag'] == 'organization') ? true : false;
}
} elseif ($fileinfo['type'] == 'link') {
$fileinfo['type'] = lang('type_link');
} elseif ($fileinfo['ext']) {
$fileinfo['type'] = getFileTypeName($fileinfo['type'], $fileinfo['ext']);
} else {

View File

@ -364,7 +364,7 @@ function authcode($string, $operation = 'DECODE', $key = '', $expiry = 0, $ckey_
}
if ($operation == 'DECODE') {
if ((substr($result, 0, 10) == 0 || substr($result, 0, 10) - time() > 0) && substr($result, 10, 16) == substr(md5(substr($result, 26) . $keyb), 0, 16)) {
if ((substr($result, 0, 10) == 0 || substr($result, 0, 10) - time() > 0) && substr($result, 10, 16) === substr(md5(substr($result, 26) . $keyb), 0, 16)) {
return substr($result, 26);
} else {
return '';
@ -1621,22 +1621,19 @@ function getexpiration()
return mktime(0, 0, 0, $date['mon'], $date['mday'], $date['year']) + 86400;
}
function return_bytes($val)
{
$val = trim($val);
$last = strtolower($val{strlen($val) - 1});
switch ($last) {
case 'g':
$val *= 1024;
case 'm':
$val *= 1024;
case 'k':
$val *= 1024;
}
return $val;
function return_bytes($val) {
$last = strtolower($val[strlen($val)-1]);
if (!is_numeric($val)) {
$val = substr(trim($val), 0, -1);
}
switch($last) {
case 'g': $val *= 1024;
case 'm': $val *= 1024;
case 'k': $val *= 1024;
}
return $val;
}
function getimgthumbname($fileStr, $extend = '.thumb.jpg', $holdOldExt = true)
{
if (empty($fileStr)) {
@ -1673,7 +1670,7 @@ function strhash($string, $operation = 'DECODE', $key = '')
{
$key = md5($key != '' ? $key : getglobal('authkey'));
if ($operation == 'DECODE') {
$hashcode = gzuncompress(base64_decode(($string)));
$hashcode = gzuncompress(base64_decode($string));
$string = substr($hashcode, 0, -16);
$hash = substr($hashcode, -16);
unset($hashcode);

View File

@ -71,8 +71,6 @@ function dshowmessage($message, $url_forward = '', $values = array(), $extrapara
if(!empty($_G['inajax'])) {
$handlekey = $_GET['handlekey'] = !empty($_GET['handlekey']) ? dhtmlspecialchars($_GET['handlekey']) : '';
$param['handle'] = true;
}
if(!empty($_G['inajax'])) {
$param['msgtype'] = empty($_GET['ajaxmenu']) && (empty($_POST) || !empty($_GET['nopost'])) ? 2 : 3;
}
if($url_forward) {

View File

@ -3,7 +3,7 @@
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title><!--{if !empty($navtitle)}-->$navtitle - <!--{/if}--><!--{if !empty($_G[setting][sitename])}--> $_G[setting][sitename] - <!--{/if}--></title>
<title><!--{if !empty($navtitle)}-->$navtitle - <!--{/if}-->$_G[setting][sitename]</title>
<meta name="keywords" content="{if !empty($_G[setting][metakeywords])}{echo htmlspecialchars($_G[setting][metakeywords])}{/if}" />
<meta name="description" content="{if !empty($_G[setting][metadescription])}{echo htmlspecialchars($_G[setting][metadescription])} {/if}" />
<meta name="generator" content="DzzOffice" />

View File

@ -4,7 +4,7 @@
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title><!--{if !empty($navtitle)}-->$navtitle - <!--{/if}-->$_G[setting][sitename] </title>
<title><!--{if !empty($navtitle)}-->$navtitle - <!--{/if}-->$_G[setting][sitename]</title>
<meta name="keywords" content="{if !empty($_G[setting][metakeywords])}{echo htmlspecialchars($_G[setting][metakeywords])}{/if}" />
<meta name="description" content="{if !empty($_G[setting][metadescription])}{echo htmlspecialchars($_G[setting][metadescription])} {/if}" />
<meta name="generator" content="DzzOffice" />

View File

@ -33,6 +33,10 @@ if($_GET['a']=='down'){
}
$icoarr['icoid'] = $_GET['s'];
}
if ($icoarr['type'] == 'link') {
@header('Location: '.$icoarr['url']);
exit();
}
$imageexts=array('jpg','jpeg','png','gif'); //图片使用;
$filename=$icoarr['name'];//rtrim($_GET['n'],'.dzz');
$ext=$icoarr['ext'];//strtolower(substr(strrchr($filename, '.'), 1, 10));

View File

@ -1122,7 +1122,9 @@ function showMenu(v) {
if(_all.length) {
for(j = 0; j < _all.length; j++) {
if((!_all[j]['type'] || _all[j]['type'] != 'hidden') && hasshow(_all[j])) {
_all[j].className += ' hidefocus';
if(_all[j].className.indexOf('hidefocus') == -1) {
_all[j].className += ' hidefocus';
}
_all[j].focus();
focused = true;
var cobj = _all[j];

View File

@ -10,7 +10,7 @@ if(!defined('IN_DZZ')) {
exit('Access Denied');
}
$about=array();
$identify=$_GET['modname'];
$identify = filter_var($_GET['modname'], FILTER_SANITIZE_STRING);
$ismobile=helper_browser::ismobile();
$appConfig=DZZ_ROOT.'./dzz/'.$identify.'/config/config.php';
if($identify && file_exists($appConfig)){
@ -41,4 +41,4 @@ if ($ismobile && !$_GET['inajax']) {
} else {
include template('about');
}
exit();
exit();