This commit is contained in:
小胡
2024-10-09 17:20:40 +08:00
Unverified
parent cf38d56c9c
commit c7fdd103c9
7 changed files with 419 additions and 8 deletions

View File

@@ -76,7 +76,7 @@
.dagai dl{
margin: var(--radius);
}
.extt .card {
.extt .card {
background-color: rgba(var(--bs-black-rgb),.175);
}
</style>

View File

@@ -63,6 +63,17 @@ class perm_check{
}else{ //继承上级,查找上级
if($folder['pfid']>0 && $folder['pfid']!=$folder['fid']){ //有上级目录
return self::getPerm($folder['pfid'],$bz,$i);
}elseif (shareLink($_GET['shareLink'],$_GET['path'])){
return perm_binPerm::getGroupPower('read');
}elseif($folder = C::t('folder')->fetch_home_by_uid($_G['uid'])){//查看当前用户的个人网盘fid
if($folder['fid']){
if(!($folder['fid']==$fid)){//判断当前用户的个人网盘fid是否等于当前用户访问的fid
$fids = get_all_chilrdenfid_by_pfid($folder['fid']);
if (!(in_array($fid,$fids))){
return false;
}
}
}
}else{ //其他的情况使用
return self::getuserPerm();
}
@@ -223,4 +234,4 @@ class perm_check{
}
}
}
}
}

View File

@@ -3,6 +3,6 @@
return array(
'allow_robot'=>false,
'about'=>array('name_en'=>'DPlayer',
'version'=>'X1.2 小胡(gitee.com/xiaohu2024)')
'version'=>'V1.1 小胡(gitee.com/xiaohu2024)')
);

View File

@@ -5,4 +5,116 @@
* @link http://www.dzzoffice.com
* @author zyx(zyx@dzz.cc)
*/
_hotkey={},_hotkey.ctrl=0,_hotkey.alt=0,_hotkey.shift=0,_hotkey.init=function(){_hotkey.ctrl=0,_hotkey.alt=0,_hotkey.shift=0},jQuery(document).on("keydown",function(e){var t,c=(e=e||window.event).srcElement?e.srcElement:e.target;if(/input|textarea/i.test(c.tagName))return!0;switch(""!=e.which?t=e.which:""!=e.charCode?t=e.charCode:""!=e.keyCode&&(t=e.keyCode),t){case 17:_hotkey.ctrl=1;break;case 18:_hotkey.alt=1;break;case 16:_hotkey.shift=1}}),jQuery(document).on("keyup",function(e){var t,c=(e=e||window.event).srcElement?e.srcElement:e.target;if(/input|textarea/i.test(c.tagName))return!0;switch(""!=e.which?t=e.which:""!=e.charCode?t=e.charCode:""!=e.keyCode&&(t=e.keyCode),t){case 17:_hotkey.ctrl=0;break;case 18:_hotkey.alt=0;break;case 16:_hotkey.shift=0;break;case 46:case 110:try{_explorer.selectall.icos.length>0&&_filemanage.delIco(_config.selectall.icos[0])}catch(t){}break;case 69:try{_hotkey.alt&&_hotkey.ctrl&&_header.loging_close()}catch(t){}}});
_hotkey={};
_hotkey.ctrl=0;
_hotkey.alt=0;
_hotkey.shift=0;
_hotkey.init=function(){
_hotkey.ctrl=0;
_hotkey.alt=0;
_hotkey.shift=0;
}
jQuery(document).on('keydown',function(event){
event=event?event:window.event;
var tag = event.srcElement ? event.srcElement :event.target;
if(/input|textarea/i.test(tag.tagName)){
return true;
}
var e;
if (event.which !="") { e = event.which; }
else if (event.charCode != "") { e = event.charCode; }
else if (event.keyCode != "") { e = event.keyCode; }
switch(e){
case 17:
_hotkey.ctrl=1;
break;
case 18:
_hotkey.alt=1;
break;
case 16:
_hotkey.shift=1;
break;
}
});
jQuery(document).on('keyup',function(event){
event=event?event:window.event;
var tag = event.srcElement ? event.srcElement :event.target;
if(/input|textarea/i.test(tag.tagName)){
return true;
}
var e;
if (event.which !="") { e = event.which; }
else if (event.charCode != "") { e = event.charCode; }
else if (event.keyCode != "") { e = event.keyCode; }
switch(e){
case 17:
_hotkey.ctrl=0;
break;
case 18:
_hotkey.alt=0;
break;
case 16:
_hotkey.shift=0;
break;
/*case 67: //Alt+C
if(_hotkey.alt) _window.currentWindow('Close');
//_hotkey.alt=0;
break;
case 77: //Alt+M
if(_hotkey.alt) _window.currentWindow('Max');
_hotkey.alt=0;
break;
case 78://Alt+N
if(_hotkey.alt) _window.currentWindow('Min');
_hotkey.alt=0;
break;*/
/*case 81://Alt+shift+Q
if(_hotkey.alt && _hotkey.shift) _window.CloseAppwinAll();
_hotkey.alt=0;
_hotkey.shift=0
break;*/
/*case 75: //Alt+K
if(_hotkey.alt) _login.showHotkey();
//_hotkey.alt=0;
break;*/
/*case 83://Alt+S
if(_hotkey.alt) jQuery('#taskbar_start').trigger('mousedown');;
//_hotkey.alt=0;
break;*/
/*case 37://Ctrl + Alt + ←
if(_hotkey.ctrl && _hotkey.alt) {_layout.setPagePrev();}
break;
case 39://Ctrl + Alt + →
if(_hotkey.ctrl && _hotkey.alt) _layout.setPageNext();
break;
case 68:
//Ctrl + Alt + D
if(_hotkey.alt && _hotkey.ctrl) _window.showDesktop();
break;
case 145:
//Ctrl + Alt + ScrollLock
if(_hotkey.alt && _hotkey.ctrl) _login.showBackground();
break;*/
/*case 35:
//Ctrl + Alt + End
if(_hotkey.alt && _hotkey.ctrl) _login.LockDesktop();
break;*/
case 46:case 110: //delete
try{
if(_explorer.selectall.icos.length>0){
_filemanage.delIco(_config.selectall.icos[0]);
}
}catch(e){}
break;
case 69://Ctrl + Alt + E
try{
if(_hotkey.alt && _hotkey.ctrl) _header.loging_close();
}catch(e){}
break;
}
});

File diff suppressed because one or more lines are too long

View File

@@ -96,7 +96,7 @@ if ($operation == 'upload') {//上传图片文件
//是图片时处理
if ($isimage) {
if (!perm_check::checkperm($fid, 'upload')) {
if (!perm_check::checkperm_Container($fid, 'upload')) {
$arr['error'] = lang('target_not_accept_image');
}
if ($data = io_dzz::linktoimage($link, $fid)) {
@@ -110,7 +110,7 @@ if ($operation == 'upload') {//上传图片文件
} else {
//试图作为视频处理
if ($data = io_dzz::linktovideo($link, $fid)) {
if (!perm_check::checkperm($fid, 'upload')) {
if (!perm_check::checkperm_Container($fid, 'upload')) {
$arr['error'] = lang('target_not_accept_video');
} else {
if ($data['error']) $arr['error'] = $data['error'];
@@ -121,7 +121,7 @@ if ($operation == 'upload') {//上传图片文件
}
}
//作为网址处理
if (!perm_check::checkperm($fid, 'upload')) {
if (!perm_check::checkperm_Container($fid, 'upload')) {
$arr['error'] = lang('target_not_accept_link');
} else {
if ($data = io_dzz::linktourl($link, $fid)) {

View File

@@ -88,6 +88,7 @@ if($_GET['a']=='down'){
}
}else{//没有可用的打开方式,转入下载;
$path=dzzencode('preview_' . $path);
IO::download($path);
exit();
}