Upload files to the current directory'+(this.is_webkit?"":'The current browser does not support drag upload. Commend to use Chrome browser or WebKit kernel for browsing')+"
Total process , uploading ,Upload fail Speed Getting,Expect time Getting
'+(""!=i?'
File nameFile sizeFile status
'+i+"
":"Please drag the file here"+(t.is_webkit?"":'The current browser does not support drag upload. Commend to use Chrome browser or WebKit kernel for browsing')+"")+"
',a="",l=this.file_path.split("/").splice(1),s=this.file_path.split("/")[0];"Windows"===bt.os?(0==l.length&&(l=[]),l.unshift('Local disk ('+s+")")):("/"==this.file_path&&(l=[]),l.unshift("Root dir"));for(var n=0;n'+l[n]+'
"}),$(e).html(l)})},reader_file_list:function(e,t){var i=this,a="",l="",s=bt.get_cookie("rank"),n=bt.get_cookie("record_paste_type");"null"!=n&&null!=n?$(".file_nav_view .file_all_paste").removeClass("hide"):$(".file_nav_view .file_all_paste").addClass("hide"),$(".file_table_view").removeClass(".list_view,.icon_view").addClass("list"==s?"list_view":"icon_view"),$(".cut_view_model:nth-child("+("list"==s?"2":"1")+")").addClass("active").siblings().removeClass("active"),this.file_images_list=[],this.get_dir_list(e,function(s){if(!1===s.status&&s.msg.indexOf("The specified directory does not exist!")>-1)return i.reader_file_list({path:"/www"});i.file_path=i.path_check(s.PATH),i.file_list=$.merge(i.data_reconstruction(s.DIR,"DIR"),i.data_reconstruction(s.FILES)),i.is_recycle=s.FILE_RECYCLE,i.file_store_list=s.STORE,bt.set_cookie("Path",i.path_check(s.PATH)),i.reader_file_list_content(i.file_list,function(n){$(".path_input").attr("data-path",i.file_path),$(".file_nav_view .multi").addClass("hide"),$(".selection_right_menu").removeAttr("style"),$.each(["100","200","500","1000","2000"],function(e,t){a+='"});var o=$(s.PAGE);o.append('per pageitem(s)"),$(".filePage").html('
Total '+n.is_dir_num+" directory, "+(i.file_list.length-n.is_dir_num)+'file(s), size:Click to calculate
'+o[0].outerHTML),e.is_operating&&i.file_operating[i.file_pointer]!=s.PATH&&(l=i.file_operating[i.file_pointer+1],void 0!==l&&l!=s.PATH&&i.file_operating.splice(i.file_pointer+1),i.file_operating.push(s.PATH),i.file_pointer=i.file_operating.length-1),i.render_path_list(),i.set_file_forward(),i.render_favorites_list(),i.set_file_view(),i.set_file_table_width(),t&&t(s)})})},data_reconstruction:function(e,t,i){var a=this,l=[],s=[["/etc","PS: System files directory"],["/home","PS: Home directory"],["/tmp","PS: Common temporary files directory"],["/root","PS: Main directory of system admin"],["/usr","PS: System application directory"],["/boot","PS: System run directory"],["/lib","PS: System source file directory"],["/mnt","PS: Store temporary mapped file system"],["/www","PS: Aapanel program directory"],["/bin","PS: Store binary executable file directory"],["/dev","PS: Storage device file directory"],["/www/wwwlogs","PS: Default site logs directory"],["/www/server","PS: Aapanel soft installed directory"],["/www/wwwlogs","PS: Site logs directory"],["/www/Recycle_bin",lan.files.recycle_bin_dir],["/www/server/panel","PS: Aapanel main program directory, do not move"],["/www/server/panel/plugin","PS: Aapanel plugin directory"],["/www/server/panel/BTPanel","PS: Aapanel directory"],["/www/server/panel/BTPanel/static","PS: Aapanel static directory"],["/www/server/panel/BTPanel/templates","PS: Aapanel templates directory"],[bt.get_cookie("backup_path"),"PS: Default backup directory"],[bt.get_cookie("sites_path"),"PS: Default site directory"]];return e.length<1?[]:($.each(e,function(e,i){var n=i.split(";"),o="",r=n[0].split("."),c=r[r.length-1];switch(n[0]){case".user.ini":o=lan.files.php_profile;break;case".htaccess":o=lan.files.apache_profile;break;case"swap":o=lan.files.swap_file}-1!=n[0].indexOf("Recycle_bin")&&(o=lan.files.swap_file),-1!=n[0].indexOf(".upload.tmp")&&(o=lan.files.recycle_bin_dir);for(var d=0;d0?($.each(this.file_store_list,function(t,i){e+='
"}},{fid:"dname",title:lan.files.recycle_bin_th2,template:function(e){return''+e.dname+""}},{fid:"size",title:lan.files.recycle_bin_th3,width:85,template:function(e){return''+bt.format_size(e.size)+""}},{fid:"time",title:lan.files.recycle_bin_th4,width:180,template:function(e,t){return''+bt.format_data(e.time)+""}},{type:"group",align:"right",width:250,title:lan.files.recycle_bin_th5,group:[{title:lan.files.recycle_bin_re,event:function(e,t,i,a,l){bt_file.ReRecycleBin(e.rname,function(){l.$delete_table_row(t)})}},{title:lan.files.recycle_bin_del,event:function(e,t,i,a,l){bt_file.DelRecycleBin(e.rname,function(){l.$delete_table_row(t)})}}]}],tootls:[{type:"batch",positon:["left","bottom"],placeholder:"Please Choose",buttonValue:"Execute",disabledSelectValue:"Please select the port that needs batch operation!",selectList:[{title:"Restore",url:"/files?action=Re_Recycle_bin",load:!0,param:function(e){return{path:e.rname}},callback:function(e){bt.confirm({title:"Restore files",msg:"Batch restore selected files, do you want to continue?",icon:0},function(i){layer.close(i),e.start_batch({},function(e){for(var i="",a=0;a
"}t.$batch_success_table({title:"Restore files",th:"File name",html:i}),t.$refresh_table_list(!0)})})}},{title:"Delete files permanently",url:"/files?action=Del_Recycle_bin",load:!0,param:function(e){return{path:e.rname}},callback:function(e){bt.confirm({title:"Delete selected files",msg:"Delete the selected file. The file will be completely deleted and cannot be recovered. Do you want to continue?",icon:0},function(i){layer.close(i),e.start_batch({},function(e){for(var i="",a=0;a
"+l.name+'
'+(l.request.status?"Successfully deleted":"Failed to delete")+"
",$(".video-list").html(i).scrollTop(34*a)})}})},play_file:function(e,t){if($("#btvideo video").attr("data-filename")==t)return!1;var i="/download?filename="+t+"&play=true",a='';$("#btvideo").html(a);var l=t.split("/");$(".btvideo-title").html(l[l.length-1]),$(".video-avt").removeClass("video-avt"),$(e).parents("tr").addClass("video-avt")},copy_file_or_dir:function(e){bt.set_cookie("record_paste",e.path),bt.set_cookie("record_paste_type","copy"),$(".file_all_paste").removeClass("hide"),layer.msg("Copy successfully. Please click [Paste] or Ctrl + V to paste")},cut_file_or_dir:function(e){bt.set_cookie("record_paste",e.path),bt.set_cookie("record_paste_type","cut"),$(".file_all_paste").removeClass("hide"),layer.msg("Cut successfully. Please click [Paste] or Ctrl + V to paste")},paste_file_or_dir:function(){var e=this,t=bt.get_cookie("record_paste_type"),i=bt.get_cookie("record_paste"),a="";if("null"!=i&&null!=i&&(a=i.split("/").pop()),e.file_path.indexOf(i)>-1)return layer.msg("Can not paste ["+a+"] here, Because the item cannot be pasted into itself.",{icon:0}),!1;if("null"!=t&&null!=t)switch(t){case"cut":case"copy":this.check_exists_files_req({dfile:this.file_path,filename:a},function(t){if(t.length>0){for(var l="",s=0;s
'+t[s].filename+"
"+ToSize(t[s].size)+"
"+getLocalTime(t[s].mtime)+"
";var n='
File name
Size
Last edit time
'+l+"
";SafeMessage("This files will be overwritten",n,function(){e.config_paste_to(i,a)})}else e.config_paste_to(i,a)});break;case"1":case"2":e.batch_file_paste()}},config_paste_to:function(e,t){var i=this,a=bt.get_cookie("record_paste_type");this.$http("copy"==a?"CopyFile":"MvFile",{sfile:e,dfile:this.file_path+"/"+t},function(e){e.status&&(bt.set_cookie("record_paste",null),bt.set_cookie("record_paste_type",null),i.reader_file_list({path:i.file_path})),layer.msg(e.msg,{icon:e.status?1:2})})},rename_file_or_dir:function(e){var t=this;t.is_editor=!0,$(".file_list_content .file_tr:nth-child("+(e.index+1)+")").addClass("editr_tr").find(".file_title").empty().append($("icon"==bt.get_cookie("rank")?'":'')),"icon"==bt.get_cookie("rank")&&$("textarea[name=rename_file_input]").css({height:$("textarea[name=rename_file_input]")[0].scrollHeight}),$(("icon"==bt.get_cookie("rank")?"textarea":"input")+"[name=rename_file_input]").on("input",function(){if("icon"==bt.get_cookie("rank")&&(this.style.height="auto",this.style.height=this.scrollHeight+"px"),"file"==e.type){var t=$(this).val().split("."),i=t[t.length-1];$(this).parent().prev().find(".file_icon").removeAttr("class").addClass("file_icon file_"+i)}}).keyup(function(e){13==e.keyCode&&$(this).blur(),e.stopPropagation(),e.preventDefault()}).blur(function(){var i=$(this).val().replace(/[\r\n]/g,""),a={sfile:e.path,dfile:t.path_resolve(t.file_path,i)};return e.filename==i||""==i?($(".file_list_content .file_tr:nth-child("+(e.index+1)+")").removeClass("editr_tr").find(".file_title").empty().append($(""+e.filename+"")),t.is_editor=!1,!1):t.match_unqualified_string(i)?layer.msg('The name cannot have /\\:*?"<>| symbol',{icon:2}):(t.rename_file_req(a,function(e){t.reader_file_list({path:t.file_path},function(){layer.msg(e.msg,{icon:e.status?1:2})})}),void(t.is_editor=!1))}).focus()},set_file_share:function(e){var t=this;this.loadY=bt.open({type:1,shift:5,closeBtn:2,area:"450px",title:"Set share "+e.type_tips+"-["+e.filename+"]",btn:["Create","Cancel"],content:'
',success:function(s,n){var o=new ClipboardJS(".copy_url"),r=new ClipboardJS(".copy_paw");o.on("success",function(e){layer.msg("Copy link succeeded!",{icon:1}),e.clearSelection()}),r.on("success",function(e){layer.msg("Copy link and extraction code succeeded!",{icon:1}),e.clearSelection()}),$(".layer_close").click(function(){layer.close(n)}),$(".QR_code").click(function(){layer.closeAll("tips"),layer.tips('',".QR_code",{area:["150px","150px"],tips:[1,"#ececec"],time:0,shade:[.05,"#000"],shadeClose:!0,success:function(){jQuery("#QR_code").qrcode({render:"canvas",text:l,height:130,width:130})}})}),$(".close_down").click(function(){a.remove_download_url({id:i.id,fileName:i.filename},function(i){a.loadY.close(),"fonticon"==t&&(a.file_list[e.index].down_id=0,a.reader_file_list_content(a.file_list)),"list"==t&&a.render_share_list(),layer.msg(i.msg,{icon:i.status?1:2})})})}})},del_file_or_dir:function(e){var t=this;t.is_recycle?bt.confirm({title:"Delete "+e.type_tips+"[ "+e.filename+" ]",msg:"Comfirm delete "+e.type_tips+"[ "+e.path+" ],it will move to recycle bin after delete, continue?"},function(){t.del_file_req(e,function(e){t.reader_file_list({path:t.file_path}),layer.msg(e.msg,{icon:e.status?1:2})})}):bt.show_confirm("Delete "+e.type_tips+"[ "+e.filename+" ]",'Recycle bin is not currently open, delete '+("dir"==e.type?"directory":"file")+" cannot be restored after, continue?",function(){t.del_file_req(e,function(e){t.reader_file_list({path:t.file_path}),layer.msg(e.msg,{icon:e.status?1:2})})})},cancel_file_favorites:function(e){var t=this,i=e.index;this.loadY=bt.confirm({title:e.filename+lan.files.unfavorite1,msg:lan.files.unfavorite1+" ["+e.path+"] "+lan.files.continue},function(){t.$http("del_files_store",{path:e.path},function(e){e.status&&(t.file_list[i].caret=!1,t.reader_file_list_content(t.file_list),t.load_favorites_index_list()),layer.msg(e.msg,{icon:e.status?1:2})})})},set_soft_link:function(e){var t=this;bt_tools.open({title:"Create Softlink",area:"520px",content:{class:"pd20",formLabelWidth:"110px",form:[{label:"Source file",group:{type:"text",name:"sfile",width:"280px",placeholder:"Please select the folder and file to be linked",icon:{type:"glyphicon-folder-open",event:function(e){},select:"all"},value:"",input:function(e){}}},{label:"Softlink name",group:{type:"text",name:"name",width:"280px",placeholder:"Please enter the name of the softlink",value:""}}]},init:function(){var e=null,t=setInterval(function(){if($('input[name="sfile"]').length<1&&clearInterval(t),e!=$('input[name="sfile"]').val()){e=$('input[name="sfile"]').val();var i=e.split("/");i.length>1&&$('[name="name"]').val(i[i.length-1])}},100)},yes:function(e,i,a){e=$.extend(e,{dfile:t.file_path+"/"+e.name}),delete e.name,bt_tools.send("files/CreateLink",e,function(e){e.status&&(layer.close(i),bt.msg(e),t.reader_file_list())},{tips:"Create Softlink"})}})},set_file_authority:function(e,t){var i=this;i.get_file_authority({path:e.path},function(a){var l='
",$(".chmodset").hide(),$(".backup_lists").html(l),$(".fixper").click(function(){layer.confirm("Note: Under the file or folder all permissions will be fixed to [ Folder: 755, File: 644 ]",{title:"Fix Permissions?",btn:["Confirm","Cancel"],closeBtn:2},function(i,a){t.$http("fix_permissions",{path:e},function(e){layer.closeAll(),t.reader_file_list({path:t.file_path,is_operating:!1}),layer.msg(e.msg,{icon:e.status?1:2})})})}),$(".restore_backup").click(function(){t.restore_file_permission($(this).attr("data-time"),e)}),$(".backup_list").on("click",".del_back",function(){var e=$(this).attr("data-id");t.del_backup(e)})})},restore_file_permission:function(e,t){var i=this,a=$("#accept_all").prop("checked")?1:0,l=layer.open({type:1,closeBtn:2,title:"Confirm restore",area:"330px",shadeClose:!1,btn:["Yes","No"],content:'
Restore would overwrite the current settings, continue?
"),$(".message-list").html(i)),setTimeout(function(){e.render_present_task_list()},1e3)})},remove_present_task:function(e){var t=this;layer.confirm("Do you want to cancel the upload of files? It need to delete the uploaded files manually. Continue?",{title:"Cancel file upload",icon:0},function(i){bt.send("remove_task","task/remove_task",{id:e},function(e){layer.msg(e.msg,{icon:1}),layer.close(t.file_present_task),t.file_present_task=null}),layer.close(i)})},edit_access_authority:function(){for(var e=$("#access").val(),t=["owner","group","public"],i=0;it.length))switch(l>7&&$("#access").val(e.substr(0,e.length-1)),l){case"1":$("#"+t[a]+"_x").prop("checked",!0);break;case"2":$("#"+t[a]+"_w").prop("checked",!0);break;case"3":$("#"+t[a]+"_x").prop("checked",!0),$("#"+t[a]+"_w").prop("checked",!0);break;case"4":$("#"+t[a]+"_r").prop("checked",!0);break;case"5":$("#"+t[a]+"_r").prop("checked",!0),$("#"+t[a]+"_x").prop("checked",!0);break;case"6":$("#"+t[a]+"_r").prop("checked",!0),$("#"+t[a]+"_w").prop("checked",!0);break;case"7":$("#"+t[a]+"_r").prop("checked",!0),$("#"+t[a]+"_w").prop("checked",!0),$("#"+t[a]+"_x").prop("checked",!0)}}},get_file_authority:function(e,t){this.$http("GetFileAccess",{filename:e.path},function(e){t&&t(e)})},set_dir_kill:function(e){var t=this;"php"==e.ext?t.$http("file_webshell_check",{filename:e.path},function(e){layer.msg(e.msg,{icon:e.status?1:2})}):layer.confirm("目录查杀将包含子目录中的php文件,是否操作?",{title:"目录查杀["+e.filename+"]",closeBtn:2,icon:3},function(i){t.$http("dir_webshell_check",{path:e.path},function(e){layer.msg(e.msg,{icon:e.status?1:2})})})},path_resolve:function(e,t){var i="";return Array.isArray(t)||(t=[t]),e.replace(/([\/|\/]*)$/,function(e){return e,"www"}),$.each(t,function(e,t){i+="/"+t}),(e+i).replace("//","/")},get_ext_name:function(e){for(var t=e.split("."),i=["folder","folder-unempty","sql","c","cpp","cs","flv","css","js","htm","html","java","log","mht","php","url","xml","ai","bmp","cdr","gif","ico","jpeg","jpg","JPG","png","psd","webp","ape","avi","mkv","mov","mp3","mp4","mpeg","mpg","rm","rmvb","swf","wav","webm","wma","wmv","rtf","docx","fdf","potm","pptx","txt","xlsb","xlsx","7z","cab","iso","rar","zip","gz","bt","file","apk","bookfolder","folder-empty","fromchromefolder","documentfolder","fromphonefolder","mix","musicfolder","picturefolder","videofolder","sefolder","access","mdb","accdb","fla","doc","docm","dotx","dotm","dot","pdf","ppt","pptm","pot","xls","csv","xlsm"],a=t[t.length-1],l=0;l')},yes:function(){var e=a.getVal();if(""==e.dfile)return layer.msg("Please select a valid address",{icon:2});a.submitForm(function(e,t){setTimeout(function(){i.reader_file_list({path:t.path})},1e3),null!=e&&null!=e||layer.msg(lan.files.zip_ok,{icon:1}),e.status&&i.render_present_task_list(),layer.close(s)})}})})},unpack_file_to_path:function(e){var t=this,i="zip",a="";a=e.path.substring(0,e.path.lastIndexOf("/")),this.reader_form_line({url:"UnZip",overall:{width:"310px"},data:[{label:"File name",name:"z_name",placeholder:"Compress file name",value:e.path},{label:"Compress path",name:"z_path",placeholder:"Compress path",value:a},{label:"Encoding",name:"z_code",type:"select",value:"UTF-8",list:[["UTF-8","UTF-8"],["gb18030","GBK"]]}],beforeSend:function(e){return{sfile:e.z_name,dfile:e.z_path,type:i,coding:e.z_code,password:e.z_password}}},function(a,l){var s=layer.open({type:1,title:"Decompress file",area:"520px",shadeClose:!1,closeBtn:2,skin:"unpack_file_view",btn:["Comfirm","Cancel"],content:l[0].outerHTML,success:function(){"gz"==e.ext&&(i="tar"),"zip"==i&&$(".unpack_file_view .line:nth-child(2)").append('
Password
')},yes:function(){var e=a.getVal();return""==e.z_name?layer.msg("Please enter the file name path",{icon:2}):""==e.z_path?layer.msg("Please enter the decompression address",{icon:2}):void a.submitForm(function(e,i){layer.close(s),setTimeout(function(){t.reader_file_list({path:i.path})},1e3),e.status&&t.render_present_task_list(),layer.msg(e.msg,{icon:e.status?1:2})})}})})},match_unqualified_string:function(e){var t=RegExp(/[(\ )(\*)(\|)(\\)(\:)(\")(\/)(\<)(\>)(\?)(\)]+/);return t.test(e)},reader_form_line:function(e,t){var i=this,a=bt.get_random(10),l=$(''),s=e,n=[];i=this;Array.isArray(e)||(s=e.data),$.each(s,function(t,i){var a=i.labelWidth||e.overall.labelWidth||null,s=bt.get_random(10),o=i.labelWidth||e.overall.width||null,r=$('
Upload files to the current directory'+(this.is_webkit?"":'The current browser does not support drag upload. Commend to use Chrome browser or WebKit kernel for browsing')+"
Total process , uploading ,Upload fail Speed Getting,Expect time Getting
'+(""!=html?'
File nameFile sizeFile status
'+html+"
":"Please drag the file here"+(that.is_webkit?"":'The current browser does not support drag upload. Commend to use Chrome browser or WebKit kernel for browsing')+"")+"
',path_before="",dir_list=this.file_path.split("/").splice(1),first_dir=this.file_path.split("/")[0];"Windows"===bt.os?(0==dir_list.length&&(dir_list=[]),dir_list.unshift('Local disk ('+first_dir+")")):("/"==this.file_path&&(dir_list=[]),dir_list.unshift("Root dir"));for(var i=0;i'+dir_list[i]+'
"})),$(el).html(_html)}))},reader_file_list:function(data,callback){var that=this,select_page_num="",next_path="",model=bt.get_cookie("rank"),isPaste=bt.get_cookie("record_paste_type");"null"!=isPaste&&null!=isPaste?$(".file_nav_view .file_all_paste").removeClass("hide"):$(".file_nav_view .file_all_paste").addClass("hide"),$(".file_table_view").removeClass(".list_view,.icon_view").addClass("list"==model?"list_view":"icon_view"),$(".cut_view_model:nth-child("+("list"==model?"2":"1")+")").addClass("active").siblings().removeClass("active"),this.file_images_list=[],this.get_dir_list(data,(function(res){if(!1===res.status&&res.msg.indexOf("The specified directory does not exist!")>-1)return that.reader_file_list({path:"/www"});that.file_path=that.path_check(res.PATH),that.file_list=$.merge(that.data_reconstruction(res.DIR,"DIR"),that.data_reconstruction(res.FILES)),that.is_recycle=res.FILE_RECYCLE,that.file_store_list=res.STORE,bt.set_cookie("Path",that.path_check(res.PATH)),that.reader_file_list_content(that.file_list,(function(rdata){$(".path_input").attr("data-path",that.file_path),$(".file_nav_view .multi").addClass("hide"),$(".selection_right_menu").removeAttr("style"),$.each(["100","200","500","1000","2000"],(function(index,item){select_page_num+='"}));var page=$(res.PAGE);page.append('per pageitem(s)"),$(".filePage").html('
Total '+rdata.is_dir_num+" directory, "+(that.file_list.length-rdata.is_dir_num)+'file(s), size:Click to calculate
'+page[0].outerHTML),data.is_operating&&that.file_operating[that.file_pointer]!=res.PATH&&(void 0!==(next_path=that.file_operating[that.file_pointer+1])&&next_path!=res.PATH&&that.file_operating.splice(that.file_pointer+1),that.file_operating.push(res.PATH),that.file_pointer=that.file_operating.length-1),that.render_path_list(),that.set_file_forward(),that.render_favorites_list(),that.set_file_view(),that.set_file_table_width(),callback&&callback(res)}))}))},data_reconstruction:function(data,type,callback){var that=this,arry=[],info_ps=[["/etc","PS: System files directory"],["/home","PS: Home directory"],["/tmp","PS: Common temporary files directory"],["/root","PS: Main directory of system admin"],["/usr","PS: System application directory"],["/boot","PS: System run directory"],["/lib","PS: System source file directory"],["/mnt","PS: Store temporary mapped file system"],["/www","PS: Aapanel program directory"],["/bin","PS: Store binary executable file directory"],["/dev","PS: Storage device file directory"],["/www/wwwlogs","PS: Default site logs directory"],["/www/server","PS: Aapanel soft installed directory"],["/www/wwwlogs","PS: Site logs directory"],["/www/Recycle_bin",lan.files.recycle_bin_dir],["/www/server/panel","PS: Aapanel main program directory, do not move"],["/www/server/panel/plugin","PS: Aapanel plugin directory"],["/www/server/panel/BTPanel","PS: Aapanel directory"],["/www/server/panel/BTPanel/static","PS: Aapanel static directory"],["/www/server/panel/BTPanel/templates","PS: Aapanel templates directory"],[bt.get_cookie("backup_path"),"PS: Default backup directory"],[bt.get_cookie("sites_path"),"PS: Default site directory"]];return data.length<1?[]:($.each(data,(function(index,item){var itemD=item.split(";"),fileMsg="",fileN=itemD[0].split("."),extName=fileN[fileN.length-1];switch(itemD[0]){case".user.ini":fileMsg=lan.files.php_profile;break;case".htaccess":fileMsg=lan.files.apache_profile;break;case"swap":fileMsg=lan.files.swap_file}-1!=itemD[0].indexOf("Recycle_bin")&&(fileMsg=lan.files.swap_file),-1!=itemD[0].indexOf(".upload.tmp")&&(fileMsg=lan.files.recycle_bin_dir);for(var i=0;i0?($.each(this.file_store_list,(function(index,item){html+='
"}},{fid:"dname",title:lan.files.recycle_bin_th2,template:function(row){return''+row.dname+""}},{fid:"size",title:lan.files.recycle_bin_th3,width:85,template:function(row){return''+bt.format_size(row.size)+""}},{fid:"time",title:lan.files.recycle_bin_th4,width:180,template:function(row,index){return''+bt.format_data(row.time)+""}},{type:"group",align:"right",width:250,title:lan.files.recycle_bin_th5,group:[{title:lan.files.recycle_bin_re,event:function(row,index,ev,key,that){bt_file.ReRecycleBin(row.rname,(function(){that.$delete_table_row(index)}))}},{title:lan.files.recycle_bin_del,event:function(row,index,ev,key,that){bt_file.DelRecycleBin(row.rname,(function(){that.$delete_table_row(index)}))}}]}],tootls:[{type:"batch",positon:["left","bottom"],placeholder:"Please Choose",buttonValue:"Execute",disabledSelectValue:"Please select the port that needs batch operation!",selectList:[{title:"Restore",url:"/files?action=Re_Recycle_bin",load:!0,param:function(row){return{path:row.rname}},callback:function(that){bt.confirm({title:"Restore files",msg:"Batch restore selected files, do you want to continue?",icon:0},(function(index){layer.close(index),that.start_batch({},(function(list){for(var html="",i=0;i
"}recycle_list.$batch_success_table({title:"Restore files",th:"File name",html:html}),recycle_list.$refresh_table_list(!0)}))}))}},{title:"Delete files permanently",url:"/files?action=Del_Recycle_bin",load:!0,param:function(row){return{path:row.rname}},callback:function(that){bt.confirm({title:"Delete selected files",msg:"Delete the selected file. The file will be completely deleted and cannot be recovered. Do you want to continue?",icon:0},(function(index){layer.close(index),that.start_batch({},(function(list){for(var html="",i=0;i
"+item.name+'
'+(item.request.status?"Successfully deleted":"Failed to delete")+"
",$(".video-list").html(video_list).scrollTop(34*index)}))}})},play_file:function(obj,filename){if($("#btvideo video").attr("data-filename")==filename)return!1;var imgUrl,v='';$("#btvideo").html(v);var p_tmp=filename.split("/");$(".btvideo-title").html(p_tmp[p_tmp.length-1]),$(".video-avt").removeClass("video-avt"),$(obj).parents("tr").addClass("video-avt")},copy_file_or_dir:function(data){bt.set_cookie("record_paste",data.path),bt.set_cookie("record_paste_type","copy"),$(".file_all_paste").removeClass("hide"),layer.msg("Copy successfully. Please click [Paste] or Ctrl + V to paste")},cut_file_or_dir:function(data){bt.set_cookie("record_paste",data.path),bt.set_cookie("record_paste_type","cut"),$(".file_all_paste").removeClass("hide"),layer.msg("Cut successfully. Please click [Paste] or Ctrl + V to paste")},paste_file_or_dir:function(){var that=this,_isPaste=bt.get_cookie("record_paste_type"),_paste=bt.get_cookie("record_paste"),_filename="";if("null"!=_paste&&null!=_paste&&(_filename=_paste.split("/").pop()),that.file_path.indexOf(_paste)>-1)return layer.msg("Can not paste ["+_filename+"] here, Because the item cannot be pasted into itself.",{icon:0}),!1;if("null"!=_isPaste&&null!=_isPaste)switch(_isPaste){case"cut":case"copy":this.check_exists_files_req({dfile:this.file_path,filename:_filename},(function(result){if(result.length>0){for(var tbody="",i=0;i
'+result[i].filename+"
"+ToSize(result[i].size)+"
"+getLocalTime(result[i].mtime)+"
";var mbody;SafeMessage("This files will be overwritten",'
File name
Size
Last edit time
'+tbody+"
",(function(){that.config_paste_to(_paste,_filename)}))}else that.config_paste_to(_paste,_filename)}));break;case"1":case"2":that.batch_file_paste()}},config_paste_to:function(path,_filename){var that=this,_type=bt.get_cookie("record_paste_type");this.$http("copy"==_type?"CopyFile":"MvFile",{sfile:path,dfile:this.file_path+"/"+_filename},(function(rdata){rdata.status&&(bt.set_cookie("record_paste",null),bt.set_cookie("record_paste_type",null),that.reader_file_list({path:that.file_path})),layer.msg(rdata.msg,{icon:rdata.status?1:2})}))},rename_file_or_dir:function(data){var that=this;that.is_editor=!0,$(".file_list_content .file_tr:nth-child("+(data.index+1)+")").addClass("editr_tr").find(".file_title").empty().append($("icon"==bt.get_cookie("rank")?'":'')),"icon"==bt.get_cookie("rank")&&$("textarea[name=rename_file_input]").css({height:$("textarea[name=rename_file_input]")[0].scrollHeight}),$(("icon"==bt.get_cookie("rank")?"textarea":"input")+"[name=rename_file_input]").on("input",(function(){if("icon"==bt.get_cookie("rank")&&(this.style.height="auto",this.style.height=this.scrollHeight+"px"),"file"==data.type){var ext_arry=$(this).val().split("."),ext=ext_arry[ext_arry.length-1];$(this).parent().prev().find(".file_icon").removeAttr("class").addClass("file_icon file_"+ext)}})).keyup((function(e){13==e.keyCode&&$(this).blur(),e.stopPropagation(),e.preventDefault()})).blur((function(){var _val=$(this).val().replace(/[\r\n]/g,""),config={sfile:data.path,dfile:that.path_resolve(that.file_path,_val)};return data.filename==_val||""==_val?($(".file_list_content .file_tr:nth-child("+(data.index+1)+")").removeClass("editr_tr").find(".file_title").empty().append($(""+data.filename+"")),that.is_editor=!1,!1):that.match_unqualified_string(_val)?layer.msg('The name cannot have /\\:*?"<>| symbol',{icon:2}):(that.rename_file_req(config,(function(res){that.reader_file_list({path:that.file_path},(function(){layer.msg(res.msg,{icon:res.status?1:2})}))})),void(that.is_editor=!1))})).focus()},set_file_share:function(data){var that=this;this.loadY=bt.open({type:1,shift:5,closeBtn:2,area:"450px",title:"Set share "+data.type_tips+"-["+data.filename+"]",btn:["Create","Cancel"],content:'
',success:function(layers,index){var copy_url=new ClipboardJS(".copy_url"),copy_paw=new ClipboardJS(".copy_paw");copy_url.on("success",(function(e){layer.msg("Copy link succeeded!",{icon:1}),e.clearSelection()})),copy_paw.on("success",(function(e){layer.msg("Copy link and extraction code succeeded!",{icon:1}),e.clearSelection()})),$(".layer_close").click((function(){layer.close(index)})),$(".QR_code").click((function(){layer.closeAll("tips"),layer.tips('',".QR_code",{area:["150px","150px"],tips:[1,"#ececec"],time:0,shade:[.05,"#000"],shadeClose:!0,success:function(){jQuery("#QR_code").qrcode({render:"canvas",text:download_url,height:130,width:130})}})})),$(".close_down").click((function(){that.remove_download_url({id:data.id,fileName:data.filename},(function(res){that.loadY.close(),"fonticon"==type&&(that.file_list[datas.index].down_id=0,that.reader_file_list_content(that.file_list)),"list"==type&&that.render_share_list(),layer.msg(res.msg,{icon:res.status?1:2})}))}))}})},del_file_or_dir:function(data){var that=this;that.is_recycle?bt.confirm({title:"Delete "+data.type_tips+"[ "+data.filename+" ]",msg:"Comfirm delete "+data.type_tips+"[ "+data.path+" ],it will move to recycle bin after delete, continue?"},(function(){that.del_file_req(data,(function(res){that.reader_file_list({path:that.file_path}),layer.msg(res.msg,{icon:res.status?1:2})}))})):bt.show_confirm("Delete "+data.type_tips+"[ "+data.filename+" ]",'Recycle bin is not currently open, delete '+("dir"==data.type?"directory":"file")+" cannot be restored after, continue?",(function(){that.del_file_req(data,(function(res){that.reader_file_list({path:that.file_path}),layer.msg(res.msg,{icon:res.status?1:2})}))}))},cancel_file_favorites:function(data){var that=this,index=data.index;this.loadY=bt.confirm({title:data.filename+lan.files.unfavorite1,msg:lan.files.unfavorite1+" ["+data.path+"] "+lan.files.continue},(function(){that.$http("del_files_store",{path:data.path},(function(res){res.status&&(that.file_list[index].caret=!1,that.reader_file_list_content(that.file_list),that.load_favorites_index_list()),layer.msg(res.msg,{icon:res.status?1:2})}))}))},set_soft_link:function(data){var that=this;bt_tools.open({title:"Create Softlink",area:"520px",content:{class:"pd20",formLabelWidth:"110px",form:[{label:"Source file",group:{type:"text",name:"sfile",width:"280px",placeholder:"Please select the folder and file to be linked",icon:{type:"glyphicon-folder-open",event:function(ev){},select:"all"},value:"",input:function(ev){}}},{label:"Softlink name",group:{type:"text",name:"name",width:"280px",placeholder:"Please enter the name of the softlink",value:""}}]},init:function(){var e=null,t=setInterval((function(){if($('input[name="sfile"]').length<1&&clearInterval(t),e!=$('input[name="sfile"]').val()){var i=(e=$('input[name="sfile"]').val()).split("/");i.length>1&&$('[name="name"]').val(i[i.length-1])}}),100)},yes:function(e,i,a){delete(e=$.extend(e,{dfile:that.file_path+"/"+e.name})).name,bt_tools.send("files/CreateLink",e,(function(e){e.status&&(layer.close(i),bt.msg(e),that.reader_file_list())}),{tips:"Create Softlink"})}})},set_file_authority:function(data,isPatch){var that=this;that.get_file_authority({path:data.path},(function(rdata){var tex='
",$(".chmodset").hide(),$(".backup_lists").html(cont),$(".fixper").click((function(){layer.confirm("Note: Under the file or folder all permissions will be fixed to [ Folder: 755, File: 644 ]",{title:"Fix Permissions?",btn:["Confirm","Cancel"],closeBtn:2},(function(index,layero){that.$http("fix_permissions",{path:fileName},(function(res){layer.closeAll(),that.reader_file_list({path:that.file_path,is_operating:!1}),layer.msg(res.msg,{icon:res.status?1:2})}))}))})),$(".restore_backup").click((function(){that.restore_file_permission($(this).attr("data-time"),fileName)})),$(".backup_list").on("click",".del_back",(function(){var _id=$(this).attr("data-id");that.del_backup(_id)}))}))},restore_file_permission:function(restore_time,fileName){var that=this,sub_type=$("#accept_all").prop("checked")?1:0,layerss=layer.open({type:1,closeBtn:2,title:"Confirm restore",area:"330px",shadeClose:!1,btn:["Yes","No"],content:'
Restore would overwrite the current settings, continue?
"),$(".message-list").html(task_body)),setTimeout((function(){that.render_present_task_list()}),1e3)}))},remove_present_task:function(id){var that=this;layer.confirm("Do you want to cancel the upload of files? It need to delete the uploaded files manually. Continue?",{title:"Cancel file upload",icon:0},(function(indexs){bt.send("remove_task","task/remove_task",{id:id},(function(rdata){layer.msg(rdata.msg,{icon:1}),layer.close(that.file_present_task),that.file_present_task=null})),layer.close(indexs)}))},edit_access_authority:function(){for(var access=$("#access").val(),idName=["owner","group","public"],n=0;nidName.length))switch(onacc>7&&$("#access").val(access.substr(0,access.length-1)),onacc){case"1":$("#"+idName[i]+"_x").prop("checked",!0);break;case"2":$("#"+idName[i]+"_w").prop("checked",!0);break;case"3":$("#"+idName[i]+"_x").prop("checked",!0),$("#"+idName[i]+"_w").prop("checked",!0);break;case"4":$("#"+idName[i]+"_r").prop("checked",!0);break;case"5":$("#"+idName[i]+"_r").prop("checked",!0),$("#"+idName[i]+"_x").prop("checked",!0);break;case"6":$("#"+idName[i]+"_r").prop("checked",!0),$("#"+idName[i]+"_w").prop("checked",!0);break;case"7":$("#"+idName[i]+"_r").prop("checked",!0),$("#"+idName[i]+"_w").prop("checked",!0),$("#"+idName[i]+"_x").prop("checked",!0)}}},get_file_authority:function(data,callback){this.$http("GetFileAccess",{filename:data.path},(function(rdata){callback&&callback(rdata)}))},set_dir_kill:function(data){var that=this;"php"==data.ext?that.$http("file_webshell_check",{filename:data.path},(function(rdata){layer.msg(rdata.msg,{icon:rdata.status?1:2})})):layer.confirm("目录查杀将包含子目录中的php文件,是否操作?",{title:"目录查杀["+data.filename+"]",closeBtn:2,icon:3},(function(index){that.$http("dir_webshell_check",{path:data.path},(function(rdata){layer.msg(rdata.msg,{icon:rdata.status?1:2})}))}))},path_resolve:function(paths,param){var path="",split="";return Array.isArray(param)||(param=[param]),paths.replace(/([\/|\/]*)$/,(function($1){return split=$1,"www"})),$.each(param,(function(index,item){path+="/"+item})),(paths+path).replace("//","/")},get_ext_name:function(fileName){for(var extArr=fileName.split("."),exts=["folder","folder-unempty","sql","c","cpp","cs","flv","css","js","htm","html","java","log","mht","php","url","xml","ai","bmp","cdr","gif","ico","jpeg","jpg","JPG","png","psd","webp","ape","avi","mkv","mov","mp3","mp4","mpeg","mpg","rm","rmvb","swf","wav","webm","wma","wmv","rtf","docx","fdf","potm","pptx","txt","xlsb","xlsx","7z","cab","iso","rar","zip","gz","bt","file","apk","bookfolder","folder-empty","fromchromefolder","documentfolder","fromphonefolder","mix","musicfolder","picturefolder","videofolder","sefolder","access","mdb","accdb","fla","doc","docm","dotx","dotm","dot","pdf","ppt","pptm","pot","xls","csv","xlsm"],extLastName=extArr[extArr.length-1],i=0;i')},yes:function(){var ress;if(""==form.getVal().dfile)return layer.msg("Please select a valid address",{icon:2});form.submitForm((function(res,datas){setTimeout((function(){that.reader_file_list({path:datas.path})}),1e3),null!=res&&null!=res||layer.msg(lan.files.zip_ok,{icon:1}),res.status&&that.render_present_task_list(),layer.close(loadT)}))}})}))},unpack_file_to_path:function(data){var that=this,_type="zip",spath="";spath=data.path.substring(0,data.path.lastIndexOf("/")),this.reader_form_line({url:"UnZip",overall:{width:"310px"},data:[{label:"File name",name:"z_name",placeholder:"Compress file name",value:data.path},{label:"Compress path",name:"z_path",placeholder:"Compress path",value:spath},{label:"Encoding",name:"z_code",type:"select",value:"UTF-8",list:[["UTF-8","UTF-8"],["gb18030","GBK"]]}],beforeSend:function(updata){return{sfile:updata.z_name,dfile:updata.z_path,type:_type,coding:updata.z_code,password:updata.z_password}}},(function(form,html){var loadT=layer.open({type:1,title:"Decompress file",area:"520px",shadeClose:!1,closeBtn:2,skin:"unpack_file_view",btn:["Comfirm","Cancel"],content:html[0].outerHTML,success:function(){"gz"==data.ext&&(_type="tar"),"zip"==_type&&$(".unpack_file_view .line:nth-child(2)").append('
Password
')},yes:function(){var ress=form.getVal();return""==ress.z_name?layer.msg("Please enter the file name path",{icon:2}):""==ress.z_path?layer.msg("Please enter the decompression address",{icon:2}):void form.submitForm((function(res,datas){layer.close(loadT),setTimeout((function(){that.reader_file_list({path:datas.path})}),1e3),res.status&&that.render_present_task_list(),layer.msg(res.msg,{icon:res.status?1:2})}))}})}))},match_unqualified_string:function(item){var containSpecial;return RegExp(/[(\ )(\*)(\|)(\\)(\:)(\")(\/)(\<)(\>)(\?)(\)]+/).test(item)},reader_form_line:function(config,callback){var that=this,random=bt.get_random(10),html=$(''),data=config,eventList=[],that=this;Array.isArray(config)||(data=config.data),$.each(data,(function(index,item){var labelWidth=item.labelWidth||config.overall.labelWidth||null,event_random=bt.get_random(10),width=item.labelWidth||config.overall.width||null,form_line=$('
"+(item.label||"")+'
'),form_el=$(function(){switch(item.type){case"select":return"";case"text":default:return"'}}(item));(item.eventType||item.event)&&(Array.isArray(item.eventType)||(item.eventType=[item.eventType]),$.each(item.eventType,(function(index,items){if(eventList.push({el:event_random,type:items||"click",event:item[items]||null}),config.el){var els=$('[data-event="'+item.el+'"]');if(item[items])"enter"==items?els.on("keyup",(function(e){13==e.keyCode&&item.event(e)})):els.on(item||"click",item.event);else if("focus"==items){var vals=els.val();""!=vals&&els.val("").focus().val(vals)}else els[items]()}}))),form_line.find(".info-r").append(form_el),html.append(form_line)})),config.el&&$(config.el).empty().append(html),callback&&callback({getVal:function(){return $("#"+random).serializeObject()},setEvent:function(){$.each(eventList,(function(index,item){var els=$('[data-event="'+item.el+'"]');if(null===item.event)if("focus"==item.type){var vals=els.val();""!=vals&&els.val("").focus().val(vals)}else els[item.type]();else"enter"==item.type?els.on("keyup",(function(e){13==e.keyCode&&item.event(e)})):els.on(item.type,item.event)}))},submitForm:function(callback){var data=this.getVal();config.beforeSend&&(data=config.beforeSend(data)),that.loadT=bt.load("submitting the form, please wait..."),bt.send(config.url,"files/"+config.url,data,(function(rdata){that.loadT.close(),callback&&callback(rdata,data)}))}},html)},$http:function(data,parem,callback){var that=this,loadT="";"string"==typeof data?("object"!=typeof parem&&(callback=parem,parem={}),Array.isArray(this.method_list[data])||(this.method_list[data]=["files",this.method_list[data]]),this.$http({method:data,tips:!!this.method_list[data][1]&&this.method_list[data][1],module:this.method_list[data][0],data:parem,msg:!0},callback)):(void 0!==data.tips&&data.tips&&(loadT=bt.load(data.tips)),bt.send(data.method,(data.module||"files")+"/"+data.method,data.data||{},(function(res){if(""!=loadT&&loadT.close(),"string"==typeof res&&(res=JSON.parse(res)),!1===res.status&&res.msg)return bt.msg(res),!1;parem&&parem(res)})))}};bt_file.init(),Function.prototype.delay=function(that,arry,time){return Array.isArray(arry)||(time=arry,arry=[]),void 0===time&&(time=0),setTimeout(this.apply(that,arry),time),this},jQuery.prototype.serializeObject=function(){var a,o,h,i,e;for(a=this.serializeArray(),h=(o={}).hasOwnProperty,i=0;i','')
+ var tmp = error_body.split('During handling of the above exception, another exception occurred:')
+ error_body = tmp[tmp.length-1];
+ var error_msg = '
";if($("#tbody tr").length==0){$("#select_dir_list").append(h)}else{$("#select_dir_list tr:first-child").before(h)}$(".newFolderName").focus();$("#nameOk").click(function(){var k=$("#newFolderName").val(),j=$(".file_path_views .path_input").attr("data-path");newTxt=j+"/"+k;e.$http("CreateDir",{path:newTxt},function(l){if(l.status==true){g.reader_file_list({path:j,is_operating:false});layer.msg(l.msg,{icon:1})}else{layer.msg(l.msg,{icon:2})}})})});$("#select_mount_list").on("click",".item",function(){g.reader_file_list({path:$(this).attr("data-menu"),is_operating:true})});$(window).resize(function(h){if($(this)[0].innerHeight!=g.area[1]){g.area[1]=$(this)[0].innerHeight;g.set_file_view()}if($(this)[0].innerWidth!=g.area[0]){g.area[0]=$(this)[0].innerWidth;g.set_dir_view_resize()}if(g.vscode_editor.view){if(g.vscode_editor.is_full_min>0){layer.style(g.vscode_editor.view,{top:0,left:0,width:g.area[0],height:g.area[1]})}}if(g.vscode_editor.view&&$.isEmptyObject(g.vscode_editor.list)){g.vscode.layout()}}).keydown(function(j){j=window.event||j;var i=j.keyCode,h=j.target.tagName.toLowerCase();if(i==8&&h!=="input"&&h!=="textarea"){if(g.vscode_editor.view==null){$(".forward_path span:eq(0)").click()}return false}});$(".file_path_input .path_input").on("focus blur keyup",function(i){i=i||window.event;var h=$(this).attr("data-path");switch(i.type){case"focus":$(this).addClass("focus").val(h).prev().hide();break;case"blur":$(this).removeClass("focus").val("").prev().show();break;case"keyup":if(i.keyCode!=13&&i.type=="keyup"){return false}var j=$(this);if($(this).data("path")!=$(this).val()){g.reader_file_list({path:$(this).val(),is_operating:true},function(k){if(k.status===false){$(j).val(h)}else{$(j).val(k.PATH);$(j).blur().prev().show()}})}break}i.stopPropagation()});$(".file_path_input .file_dir_view").on("click",".file_dir",function(){g.reader_file_list({path:$(this).attr("title"),is_operating:true})});$(".forward_path span").click(function(){var h=$(this).index(),i="";if(!$(this).hasClass("active")){switch(h){case 0:g.file_pointer=g.file_pointer-1;i=g.retrun_prev_path(g.file_path);break;case 1:g.file_pointer=g.file_pointer+1;i=g.file_path+"/"+$(".select_file_group .file_directory").val();break;case 2:g.file_pointer=g.file_pointer-1;i=g.retrun_prev_path(g.file_path);break}g.reader_file_list({path:i,is_operating:false})}});$(".file_path_input .file_dir_view").on("click",".file_dir_omit",function(i){var j=this,h=$(this).children(".nav_down_list");$(this).addClass("active");h.addClass("show");$(document).one("click",function(){$(j).removeClass("active");h.removeClass("show");i.stopPropagation()});i.stopPropagation()});$("#select_dir_list").on("dblclick","tr",function(j){if($(j.target).hasClass("file_check")){return false}var i=$(this).attr("data-path"),h=$(this).attr("data-type");if(h=="dir"){g.reader_file_list({path:g.file_path+"/"+i})}else{}j.stopPropagation();j.preventDefault()});$(".file_path_refresh").click(function(){g.reader_file_list({path:g.file_path})});$(".file_nav_view .upload_or_download").on("click",function(h){g.open_upload_view();h.stopPropagation();h.preventDefault()});$(".file_nav_view .upload_or_download li").on("click",function(i){var h=$(this).data("type");if(h==="uploadFile"){g.open_upload_view()}else{g.open_download_view()}i.stopPropagation();i.preventDefault()});$(".mount_disk_list").on("click",".nav_btn",function(){var h=$(this).data("menu");g.reader_file_list({path:h})});$(".file_list_header").on("click",".file_name,.file_size,.file_mtime,.file_accept,.file_user",function(j){var k=$(this).attr("data-tid"),h=$(this).find(".icon_sort").hasClass("active"),i=$(this).hasClass("active");if(!$(this).find(".icon_sort").hasClass("active")&&$(this).hasClass("active")){$(this).find(".icon_sort").addClass("active")}else{$(this).find(".icon_sort").removeClass("active")}$(this).addClass("active").siblings().removeClass("active").find(".icon_sort").removeClass("active").empty();$(this).find(".icon_sort").html('');if(!i){h=true}bt.set_cookie("files_sort",k);bt.set_cookie("name_reverse",h?1:0);g.reader_file_list();return false});$(".file_list_header .file_th").each(function(i,k){var h=bt.get_cookie("files_sort"),j=bt.get_cookie("name_reverse");if($(this).attr("data-tid")===h){$(this).addClass("active").siblings().removeClass("active").find(".icon_sort").removeClass("active").empty();$(this).find(".icon_sort").html('');if(j===0){$(this).find(".icon_sort").addClass("active")}}});$(".file_list_header .file_check").on("click",function(i){var h=parseInt($(this).data("checkbox"));switch(h){case 0:$(this).addClass("active").removeClass("active_2").data("checkbox",1);$(".file_list_content .file_tr").addClass("active").removeClass("active_2");g.file_table_arry=g.file_list;break;case 2:$(this).addClass("active").removeClass("active_2").data("checkbox",1);$(".file_list_content .file_tr").addClass("active");g.file_table_arry=g.file_list;break;case 1:$(this).removeClass("active active_2").data("checkbox",0);$(".file_list_content .file_tr").removeClass("active");g.file_table_arry=[];break}});$(".file_list_content").on("click",".file_check",function(l){var i=$(this).parents(".file_tr"),k=i.data("index"),h=$(".file_list_header .file_check"),j=i.attr("data-filename");$(".selection_right_menu").removeAttr("style");if(i.hasClass("active")){i.removeClass("active");g.remove_check_file(g.file_table_arry,"filename",j);if(g.file_table_arry.length>0){h.addClass("active_2").removeClass("active").data("checkbox",2)}else{if(g.file_table_arry.length==0){h.removeClass("active active_2").data("checkbox",0)}}}else{i.addClass("active");i.attr("data-filename",g.file_list[k]["filename"]);if(g.file_table_arry.length==g.file_list.length){h.addClass("active").removeClass("active_2").data("checkbox",1)}else{h.addClass("active_2").removeClass("active").data("checkbox",2)}g.file_table_arry.push(g.file_list[k])}l.stopPropagation()});$(".file_list_content").scroll(function(h){if($(this).scrollTop()==($(this)[0].scrollHeight-$(this)[0].clientHeight)){$(this).prev().css("opacity",1);$(this).next().css("opacity",0)}else{if($(this).scrollTop()>0){$(this).prev().css("opacity",1)}else{if($(this).scrollTop()==0){$(this).prev().css("opacity",0);$(this).next().css("opacity",1)}}}});$(".file_table_view .file_list_content").on("click",".file_tr",function(h){$(".selection_right_menu").removeAttr("style");$(this).find(".file_checkbox .file_check").click();h.stopPropagation();h.preventDefault()});$(".file_table_view .file_list_content").on("click",".file_title i",function(k){var i=$(this).parents(".file_tr"),h=i.data("index"),j=g.file_list[h];if(j.type=="dir"){g.reader_file_list({path:g.file_path+"/"+j.filename})}else{}k.stopPropagation()});$(".file_table_view .file_list_content").on("click",".file_name .icon-share1",function(k){var i=$(this).parents(".file_tr"),h=i.data("index"),j=g.file_list[h];g.info_file_share(j,i);k.stopPropagation()});$(".file_table_view .file_list_content").on("click",".file_name .icon-favorites",function(k){var i=$(this).parents(".file_tr"),h=i.data("index"),j=g.file_list[h];j.typeText=j.type?"文件夹":"文件";g.cancel_file_favorites(j,i);k.stopPropagation()});$(".file_table_view .file_list_content").on("dblclick",".file_tr",function(j){if($(j.target).hasClass("file_check")){return false}var h=$(this).data("index"),i=g.file_list[h];if(i.type=="dir"){g.reader_file_list({path:g.file_path+"/"+i.filename})}else{}j.stopPropagation();j.preventDefault()});$(".file_list_content").on("contextmenu",".file_tr",function(i){var h=this;if(i.which==3){g.render_file_groud_menu(i,this);$(".content_right_menu").removeAttr("style");$(this).addClass("selected").siblings().removeClass("selected");$(document).one("click",function(j){$(h).removeClass("selected");$(".selection_right_menu").removeAttr("style");j.stopPropagation();j.preventDefault()})}i.stopPropagation();i.preventDefault()});$(".file_list_content").on("contextmenu",function(l){var h=$(".content_right_menu"),k=h.width(),j=h.height(),i=this;if(l.which==3){$(".selection_right_menu").removeAttr("style");g.render_file_all_menu(l,this)}l.stopPropagation();l.preventDefault()});$(".filePage").on("change",".showRow",function(){var h=$(this).val();bt.set_storage("showRow",h);g.reader_file_list()});$(".file_list_content").on("click",".folder_size",function(i){var h=j.file_list[$(this).parents(".file_tr").data("index")],j=this;j.get_file_size({path:h.path},function(k){$(j).text(bt.format_size(k.size))});i.stopPropagation();i.preventDefault()});$(".cut_view_model").on("click",function(){var h=$(this).data("type");$(".file_table_view").addClass(h=="icon"?"icon_view":"list_view").removeClass(h!="icon"?"icon_view":"list_view");$(this).addClass("active").siblings().removeClass("active")})},set_file_forward:function(){var h=this,g=$(".forward_path span");console.log(h.file_operation);if(h.file_operating.length==1){g.addClass("active")}else{if(h.file_pointer==h.file_operating.length-1){g.eq(0).removeClass("active");g.eq(1).addClass("active")}else{if(h.file_pointer==0){g.eq(0).addClass("active");g.eq(1).removeClass("active")}else{g.removeClass("active")}}}},set_file_view:function(){var h=$(".file_list_content"),g=this.area[1]-170;$(".file_bodys").height(this.area[1]-100);if((this.file_list.length*50)>g){h.attr("data-height",h.data("height")||h.height()).height(g);$(".file_shadow_bottom").css("opacity",1)}else{h.height(g);$(".file_shadow_top,.file_shadow_bottom").css("opacity",0)}},clear_table_active:function(){this.file_table_arry=[];$(".file_list_header .file_check").removeClass("active active_2");$(".file_list_content .file_tr").removeClass("active")}};c.reader_view();c.event_bind()},$fixed_table_thead:function(a){$(a).scroll(function(){var b=this.scrollTop;this.querySelector("thead").style.transform="translateY("+b+"px)"})},send:function(g,e,c,b,a,l){var h={},k=null,i=null,f=[],j="";$.each(arguments,function(n,m){f.push([m,typeof m])});function d(n){try{k=f[n][1]=="function"?f[n][0]:null;m=f[(n+1)][1]=="function"?f[(n+1)][0]:null}catch(m){}}j=f[0];switch(j[1]){case"string":$.each(f,function(n,m){var p=m[0],o=m[1];if(n>1&&(o=="boolean"||o=="string"||o=="object")){var q=j[0].split("/");h.url="/"+q[0]+"?action="+q[1];h.load=p;if(o=="object"){h.load=p.load;h.tips=p.tips;h.verify=p.verify}return false}else{h.url=j[0]}});if(f[1][1]==="object"){h.data=f[1][0];d(2)}else{d(1)}break;case"object":h.url=j[0].url;h.data=j[0].data||{};$.each(f,function(n,m){var p=m[0],o=m[1];if(n>1&&(o=="boolean"||o=="string"||o=="object")){h.load=m;if(o=="object"){h.load=p.load;h.tips=p.tips}return true}});if(f[1][1]==="object"){h.data=f[1][0];d(2)}else{d(1)}break}if(h.load){h.load=this.load(h.load)}$.ajax({type:h.type||"POST",url:h.url,data:h.data||{},dataType:h.dataType||"JSON",complete:function(){if(h.load){h.load.close()}},success:function(m){if(h.verify){if(k){k(m)}return false}if(typeof m==="string"){layer.msg(m,{icon:2,time:0,closeBtn:2});return false}if(h.bacth){if(k){k(m)}return false}if(m.status===false){bt_tools.msg(m);return false}if(h.tips){bt_tools.msg(m)}if(k){k(m)}}})},command_line_output:function(b){var c=this,d=bt.get_random(15);function a(e){var i=this;for(var g in c.commandConnectionPool){var h=c.commandConnectionPool[g],f=$(h.config.el);if(e.shell===h.config.shell&&f.length){h.el=f;return h}}if(typeof e==="undefined"){e={}}this.config=$.extend({route:"/sock_shell"},e);this.xterm_config=$.extend(this.xterm_config,this.config.xterm);this.el=$(this.config.el);this.open=e.open;this.close=e.close;this.message=e.message;if(!this.config.hasOwnProperty("el")){c.msg({msg:"请输入选择器element,不可为空",status:false});return false}if(!this.config.hasOwnProperty("shell")){c.msg({msg:"请输入命令,不可为空",status:false});return false}if(this.config.hasOwnProperty("time")){setTimeout(function(){i.close_connect()},this.config.time)}this.init()}a.prototype={socket:null,socketToken:null,timeout:0,monitor_interval:2000,element_detection:null,uuid:d,fragment:[],error:0,init:function(){var e=bt.get_cookie("commandInputViewUUID"),f=this;if(!this.el[0]){if(this.error>10){return false}setTimeout(function(){f.init();this.error++},2000);return false}this.error=0;if(this.el[0].localName!=="pre"){this.el.append('');this.el=this.el.find("pre");this.config.el=this.config.el+" pre"}else{this.el.addClass("command_output_pre")}if(Array.isArray(this.config.area)){this.el.css({width:this.config.area[0],height:this.config.area[1]})}else{this.el.css({width:"100%",height:"100%"})}if(e&&typeof c.commandConnectionPool[e]!="undefined"){c.commandConnectionPool[e].close_connect();delete c.commandConnectionPool[e]}bt.set_cookie("commandInputViewUUID",this.uuid);this.element_detection=setInterval(function(){if(!$(f.config.el).length){clearInterval(f.element_detection);f.close_connect()}},1*60*1000);this.set_full_screen();this.create_websocket_connect(this.config.route,this.config.shell);this.monitor_element()},create_websocket_connect:function(e,f){var g=this;this.socket=new WebSocket((location.protocol==="http:"?"ws://":"wss://")+location.host+e);this.socket.addEventListener("open",function(h){if(!this.socketToken){var i=document.getElementById("request_token_head").getAttribute("token");this.socketToken={"x-http-token":i}}this.send(JSON.stringify(this.socketToken));this.send(f);if(g.open){g.open()}});this.socket.addEventListener("close",function(h){if(h.code!==1000){g.socket=g.create_websocket_connect(g.config.route,g.config.shell)}if(g.close){g.close(h)}});this.socket.addEventListener("message",function(i){var h=i.data;if(!h){return}g.refresh_data(h);if(g.message){g.message(h)}});return this.socket},set_full_screen:function(){},refresh_data:function(e){this.fragment.push(e);if(this.fragment.length>=300){this.fragment.splice(0,150);this.el.html(this.fragment.join(""))}else{this.el.append(e)}this.el.scrollTop(this.el[0].scrollHeight)},monitor_element:function(){var e=this;this.monitor_interval=setInterval(function(){if(!e.el.length){e.close_connect();clearInterval(e.monitor_interval)}},e.config.monitorTime||2000)},close_connect:function(){this.socket.send("");this.socket.close();delete c.commandConnectionPool[this.uuid]}};this.commandConnectionPool[d]=new a(b);return this.commandConnectionPool[d]}};$.fn.serializeObject=function(){var a=Object.prototype.hasOwnProperty;return this.serializeArray().reduce(function(b,c){if(!a.call(b,c.name)){b[c.name]=c.value}return b},{})};
\ No newline at end of file
diff --git a/BTPanel/static/language/English/lan.js b/BTPanel/static/language/English/lan.js
index 2f19e0a1..b4084aae 100644
--- a/BTPanel/static/language/English/lan.js
+++ b/BTPanel/static/language/English/lan.js
@@ -1006,7 +1006,7 @@ var lan = {
"mysql_status_ps4":"If too low, increase innodb_buffer_pool_size",
"mysql_status_ps5":"If too low, increase query_cache_size",
"mysql_status_ps6":"If too high, increase tmp_table_size",
- "mysql_status_ps7":"If too high, increase table_cache_size",
+ "mysql_status_ps7":"If too high, increase table_open_cache",
"mysql_status_ps8":"If not 0, please check index of database table",
"mysql_status_ps9":"If not 0, please check index of database table",
"mysql_status_ps10":"If too high, increase sort_buffer_size",
diff --git a/BTPanel/static/language/Simplified_Chinese/lan.js b/BTPanel/static/language/Simplified_Chinese/lan.js
index d9005579..bb5215b6 100644
--- a/BTPanel/static/language/Simplified_Chinese/lan.js
+++ b/BTPanel/static/language/Simplified_Chinese/lan.js
@@ -947,7 +947,7 @@ var lan = {
"mysql_status_ps4": "If too low, increase innodb_buffer_pool_size",
"mysql_status_ps5": "If too low, increase query_cache_size",
"mysql_status_ps6": "If too high, increase tmp_table_size",
- "mysql_status_ps7": "If too high, increase table_cache_size",
+ "mysql_status_ps7": "If too high, increase table_open_cache",
"mysql_status_ps8": "If not 0, please check index of DB table",
"mysql_status_ps9": "If not 0, please check index of DB table",
"mysql_status_ps10": "If too high, increase sort_buffer_size",
diff --git a/BTPanel/templates/default/files.html b/BTPanel/templates/default/files.html
index a05dadd3..986e1f9b 100644
--- a/BTPanel/templates/default/files.html
+++ b/BTPanel/templates/default/files.html
@@ -113,7 +113,7 @@
-
Backup PMSN
+
Backup PMSN
Recycle bin
@@ -285,19 +285,19 @@
Back
-
+
Search
-
+
New
-
新建文件夹
-
新建文件
+
Folder
+
File
-
+
Refresh
diff --git a/BTPanel/templates/default/panel_error.html b/BTPanel/templates/default/panel_error.html
new file mode 100644
index 00000000..4e67afc3
--- /dev/null
+++ b/BTPanel/templates/default/panel_error.html
@@ -0,0 +1,13 @@
+
+
An error occurred while the panel was running!
+
+
{error_title}
+
+
{request_info}
+
{error_msg}
+
+
Sorry, an unexpected error occurred while the panel was running. Please try to resolve this error in the following order:
+
1. Click the Fix button in the upper right corner of [Home], and log out of the panel and log in again.
+
2. Still unresolved, please take a screenshot of this window and post on the forum for help, address:https://forum.aapanel.com/
+
+
\ No newline at end of file
diff --git a/BTPanel/templates/default/plugin_error.html b/BTPanel/templates/default/plugin_error.html
new file mode 100644
index 00000000..117a6e8d
--- /dev/null
+++ b/BTPanel/templates/default/plugin_error.html
@@ -0,0 +1,15 @@
+
+
Something went wrong, an error occurred while running [{plugin name}]!
+
+
{error_title}
+
+
{request_info}
+
{error_msg}
+
+
Sorry, an unexpected error occurred while accessing the [{plugin name}] plugin. Please try to resolve this error in the following order:
+
1. Click the Fix button in the upper right corner of [Home], and log out of the panel and log in again.
+
2. If the plugin is not the latest version, try to update to the latest version, if it is the latest version, please try to reinstall the plugin, if it is a beta version, please try to switch to the official version
+
3. If this plug-in is a third-party plug-in, try to contact the author for help
+
4. If the above attempt fails to resolve this error, please take a screenshot of this window and post on the Pagoda Forum for helphttps://forum.aapanel.com
+
+
\ No newline at end of file
diff --git a/BTPanel/templates/default/soft.html b/BTPanel/templates/default/soft.html
index f4b69753..3acbc8fe 100644
--- a/BTPanel/templates/default/soft.html
+++ b/BTPanel/templates/default/soft.html
@@ -31,6 +31,7 @@