Linux ip-172-26-2-223 5.4.0-1018-aws #18-Ubuntu SMP Wed Jun 24 01:15:00 UTC 2020 x86_64
Apache
: 172.26.2.223 | : 13.59.134.12
Cant Read [ /etc/named.conf ]
8.1.13
www
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
www /
server /
panel /
BTPanel /
static /
js /
[ HOME SHELL ]
Name
Size
Permission
Action
Validform_v5.3.2_min.js
20.17
KB
-rwxr-xr-x
aes.js
22.15
KB
-rwxr-xr-x
bootstrap-select.min.js
30.91
KB
-rwxr-xr-x
bootstrap.min.js
35.95
KB
-rwxr-xr-x
bt_upload.js
6.46
KB
-rwxr-xr-x
china.js
60.38
KB
-rwxr-xr-x
clipboard.min.js
10.41
KB
-rwxr-xr-x
config.js
62.92
KB
-rwxr-xr-x
control.js
43.36
KB
-rwxr-xr-x
countryCode.json
27.27
KB
-rwxr-xr-x
crontab.js
61.74
KB
-rwxr-xr-x
database.js
103.01
KB
-rwxr-xr-x
docker.js
151.43
KB
-rwxr-xr-x
echarts.min.js
950.32
KB
-rwxr-xr-x
files.js
233.97
KB
-rwxr-xr-x
files.min.js
121.19
KB
-rwxr-xr-x
firewall.js
102.42
KB
-rwxr-xr-x
i18next.min.js
47.94
KB
-rwxr-xr-x
index.html
0
B
-rwxr-xr-x
index.js
123.52
KB
-rwxr-xr-x
jquery-1.10.2.min.js
90.88
KB
-rwxr-xr-x
jquery-2.2.4.min.js
83.57
KB
-rwxr-xr-x
jquery-ui.min.js
247.72
KB
-rwxr-xr-x
jquery.contextify.min.js
2.7
KB
-rwxr-xr-x
jquery.dragsort-0.5.2.min.js
8.92
KB
-rwxr-xr-x
jquery.fly.min.js
1.79
KB
-rwxr-xr-x
jquery.i18n.properties.js
16.59
KB
-rwxr-xr-x
jquery.qrcode.min.js
13.67
KB
-rwxr-xr-x
jsencrypt.min.js
175.64
KB
-rwxr-xr-x
logs.js
39.53
KB
-rwxr-xr-x
md5.js
8.34
KB
-rwxr-xr-x
polyfill.js
9.31
KB
-rwxr-xr-x
polyfill.min.js
520
B
-rwxr-xr-x
public.js
231.13
KB
-rwxr-xr-x
public_backup.js
352.53
KB
-rwxr-xr-x
qrcode.min.js
19.46
KB
-rwxr-xr-x
requestAnimationFrame.js
901
B
-rwxr-xr-x
site.js
458.68
KB
-rwxr-xr-x
socket.io.min.js
63.54
KB
-rwxr-xr-x
soft.js
266.85
KB
-rwxr-xr-x
term.js
48.74
KB
-rwxr-xr-x
tools.js
130.2
KB
-rwxr-xr-x
tools.min.js
80.67
KB
-rwxr-xr-x
upload-drog.js
38.45
KB
-rwxr-xr-x
upload.js
8.11
KB
-rwxr-xr-x
xterm.js
295.86
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : tools.min.js
var bt_tools={commandConnectionPool:{},table:function(a){function b(c){this.config=c;this.$load()}b.prototype={style_list:[],event_list:{},checkbox_list:[],batch_active:{},event_rows_model:{},data:[],page:"",column:[],batch_thread:[],random:bt.get_random(5),init:false,checked:false,$load:function(){var d=this,c=$('<input type="checkbox" id="checked_'+d.random+'" style="font-size:0;position:fixed;left:-9999999px;"/>');if(this.config.init){this.config.init(this)}$(this.config.el).addClass("bt_table").append(c);c.focus(function(){d.checked=true;return false}).blur(function(e){d.checked=false;if(d.checked_blur){d.checked_blur(e)}});if(this.config.minWidth){this.style_list.push({className:this.config.el+" table",css:("min-width:"+this.config.minWidth)})}if(this.config.tootls){this.$reader_tootls(this.config.tootls)}else{console.log(this.config.height);if($(d.config.el+".divtable").length===0){$(d.config.el).append('<div class="divtable mtb10" style="heigth:'+(this.config.height||"auto")+'"></div>')}}this.$reader_content();if(d.config.url!==undefined){this.$refresh_table_list()}else{if(this.config.data!==undefined){this.$reader_content(this.config.data)}else{alert(lan["public"].miss_data_or_url)}}if(this.config.methods){$.extend(this,this.config.methods)}},$refresh_table_list:function(d){var c=this,e;if(d){e=bt.load(lan.database.get_data)}this.$http(function(g,f){if(d){e.close()}c.$reader_content(g,f)})},$active_focus:function(d){var c=this;$("#checked_"+c.random).focus();this.checked_blur=function(e){setTimeout(function(){if(d){d(e)}delete c.checked_blur},200)}},$reader_content:function(u,h){var v=this,r="",c="",q=0,g=this.config.column,f={},n=$(v.config.el+" .checkbox_"+v.random);u=u||[];this.data=u;if(n.length){n.removeClass("active selected");v.checkbox_list=[];v.$set_batch_view()}do{var k=u[q],m=0;if(u.length>0){c+="<tr>"}for(var p=0;p<g.length;p++){var s=g[p];if($.isEmptyObject(s)){m++;continue}if(q===0&&!this.init){if(!this.init){this.style_list.push(this.$dynamic_merge_style(s,p-m))}var d="sort_"+this.random+"",l="checkbox_"+this.random,o=s.sortValue||"desc";r+="<th><span "+(s.sort?'class="not-select '+d+(s.sortValue?" sort-active":"")+' cursor-pointer"':"")+' data-index="'+p+'" '+(s.sort?'data-sort="'+o+'"':"")+">"+(s.type=="checkbox"?'<label><i class="cust—checkbox cursor-pointer '+l+'" data-checkbox="all"></i><input type="checkbox" class="cust—checkbox-input"></label>':"<span>"+s.title+"</span>")+(s.sort?'<span class="glyphicon glyphicon-triangle-'+(o=="desc"?"bottom":"top")+' ml5"></span>':"")+"</span></th>";if(q===0){if(!f[d]&&s.sort){f[d]={event:this.config.sortEvent,eventType:"click",type:"sort"}}if(!f[l]){f[l]={event:s.checked,eventType:"click",type:"checkbox"}}}}if(k!==undefined){var t="",e="event-"+s.fid+"-"+this.random;if(s.template){t=v.$custom_template_render(s,k,p)}else{t=this.$reader_column_type(s,k);f=$.extend(f,t[1]);t=t[0]}c+="<td><span "+(s["class"]?'class="'+s["class"]+'"':"")+" "+(s.tips?'title="'+s.tips+'"':"")+">"+t+"</span></td>";if(q===0){if(!f[e]&&s.event){f[e]={event:s.event,eventType:"click",type:"rows"}}}}}if(u.length>0){c+="</tr>"}if(u.length==0){c+='<tr><td colspan="'+(g.length-m)+'" style="text-align:center;">'+(this.config["default"]||lan["public"].empty)+"</td></tr>"}q++}while(q<u.length);if(!this.init){this.$style_bind(this.style_list)}this.$event_bind(f);if(!this.init){$(this.config.el+" .divtable").append('<table class="table table-hover"><thead>'+r+"</thead><tbody>"+c+"</tbody></table></div></div>")}else{$(this.config.el+" .divtable tbody").html(c);if(this.config.page&&h){$(this.config.el+" .page").replaceWith(this.$reader_page(this.config.page,h))}}this.init=true;if(this.config.success){this.config.success(this)}},$custom_template_render:function(g,h,d){var e="event-"+g.fid+"-"+this.random,f=g.template(h,d),c=$(f);if(c.length>0){template=c.addClass(e)[0].outerHTML}else{if(g.type==="text"){template='<span class="'+e+'">'+f+"</span>"}else{template='<a href="javascript:;" class="btlink '+e+'">'+f+"</a>"}}return template},$modify_row_data:function(e){this.event_rows_model.rows=$.extend(this.event_rows_model.rows,e);var d=this.event_rows_model,c=null;if(typeof d.model.template!="undefined"){c=$(this.$custom_template_render(d.model,d.rows,d.index))}else{c=$(this.$reader_column_type(d.model,d.rows)[0])}d.el.replaceWith(c);d.el=c},$batch_success_table:function(c){var d=this;bt.open({type:1,title:c.title,area:c.area||["380px","350px"],shadeClose:false,closeBtn:2,content:c.content||'<div class="batch_title"><span class><span class="batch_icon"></span><span class="batch_text">'+c.title+" "+lan["public"].success+'</span></span></div><div class="fiexd_thead divtable success-layer" style="margin: 15px 30px 15px 30px;overflow: auto;height: 200px;"><table class="table table-hover"><thead><tr><th>'+c.th+'</th><th style="text-align:right;width:120px;">'+lan["public"].result+"</th></tr></thead><tbody>"+c.html+"</tbody></table></div>",success:function(){d.$fixed_table_thead(".fiexd_thead")}})},$delete_table_row:function(c){this.data.splice(c,1);this.$reader_content(this.data)},$fixed_table_thead:function(c){$(c).scroll(function(){var d=this.scrollTop;this.querySelector("thead").style.transform="translateY("+d+"px)"})},$set_batch_view:function(){var c=$(this.config.el+" .bt_select_value"),d=$(this.config.el+" .bt_table_select_group").next();if(typeof this.config.batch!="undefined"){var d=$(this.config.el+" .set_batch_option");if(typeof this.config.batch.config!="undefined"){if(this.checkbox_list.length>0){d.removeClass("bt-disabled btn-default").addClass("btn-success").text(lan["public"].please_choose+this.batch_active.title+"("+lan["public"].selected+this.checkbox_list.length+")")}else{d.addClass("bt-disabled btn-default").removeClass("btn-success").text(lan["public"].please_choose+this.batch_active.title)}}else{var c=$(this.config.el+" .bt_select_value");if(this.checkbox_list.length>0){d.removeClass("bt-disabled btn-default").addClass("btn-success").prev().removeClass("bt-disabled");c.find("em").html("("+lan["public"].selected+this.checkbox_list.length+")")}else{d.addClass("bt-disabled btn-default").removeClass("btn-success").prev().addClass("bt-disabled");c.children().eq(0).html(lan["public"].please_choose+"<em></em>");c.next().find("li").removeClass("active");this.batch_active={}}}}},$reader_column_type:function(m,n){var l=n[m.fid],c={},i="",e=[],g=this;switch(m.type){case"text":e=[l,c];break;case"checkbox":e=['<label><i class="cust—checkbox cursor-pointer checkbox_'+this.random+'"></i><input type="checkbox" class="cust—checkbox-input"></label>',c];break;case"password":var k="",j="",i="ico_"+g.random+"_",h='<span class="bt-table-password mr10"><i>**********</i></span>';if(m.eye_open){h+='<span class="glyphicon cursor pw-ico glyphicon-eye-open mr10 '+i+'eye_open" title="Show"></span>';if(!c[i+"eye_open"]){c[i+"eye_open"]={type:"eye_open_password"}}}if(m.copy){h+='<span class="ico-copy cursor btcopy mr10 '+i+'copy" title="Copy"></span>';if(!c[i+"copy"]){c[i+"copy"]={type:"copy_password"}}}e=[h,c];break;case"link":i="click_"+m.fid+"_"+this.random;if(!c[i]&&m.event){c[i]={event:m.event,type:"rows"}}e=['<a class="btlink '+i+'" href="'+(m.href?l:"javascript:;")+'" '+(m.href?('target="'+(m.target||"_blank")+'"'):"")+' title="'+l+'">'+l+"</a>",c];break;case"input":blurName="blur_"+m.fid+"_"+this.random;keyupName="keyup_"+m.fid+"_"+this.random;if(!c[blurName]&&m.blur){c[blurName]={event:m.blur,eventType:"blur",type:"rows"}}if(!c[keyupName]&&m.keyup){c[keyupName]={event:m.keyup,eventType:"keyup",type:"rows"}}e=['<input type="text" title="'+lan.site.click_edit+'" class="table-input '+blurName+" "+keyupName+'" value="'+l+'">',c];break;case"status":var f="";i="click_"+m.fid+"_"+this.random;$.each(m.config.list,function(p,o){if(o[0]===l){f=o}});if(!c[i]&&m.event){c[i]={event:m.event,type:"rows"}}e=['<a class="btlink '+i+" "+(f[2].indexOf("#")>-1?"":f[2])+'" style="'+(f[2].indexOf("#")>-1?("color:"+f[2]+";"):"")+'" href="javascript:;"><span>'+f[1]+"</span>"+(m.config.icon?'<span class="glyphicon '+f[3]+'"></span>':"")+"</a>",c];break;case"switch":break;case"group":var d="";$.each(m.group,function(q,o){i=(m.fid?m.fid:"group")+"_"+q+"_"+g.random;if(o.template){var r=o.template(n,g),p=$(r);if(p.length>0){d+=p.addClass(i)[0].outerHTML}else{d+='<a href="javascript:;" class="btlink '+i+'">'+r+"</a>"}}else{d+='<a href="javascript:;" class="btlink '+i+'" '+(o.hide?'style="display:none;"':"")+">"+o.title+"</a>"}d+=((m.group.length-1!=q)?" | ":"");if(!c[i]&&o.event){c[i]={event:o.event,type:"rows"}}});e=[d,c];break;default:e=[l,c];break}return e},$reader_tootls:function(f){var k=this,c={};function o(w,v){var x=bt.load(w.title+lan.site.executing),i={},u=k.$get_data_batch_list(w.paramId,v);if(!w.beforeRequest){i[w.paramName]=u.join(",")}else{i[w.paramName]=w.beforeRequest(v)}bt_tools.send({url:w.url||k.config.batch.url,data:$.extend(w.param||{},i)},function(z){x.close();if(!z.status){return false}if(typeof w.tips==="undefined"||w.tips){var y="";$.each(z.error,function(A,B){y+="<tr><td><span>"+A+'</span/></td><td><div style="float:right;" class="size_ellipsis"><span style="color:red">'+B+"</span></div></td></tr>"});$.each(z.success,function(A,B){y+="<tr><td><span>"+B+'</span></td><td><div style="float:right;" class="size_ellipsis"><span style="color:#20a53a">'+lan["public"].success+"</span></div></td></tr>"});k.$batch_success_table({title:w.title,th:w.theadName,html:y});k.$refresh_table_list(true)}if(w.success){w.success(z,v,k)}})}function l(u,i,v){if(u.callback){u.callback({loadT:0,config:{},check_list:i,bacth_status:true,start_batch:function(w,y){var x=this;if(u.load){this.loadT=layer.msg(lan["public"].executeing+u.title+',<span class="batch_progress">'+lan["public"].schedule+":0/"+this.check_list.length+"</span>,"+lan["public"].please_wait+(u.clear?'<a href="javascript:;" class="btlink clear_batch" style="margin-left:20px;">cancel</a>':""),$.extend({icon:16,skin:"batch_tips",shade:0.3,time:0},u.clear?{area:"420px"}:{}));$("#layui-layer"+x.loadT).on("click",".clear_batch",function(){x.clear_bacth()})}this.config={param:w,url:u.url};this.bacth(y)},bacth:function(w,z){var y=this,x={};if(typeof w==="function"){z=w,w=0}if(w<this.check_list.length){if(typeof u.param=="function"){x=u.param(i[w])}else{x=u.param}this.config.param=$.extend(this.config.param,x);if(u.paramId){y.config.param[u.paramId]=y.check_list[w][u.paramId]}if(this.config.param.bacth&&w==this.check_list.length-1){delete this.config.param.bacth}if(!y.bacth_status){return false}if(u.load){$("#layui-layer"+y.loadT).find(".layui-layer-content").html('<i class="layui-layer-ico layui-layer-ico16"></i>'+lan["public"].executeing+u.title+',<span class="batch_progress">'+lan["public"].schedule+":"+w+"/"+y.check_list.length+"</span>,"+lan["public"].please_wait+(u.clear?'<a href="javascript:;" class="btlink clear_batch" style="margin-left:20px;">cancel</a>':""))}bt_tools.send({url:this.config.url,data:this.config.param,bacth:true},function(A){$.extend(y.check_list[w],{request:{status:typeof A.status==="boolean"?A.status:false,msg:A.msg||lan["public"].request_error}});w++;y.bacth(w,z)})}else{if(v){v()}z(this.check_list);layer.close(this.loadT)}},clear_bacth:function(){this.bacth_status=false;layer.close(this.loadT)}})}else{if(!u.confirm){if(u.confirmVerify){bt.show_confirm(u.title+lan["public"].in_bulk,u.title+lan["public"].in_bulk+","+lan["public"].risk_prompt,o)}else{bt.confirm({title:u.title+lan["public"].in_bulk,msg:u.title+lan["public"].in_bulk+","+lan["public"].risk_prompt},function(){if(o){o(u,i)}})}}else{o(u,i)}}}for(var p=0;p<f.length;p++){var r="",t=f[p];switch(t.type){case"group":$.each(t.list,function(u,i){var w=t.type+"_"+k.random+"_"+u,v="";if(!i.group){r+='<button type="button" class="btn '+(i.active?"btn-success":"btn-default")+" "+w+' btn-sm mr5">'+i.title+"</button>"}else{r+='<div class="btn-group" style="vertical-align: top;"> <button type="button" class="btn btn-default '+w+' btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span style="margin-right:2px;">'+lan.site.category_manager+'</span><span class="caret" style="position: relative;top: -1px;"></span></button> <ul class="dropdown-menu"></ul> </div>';if(t.list){$.each(t.list,function(y,x){v+='<li><a href="javascript:;" '+ +">"+x[t.key]+"</a></li>"})}if(i.init){setTimeout(function(){i.init(w)},400)}}if(!c[w]){c[w]={event:i.event,type:"button"}}});break;case"search":this.config.search=t;var s="search_input_"+this.random,n="search_btn_"+this.random;r='<div class="bt_search"><input type="text" class="search_input '+s+'" style="'+(t.width?("width:"+t.width):"")+'" placeholder="'+(t.placeholder||"")+'"/><span class="glyphicon glyphicon-search '+n+'" aria-hidden="true"></span></div>';if(!c[s]){c[s]={eventType:"keyup",type:"search_input"}}if(!c[n]){c[n]={type:"search_btn"}}break;case"batch":this.config.batch=t;var h=[],e="",j=t.config;if(typeof t.config!="undefined"){k.batch_active=j;$(k.config.el).on("click",".set_batch_option",function(x){var w=[];for(var v=0;v<k.checkbox_list.length;v++){w.push(k.data[k.checkbox_list[v]])}if($(this).hasClass("bt-disabled")){layer.tips(k.config.batch.disabledTips||"Select batch operation",$(this),{tips:[1,"red"],time:2000});return false}switch(typeof j.confirm){case"function":j.confirm(j,function(i,y){j.param=$.extend(j.param,i);l(j,w,y)});break;case"undefined":l(j,w);break;case"object":var u=j.confirm;bt.open({title:u.title||"Batch execute",area:u.area||"350px",btn:u.btn||["Confirm","Cancel"],content:u.content,success:function(i,y){u.success(i,y,j)},yes:function(y,i){u.yes(y,i,function(z,A){j.param=$.extend(j.param,z);o(j,w)})}});break}})}else{$.each(t.selectList,function(u,i){if(i.group){$.each(i.group,function(w,v){h.push($.extend({},i,v));e+='<li class="item">'+v.title+"</li>"});delete i.group}else{h.push(i);e+='<li class="item">'+i.title+"</li>"}});$(k.config.el).on("click",".bt_table_select_group .bt_select_value",function(x){var y=this,w=$(this).parent(),i=w.find(".bt_selects"),v=w.offset(),u=k.$get_win_area();if(w.hasClass("bt-disabled")){layer.tips(k.config.batch.disabledSelectValue,w,{tips:[1,"red"],time:2000});return false}if(w.hasClass("active")){w.removeClass("active")}else{w.addClass("active")}if(i.height()>(u[1]-v.top)){i.addClass("top")}else{i.removeClass("top")}$(document).one("click",function(){$(k.config.el).find(".bt_table_select_group").removeClass("active");return false});return false});$(k.config.el).on("click",".bt_table_select_group .item",function(u){var i=$(this).text(),v=$(this).index();$(this).addClass("active").siblings().removeClass("active");$(k.config.el+" .bt_select_tips").html(i+lan["public"].in_bulk+"<em>("+lan.site.have_been_selected+k.checkbox_list.length+")</em>");k.batch_active=h[v];if(!k.checked){$(".bt_table_select_group").removeClass("active")}});$(k.config.el).on("click",".set_batch_option",function(z){var y=[],x=k.batch_active;if($(this).hasClass("bt-disabled")){layer.tips(k.config.batch.disabledSelectValue,$(this),{tips:[1,"red"],time:2000});return false}for(var w=0;w<k.checkbox_list.length;w++){y.push(k.data[k.checkbox_list[w]])}if(JSON.stringify(x)==="{}"){var u=$(k.config.el+" .bt_table_select_group");layer.tips(lan["public"].select_opt_type,u,{tips:[1,"red"],time:2000});u.css("border","1px solid red");setTimeout(function(){u.removeAttr("style")},2000);return false}switch(typeof x.confirm){case"function":x.confirm(x,function(i,A){x.param=$.extend(x.param,i);l(x,y,A)});break;case"undefined":l(x,y);break;case"object":var v=x.confirm;bt.open({title:v.title||lan["public"].bulk_opt,area:v.area||"350px",btn:v.btn||[lan["public"].confirm,lan["public"].cancel],content:v.content,success:function(i,A){v.success(i,A,x)},yes:function(A,i){v.yes(A,i,function(B,C){x.param=$.extend(x.param,B);o(x,y)})}});break}})}r='<div class="bt_batch"><label><i class="cust—checkbox cursor-pointer checkbox_'+this.random+'" data-checkbox="all"></i><input type="checkbox" lass="cust—checkbox-input" /></label>'+(typeof t.config!="undefined"?'<button class="btn btn-default btn-sm set_batch_option bt-disabled">'+t.config.title+"</button>":'<div class="bt_table_select_group bt-disabled not-select"><span class="bt_select_value"><span class="bt_select_tips">'+lan["public"].select_opt_type+'<em></em></span><span class="glyphicon glyphicon-triangle-bottom ml5"></span></span><ul class="bt_selects ">'+e+'</ul></div><button class="btn btn-default btn-sm set_batch_option bt-disabled" >'+t.buttonValue+"</button>")+"</div>";break;case"page":this.config.page=t;var q=bt.get_cookie(this.config.cookiePrefix+"_"+this.config.page.numberParam);if(this.config.cookiePrefix&&q){this.config.page.number=q}r=this.$reader_page(this.config.page,'<div><span class="Pcurrent">1 </span><span class="Pcount">'+lan.public_backup.total+"</span></div>");break}if(r){var d=$(k.config.el+" .tootls_"+t.positon[1]);if(d.length){var m=d.find(".pull-"+t.positon[0]);m.append(r)}else{var g='<div class="tootls_group tootls_'+t.positon[1]+'"><div class="pull-left">'+(t.positon[0]=="left"?r:"")+'</div><div class="pull-right">'+(t.positon[0]=="right"?r:"")+"</div></div>";if(t.positon[1]==="top"){$(k.config.el).append(g);if($(k.config.el+" .divtable").length===0){$(k.config.el).append('<div class="divtable mtb10"></div>')}}else{if($(k.config.el+" .divtable").length===0){$(k.config.el).append('<div class="divtable mtb10"></div>')}$(k.config.el).append(g)}}}}if(!this.init){this.$event_bind(c)}},$get_data_batch_list:function(e,c){var d=[];$.each(c||this.data,function(f,g){d.push(g[e])});return d},$reader_page:function(d,h){var e=this,f=$(h),k="",c={};f.find("a").addClass("page_link_"+this.random);k+=f.html();if(d.numberStatus){var i="page_select_"+this.random;k+='<select class="page_select_number '+i+'">';$.each(d.numberList,function(l,m){k+='<option value="'+m+'" '+(d.number==m?"selected":"")+">"+m+lan.site.items_page+"</option>"});k+="</select>";c[i]={eventType:"change",type:"page_select"}}if(d.jump){var g="page_jump_input-"+this.random;var j="page_jump_btn_"+this.random;k+='<div class="page_jump_group"><span class="page_jump_title">'+lan["public"].jump_to_page+'</span><input type="number" class="page_jump_input '+g+'" value="'+d.page+'" /><span class="page_jump_title"></span><button type="button" class="page_jump_btn '+j+'">'+lan["public"].confirm+"</button></div>";c[g]={eventType:"keyup",type:"page_jump_input"};c[j]={type:"page_jump_btn"}}c["page_link_"+this.random]={type:"cut_page_number"};e.config.page.total=parseInt(f.find(".Pcount").html().match(/([0-9]*)/g)[1]);e.$event_bind(c);return'<div class="page">'+k+"</div>"},$dynamic_merge_style:function(d,c){var e="";$.each(d,function(f,g){switch(f){case"align":e+="text-align:"+g+";";break;case"width":e+="width:"+(typeof g=="string"?g:g+"px")+";";break;case"style":e+=g;break;case"minWidth":e+="min-width:"+(typeof g=="string"?g:g+"px")+";";break;case"maxWidth":e+="max-width:"+(typeof g=="string"?g:g+"px")+";";break}});return{index:c,css:e}},$event_bind:function(d){var c=this;$.each(d,function(e,f){if(c.event_list[e]&&c.event_list[e].eventType===f.eventType){return true}c.event_list[e]=f;$(c.config.el).on(f.eventType||"click","."+e,function(q){var o=$(this).parents("tr").index(),k=$(this).data(),n=[];switch(f.type){case"rows":c.event_rows_model={el:$(this),model:c.config.column[$(this).parents("td").index()],rows:c.data[o],index:o};n=[c.event_rows_model.rows,c.event_rows_model.index,q,e,c];break;case"sort":var m=c.config.column[k.index];if($(this).hasClass("sort-active")){$(".sort_"+c.random+" .sort-active").data({sort:"desc"})}$(".sort_"+c.random).removeClass("sort-active").find(".glyphicon").removeClass("glyphicon-triangle-top").addClass("glyphicon-triangle-bottom");$(this).addClass("sort-active");if(k.sort=="asc"){$(this).data({sort:"desc"});$(this).find(".glyphicon").removeClass("glyphicon-triangle-top").addClass("glyphicon-triangle-bottom")}else{$(this).data({sort:"asc"});$(this).find(".glyphicon").removeClass("glyphicon-triangle-bottom").addClass("glyphicon-triangle-top")}c.config.sort=c.config.sortParam({name:m.fid,sort:k.sort});c.$refresh_table_list(true);break;case"checkbox":var t=$(c.config.el+' [data-checkbox="all"]'),i=$(c.config.el+" tbody .checkbox_"+c.random);if(k.checkbox==undefined){if(!$(this).hasClass("active")){$(this).addClass("active");c.checkbox_list.push(o);if(c.data.length===c.checkbox_list.length){t.addClass("active").removeClass("selected")}else{if(c.checkbox_list.length>0){t.addClass("selected")}}}else{$(this).removeClass("active");c.checkbox_list.splice(c.checkbox_list.indexOf(o),1);if(c.checkbox_list.length>0){t.addClass("selected").removeClass("active")}else{t.removeClass("selected active")}}}else{if(c.checkbox_list.length===c.data.length){c.checkbox_list=[];i.removeClass("active selected").next().prop("checked","checked");t.removeClass("active")}else{i.each(function(u,v){if(!$(this).hasClass("active")){$(this).addClass("active").next().prop("checked","checked");c.checkbox_list.push(u)}});t.removeClass("selected").addClass("active")}}c.$set_batch_view();break;case"button":n.push(q,c);break;case"search_focus":var s=$(c.config.el+" .bt_search_tips");if($(c.config.el+" .bt_search_tips").length>0){s.remove()}break;case"search_input":if(q.keyCode==13){$(c.config.el+" .search_btn_"+c.random).click();return false}break;case"search_btn":var l=$(c.config.el+" .search_input"),h=$(c.config.el+" .search_input").val();c.config.search.value=h;l.append('<div class="bt_search_tips"><span>'+h+'</span><i class="bt_search_close"></i></div>');c.$refresh_table_list(true);break;case"page_select":var j=parseInt($(this).val());c.config.page.number=j;c.config.page.page=1;c.$refresh_table_list(true);return false;break;case"page_jump_input":if(q.keyCode==13){$(c.config.el+" .page_jump_btn_"+c.random).click();$(this).focus()}return false;break;case"page_jump_btn":var r=parseInt($(c.config.el+" .page_jump_input-"+c.random).val()),g=Math.ceil(c.config.page.total/c.config.page.number);if(r>g){r=c.config.page.page}c.config.page.page=r;c.$refresh_table_list(true);break;case"cut_page_number":var p=parseInt($(this).attr("href").match(/([0-9]*)$/)[0]);c.config.page.page=p;c.$refresh_table_list(true);return false;break;case"eye_open_password":if($(this).hasClass("glyphicon-eye-open")){$(this).addClass("glyphicon-eye-close").removeClass("glyphicon-eye-open");$(this).prev().text(c.data[o].password)}else{$(this).addClass("glyphicon-eye-open").removeClass("glyphicon-eye-close");$(this).prev().html("<i>**********</i>")}return false;break;case"copy_password":bt.pub.copy_pass(c.data[o].password);return false;break}if(f.event){f.event.apply(this,n)}})})},$style_bind:function(e,c){var f="",d=this;$.each(e,function(g,h){if(h.css!=""){if(!h.className){f+=d.config.el+" thead th:nth-child("+(h.index+1)+"),"+d.config.el+" tbody tr td:nth-child"+(h.span?" span":"")+"("+(h.index+1)+"){"+h.css+"}"}else{f+=h.className+"{"+h.css+"}"}}});if($("#bt_table_"+d.random).length==0){$(d.config.el).append('<style type="text/css" id="bt_table_'+d.random+'">'+f+"</style>")}},$get_win_area:function(){return[window.innerWidth,window.innerHeight]},$http:function(h){var g={},d=this.config,e=d.page,f=d.search,c=d.sort||{};if(e){g[e.numberParam]=e.number,g[e.pageParam]=e.page;if(this.config.cookiePrefix){bt.set_cookie(this.config.cookiePrefix+"_"+e.numberParam,e.number)}}if(f){g[f.searchParam]=f.value}if(this.config.beforeRequest){d.param=this.config.beforeRequest(d.param)}bt_tools.send({url:d.url,data:$.extend(d.param,g,c)},function(i){if(d.dataFilter){var j=d.dataFilter(i);if(h){h(j.data,j.page)}}else{if(h){h(i.data,i.page)}}})}};return new b(a)},select_file:function(c,d){if(typeof c==="string"){c={path:c,type:2,title:lan["public"].select_fileordir,ext:[],limit:""}}if(typeof c==="function"){type=d,d=c,c={path:bt.get_cookie("Path")}}if(typeof type!=="number"){type=0}var b=this,a={type:type,type_tips:type==0?lan["public"].dir:(type==1?lan.site.file:lan["public"].fileordir),select_list:[],select_path:bt.get_cookie("Path")||(bt.os=="Windows"?setup_path:"/www/wwwroot"),select_config:{},scroll_width:0,reader_view:function(){var e=this;this.scroll_width=a.getScrollbarWidth();layer.open({type:1,title:c.title||(lan["public"].select+e.type_tips),shadeClose:false,closeBtn:1,area:["650px","550px"],content:'<div id="select_file_style"></div><div id="select_file_directory" class="select_file_content"><div class="file_path_views"><div class="forward_path"><span class="active" title="'+lan["public"].back+'"><i class="iconfont icon-arrow-lift"></i></span><span class="active" title="'+lan["public"].next+'"><i class="iconfont icon-arrow-right"></i></span><span class="file_return_level" title="'+lan["public"]["return"]+'"><i class="iconfont icon-prev"></i></span></div><div class="file_path_input"><div class="file_path_shadow"></div><div class="file_dir_view" data-width="244"></div><input type="text" data-path="C:/BtSoft/backup" class="path_input"></div><div class="file_path_refresh" title="'+lan["public"].fresh+'"><i class="iconfont icon-shuaxin"></i></div><div class="search_path_views"><input type="text" placeholder="'+lan["public"].search_file_name+'" class="file_search_input"><button type="submit" class="path_btn"><i class="iconfont icon-search"></i></button></div></div><div class="select_file_tootls"><button type="button" class="select_btn">'+lan.bt.adddir+'</button></div><div class="select_file_body"><div class="select_mount_list not-select" id="select_mount_list"></div><div class="select_dir_list not-select"><div class="select_list_thaed"><table class="mask_thead"><thead><tr><th data-type="filename"><span>'+lan["public"].name+'</span><i class="iconfont icon-xiala"></i><i class="icon-drag"></i></th><th data-type="mtime"><span>'+lan["public"].modify_time+'</span><i class="iconfont icon-xiala"></i><i class="icon-drag"></i></th><th data-type="type" class="active"><span>'+lan.site.redirect_type+'</span><i class="iconfont icon-xiala"></i><i class="icon-drag"></i></th></tr></thead></table><div class="select_list_shadow"></div></div><div class="select_list_body"><table><thead><tr><th><span>文件</span><i></i></th><th><span>修改时间</span><i></i></th><th><span>类型</span><i></i></th></tr></thead><tbody id="select_dir_list"></tbody></table></div></div></div><div class="select_file_group"><div class="select-line"><span class="select-line-name">'+e.type_tips+'名:</span><div class="select-line-content"><input type="text" name="select_name" class="file_directory" /></div></div><div class="select_btn_group"><button class="btn btn-success btn-sm" type="button">选择'+e.type_tips+'</button><button class="btn btn-default btn-sm" type="button">取消</button></div></div></div>',success:function(){e.evnet_bind();e.render_file_list(function(){e.set_path_width()});$(".select_list_thaed").css("right",e.scroll_width+"px")}})},evnet_bind:function(){var e=this;$("#select_dir_list").on("click","tr",function(){var f=$(this).data("index");$(this).addClass("active").siblings().removeClass("active");$('[name="select_name"]').val(e.select_list[f].filename)});$(".select_list_body").on("scroll",function(h){var g=$(this).scrollTop(),f=$(this).scrollLeft();if(g>0){$(".select_list_shadow").show()}else{$(".select_list_shadow").hide()}if(f>=0){$(".select_list_thaed").css("left",(4-f)+"px")}h.stopPropagation();h.preventDefault()});$(".file_path_refresh").on("click",function(){e.render_file_list()});$(".select_dir_list thead th .icon-drag").on("mousedown",function(k){var m=k.clientX,f=$(this).parent(),h=f.index(),n=f[0].clientWidth,g=parseInt($(this).parent().attr("data-min")),l=null;if(k.which===1){var j=function(r){var p=r.clientX,q=p-m,o=n+q;l=setTimeout(function(){e.set_select_width(h,"width:"+o+"px")},0)},i=function(){$(this).unbind(j);$(this).unbind(i)};$(document).on("mousemove",j).one("mouseup",function(){$(this).unbind(j);$(this).unbind(this)})}k.stopPropagation()});$(".select_dir_list thead th>span").on("click",function(h){var g=$(this).parent(),f=g.data("type"),i=g.hasClass("active"),j=g.hasClass("sort");if(i){g.addClass("sort").removeClass("active")}else{if(j){g.addClass("active").removeClass("sort")}else{g.addClass("active")}}g.siblings().removeClass("active sort");e.render_file_list({sort:f,reverse:i?1:0});h.stopPropagation()});$(".search_path_views input").on("keyup",function(){var f=$(this).val()})},set_path_width:function(j){var e=0,h=$(".file_dir_view")[0].offsetWidth,g=$(".file_dir_view .file_dir_item"),k=[],e=0;$(".file_dir_view .file_dir_item").each(function(){k.push($(this)[0].offsetWidth)});var l=k.reverse();for(var f=0;f<l.length;f++){e+=l[f];if(h-e<=60){$(".file_dir_omit").removeClass("hide").find(".nav_down_list").html($(".file_dir_view .file_dir_item:lt("+f+")"));$(".file_dir_view .file_dir_item").show();$(".file_dir_view .file_dir_item:lt("+f+")").hide();return false}}},render_file_list:function(h,j){var f="",g="",i=this,e={path:this.select_path,sort:"type",disk:true};if(typeof h=="undefined"){h=e}if(typeof h=="function"){j=h,h=e}i.select_config=$.extend(e,h);b.send({url:"/files?action=GetDir",data:i.select_config},function(n){var o=n.DIR,k=n.FILES,m=n.DISK,l=[];$.each(k,function(p,s){var r=s.split(";"),q=r[0].split("."),t=bt.format_data(r[2]);l.push({type:"file",filename:r[0],ext:q[q.length-1],size:r[1],accept:r[3],mtime:t})});$.each(o,function(p,r){var q=r.split(";"),s=bt.format_data(q[2]);l.push({type:"dir",filename:q[0],size:q[1],accept:q[3],mtime:s})});i.select_list=l;i.render_path_list(n.PATH);$.each(m,function(q,r){var p=(r.path=="/"?"根目录":r.path.indexOf(":/")>-1?("本地磁盘("+r.path.match(/[A-Z]+/)[0])+":)":r.path);f+='<div class="item" data-menu="'+r.path+'" title="名称: '+p+"\n路径: "+r.path+"\n总容量: "+r.size[0]+"\n可用容量: "+r.size[2]+'"><span class="glyphicon glyphicon-hdd mr5"></span><span>'+p+"</span></div>"});$.each(l,function(q,s){var p=bt.format_data(s.mtime),r=(s.type=="dir"?"文件夹":"文件");g+='<tr data-index="'+q+'" title="名称:'+s.filename+"\r修改时间:"+p+"\r类型:"+r+'"> <td><span><i class="'+s.type+'-icon"></i><span>'+s.filename+"</span></span></td> <td><span>"+p+"</span></td> <td><span>"+(s.type=="dir"?"文件夹":"文件")+"</span></td> </tr>"});$("#select_mount_list").html(f);$("#select_dir_list").html(g);if(j){j(n)}})},render_path_list:function(j,m){var h='<div class="file_dir_omit hide" title="展开已隐藏的目录"><span></span><i class="iconfont icon-zhixiang-zuo"></i><div class="nav_down_list"></div></div>',f="",l=j.split("/").splice(1),k=j.split("/")[0];if(bt.os==="Windows"){if(l.length==0){l=[]}l.unshift('<span class="glyphicon glyphicon-hdd"></span><span class="ml5">本地磁盘('+k+")</span>")}else{if(j=="/"){l=[]}l.unshift("根目录")}for(var g=0;g<l.length;g++){f+="/"+l[g];if(g==0){f=""}h+='<div class="file_dir_item"> <span class="file_dir" title="'+(k+f)+'">'+l[g]+'</span> <i class="iconfont icon-arrow-right"></i> <ul class="nav_down_list"> <li data-path="*"><span>加载中</span></li> </ul> </div>'}$(".path_input").val("").attr("data-path",j);var e=$("#select_file_directory .file_path_input .file_dir_view");e.html(h);if(m){m(j)}},set_select_width:function(h,g){var i=this,f=".select_dir_list tbody td:nth-child("+(h+1)+")>span,.select_dir_list thead th:nth-child("+(h+1)+")>span",e=$("#th-index-"+h);if(e.length>0){e.html(f+"{"+g+"}")}else{$("#select_file_style").append('<style type="text/css" id="th-index-'+h+'">'+f+"{"+g+"}</style>")}},cut_style_object:function(f){var e={},g=f.split(";");return e},getScrollbarWidth:function(){var h=document.createElement("div"),g={width:"100px",height:"100px",overflowY:"scroll"},e,f;for(e in g){h.style[e]=g[e]}document.body.appendChild(h);f=h.offsetWidth-h.clientWidth;h.remove();return f}};a.reader_view()},form:function(a){var b=this;function c(d){this.config=d;this.data=d.data||{};this.$load()}c.prototype={element:null,style_list:[],event_list:{},event_type:["click","event","focus","keyup","blur","change"],hide_list:[],form_element:{},form_config:{},random:bt.get_random(5),$load:function(){var d=this;if(d.el){this.$reader_content(function(){d.$event_bind()})}},$reader_content:function(h){var g=this,f="",e="",d={};$.each(g.config.form,function(i,j){f+=g.$reader_content_row(i,j)});g.element=$('<form class="bt-form" data-form="'+g.random+'">'+f+"</form>");e=$('<div class="'+b.$verify(g.config["class"])+'"></div>');e.append(g.element);if(h){h()}return e[0].outerHTML},$reader_content_row:function(f,h){var g=this,e=h.help,d=this.config.formLabelWidth||h.formLabelWidth;return'<div class="line'+b.$verify(h["class"])+b.$verify(h.hide,"hide",true)+'"'+b.$verify(h.id,"id")+">"+(h.label?'<span class="tname" '+(d?'style="width:'+d+'"':"")+">"+h.label+"</span>":"")+'<div class="'+(h.label?"info-r":"")+b.$verify(h.line_class)+'"'+b.$verify(g.$reader_style($.extend(h.style,d?{"margin-left":d}:{})),"style")+">"+g.$reader_form_element(h.group,f)+(e?('<div class="c9 mt5 '+b.$verify(e["class"],"class")+'" '+b.$verify(g.$reader_style(e.style),"style")+">"+e.list.join("</br>")+"</div>"):"")+"</div></div>"},$reader_form_element:function(g,d){var f=this,e="";if(!Array.isArray(g)){g=[g]}$.each(g,function(h,i){i.find_index=d;e+=f.$reader_form_find(i);f.form_config[i.name]=i});return e},$reader_form_element:function(i,f){var h=this,e=[],g="",d={};if(!Array.isArray(i)){i=[i]}$.each(i,function(q,r){var j=h.$reader_style(r.style)+b.$verify(r.width,"width","style"),k=h.$verify_group(r,["name","value","placeholder","disabled","readonly","autofocus","autocomplete","min","max"]),s=h.$create_event_config(r),o="";g+=r.label?'<span class="mr5">'+r.label+"</span>":"";if(typeof r.name!=="undefined"){d[r.name]=s}switch(r.type){case"text":case"checkbox":case"password":case"radio":case"number":var m="event_"+r.name+"_"+h.random,n=r.type==="checkbox"?true:false;if(r.type==="radio"){$.each(r.label_tips,function(u,t){if(r.block){g+='<div class="block '+(r.block_class?r.block_class:"")+'">'}g+='<input type="'+r.type+'"'+k+" "+(r.icon?'id="'+m+'"':"")+' class="bt-input-'+(r.type!="select_path"?r.type:"text")+" mr10 "+(r.label?"form_middle":"")+b.$verify(r["class"],"class")+'"'+b.$verify(j,"style")+" "+(n?'id="'+h.random+"_"+r.name+'"':"")+" "+(u==0?"checked":"")+' id="'+h.random+"_"+r.name+u+'"/>';g+='<label for="'+h.random+"_"+r.name+u+'">'+t+"</label>";if(r.block){g+="</div>"}})}else{if(r.block){g+='<div class="block '+(r.hide?"hide":"")+" "+(r.block_class?r.block_class:"")+'">'}g+='<input type="'+r.type+'"'+k+" "+(r.icon?'id="'+m+'"':"")+' class="bt-input-'+(r.type!="select_path"?r.type:"text")+" mr10 "+m+(r.label?"form_middle":"")+b.$verify(r["class"],"class")+'"'+b.$verify(j,"style")+" "+(n?'id="'+h.random+"_"+r.name+'"':"")+"/>";if(r.type=="checkbox"){g+='<label for="'+h.random+"_"+r.name+'">'+r.label_tips+"</label>"}if(r.block){g+="</div>"}h.event_list[m]={click:{event:r.event}}}if(r.icon){g+='<span class="glyphicon '+r.icon.type+" "+r.name+'_icon cursor" '+b.$verify(h.$reader_style(r.icon.style),"style")+"></span>";d[r.name+"_icon"]={click:{type:"select_path",config:r}}}break;case"textarea":g+='<textarea class="bt-input-text"'+b.$verify(j,"style")+k+" >"+(r.value||"")+"</textarea>";$.each(["blur","focus","input"],function(u,t){if(r.tips){var v=null;switch(t){case"blur":v=function(x,w){if($(this).val()===""){$(this).next().show()}layer.close(w.tips.loadT)};break;case"focus":v=function(x,w){$(this).next().hide();w.tips.loadT=layer.tips(p,$(this),{tips:[1,"#20a53a"],time:0,area:$(this).width()})};break}}d[r.name][t]?(d[r.name][t]["added"]=v):(d[r.name][t]={type:r.type,cust:false,event:r[t],added:v})});if(r.tips){var p="";if(typeof r.tips.list==="undefined"){p=r.tips.text}else{p=r.tips.list.join("</br>")}g+='<div class="placeholder c9 '+r.name+'_tips" '+b.$verify(h.$reader_style(r.tips.style),"style")+">"+p+"</div>";d[r.name+"_tips"]={click:{type:"textarea_tips",config:r}}}break;case"select":g+=h.$reader_select(r,j,k,f);h.event_list.custom_select={click:{type:"custom_select",children:".bt_select_value"}};h.event_list.custom_select_item={click:{type:"custom_select_item",children:"li.item"}};break;case"link":o="event_"+bt.get_random(6);g+='<a href="'+(r.href||"javascript:;")+'" class="btlink offsetY7'+b.$verify(r["class"],"class")+" "+o+'" '+b.$verify(h.$reader_style(r.style),"style")+">"+r.title+"</a>";h.event_list[o]={click:{type:"link_event",event:r.event}};break;case"help":var l="";$.each(r.list,function(u,t){l+="<li>"+t+"</li>"});g+='<ul class="help-info-text c7'+b.$verify(r["class"])+'"'+b.$verify(h.$reader_style(r.style),"style")+">"+l+"</ul>";break}h.form_config[r.name]=r});$.extend(h.event_list,d);return g},$create_event_config:function(e){var d={};if(typeof e.name==="undefined"){return{}}$.each(this.event_type,function(g,f){if(e[f]){d[(f==="event"?"click":f)]={type:e.type,event:e[f],cust:(["select","checkbox","radio"].indexOf(e.type)>-1?true:false),config:e}}});return d},$reader_style:function(e){var d="";if(typeof e==="string"){return e}if(typeof e==="undefined"){return""}$.each(e,function(f,g){d+=f+":"+g+";"});return d},$local_refresh:function(e,d){this.element.find("[data-name="+e+"]").replaceWith(this.$reader_form_find(d))},$reader_select:function(l,d,e,j){var i=this,k="",h="",g={};if(!Array.isArray(l.list)){var f=l.list;bt_tools.send({url:f.url,data:f.param||{}},function(m){if(m.status!==false){l.list=l.list.dataFilter?l.list.dataFilter(m):m;i.$replace_render_content(j)}else{bt.msg(m)}})}$.each(l.list,function(n,m){try{if(m.value===l.value){g=m}else{g=l.list[0]}}catch(o){}k+='<li class="item'+b.$verify(m.value===g.value?"active":"")+" "+(m.disabled?"disabled":"")+'">'+m.title+"</li>";h+='<option value="'+m.value+'"'+(m.disabled?"disabled":"")+" "+b.$verify(m.value===g.value?"selectd":"")+">"+m.title+"</option>"});if(!g.title&&Array.isArray(l.list)){g=l.list[0]}return'<div class="bt_select_updown mr10 '+(l.disabled?"bt-disabled":"")+" "+b.$verify(l.hide,"hide",true)+b.$verify(l["class"])+'" '+b.$verify(d,"style")+' data-name="'+l.name+'"><span class="bt_select_value"><span class="bt_select_content">'+(g.title||"Getting data...")+'</span><span class="glyphicon glyphicon-triangle-bottom ml5"></span></span><ul class="bt_select_list">'+(k||"")+"</ul><select"+e+' class="hide" '+(l.disabled?"disabled":"")+">"+(h||"")+"</select></div>"},$replace_render_content:function(e){var f=this,d=this.config.form[e];$("[data-form="+f.random+"]").find(".line:eq("+e+")").replaceWith(f.$reader_content_row(e,d))},$event_bind:function(f,g){var e=this,d={};e.element=$(typeof f==="object"?e.element:("[data-form="+e.random+"]"));if(typeof f==="undefined"){d=e.event_list}console.log(d);$.each(d,function(h,i){if($.isEmptyObject(i)){return true}$.each(i,function(l,j){var k="";if(typeof j.cust==="boolean"){k="["+(j.cust?"data-":"")+"name="+h+"]"}else{k="."+h}(function(m,n){if(m.onEvent===false){switch(m.type){case"input_checked":$(k).on(l!="event"?l:"click",function(o){m.event.apply(this,[o,e])});break}return true}else{e.element.on(l!="event"?l:"click",m.children?m.children:k,function(s){var r=e.$get_form_element(true),t=e.$get_form_value(),p=e.form_config[n];switch(m.type){case"textarea_tips":$(this).hide().prev().focus();break;case"custom_select":if($(this).parent().hasClass("bt-disabled")){return false}var o=$(this).next();if(!o.hasClass("show")){$(".bt_select_list").removeClass("show");o.addClass("show")}else{o.removeClass("show")}$(document).click(function(){e.element.find(".bt_select_list").removeClass("show");$(this).unbind("click");return false});return false;break;case"custom_select_item":p=e.form_config[$(this).parents(".bt_select_updown").attr("data-name")],item_config=p.list[$(this).index()];if($(this).hasClass("disabled")){$(this).parent().removeClass("show");if(item_config.tips){layer.msg(item_config.tips,{icon:2})}return true}if(!$(this).hasClass("active")&&!$(this).hasClass("disabled")){$(this).parent().prev().find(".bt_select_content").text($(this).text());$(this).addClass("active").siblings().removeClass("active");$(this).parent().next().val(item_config.value.toString());$(this).parent().removeClass("show");$(this).parent().next().trigger("change")}break;case"select_path":bt.select_path("event_"+$(this).prev().attr("name")+"_"+e.random,m.config.icon.select||"");break;case"checkbox":var q=$(this).is(":checked");if(q){$(this).prev().addClass("active")}else{$(this).prev().removeClass("active")}break}if(m.event){m.event.apply(this,[t,r,e,p,s])}if(m.added){m.added.apply(this,[s,p,r])}})}}(j,h))})});if(g){g()}},$get_form_value:function(){return this.element.serializeObject()},$set_find_value:function(e,g){var d={},f=this;typeof e!="string"?d=e:d[e]=g;$.each(d,function(h,i){f.form_element[h].val(i)})},$get_form_element:function(f){var e={},d=this;if(f||$.isEmptyObject(d.form_element)){this.element.find(":input").each(function(g){e[$(this).attr("name")]=$(this)});d.form_element=e;return e}else{return d.form_element}},$verify_group:function(d,f){var e=this,g="";$.each(f,function(h,i){if(typeof d[i]==="undefined"){return true}if(["disabled","readonly"].indexOf(i)>-1){g+=" "+(d[i]?(i+'="'+i+'"'):"")}else{g+=" "+i+'="'+d[i]+'"'}});return g},$verify_bind_event:function(e,g,f){var d={};$.each(f,function(i,h){var j=g[h];if(j){if(typeof d[e]==="object"){if(!Array.isArray(d[e])){d[e]=[d[e]]}d[e].push({event:j,eventType:h})}else{d[e]={event:j,eventType:h}}}});return d},$verify:function(f,d,e){if(!f){return""}if(e===true){return f?" "+d:""}if(e==="style"){return d?d+":"+f+";":f}return d?" "+d+'="'+f+'"':" "+f},$verify_form:function(){var k={},e=this.config.form,j=this.$get_form_value(),g=this.$get_form_element(true);for(var m=0;m<e.length;m++){var n=e[m];if(!Array.isArray(n.group)){n.group=[n.group]}for(var f=0;f<n.group.length;f++){var h=n.group[f],d=h.name;if(h.type==="help"){continue}if(typeof h.verify!="undefined"){var l=h.verify(j[d],g[d],h,true);if(l===false&&j[d]!==false){return false}k[d]=l}else{k[d]=j[d]}}}return k},$submit:function(f,g,d){var e=this.$verify_form();if(typeof f==="function"){d=g,g=f,f={}}if(!e){return false}e=$.extend(e,f);if(typeof this.config.url=="undefined"){bt_tools.msg("Request Submission address cannot be empty?",false);return false}bt_tools.send({url:this.config.url,data:e},function(h){if(g){g(h,e)}else{bt_tools.msg(h)}},(d||"Submit"))}};return new c(a)},tab:function(a){var b=this;function c(d){this.config=d;this.theme=this.config.theme||{};this.$load()}c.prototype={type:1,theme_list:[{content:"tab-body",nav:"tab-nav",body:"tab-con",active:"on"},{content:"bt-w-body",nav:"bt-w-menu",body:"bt-w-con"}],random:bt.get_random(5),$init:function(){var f=this,g=this.config.active,e=f.config.list,d={};this.$event_bind();if(e[f.active].success){e[f.active].success()}e[f.active]["init"]=true},$load:function(){var d=this},$reader_content:function(){var i=this,f=i.config.list,h="",g="",e=i.theme,d=i.config;if(typeof i.active==="undefined"){i.active=0}if(!$.isEmptyObject(d.theme)){e=this.theme_list[i.active];$.each(d.theme,function(j,k){if(e[j]){e[j]+=" "+k}});i.theme=e}if(d.type&&$.isEmptyObject(d.theme)){this.theme=this.theme_list[i.active]}$.each(f,function(k,l){var m=(i.active===k?true:false),j=e.active||"active";h+='<span class="'+(m?j:"")+'">'+l.title+"</span>";g+='<div class="tab-block '+(m?j:"")+'">'+(m?l.content:"")+"</div>"});i.element=$('<div id="tab_'+i.random+'" class="'+e.content+b.$verify(i.config["class"])+'"><div class="'+e.nav+'" >'+h+'</div><div class="'+e.body+'">'+g+"</div></div>");return i.element[0].outerHTML},$reader_find:function(){},$event_bind:function(){var e=this,d=e.theme,f=d.active||"active";if(!e.el){e.element=$("#tab_"+e.random)}e.element.on("click",("."+d.nav.replace(/\s+/g,".")+" span"),function(){var h=$(this).index(),g=e.config.list[h];$(this).addClass(f).siblings().removeClass(f);$("."+d.body+">div:eq("+h+")").addClass(f).siblings().removeClass(f);e.active=h;if(!g.init){$("."+d.body+">div:eq("+h+")").html(g.content);if(g.success){g.success()}g.init=true}})}};return new c(a)},load:function(b){var a=layer.msg(b+",please wait...",{icon:16,time:0,shade:0.3});if(b===true){a=layer.load()}return{close:function(){layer.close(a)}}},open:function(a){var d={},c=null,b=null;d=$.extend({type:1,area:"640px",closeBtn:2,btn:["Yes","No"]},a);if(typeof d.content=="object"){var e=d.content;b=bt_tools.form(e);d.success=function(f,g){b.$event_bind();if(typeof d.init!="undefined"){d.init(f,g)}};d.yes=function(i,f){var g=b.$verify_form();if(!g){return false}if(typeof a.yes!="undefined"){var h=a.yes.apply(b,[g,i,f]);if(!h){return false}}};d.content=b.$reader_content()}c=layer.open(d);return{close:function(){layer.close(c)},form:b}},msg:function(e,c){var b=null,d="",a={};if(typeof e==="object"){if(typeof e.status==="boolean"){d=e.msg,a={icon:e.status?1:2}}}if(typeof e==="string"){d=e,a={icon:typeof c!=="undefined"?c:1}}b=layer.msg(d,a);return{close:function(){layer.close(b)}}},$verify:function(c,a,b){if(!c){return""}if(b===true){return c?" "+a:""}if(b==="style"){return a?a+":"+c+";":c}return a?" "+a+'="'+c+'"':" "+c},select_path:function(a,f,d,b){if(typeof d!=="number"){d=1}if(typeof b!=="number"){b=false}bt.set_cookie("Path","/www/server/panel/BTPanel/static");var e=this,c={type:d,type_tips:d==0?"目录":(d==1?"文件":"目录或文件"),type_limit:d==0?"dir":(d==1?"file":"all"),select_list:[],select_path:bt.get_cookie("Path")||(bt.os=="Windows"?setup_path:"/www/wwwroot"),select_config:{},scroll_width:0,file_path:bt.get_cookie("Path"),file_operating:[],area:[window.innerWidth,window.innerHeight],reader_view:function(){var g=this;this.scroll_width=c.getScrollbarWidth();layer.open({type:1,title:a.title||("选择"+g.type_tips),shadeClose:false,closeBtn:2,area:["650px","555px"],content:'<div id="select_file_style"></div> <div id="select_file_directory" class="select_file_content"> <div class="file_path_views"> <div class="forward_path"> <span title="后退"><i class="iconfont icon-arrow-lift"></i></span> <span title="前进" class="active"><i class="iconfont icon-arrow-right"></i></span> <span class="file_return_level" title="上一层"><i class="iconfont icon-prev"></i></span> </div> <div class="file_path_input"> <div class="file_path_shadow"></div> <div class="file_dir_view" data-width="244"></div> <input type="text" data-path="C:/BtSoft/backup" class="path_input"> </div> <div class="file_path_refresh" title="刷新列表"><i class="iconfont icon-shuaxin"></i></div> <div class="search_path_views"> <input type="text" placeholder="搜索文件名" class="file_search_input"> <div class="search_dir_all" style="display: none;"> <input type="checkbox" style="display:none;"/> <span class="file_check" data-type="all" data-checkbox="0"></span> <span>包含子目录</span> </div> <button type="submit" class="path_btn"><i class="iconfont icon-search"></i></button> </div> </div> <div class="select_file_tootls"><button type="button" class="creat_dir">新建文件夹</button></div> <div class="select_file_body"> <div class="select_mount_list not-select" id="select_mount_list"></div> <div class="select_dir_list not-select"> <div class="select_list_thaed"> <table class="mask_thead"> <thead><tr><th data-type="filename"><span>名称</span><i class="iconfont icon-xiala"></i><i class="icon-drag"></i></th><th data-type="mtime"><span>修改时间</span><i class="iconfont icon-xiala"></i><i class="icon-drag"></i></th><th data-type="type" class="active"><span>类型</span><i class="iconfont icon-xiala"></i><i class="icon-drag"></i></th></tr></thead> </table> <div class="select_list_shadow"></div> </div> <div class="select_list_body"> <table> <thead><tr><th><span>文件</span><i></i></th><th><span>修改时间</span><i></i></th><th><span>类型</span><i></i></th></tr></thead> <tbody id="select_dir_list"></tbody> </table> </div> </div> </div> <div class="select_file_group"> <div class="select-line"> <span class="select-line-name">'+g.type_tips+'名:</span> <div class="select-line-content"> <input type="text" name="select_name" class="file_directory" /> </div> </div> <div class="select_btn_group"> <button class="btn btn-success btn-sm" type="button">选择'+(g.type_tips=="目录或文件"?"":g.type_tips)+'</button> <button class="btn btn-default btn-sm" type="button">取消</button> </div> </div> </div>',success:function(){g.render_file_list();$(".select_list_thaed").css("right",g.scroll_width+"px")}})},render_file_list:function(j,l){var h="",i="",k=this,g={path:this.select_path,sort:"type",disk:true};if(typeof j=="undefined"){j=g}if(typeof j=="function"){l=j,j=g}k.select_config=$.extend(g,j);e.$http("GetDir",k.select_config,function(n){var m=n.DISK,o=$.merge(k.data_reconstruction(n.DIR,"DIR"),k.data_reconstruction(n.FILES));k.select_list=o;k.render_path_list();$.each(m,function(q,r){var p=(r.path=="/"?"根目录":r.path.indexOf(":/")>-1?("本地磁盘("+r.path.match(/[A-Z]+/)[0])+":)":r.path);h+='<div class="item" data-menu="'+r.path+'" title="名称: '+p+"\n路径: "+r.path+"\n总容量: "+r.size[0]+"\n可用容量: "+r.size[2]+'"><span class="glyphicon glyphicon-hdd mr5"></span><span>'+p+"</span></div>"});$.each(o,function(q,s){if((k.type==0)&&s.type!=k.type_limit){return true}var p=bt.format_data(s.mtime),r=(s.type=="dir"?"文件夹":"文件");i+='<tr data-index="'+q+'" title="名称:'+s.filename+"\r修改时间:"+p+"\r类型:"+r+'" data-path="'+s.filename+'" data-type="'+s.type+'"> <td><span><i class="'+s.type+'-icon"></i><span>'+s.filename+"</span></span></td> <td><span>"+p+"</span></td> <td><span>"+(s.type=="dir"?"文件夹":"文件")+"</span></td> </tr>"});$("#select_mount_list").html(h);$("#select_dir_list").html(i);if(l){l(n)}})},data_reconstruction:function(i,h,j){if(i.length<1){return[]}var g=[];$.each(i,function(k,n){var l=n.split(";"),o="",p=l[0].split("."),m=p[p.length-1];switch(l[0]){case".user.ini":o="PS: PHP用户配置文件(防跨站)!";break;case".htaccess":o="PS: Apache用户配置文件(伪静态)";break;case"swap":o="PS: 宝塔默认设置的SWAP交换分区文件";break}if(l[0].indexOf("Recycle_bin")!=-1){o="PS: 回收站目录,勿动!"}if(l[0].indexOf(".upload.tmp")!=-1){o="PS: 宝塔文件上传临时文件,重新上传从断点续传,可删除"}g.push({caret:l[8]=="1"?true:false,down_id:l[9],ext:(h=="DIR"?"":m),filename:l[0],mtime:l[2],ps:o||l[10],size:l[1],type:h=="DIR"?"dir":"file",user:l[3],root_level:l[4]})});return g},render_path_list:function(o){var n=this,k='<div class="file_dir_omit hide" title="展开已隐藏的目录"><span></span><i class="iconfont icon-zhixiang-zuo"></i><div class="nav_down_list"></div></div>',h="",m=this.file_path.split("/").splice(1),l=this.file_path.split("/")[0];if(bt.os==="Windows"){if(m.length==0){m=[]}m.unshift('<span class="glyphicon glyphicon-hdd"></span><span class="ml5">本地磁盘('+l+")</span>")}else{if(this.file_path=="/"){m=[]}m.unshift("根目录")}for(var j=0;j<m.length;j++){h+="/"+m[j];if(j==0){h=""}k+='<div class="file_dir_item"> <span class="file_dir" title="'+(l+h)+'">'+m[j]+'</span> <i class="iconfont icon-arrow-right"></i> <ul class="nav_down_list"> <li data-path="*"><span>加载中</span></li> </ul> </div>'}$(".path_input").val("").attr("data-path",this.file_path);var g=$(".file_path_input .file_dir_view");g.html(k);g.attr("data-width",g.width());n.set_dir_view_resize()},set_select_width:function(j,i){var k=this,h=".select_dir_list tbody td:nth-child("+(j+1)+")>span,.select_dir_list thead th:nth-child("+(j+1)+")>span",g=$("#th-index-"+j);if(g.length>0){g.html(h+"{"+i+"}")}else{$("#select_file_style").append('<style type="text/css" id="th-index-'+j+'">'+h+"{"+i+"}</style>")}},cut_style_object:function(h){var g={},i=h.split(";");console.log(i);return g},getScrollbarWidth:function(){var k=document.createElement("div"),j={width:"100px",height:"100px",overflowY:"scroll"},g,h;for(g in j){k.style[g]=j[g]}document.body.appendChild(k);h=k.offsetWidth-k.clientWidth;k.remove();return h},set_dir_view_resize:function(){var i=$(".file_path_input"),g=$(".file_path_input .file_dir_view"),k=g.attr("data-width"),j=null;if(k){parseInt(k)}else{k=g.width();g.attr("data-width",k)}if(g.width()-k<90){var h=0;$($(".file_path_input .file_dir_view .file_dir_item").toArray().reverse()).each(function(){var l=0;if(!$(this).attr("data-width")){$(this).attr("data-width",$(this).width());l=$(this).width()}else{l=parseInt($(this).attr("data-width"))}h+=l;if((i.width()-h)<=90){$(this).addClass("hide")}else{$(this).removeClass("hide")}})}var j=g.children(".file_dir_item.hide").clone(true);if(g.children(".file_dir_item.hide").length==0){i.removeClass("active").find(".file_dir_omit").addClass("hide")}else{j.each(function(){if($(this).find(".glyphicon-hdd").length==0){$(this).find(".file_dir").before('<span class="file_dir_icon"></span>')}});i.addClass("active").find(".file_dir_omit").removeClass("hide");i.find(".file_dir_omit .nav_down_list").empty().append(j);i.find(".file_dir_omit .nav_down_list .file_dir_item").removeClass("hide")}},reader_file_list:function(h,k){var j=this,g="",i="";if(typeof h==="function"){k=h,h={is_operating:false}}if(typeof h==="undefined"){h={is_operating:false}}if(b){layer.msg("只能在该目录下操作",{icon:2});return false}this.loadT=bt.load("正在获取文件列表,请稍候...");this.file_images_list=[];j.get_dir_list(h,function(n){j.loadT.close();j.file_list=$.merge(j.data_reconstruction(n.DIR,"DIR"),j.data_reconstruction(n.FILES));j.file_path=n.PATH;j.is_recycle=n.FILE_RECYCLE;j.file_store_list=n.STORE;bt.set_cookie("Path",n.PATH);var m="",p="",q=n.DISK,r=j.file_list;j.select_list=j.file_list;j.render_path_list();$.each(q,function(t,u){var s=(u.path=="/"?"根目录":u.path.indexOf(":/")>-1?("本地磁盘("+u.path.match(/[A-Z]+/)[0])+":)":u.path);m+='<div class="item" data-menu="'+u.path+'" title="名称: '+s+"\n路径: "+u.path+"\n总容量: "+u.size[0]+"\n可用容量: "+u.size[2]+'"><span class="glyphicon glyphicon-hdd mr5"></span><span>'+s+"</span></div>"});$.each(r,function(t,v){if((j.type==0)&&v.type!=j.type_limit){return true}var s=bt.format_data(v.mtime),u=(v.type=="dir"?"文件夹":"文件");p+='<tr data-index="'+t+'" title="名称:'+v.filename+"\r修改时间:"+s+"\r类型:"+u+'" data-path="'+v.filename+'" data-type="'+v.type+'"> <td><span><i class="'+v.type+'-icon"></i><span>'+v.filename+"</span></span></td> <td><span>"+s+"</span></td> <td><span>"+(v.type=="dir"?"文件夹":"文件")+"</span></td> </tr>"});$("#select_mount_list").html(m);$("#select_dir_list").html(p);var o=n.PATH.lastIndexOf("/"),l=n.PATH.substring(o+1,n.PATH.length);if(k){k(rdata)}})},reader_file_list_content:function(i,k){var g="",j=this,h=0;$.each(i,function(l,n){var m=n.filename+n.ps;j.file_list[l]=n=j.$file_data_dispose(n);j.file_list[l]["only_index"]=l;if(n.filename.indexOf("Recycle_bin")){_tips="PS: 回收站目录,勿动!"}if(m.length>20){m=m.substring(0,20)+"..."}if(bt.check_chinese(m)&&m.length>10){m=m.substring(0,10)+"..."}g+='<div class="file_tr" data-index="'+l+'"><div class="file_td file_checkbox"><div class="file_check"></div></div><div class="file_td file_name"><div class="file_ico_type"><i class="file_icon '+(n.type=="dir"?"file_folder":(n.ext==""?"":"file_"+n.ext))+'"></i></div><span class="file_title file_'+n.type+'_status" title="'+j.file_path+"/"+n.filename+'"><i>'+n.filename+n.ps+"</i></span>"+(n.caret?'<span class="iconfont icon-favorites" style="'+(n.down_id?"right:30px":"")+'" title="文件已收藏,点击取消"></span>':"")+(n.down_id?'<span class="iconfont icon-share1" title="文件已分享,点击查看信息"></span>':"")+'</div><div class="file_td file_type"><span title="'+n.type_tips+'">'+n.type_tips+'</span></div><div class="file_td file_size"><span>'+(n.type=="dir"?'<a class="btlink folder_size" href="javascript:;" data-path="'+(j.file_path+"/"+n.filename)+'">点击计算</a>':bt.format_size(n.size))+'</span></div><div class="file_td file_mtime"><span>'+bt.format_data(n.mtime)+"</span></div></div>";if(n.type=="dir"){h++}if(n.ispreview){j.file_images_list.push(n.path);if(typeof n.images_id){n.images_id=j.file_images_list.length-1}}});$(".file_list_content").html(g);if(k){k({is_dir_num:h})}},$file_data_dispose:function(g){var h={languages:null,model:null};return $.extend(g,{only_id:bt.get_random(10),type_tips:g.type==="dir"?"文件夹":this.ext_type_tips(g.ext),open_type:this.determine_file_type(g.ext),languages:h.languages,path:g.path||this.path_resolve(this.file_path,g.filename),model:h.model})},path_resolve:function(j,i){var h="",g="";if(!Array.isArray(i)){i=[i]}j.replace(/([\/|\/]*)$/,function(k){g=k;return"www"});$.each(i,function(k,l){h+="/"+l});return j+h},$get_file_model:function(k){var h=this.vscode_editor.config;for(languages in h.supportedModes){var i=h.supportedModes[languages];for(var g=0;g<i[0].length;g++){console.log(k.ext,i[0][g]);if(k.ext===i[0][g]){return{languages:languages,model:i[1]}}}}return{languages:"text",model:"Text"}},render_file_disk_list:function(){var h=this,g="";h.get_disk_list(function(i){$.each(i,function(j,k){g+='<div class="nav_btn" data-menu="'+k.path+'"><span class="glyphicon glyphicon-hdd"></span><span>'+(k.path=="/"?"根目录":k.path)+" ("+k.size[2]+")</span></div>"});$(".mount_disk_list").html(g)})},determine_file_type:function(j,i){var g={images:["jpg","jpeg","png","bmp","gif","tiff","ico"],compress:["zip","rar","gz","war","tgz"],video:["mp4","mpeg","mpg","mov","avi","webm","mkv"],ont_text:["iso","xlsx","xsl","doc","docx","tiff","exe","so","7z","bz","dmg","apk"]},h=false;if(i!=undefined){if(i=="text"){$.each(g,function(k,l){$.each(l,function(n,m){if(m==j){h=true;return false}})});h=!h}else{if(typeof g[i]=="undefined"){return false}$.each(g[i],function(k,l){if(l==j){h=true;return false}})}}else{$.each(g,function(k,l){$.each(l,function(n,m){if(m==j){h=k;return false}})});if(typeof h=="boolean"){h="text"}}return h},render_file_groud_menu:function(l,g){var j=this,k=$(g).data("index"),h=j.file_list[k],o=[["open","打开"],["split",""],["download","下载"],["share","分享目录/文件"],["cancel_share","取消分享"],["favorites","收藏目录/文件"],["cancel_favorites","取消收藏"],["split",""],["dir_kill","目录查杀"],["authority","权限"],["split",""],["copy","复制"],["shear","剪切"],["rename","重命名"],["del","删除"],["split",""],["killing","创建压缩",[["gzip","tar.gz (推荐)"],["zip","zip (通用格式)"],["rar","rar (中文兼容较好)"]]],["unzip","解压",[["local","解压到当前"],["folad","解压到当前"]]]],n=["zip","rar","gz","war","tgz","bz2"],m=0;if(h.type=="dir"){o.splice(2,1);m++}if(h.down_id!==0){o.splice(3-m,1);m++}else{o.splice(4-m,1);o[3-m][1]=(h.type=="dir"?"分享目录":"分享文件");m++}if(h.caret!==false){o.splice((5-m),1);m++}else{o.splice((6-m),1);o[5-m][1]=(h.type=="dir"?"收藏目录":"收藏文件");m++}if(h.ext!="php"&&h.type!="dir"){o.splice((8-m),1);m++}var i=0;$.each(n,function(p,q){if(q==h.ext){i++}});if(i==0){o.splice((17-m),1);m++}j.reader_menu_list({el:$(".selection_right_menu"),ev:l,data:h,list:o})},render_file_all_menu:function(i,h){var k=this,j=[["refresh","刷新"],["split",""],["upload","上传"],["create","新建文件夹/文件",[["create_dir","新建文件夹"],["create_files","新建文件"]]],["split",""],["paste","粘贴"]],g=0;if(!bt.get_storage("session","copy_path")){j.splice(5,1);g++}k.reader_menu_list({el:$(".selection_right_menu"),ev:i,data:{},list:j})},get_dir_list:function(h,j,g){var i=this;if(typeof j==="boolean"){g=j,j=null}e.$http("GetDir",$.extend({disk:true,path:i.file_path,sort:bt.get_cookie("files_sort")||"type"},h),j,g)},retrun_prev_path:function(g){var h=g.split("/");h.splice(h.length-1);return h.join("/")},reader_menu_list:function(h){var l=this,j=h.el.find("ul"),i=j.height(),g=j.width(),k=h.ev.clientX-((this.area[0]-h.ev.clientX)<g?g:0);j.empty();$.each(h.list,function(o,p){var m=null,n=null;if(p[0]=="split"){j.append('<li class="separate"></li>')}else{if(Array.isArray(p[2])){m=$('<div class="file_menu_down"><span class="glyphicon glyphicon-triangle-right" aria-hidden="true"></span><ul class="set_group"></ul></div>');n=m.find(".set_group");$.each(p[2],function(r,q){n.append($('<li><i class="file_menu_icon '+q[0]+'_file_icon"></i><span>'+q[1]+"</span></li>").on("click",{type:q[0],data:h.data},function(s){l.file_groud_event($.extend(s.data.data,{open:s.data.type,index:parseInt($(h.ev.currentTarget).data("index")),element:h.ev.currentTarget,type_tips:p.type?"文件夹":"文件"}));h.el.removeAttr("style");s.stopPropagation();s.preventDefault()}))})}j.append($('<li><i class="file_menu_icon '+p[0]+"_file_icon "+(function(q){switch(q){case"share":case"cancel_share":return"iconfont icon-share";break;case"dir_kill":return"iconfont icon-dir_kill";break;case"authority":return"iconfont icon-authority";break}return""}(p[0]))+'"></i><span>'+p[1]+"</span></li>").append(m).on("click",{type:p[0],data:h.data},function(q){l.file_groud_event($.extend(q.data.data,{open:q.data.type,index:parseInt($(h.ev.currentTarget).data("index")),element:h.ev.currentTarget,type_tips:p.type?"文件夹":"文件"}));h.el.removeAttr("style");q.stopPropagation();q.preventDefault()}))}});h.el.css({left:k,top:h.ev.clientY-((this.area[1]-h.ev.clientY)<i?i:0)}).removeClass("left_menu right_menu").addClass(this.area[0]-(k+g)<230?"left_menu":"right_menu");$(document).one("click",function(m){$(h.ev.currentTarget).removeClass("selected");h.el.removeAttr("style");m.stopPropagation();m.preventDefault()})},ext_type_tips:function(h){var g={ai:"Adobe Illustrator格式图形",apk:"安卓安装包",asp:"动态网页文件",bat:"批处理文件",bin:"二进制文件",bas:"BASIC源文件",bak:"备份文件",css:"CSS样式表",cad:"备份文件",cxx:"C++源代码文件",crt:"认证文件",cpp:"C++代码文件",conf:"配置文件",dat:"数据文件",der:"认证文件",doc:"Microsoft Office Word 97-2003 文档",docx:"Microsoft Office Word 2007 文档",exe:"程序应用",gif:"图形文件",go:"Go语言源文件",htm:"超文本文档",html:"超文本文档",ico:"图形文件",java:"Java源文件",jsp:"HTML网页",jpe:"图形文件",jpeg:"图形文件",jpg:"图形文件",log:"日志文件",link:"快捷方式文件",js:"Javascript源文件",mdb:"Microsoft Access数据库",mp3:"音频文件",mp4:"视频文件",mng:"多映像网络图形",msi:"Windows Installe安装文件包",png:"图形文件",py:"Python源代码",pyc:"Python字节码文件",pdf:"文档格式文件",ppt:"Microsoft Powerpoint 97-2003 幻灯片演示文稿",pptx:"Microsoft Powerpoint2007 幻灯片演示文稿",psd:"Adobe photoshop位图文件",pl:"Perl脚本语言",rar:"RAR压缩文件",reg:"注册表文件",sys:"系统文件",sql:"数据库文件",sh:"Shell脚本文件",txt:"文本格式",vb:"Visual Basic的一种宏语言",xml:"扩展标记语言",xls:"Microsoft Office Excel 97-2003 工作表",xlsx:"Microsoft Office Excel 2007 工作表",gz:"压缩文件",zip:"ZIP压缩文件",z:"","7z":"7Z压缩文件",json:"JSON文本"};return typeof g[h]!="undefined"?g[h]:(h+"文件")},event_bind:function(){var g=this;$("#select_dir_list").on("click","tr[data-index]",function(k){var j=$(this).data("index"),i=$(this).attr("data-type"),h=(g.type_limit=="file"&&i=="dir")?"":g.select_list[j].filename;$(this).addClass("active").siblings().removeClass("active");$('[name="select_name"]').val(h);if(i=="file"){$(".file_path_views .forward_path span:eq(1)").addClass("active")}else{$(".file_path_views .forward_path span:eq(1)").removeClass("active")}});$(".select_list_body").on("scroll",function(j){var i=$(this).scrollTop(),h=$(this).scrollLeft();if(i>0){$(".select_list_shadow").show()}else{$(".select_list_shadow").hide()}if(h>=0){$(".select_list_thaed").css("left",(4-h)+"px")}j.stopPropagation();j.preventDefault()});$(".file_path_refresh").on("click",function(){g.render_file_list()});$(".select_dir_list thead th .icon-drag").on("mousedown",function(m){var o=m.clientX,h=$(this).parent(),j=h.index(),p=h[0].clientWidth,i=parseInt($(this).parent().attr("data-min")),n=null;if(m.which===1){var l=function(t){var r=t.clientX,s=r-o,q=p+s;n=setTimeout(function(){g.set_select_width(j,"width:"+q+"px")},0)},k=function(){console.log(k);$(this).unbind(l);$(this).unbind(k)};$(document).on("mousemove",l).one("mouseup",function(){$(this).unbind(l);$(this).unbind(this)})}m.stopPropagation()});$(".select_dir_list thead th>span").on("click",function(j){var i=$(this).parent(),h=i.data("type"),k=i.hasClass("active"),l=i.hasClass("sort");if(k){i.addClass("sort").removeClass("active")}else{if(l){i.addClass("active").removeClass("sort")}else{i.addClass("active")}}i.siblings().removeClass("active sort");g.render_file_list({sort:h,reverse:k?1:0});j.stopPropagation()});$(".search_path_views input").on("keyup",function(){var h=$(this).val();console.log(h)});$(".search_path_views input").focus(function(){$(this).next().show()}).blur(function(){$(this).next().hide()});$("#select_file_directory .select_file_group").on("click",".select_btn_group .btn-success",function(h){var j=$('[name="select_name"]').val(),i="";if(j==""){layer.msg("只能选择"+g.type_tips,{icon:2})}else{i=g.file_path+"/"+j;console.log(i)}});$("#select_file_directory .select_file_tootls").on("click",".creat_dir",function(i){var h="<tr><td colspan='2'><span class='glyphicon glyphicon-folder-open'></span> <input id='newFolderName' class='newFolderName' type='text' value=''></td><td colspan='3'><button id='nameOk' type='button' class='btn btn-success btn-sm'>"+lan["public"].ok+"</button> <button id='nameNOk' type='button' class='btn btn-default btn-sm'>"+lan["public"].cancel+"</button></td></tr>";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('<i class="iconfont icon-xiala"></i>');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('<i class="iconfont icon-xiala"></i>');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('<pre class="command_output_pre"></pre>');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},{})};
Close