diff --git a/admin/system/template/xtxx.htm b/admin/system/template/xtxx.htm
index 33a3b77..a078d4a 100644
--- a/admin/system/template/xtxx.htm
+++ b/admin/system/template/xtxx.htm
@@ -76,7 +76,7 @@
.dagai dl{
margin: var(--radius);
}
- .extt .card {
+ .extt .card {
background-color: rgba(var(--bs-black-rgb),.175);
}
diff --git a/core/class/perm/perm_check.php b/core/class/perm/perm_check.php
index 36b66ae..28eaeb9 100644
--- a/core/class/perm/perm_check.php
+++ b/core/class/perm/perm_check.php
@@ -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{
}
}
}
-}
\ No newline at end of file
+}
diff --git a/dzz/DPlayer/config/config.php b/dzz/DPlayer/config/config.php
index ef8086f..2e22605 100644
--- a/dzz/DPlayer/config/config.php
+++ b/dzz/DPlayer/config/config.php
@@ -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)')
);
\ No newline at end of file
diff --git a/dzz/shares/scripts/_hotkey.js b/dzz/shares/scripts/_hotkey.js
index 7e3816a..97debf1 100644
--- a/dzz/shares/scripts/_hotkey.js
+++ b/dzz/shares/scripts/_hotkey.js
@@ -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){}}});
\ No newline at end of file
+_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;
+ }
+
+ });
diff --git a/dzz/shares/scripts/jquery.dzzthumb.js b/dzz/shares/scripts/jquery.dzzthumb.js
index c97682a..28c2160 100644
--- a/dzz/shares/scripts/jquery.dzzthumb.js
+++ b/dzz/shares/scripts/jquery.dzzthumb.js
@@ -19,4 +19,291 @@
});
*/
-!function(e){e.fn.dzzthumb=function(t){var i={root:jQuery("body"),selector:"img[data-original]",container:jQuery("body")},n=e.extend(i,t),o=0,r=0;downurl=SITEURL+(DZZSCRIPT||"index.php")+"?mod=io&op=download",$imgs=e(this),$imgs.off("click.dzzthumb").on("dblclick.dzzthumb",function(){var e=this;return $imgs.each(function(t){this.src==e.src&&(r=t)}),p(),u(),!1});var a,d,s,l,p=function(){jQuery("html,body").css("overflow","hidden").css("height","100%"),document.getElementById("MsgContainer")?jQuery("#MsgContainer").empty().show():jQuery('
').appendTo(n.container);var t="";t+='',t+='
',t+='\t
ESC'+__lang.logout+"
",t+='\t
',t+='\t\t
',t+='\t\t\t- '+__lang.rotation+"
",t+='\t\t\t- '+__lang.download+"
",t+='\t\t\t- '+__lang.look_artwork+"
",t+="\t\t
",t+='\t\t
',t+="\t
",t+='\t
',t+='\t\t
',t+='\t\t\t'+__lang.on_a+"",t+='\t\t\t'+__lang.under_a+"",t+="\t\t
",t+='\t\t
'+__lang.loading_in+"
",t+='\t\t
',t+="\t
",t+="
",t+='
'+__lang.keyboard+"“←”"+__lang.key_on+"
",t+='
'+__lang.keyboard+"“→”"+__lang.key_under+"
",t+='
ESC'+__lang.logout+"
",t+='",t+="
",jQuery(t).appendTo("#MsgContainer"),jQuery("#preview_Container").css({height:"100%",width:"100%"}).show(),jQuery("#preview-box b").on("mouseenter",function(){var e=jQuery(this).attr("btn");jQuery("#"+e+"-tips").show()}),jQuery("#preview-box b").on("mouseleave",function(){var e=jQuery(this).attr("btn");jQuery("#"+e+"-tips").hide()}),jQuery(document).on("keyup.dzzthumb",function(e){var t;switch(""!=e.which?t=e.which:""!=e.charCode?t=e.charCode:""!=e.keyCode&&(t=e.keyCode),t){case 27:jQuery(document).off(".dzzthumb"),jQuery("#MsgContainer").empty().hide();break;case 37:0==r?(jQuery("#popup-hint").find("span").html(__lang.has_last_picture),jQuery("#popup-hint").show(),window.setTimeout(function(){jQuery("#popup-hint").hide()},3e3)):(r-=1,u());break;case 39:r==$imgs.length-1?(jQuery("#popup-hint").find("span").html(__lang.has_last_picture1),jQuery("#popup-hint").show(),window.setTimeout(function(){jQuery("#popup-hint").hide()},3e3)):(r+=1,u())}}),jQuery("#previewer-photo").on("click.dzzthumb",function(){jQuery(document).off(".dzzthumb"),jQuery("#MsgContainer").empty().hide(),jQuery("html,body").css("overflow","auto")}),jQuery("#MsgContainer [btn],#previewer-photo").on("click.dzzthumb",function(){switch(jQuery(this).attr("btn")){case"close":jQuery(document).off(".dzzthumb"),jQuery("#MsgContainer").empty().hide(),jQuery("html,body").css("overflow","auto");break;case"prev":0==r?(jQuery("#popup-hint").find("span").html(__lang.has_last_picture),jQuery("#popup-hint").show(),window.setTimeout(function(){jQuery("#popup-hint").hide()},3e3)):(r-=1,u());break;case"next":r==$imgs.length-1?(jQuery("#popup-hint").find("span").html(__lang.has_last_picture1),jQuery("#popup-hint").show(),window.setTimeout(function(){jQuery("#popup-hint").hide()},3e3)):(r+=1,u());break;case"download":var t=$imgs.get(r),i=e(t).data("dpath"),n=downurl+"&path="+i;document.getElementById("hideframe")||jQuery('').appendTo("body"),jQuery("#hideframe").attr("src",n);break;case"newwindow":var a=e($imgs.get(r));a.data("original")&&window.open(a.data("original"));break;case"rotate":var d=jQuery("#previewer-photo img"),s=(o+=90)%360/90;d.css({transform:"rotate("+o+"deg)","-webkit-transform":"rotate("+o+"deg)","-moz-transform":"rotate("+o+"deg)","-o-transform":"rotate("+o+"deg)","-ms-transform":"rotate("+o+"deg)"}),BROWSER.ie&&BROWSER.ie<9&&d.css("filter","progid:DXImageTransform.Microsoft.BasicImage(Rotation="+s+"))")}return!1})},u=function(){var t=$imgs.get(r);jQuery("#file_name").html(t.title),jQuery("#popup-hint").hide(),jQuery("#previewer-photo").empty().hide(),jQuery("#pre_loading").show();var i=jQuery("#previewer-photo"),o=n.root.width(),a=n.root.height();h(e(t).data("original"),function(){var n=0,r=0,d=1*this.width,s=1*this.height,l=o-6,p=a-jQuery("#btn_hand").height()-6;l/p>d/s?p').appendTo(i);u.get(0).onmousedown=function(e){try{dragMenu(u.get(0),e,1)}catch(e){}},u.on("click",function(){return!1})})},h=(a=[],d=null,s=function(){for(var e=0;e1024)&&(t.call(h),o.end=!0)})(),h.onload=function(){!o.end&&o(),i&&i.call(h),h=h.onload=h.onerror=null},o.end||(a.push(o),null===d&&(d=setInterval(s,40)))})}}(jQuery);
\ No newline at end of file
+(function($) {
+ $.fn.dzzthumb = function(options) {
+ var defaults = {
+ root: jQuery('body'),
+ selector: 'img[data-original]',
+ container: jQuery('body')
+ },
+ opts = $.extend(defaults, options),
+ angle = 0,
+ current = 0;
+ downurl = SITEURL + (DZZSCRIPT ? DZZSCRIPT : 'index.php') + '?mod=io&op=download',
+
+ $imgs = $(this);
+ $imgs.off('click.dzzthumb').on('dblclick.dzzthumb', function() {
+ var self = this;
+ $imgs.each(function(index) {
+ if(this.src == self.src) current = index;
+ });
+ setupDom();
+ showContent();
+ return false;
+ });
+ var setupDom = function() {
+ jQuery('html,body').css('overflow', 'hidden').css('height', '100%');
+ if(!document.getElementById('MsgContainer')) {
+ jQuery('').appendTo(opts['container']);
+ } else {
+ jQuery('#MsgContainer').empty().show();
+ }
+
+ var html = '';
+ html += '';
+ html += '
';
+ html += '
ESC'+__lang.logout+'
';
+ html += '
';
+ html += '
';
+ html += ' - '+__lang.rotation+'
';
+ //html+=' - 保存到我的文档
';
+ html += ' - '+__lang.download+'
';
+ html += ' - '+__lang.look_artwork+'
';
+ html += '
';
+ html += '
';
+ html += '
';
+ html += '
';
+ html += '
';
+ html += ' '+__lang.on_a+'';
+ html += ' '+__lang.under_a+'';
+ html += '
';
+ html += '
'+__lang.loading_in+'
';
+ html += '
';
+ html += '
';
+ html += '
';
+ html += '
'+__lang.keyboard+'“←”'+__lang.key_on+'
';
+ html += '
'+__lang.keyboard+'“→”'+__lang.key_under+'
';
+ html += '
ESC'+__lang.logout+'
';
+ html += '';
+ html += '
';
+ jQuery(html).appendTo('#MsgContainer');
+
+ jQuery('#preview_Container').css({ height: '100%', width: '100%' }).show();
+ jQuery('#preview-box b').on('mouseenter', function() {
+ var btn = jQuery(this).attr('btn');
+ jQuery('#' + btn + '-tips').show();
+ });
+ jQuery('#preview-box b').on('mouseleave', function() {
+ var btn = jQuery(this).attr('btn');
+ jQuery('#' + btn + '-tips').hide();
+ });
+ jQuery(document).on('keyup.dzzthumb', function(event) {
+ 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 27: //Ctrl + Alt + ←
+ jQuery(document).off('.dzzthumb');
+ jQuery('#MsgContainer').empty().hide();
+ break;
+ case 37: //Ctrl + Alt + ←
+ if(current == 0) {
+ jQuery('#popup-hint').find('span').html(__lang.has_last_picture);
+ jQuery('#popup-hint').show();
+ window.setTimeout(function() { jQuery('#popup-hint').hide(); }, 3000);
+ } else {
+ current = current - 1;
+ showContent();
+ }
+ break;
+ case 39: //Ctrl + Alt + →
+ if(current == $imgs.length - 1) {
+ jQuery('#popup-hint').find('span').html(__lang.has_last_picture1);
+ jQuery('#popup-hint').show();
+ window.setTimeout(function() { jQuery('#popup-hint').hide(); }, 3000);
+ } else {
+ current = current + 1;
+ showContent();
+ }
+ break;
+ }
+ });
+ jQuery('#previewer-photo').on('click.dzzthumb', function() {
+ jQuery(document).off('.dzzthumb');
+ jQuery('#MsgContainer').empty().hide();
+ jQuery('html,body').css('overflow', 'auto');
+ });
+ jQuery('#MsgContainer [btn],#previewer-photo').on('click.dzzthumb', function() {
+ var btn = jQuery(this).attr('btn');
+ switch(btn) {
+ case "close":
+ jQuery(document).off('.dzzthumb');
+ jQuery('#MsgContainer').empty().hide();
+ jQuery('html,body').css('overflow', 'auto');
+ break;
+ case "prev":
+ if(current == 0) {
+ jQuery('#popup-hint').find('span').html(__lang.has_last_picture);
+ jQuery('#popup-hint').show();
+ window.setTimeout(function() { jQuery('#popup-hint').hide(); }, 3000);
+ } else {
+ current = current - 1;
+ showContent();
+ }
+ break;
+ case "next":
+ if(current == $imgs.length - 1) {
+ jQuery('#popup-hint').find('span').html(__lang.has_last_picture1);
+ jQuery('#popup-hint').show();
+ window.setTimeout(function() { jQuery('#popup-hint').hide(); }, 3000);
+ } else {
+ current = current + 1;
+ showContent();
+ }
+ break;
+ case "download":
+ var img = $imgs.get(current);
+ var dpath = $(img).data('dpath');
+ var url = downurl + '&path=' + dpath;
+ if(!document.getElementById('hideframe')) {
+ jQuery('').appendTo('body');
+ }
+ jQuery('#hideframe').attr('src', url);
+ break;
+ case "newwindow":
+ var $img = $($imgs.get(current));
+ if($img.data('original')) window.open($img.data('original'));
+ break;
+
+ case "rotate":
+ var el = jQuery('#previewer-photo img');
+ angle += 90;
+ var rotation = ((angle % 360) / 90);
+ el.css({ 'transform': 'rotate(' + (angle) + 'deg)', '-webkit-transform': 'rotate(' + (angle) + 'deg)', '-moz-transform': 'rotate(' + (angle) + 'deg)', '-o-transform': 'rotate(' + (angle) + 'deg)', '-ms-transform': 'rotate(' + (angle) + 'deg)' });
+ if(BROWSER.ie && BROWSER.ie < 9) {
+ el.css('filter', 'progid:DXImageTransform.Microsoft.BasicImage(Rotation=' + (rotation) + '))');
+ }
+ break;
+
+ }
+ return false;
+ });
+ }
+ var showContent = function() {
+ var img = $imgs.get(current);
+
+ jQuery('#file_name').html(img.title);
+ jQuery('#popup-hint').hide();
+ jQuery('#previewer-photo').empty().hide();
+
+ jQuery('#pre_loading').show();
+ var el = jQuery('#previewer-photo');
+ var screenWidth = opts['root'].width();
+ var screenHeight = opts['root'].height();
+ imgReady($(img).data('original'), function() {
+ var width = 0;
+ var height = 0;
+ var imgw = this.width * 1;
+ var imgh = this.height * 1;
+ var bodyWidth = screenWidth - 6;
+ var bodyHeight = screenHeight - jQuery('#btn_hand').height() - 6;
+ var ratio = bodyWidth / bodyHeight;
+ var ratio1 = imgw / imgh;
+ if(ratio > ratio1) {
+ if(bodyHeight < imgh) {
+ height = bodyHeight;
+ width = imgw / imgh * bodyHeight;
+ } else {
+ width = imgw;
+ height = imgh;
+ }
+ } else {
+ if(bodyWidth < imgw) {
+ width = bodyWidth;
+ height = imgh / imgw * bodyWidth;
+ } else {
+ width = imgw;
+ height = imgh;
+ }
+ }
+ var left = (screenWidth - width) / 2;
+ var top = (bodyHeight - height) / 2;
+ var el1 = jQuery('
').appendTo(el);
+ el1.get(0).onmousedown = function(event) { try { dragMenu(el1.get(0), event, 1); } catch(e) {} };
+ el1.on('click', function() { return false });
+ });
+ };
+ var imgReady = (function() {
+ var list = [],
+ intervalId = null,
+
+ // 用来执行队列
+ tick = function() {
+ var i = 0;
+ for(; i < list.length; i++) {
+ list[i].end ? list.splice(i--, 1) : list[i]();
+ };
+ !list.length && stop();
+ },
+
+ // 停止所有定时器队列
+ stop = function() {
+ clearInterval(intervalId);
+ intervalId = null;
+ };
+
+ return function(url, ready, load, error) {
+ var onready, width, height, newWidth, newHeight,
+ img = new Image();
+
+ img.src = url;
+
+ // 如果图片被缓存,则直接返回缓存数据
+ if(img.complete) {
+ ready.call(img);
+ load && load.call(img);
+ return;
+ };
+
+ width = img.width;
+ height = img.height;
+
+ // 加载错误后的事件
+ img.onerror = function() {
+ error && error.call(img);
+ onready.end = true;
+ img = img.onload = img.onerror = null;
+ };
+
+ // 图片尺寸就绪
+ onready = function() {
+ newWidth = img.width;
+ newHeight = img.height;
+ if(newWidth !== width || newHeight !== height ||
+ // 如果图片已经在其他地方加载可使用面积检测
+ newWidth * newHeight > 1024
+ ) {
+ ready.call(img);
+ onready.end = true;
+ };
+ };
+ onready();
+
+ // 完全加载完毕的事件
+ img.onload = function() {
+ // onload在定时器时间差范围内可能比onready快
+ // 这里进行检查并保证onready优先执行
+ !onready.end && onready();
+
+ load && load.call(img);
+
+ // IE gif动画会循环执行onload,置空onload即可
+ img = img.onload = img.onerror = null;
+ };
+
+ // 加入队列中定期执行
+ if(!onready.end) {
+ list.push(onready);
+ // 无论何时只允许出现一个定时器,减少浏览器性能损耗
+ if(intervalId === null) intervalId = setInterval(tick, 40);
+ };
+ };
+ })();
+ //var btnClick=
+
+ }
+})(jQuery);
\ No newline at end of file
diff --git a/dzz/system/fileselection/ajax.php b/dzz/system/fileselection/ajax.php
index d911519..628f7f5 100644
--- a/dzz/system/fileselection/ajax.php
+++ b/dzz/system/fileselection/ajax.php
@@ -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)) {
diff --git a/share.php b/share.php
index 3d5e9a5..db4d1b2 100644
--- a/share.php
+++ b/share.php
@@ -88,6 +88,7 @@ if($_GET['a']=='down'){
}
}else{//没有可用的打开方式,转入下载;
+ $path=dzzencode('preview_' . $path);
IO::download($path);
exit();
}