diff --git a/BTPanel/__init__.py b/BTPanel/__init__.py index e92a30f6..0f6fc742 100644 --- a/BTPanel/__init__.py +++ b/BTPanel/__init__.py @@ -12,13 +12,13 @@ import os import time import re import uuid -import threading -import socket -os.chdir('/www/server/panel') +if not os.name in ['nt']: + os.chdir('/www/server/panel') if not 'class/' in sys.path: sys.path.insert(0,'class/') -from flask import Flask,session,render_template,send_file,request,redirect,g,make_response,render_template_string,abort,Response as Resp +from flask import Config, Flask, session, render_template, send_file, request, redirect, g, make_response, \ + render_template_string, abort, Response as Resp from cachelib import SimpleCache from werkzeug.wrappers import Response from flask_session import Session @@ -27,8 +27,9 @@ from flask_sockets import Sockets cache = SimpleCache() import public -#初始化Flask应用 -app = Flask(__name__,template_folder="templates/" + public.GetConfigValue('template')) + +# 初始化Flask应用 +app = Flask(__name__, template_folder="templates/{}".format(public.GetConfigValue('template'))) Compress(app) sockets = Sockets(app) @@ -57,12 +58,9 @@ app.config['SESSION_PERMANENT'] = True app.config['SESSION_USE_SIGNER'] = True app.config['SESSION_KEY_PREFIX'] = 'BT_:' app.config['SESSION_COOKIE_NAME'] = "SESSIONID" -app.config['PERMANENT_SESSION_LIFETIME'] = 86400 +app.config['PERMANENT_SESSION_LIFETIME'] = 86400 * 30 Session(app) - -from datetime import datetime -import socket import common #初始化路由 @@ -130,6 +128,7 @@ if admin_path in admin_path_checks: admin_path = '/bt' #Flask请求勾子 @app.before_request def request_check(): + g.request_time = time.time() #路由和URI长度过滤 if len(request.path) > 128: return abort(403) if len(request.url) > 1024: return abort(403) @@ -171,9 +170,14 @@ def request_check(): #Flask 请求结束勾子 @app.teardown_request def request_end(reques = None): + if request.path in ['/service_status']: return not_acts = ['GetTaskSpeed','GetNetWork','check_pay_status','get_re_order_status','get_order_stat'] key = request.args.get('action') - if not key in not_acts and request.full_path.find('/static/') == -1: public.write_request_log() + if not key in not_acts and request.full_path.find('/static/') == -1: + public.write_request_log() + if 'api_request' in g: + if g.api_request: + session.clear() #Flask 404页面勾子 @app.errorhandler(404) @@ -190,31 +194,11 @@ def notfound(e): } return Response(errorStr,status=404,headers=headers) -#@app.errorhandler(500) -# def internalerror(e): -# public.submit_error() -# errorStr = public.ReadFile('./BTPanel/templates/' + public.GetConfigValue('template') + '/error.html') -# try: -# if not app.config['DEBUG']: -# errorStr = errorStr.format(public.getMsg('PAGE_ERR_500_TITLE'), -# public.getMsg('PAGE_ERR_500_H1'), -# public.getMsg('PAGE_ERR_500_P1'), -# public.getMsg('NAME'), -# public.getMsg('PAGE_ERR_HELP')) -# else: -# errorStr = errorStr.format(public.getMsg('PAGE_ERR_500_TITLE'), -# str(e), -# '
'+public.get_error_info() + '
', -# public.getMsg('INIT_DEBUG_INFO'),public.getMsg('INIT_VERSION_LAST') + public.version()) -# except IndexError:pass -# return errorStr,500 - -#===================================Flask HOOK========================# +# ===================================Flask HOOK========================# - -#===================================普通路由区========================# -@app.route('/',methods=method_all) +# ===================================普通路由区========================# +@app.route('/', methods=method_all) def home(): #面板首页 comReturn = comm.local() @@ -225,6 +209,7 @@ def home(): data['ftpCount'] = public.M('ftps').count() data['databaseCount'] = public.M('databases').count() data['lan'] = public.GetLan('index') + data['js_random'] = get_js_random() public.auto_backup_panel() return render_template( 'index.html',data = data) @@ -297,9 +282,11 @@ def site(pdata = None): comReturn = comm.local() if comReturn: return comReturn if request.method == method_get[0] and not pdata: - data = {} + import system + data = system.system().GetConcifInfo() data['isSetup'] = True data['lan'] = public.getLan('site') + data['js_random'] = get_js_random() if os.path.exists(public.GetConfigValue('setup_path')+'/nginx') == False \ and os.path.exists(public.GetConfigValue('setup_path')+'/apache') == False \ and os.path.exists(public.GetConfigValue('openlitespeed_path')+'/lsws') == False: @@ -308,7 +295,10 @@ def site(pdata = None): import panelSite siteObject = panelSite.panelSite() - defs = ('get_site_domains','GetRedirectFile','SaveRedirectFile','DeleteRedirect','GetRedirectList','CreateRedirect','ModifyRedirect', + defs = ('upload_csv','create_website_multiple','del_redirect_multiple','del_proxy_multiple','delete_dir_auth_multiple', + 'delete_dir_bind_multiple','delete_domain_multiple','set_site_etime_multiple','set_site_php_version_multiple', + 'delete_website_multiple','set_site_status_multiple','get_site_err_log','get_site_domains','GetRedirectFile', + 'SaveRedirectFile','DeleteRedirect','GetRedirectList','CreateRedirect','ModifyRedirect', 'set_dir_auth','delete_dir_auth','get_dir_auth','modify_dir_auth_pass', 'GetSiteLogs','GetSiteDomains','GetSecurity','SetSecurity','ProxyCache','CloseToHttps','HttpToHttps','SetEdate', 'SetRewriteTel','GetCheckSafe','CheckSafe','GetDefaultSite','SetDefaultSite','CloseTomcat','SetTomcat','apacheAddPort', @@ -329,6 +319,7 @@ def ftp(pdata = None): FtpPort() data = {} data['isSetup'] = True + data['js_random'] = get_js_random() if os.path.exists(public.GetConfigValue('setup_path') + '/pure-ftpd') == False: data['isSetup'] = False data['lan'] = public.GetLan('ftp') return render_template('ftp.html',data=data) @@ -354,10 +345,11 @@ def database(pdata = None): data['isSetup'] = os.path.exists(public.GetConfigValue('setup_path') + '/mysql/bin') data['mysql_root'] = public.M('config').where('id=?',(1,)).getField('mysql_root') data['lan'] = public.GetLan('database') + data['js_random'] = get_js_random() return render_template('database.html',data=data) import database databaseObject = database.database() - defs = ('check_mysql_ssl_status','write_ssl_to_mysql','GetdataInfo','GetInfo','ReTable','OpTable','AlTable','GetSlowLogs','GetRunStatus', + defs = ('get_mysql_user','check_mysql_ssl_status','write_ssl_to_mysql','GetdataInfo','GetInfo','ReTable','OpTable','AlTable','GetSlowLogs','GetRunStatus', 'SetDbConf','GetDbStatus','BinLog','GetErrorLog','GetMySQLInfo','SetDataDir','SetMySQLPort', 'AddDatabase','DeleteDatabase','SetupPassword','ResDatabasePassword','ToBackup','DelBackup', 'InputSql','SyncToDatabases','SyncGetDatabases','GetDatabaseAccess','SetDatabaseAccess') @@ -375,7 +367,6 @@ def acme(pdata = None): 'get_auths','auth_domain','check_auth_status','download_cert','apply_cert','renew_cert','apply_cert_api','apply_dns_auth') return publicObject(acme_v2_object,defs,None,pdata) - @app.route('/message/',methods=method_all) def message(action = None): #提示消息管理 @@ -404,6 +395,7 @@ def control(pdata = None): if request.method == method_get[0]: data = {} data['lan'] = public.GetLan('control') + data['js_random'] = get_js_random() return render_template( 'control.html',data=data) @app.route('/firewall',methods=method_all) @@ -414,6 +406,7 @@ def firewall(pdata = None): if request.method == method_get[0] and not pdata: data = {} data['lan'] = public.GetLan('firewall') + data['js_random'] = get_js_random() return render_template( 'firewall.html',data=data) import firewalls firewallObject = firewalls.firewalls() @@ -429,6 +422,7 @@ def ssh_security(pdata = None): if request.method == method_get[0] and not pdata: data = {} data['lan'] = public.GetLan('firewall') + data['js_random'] = get_js_random() return render_template( 'firewall.html',data=data) import ssh_security firewallObject = ssh_security.ssh_security() @@ -437,23 +431,6 @@ def ssh_security(pdata = None): return publicObject(firewallObject,defs,None,pdata) -# @app.route('/firewall_new',methods=method_all) -# def firewall_new(pdata = None): -# comReturn = comm.local() -# if comReturn: return comReturn -# if request.method == method_get[0] and not pdata: -# data = {} -# data['lan'] = public.GetLan('firewall') -# return render_template( 'firewall_new.html',data=data) -# import firewall_new -# firewallObject = firewall_new.firewalls() -# defs = ('GetList','AddDropAddress','DelDropAddress','FirewallReload','SetFirewallStatus', -# 'AddAcceptPort','DelAcceptPort','SetSshStatus','SetPing','SetSshPort','GetSshInfo', -# 'AddSpecifiesIp','DelSpecifiesIp' -# ) -# return publicObject(firewallObject,defs,None,pdata) - - @app.route('/monitor', methods=method_all) def panel_monitor(pdata=None): #云控统计信息 @@ -535,13 +512,14 @@ def files(pdata = None): data = {} data['recycle_bin'] = os.path.exists('data/recycle_bin.pl') data['lan'] = public.GetLan('files') + data['js_random'] = get_js_random() return render_template('files.html',data=data) import files filesObject = files.files() defs = ('get_progress','restore_website','fix_permissions','get_all_back','restore_path_permissions','del_path_premissions','get_path_premissions','back_path_permissions', 'CheckExistsFiles','GetExecLog','GetSearch','ExecShell','GetExecShellMsg','exec_git','exec_composer','create_download_url', 'UploadFile','GetDir','CreateFile','CreateDir','DeleteDir','DeleteFile','get_download_url_list','remove_download_url','modify_download_url', - 'CopyFile','CopyDir','MvFile','GetFileBody','SaveFileBody','Zip','UnZip','get_download_url_find', + 'CopyFile','CopyDir','MvFile','GetFileBody','SaveFileBody','Zip','UnZip','get_download_url_find','set_file_ps', 'SearchFiles','upload','read_history','re_history','auto_save_temp','get_auto_save_body','get_videos', 'GetFileAccess','SetFileAccess','GetDirSize','SetBatchData','BatchPaste','install_rar','get_path_size', 'DownloadFile','GetTaskSpeed','CloseLogs','InstallSoft','UninstallSoft','SaveTmpFile','get_composer_version','exec_composer','update_composer', @@ -559,6 +537,7 @@ def crontab(pdata = None): if request.method == method_get[0] and not pdata: data = {} data['lan'] = public.GetLan('crontab') + data['js_random'] = get_js_random() return render_template( 'crontab.html',data=data) import crontab crontabObject = crontab.crontab() @@ -575,6 +554,7 @@ def soft(pdata = None): if request.method == method_get[0] and not pdata: data={} data['lan'] = public.GetLan('soft') + data['js_random'] = get_js_random() return render_template( 'soft.html',data=data) @app.route('/config',methods=method_all) @@ -595,9 +575,6 @@ def config(pdata = None): data['ipv6'] = '' sess_out_path = 'data/session_timeout.pl' if not os.path.exists(sess_out_path): public.writeFile(sess_out_path,'86400') - workers_p = 'data/workers.pl' - if not os.path.exists(workers_p): public.writeFile(workers_p,'1') - data['workers'] = int(public.readFile(workers_p)) s_time_tmp = public.readFile(sess_out_path) if not s_time_tmp: s_time_tmp = '0' data['session_timeout'] = int(s_time_tmp) @@ -607,25 +584,32 @@ def config(pdata = None): data['basic_auth']['value'] = public.getMsg('CLOSED') if data['basic_auth']['open']: data['basic_auth']['value'] = public.getMsg('OPENED') data['debug'] = '' + data['js_random'] = get_js_random() if app.config['DEBUG']: data['debug'] = 'checked' data['is_local'] = '' if public.is_local(): data['is_local'] = 'checked' return render_template( 'config.html',data=data) import config - defs = ('get_ols_private_cache_status','get_ols_value','set_ols_value','get_ols_private_cache','get_ols_static_cache','set_ols_static_cache','switch_ols_private_cache','set_ols_private_cache', - 'set_coll_open','get_qrcode_data','check_two_step','set_two_step_auth','create_user','remove_user','modify_user', - 'get_key','get_php_session_path','set_php_session_path','get_cert_source','get_users', - 'set_local','set_debug','get_panel_error_logs','clean_panel_error_logs', - 'get_basic_auth_stat','set_basic_auth','get_cli_php_version','get_tmp_token', - 'set_cli_php_version','DelOldSession', 'GetSessionCount', 'SetSessionConf', - 'GetSessionConf','get_ipv6_listen','set_ipv6_status','GetApacheValue','SetApacheValue', - 'GetNginxValue','SetNginxValue','get_token','set_token','set_admin_path','is_pro', - 'get_php_config','get_config','SavePanelSSL','GetPanelSSL','GetPHPConf','SetPHPConf', - 'GetPanelList','AddPanelInfo','SetPanelInfo','DelPanelInfo','ClickPanelInfo','SetPanelSSL', - 'SetTemplates','Set502','setPassword','setUsername','setPanel','setPathInfo','setPHPMaxSize', - 'getFpmConfig','setFpmConfig','setPHPMaxTime','syncDate','setPHPDisable','SetControl', - 'ClosePanel','AutoUpdatePanel','SetPanelLock','return_mail_list','del_mail_list','add_mail_address','user_mail_send','get_user_mail','set_dingding','get_dingding','get_settings','user_stmp_mail_send','user_dingding_send' - ) + defs = ( + 'get_panel_ssl_status','set_file_deny', 'del_file_deny', 'get_file_deny', + 'get_httpd_access_log_format_parameter','set_httpd_format_log_to_website','get_httpd_access_log_format', + 'del_httpd_access_log_format','add_httpd_access_log_format','get_nginx_access_log_format_parameter', + 'set_format_log_to_website','get_nginx_access_log_format','del_nginx_access_log_format', + 'add_nginx_access_log_format','get_ols_private_cache_status','get_ols_value','set_ols_value', + 'get_ols_private_cache','get_ols_static_cache','set_ols_static_cache','switch_ols_private_cache','set_ols_private_cache', + 'set_coll_open','get_qrcode_data','check_two_step','set_two_step_auth','create_user','remove_user','modify_user', + 'get_key','get_php_session_path','set_php_session_path','get_cert_source','get_users', + 'set_local','set_debug','get_panel_error_logs','clean_panel_error_logs','get_menu_list','set_hide_menu_list', + 'get_basic_auth_stat','set_basic_auth','get_cli_php_version','get_tmp_token','get_temp_login','set_temp_login','remove_temp_login','clear_temp_login','get_temp_login_logs', + 'set_cli_php_version','DelOldSession', 'GetSessionCount', 'SetSessionConf', + 'GetSessionConf','get_ipv6_listen','set_ipv6_status','GetApacheValue','SetApacheValue', + 'GetNginxValue','SetNginxValue','get_token','set_token','set_admin_path','is_pro', + 'get_php_config','get_config','SavePanelSSL','GetPanelSSL','GetPHPConf','SetPHPConf', + 'GetPanelList','AddPanelInfo','SetPanelInfo','DelPanelInfo','ClickPanelInfo','SetPanelSSL', + 'SetTemplates','Set502','setPassword','setUsername','setPanel','setPathInfo','setPHPMaxSize', + 'getFpmConfig','setFpmConfig','setPHPMaxTime','syncDate','setPHPDisable','SetControl', + 'ClosePanel','AutoUpdatePanel','SetPanelLock','return_mail_list','del_mail_list','add_mail_address','user_mail_send','get_user_mail','set_dingding','get_dingding','get_settings','user_stmp_mail_send','user_dingding_send' + ) return publicObject(config.config(),defs,None,pdata) @app.route('/ajax',methods=method_all) @@ -686,7 +670,7 @@ def ssl(pdata = None): if comReturn: return comReturn import panelSSL toObject = panelSSL.panelSSL() - defs = ('RemoveCert','renew_lets_ssl','SetCertToSite','GetCertList','SaveCert','GetCert','GetCertName', + defs = ('check_url_txt','RemoveCert','renew_lets_ssl','SetCertToSite','GetCertList','SaveCert','GetCert','GetCertName','again_verify', 'DelToken','GetToken','GetUserInfo','GetOrderList','GetDVSSL','Completed','SyncOrder','download_cert','set_cert','cancel_cert_order', 'get_order_list','get_order_find','apply_order_pay','get_pay_status','apply_order','get_verify_info','get_verify_result','get_product_list','set_verify_info', 'GetSSLInfo','downloadCRT','GetSSLProduct','Renew_SSL','Get_Renew_SSL') @@ -746,7 +730,7 @@ def auth(pdata = None): if comReturn: return comReturn import panelAuth toObject = panelAuth.panelAuth() - defs = ('get_re_order_status_plugin','create_plugin_other_order','get_order_stat', + defs = ('auth_activate','get_product_auth','get_stripe_session_id','get_re_order_status_plugin','create_plugin_other_order','get_order_stat', 'get_voucher_plugin','create_order_voucher_plugin','get_product_discount_by', 'get_re_order_status','create_order_voucher','create_order','get_order_status', 'get_voucher','flush_pay_status','create_serverid','check_serverid', @@ -766,7 +750,7 @@ def download(): if filename.find('|') != -1: filename = filename.split('|')[1] if not filename: return public.ReturnJson(False,"INIT_ARGS_ERR"),json_header - if filename in ['alioss','qiniu','upyun','txcos','ftp']: return panel_cloud() + if filename in ['alioss','qiniu','upyun','txcos','ftp','msonedrive','gcloud_storage', 'gdrive', 'aws_s3']: return panel_cloud() if not os.path.exists(filename): return public.ReturnJson(False,"FILE_NOT_EXISTS"),json_header if request.args.get('play') == 'true': @@ -779,6 +763,8 @@ def download(): if extName in ['png','gif','jpeg','jpg']: mimetype = None return send_file(filename,mimetype=mimetype, as_attachment=True, + add_etags=True, + conditional=True, attachment_filename=os.path.basename(filename), cache_timeout=0) @@ -831,15 +817,15 @@ def login(): if admin_path != '/bt' and os.path.exists(admin_path_file) and not 'admin_auth' in session: is_auth_path = True num_key = public.md5(public.GetClientIp() + '_auth_path') - if not public.get_error_num(num_key,20): return public.returnMsg(False,'连续20次安全入口验证失败,禁止1小时') + if not public.get_error_num(num_key,20): return public.returnMsg(False,'AUTH_FAILED1') #登录输入验证 if request.method == method_post[0]: v_list = ['username','password','code','vcode','cdn_url'] for v in v_list: pv = request.form.get(v,'').strip() if v == 'cdn_url': - if len(pv) > 32: return public.returnMsg(False,'错误的参数长度!'),json_header - if not re.match(r"^[\w\.-]+$",pv): public.returnJson(False,'错误的参数格式'),json_header + if len(pv) > 32: return public.returnMsg(False,'PARAMETER_LEN_ERR'),json_header + if not re.match(r"^[\w\.-]+$",pv): public.returnJson(False,'PARAMETER_FORMAT_ERR'),json_header continue if not pv: continue @@ -847,14 +833,14 @@ def login(): if v == 'code': p_len = 4 if v == 'vcode': p_len = 6 if len(pv) != p_len: - if v == 'code': return public.returnJson(False,'验证码长度错误'),json_header - return public.returnJson(False,'错误的参数长度'),json_header + if v == 'code': return public.returnJson(False,'VCODE_LEN_ERR'),json_header + return public.returnJson(False,'PARAMETER_LEN_ERR'),json_header if not re.match(r"^\w+$",pv): - return public.returnJson(False,'错误的参数格式'),json_header + return public.returnJson(False,'PARAMETER_FORMAT_ERR'),json_header for n in request.form.keys(): if not n in v_list: - return public.returnJson(False,'登录参数中不能有多余参数'),json_header + return public.returnJson(False,'EXTRA_PARAMETER_ERR'),json_header get = get_input() import userlogin @@ -869,10 +855,12 @@ def login(): if session['login'] != False: session['login'] = False cache.set('dologin',True) - public.WriteLog('用户登出','客户端:{},已手动退出面板'.format(public.GetClientIp()+ ":" + str(request.environ.get('REMOTE_PORT')))) + public.WriteLog('TYPE_LOGOUT','MANUALLY_LOGOUT',(public.GetClientIp()+ ":" + str(request.environ.get('REMOTE_PORT')),)) + if 'tmp_login_expire' in session: + s_file = 'data/session/{}'.format(session['tmp_login_id']) + if os.path.exists(s_file): + os.remove(s_file) session.clear() - session_path = r'/dev/shm/session_py' + str(sys.version_info[0]) - if os.path.exists(session_path): public.ExecShell("rm -f " + session_path + '/*') sess_file = 'data/sess_files/' + public.get_sess_key() if os.path.exists(sess_file): try: @@ -883,11 +871,17 @@ def login(): if is_auth_path: if route_path != request.path and route_path + '/' != request.path: - public.set_error_num(num_key) - #return abort(404) - data = {} - data['lan'] = public.getLan('close') - return render_template('autherr.html',data=data) + referer = request.headers.get('Referer','err') + referer_tmp = referer.split('/') + referer_path = referer_tmp[-1] + if referer_path == '': + referer_path = referer_tmp[-2] + if route_path != '/'+referer_path: + public.set_error_num(num_key) + #return abort(404) + data = {} + data['lan'] = public.getLan('close') + return render_template('autherr.html',data=data) session['admin_auth'] = True public.set_error_num(num_key,True) comReturn = common.panelSetup().init() @@ -929,16 +923,19 @@ def tips(): return render_template('tips.html') -@app.route('/get_app_bind_status',methods=method_all) -def get_app_bind_status(pdata = None): - #APP绑定状态查询 +@app.route('/get_app_bind_status', methods=method_all) +def get_app_bind_status(pdata=None): + # APP绑定状态查询 + if not public.check_app('app_bind'):return public.returnMsg(False, 'API_DISABLED') import panelApi api_object = panelApi.panelApi() return json.dumps(api_object.get_app_bind_status(get_input())),json_header -@app.route('/check_bind',methods=method_all) -def check_bind(pdata = None): - #APP绑定查询 + +@app.route('/check_bind', methods=method_all) +def check_bind(pdata=None): + # APP绑定查询 + if not public.check_app('app_bind'):return public.returnMsg(False, 'API_DISABLED') import panelApi api_object = panelApi.panelApi() return json.dumps(api_object.check_bind(get_input())),json_header @@ -1098,6 +1095,7 @@ def panel_public(): return data,json_header if get.name != 'app': return abort(404) + if not public.check_app('wxapp'): return public.returnMsg(False, 'UNBOUND_USER') import panelPlugin plu = panelPlugin.panelPlugin() get.s = '_check' @@ -1126,6 +1124,10 @@ def send_favicon(): @app.route('/service_status',methods = method_get) def service_status(): #检查面板当前状态 + try: + if not 'login' in session: session.clear() + except: + pass return 'True' @app.route('/coll',methods=method_all) @@ -1140,7 +1142,7 @@ def panel_other(name=None,fun = None,stype=None): args = None else: args = get_input() - args_list = ['mail_from','password','mail_to','subject','content','subtype'] + args_list = ['mail_from','password','mail_to','subject','content','subtype','data'] for k in args.__dict__: if not k in args_list: return abort(404) @@ -1256,6 +1258,7 @@ def panel_hook(): @app.route('/install',methods=method_all) def install(): #初始化面板接口 + if not os.path.exists('install.pl'): return redirect('/login') if public.M('config').where("id=?",('1',)).getField('status') == 1: if os.path.exists('install.pl'): os.remove('install.pl') session.clear() @@ -1311,7 +1314,8 @@ def get_dir_down(filename,token,find): import files args = public.dict_obj() args.path = filename - to_path = filename.replace(find['filename'],'').strip('/') + args.share = True + to_path = filename.replace(find['filename'], '').strip('/') if request.args.get('play') == 'true': pdata = files.files().get_videos(args) @@ -1322,7 +1326,7 @@ def get_dir_down(filename,token,find): pdata['token'] = token pdata['src_path'] = find['filename'] pdata['to_path'] = to_path - if find['expire'] > (time.time() + (86400 * 365 * 10)): + if find['expire'] < (time.time() + (86400 * 365 * 10)): pdata['expire'] = public.format_date(times=find['expire']) else: pdata['expire'] = public.getMsg('NEVER_EXPIRES') @@ -1380,6 +1384,8 @@ class run_exec: result = eval(fun) else: result = eval(fun) + r_type = type(result) + if r_type == Resp: return result result = public.GetJson(result),json_header break if not result: @@ -1387,12 +1393,12 @@ class run_exec: if g.is_aes: result = public.aes_encrypt(result[0],g.aes_key),json_header else: - if os.path.exists('pyenv/bin/python') and sys.version_info[0] == 3: - if not os.path.exists('data/debug.pl'): - x_token = request.headers.get('x-http-token') - if x_token: - aes_pwd = x_token[:8] + x_token[40:48] - result = "BT-CRT"+public.aes_encrypt(result[0],aes_pwd),{'Content-Type':'text/plain; charset=utf-8'} + # if os.path.exists('pyenv/bin/python') and sys.version_info[0] == 3: + # if not os.path.exists('data/debug.pl'): + # x_token = request.headers.get('x-http-token') + # if x_token: + # aes_pwd = x_token[:8] + x_token[40:48] + # result = "BT-CRT"+public.aes_encrypt(result[0],aes_pwd),{'Content-Type':'text/plain; charset=utf-8'} pass return result @@ -1430,10 +1436,7 @@ def publicObject(toObject,defs,action=None,get = None): if hasattr(toObject,'site_path_check'): if not toObject.site_path_check(get): return public.ReturnJson(False,'INIT_ACCEPT_NOT'),json_header - p = run_exec() - result = p.run(toObject,defs,get) - del p - return result + return run_exec().run(toObject,defs,get) @@ -1578,6 +1581,14 @@ def is_login(result): result.set_cookie('request_token',request_token,max_age=86400*30) return result +# js随机数模板使用,用于不更新版本号时更新前端文件不需要用户强制刷新浏览器 +def get_js_random(): + js_random = public.readFile('data/js_random.pl') + if not js_random or js_random == '1': + js_random = public.GetRandomString(16) + public.writeFile('data/js_random.pl',js_random) + return js_random + #获取输入数据 def get_input(): data = public.dict_obj() @@ -1585,17 +1596,17 @@ def get_input(): for key in request.args.keys(): data[key] = str(request.args.get(key,'')) try: - x_token = request.headers.get('x-http-token') - if x_token: - aes_pwd = x_token[:8] + x_token[40:48] + # x_token = request.headers.get('x-http-token') + # if x_token: + # aes_pwd = x_token[:8] + x_token[40:48] for key in request.form.keys(): if key in exludes: continue data[key] = str(request.form.get(key,'')) - if x_token: - if len(data[key]) > 5: - if data[key][:6] == 'BT-CRT': - data[key] = public.aes_decrypt(data[key][6:],aes_pwd) + # if x_token: + # if len(data[key]) > 5: + # if data[key][:6] == 'BT-CRT': + # data[key] = public.aes_decrypt(data[key][6:],aes_pwd) except: try: post = request.form.to_dict() @@ -1609,7 +1620,6 @@ def get_input(): for k in g.form_data.keys(): data[k] = str(g.form_data[k]) - if not hasattr(data,'data'): data.data = [] return data diff --git a/BTPanel/static/ace/icons/iconfont.woff b/BTPanel/static/ace/icons/iconfont.woff new file mode 100644 index 00000000..490a36cf Binary files /dev/null and b/BTPanel/static/ace/icons/iconfont.woff differ diff --git a/BTPanel/static/ace/styles/icons.css b/BTPanel/static/ace/styles/icons.css index 6517f227..8bdf3ba3 100644 --- a/BTPanel/static/ace/styles/icons.css +++ b/BTPanel/static/ace/styles/icons.css @@ -28,6 +28,12 @@ font-weight: normal; font-style: normal; } +@font-face { + font-family: iconfont; + src: url("../icons/iconfont.woff"); + font-weight: normal; + font-style: normal; +} .binary-icon:before { font-family: "Octicons Regular"; font-size: 16px; @@ -4939,4 +4945,121 @@ color: #6a9fb5; font-family: octicons; content: "\f0c9"; +} + + + + + +/* 文件目录图标 */ +.iconfont { + font-family: "iconfont" !important; + font-size: 16px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-houtui:before { + content: "\e60f"; +} + +.icon-search1:before { + content: "\e60e"; +} + +.icon-lishi:before { + content: "\e652"; +} + +.icon-shoucang:before { + content: "\e648"; +} + +.icon-wenjian:before { + content: "\e6ab"; +} + +.icon-vscode:before { + content: "\e609"; +} + +.icon-fenxiang:before { + content: "\e62a"; +} + +.icon-tishi:before { + content: "\e63f"; +} + +.icon-guanbi:before { + content: "\e60c"; +} + +.icon-favorites:before { + content: "\e66c"; +} + +.icon-share1:before { + content: "\e607"; +} + +.icon-authority:before { + content: "\e606"; +} + +.icon-dir_kill:before { + content: "\e643"; +} + +.icon-zhixiang-zuo:before { + content: "\e6fd"; +} + +.icon-next:before { + content: "\e772"; +} + +.icon-prev:before { + content: "\e7b4"; +} + +.icon-lajitong-copy:before { + content: "\e605"; +} + +.icon-xingxing:before { + content: "\e602"; +} + +.icon-triangle-right:before { + content: "\e601"; +} + +.icon-search:before { + content: "\e60d"; +} + +.icon-arrow-down:before { + content: "\e7b2"; +} + +.icon-arrow-right:before { + content: "\e743"; +} + +.icon-arrow-lift:before { + content: "\e744"; +} + +.icon-terminal:before { + content: "\e600"; +} + +.icon-iconfont53:before { + content: "\e75e"; +} + +.icon-xiala:before { + content: "\e62e"; } \ No newline at end of file diff --git a/BTPanel/static/css/files_style.css b/BTPanel/static/css/files_style.css new file mode 100644 index 00000000..d8f1cfd1 --- /dev/null +++ b/BTPanel/static/css/files_style.css @@ -0,0 +1,2850 @@ +/* 上线删除 */ + +.webDelete .vcode #vcodeResult { + width: 50px; + height: 26px; +} + +/* 上线删除 */ +* { + margin: 0; + padding: 0; +} + +.file_table_view.list_view::-webkit-scrollbar { + /*滚动条整体样式*/ + width: 12px; + /*高宽分别对应横竖滚动条的尺寸*/ + height: 7px; + padding: 2px; + position: relative; +} + +.file_table_view.list_view::-webkit-scrollbar-thumb { + /*滚动条里面小方块*/ + border-radius: 3px; + box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1); + background: #bbb; +} + +.file_table_view.list_view::-webkit-scrollbar-track { + /*滚动条里面轨道*/ + border-radius: 3px; + box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1); + background: #ededed; +} + +.file_list_header { + height: 40px; + background: #f6f6f6; + border-bottom: none; + position: relative; + z-index: 999; + overflow-y: hidden; +} + +.file_list_header .file_checkbox, +.file_table_view.list_view .file_list_content .file_checkbox { + padding: 12px !important; + margin-left: 0 !important; + cursor: default; +} + +.file_list_header .file_checkbox input, +.file_table_view.list_view .file_list_content .file_checkbox input { + display: none; +} + +.file_list_header .file_check, +.file_table_view.list_view .file_list_content .file_check { + width: 16px; + height: 16px; + line-height: 16px; + border: 1px solid #d2d2d2; + box-sizing: border-box; + border-radius: 2px; + cursor: pointer; + transition: all 200ms; + background-color: #fff; +} +.file_list_header .file_main_title{ + line-height: 40px; + height: 40px; + overflow: hidden; + border: 1px solid transparent; + border-bottom: none; +} +.file_list_header .file_check i, +.file_table_view.list_view .file_list_content .file_check i { + position: relative; + top: -2px; + font-size: 14px; +} + +.file_table_view.icon_view { + position: relative; + overflow: hidden; +} + +.file_table_view.list_view { + position: relative; + overflow: auto; + z-index: 1; +} + +.file_table_view .file_name .file_title i:hover { + color: #000; + cursor: pointer; +} + +.file_table_view.list_view .file_name { + min-width: 120px; +} + +.file_table_view.icon_view .file_list_header { + display: none; +} + +.file_table_view.icon_view .file_name .iconfont, +.file_table_view.icon_view .file_checkbox, +.file_table_view.icon_view .file_ps, +.file_table_view.icon_view .file_type, +.file_table_view.icon_view .file_size, +.file_table_view.icon_view .file_mtime, +.file_table_view.icon_view .file_user, +.file_table_view.icon_view .file_accept, +.file_table_view.icon_view .app_menu_group { + display: none; +} + +.file_table_view.icon_view .file_tr { + display: inline-block; + width: 80px !important; + min-height: 90px; + padding: 5px; + vertical-align: top; + margin: 0 10px 10px 0; +} + +.file_table_view.icon_view .file_name { + width: 100% !important; + position: relative; +} + +.file_table_view.icon_view .file_ico_type { + height: 60px; +} + +.file_table_view.icon_view .file_list_content .file_icon { + width: 45px; + height: 45px; + left: 21%; +} + +.file_table_view.icon_view .file_name i { + font-style: inherit; +} + +.file_table_view.icon_view .file_title.file_dir_status, +.file_table_view.icon_view .file_title.file_file_status { + width: 70px; + text-align: center; + word-break: break-all; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + overflow: hidden; +} + +.file_table_view.icon_view .file_list_content .file_tr:hover { + background: #f0f9f7 !important; +} + +.file_table_view.icon_view .file_list_content .file_tr.active { + background: #f0f9f7 !important; + border: 1px solid #ddefeb; + box-sizing: border-box; + padding: 4px; +} + +.file_list_header .file_th { + float: left; + padding-left: 10px; + padding-right: 10px; + height: 40px; + line-height: 40px; + font-size: 13px; + color: #333; + position: relative; + cursor: pointer; + margin-left: -5px; +} + +.file_list_header .file_th>span { + vertical-align: middle; +} + +.file_table_view.list_view .file_type { + min-width: 80px; + max-width: 300px; +} + +.file_list_header .file_th { + color: #333; +} + +.file_list_header .file_th.active { + background: #eee; + color: #555; +} + +.file_list_header .file_th:hover { + background: #eee; +} + +.file_list_header .file_checkbox:hover, +.file_list_header .file_operation:hover { + background: #f3f3f3; +} + + +.file_ps_title .set_file_ps{ + height: 25px; + line-height: 25px; + border: 1px solid transparent; + width: 100%; + border-radius: 2px; + padding-left: 5px; + outline: none; +} + +.file_ps_title .set_file_ps:hover{ + border: 1px solid #20a53a !important; + background-color: #fff !important; +} + +.file_list_header .file_width_resize { + float: left; + width: 10px; + margin-left: -5px; + height: 40px; + /* cursor: col-resize; */ + overflow: hidden; + position: relative; + z-index: 998; +} + +.file_list_header .file_width_resize::after { + content: ''; + display: block; + background: #e2e2e2; + width: 1px; + height: 25px; + position: absolute; + top: 50%; + left: 50%; + margin-left: -1px; + margin-top: -12.5px; +} + +.file_list_header .file_name { + margin-left: 0; +} + +.file_operation.file_td .set_operation_group{ + display: none; +} +.file_table_view.list_view .file_tr.active .set_operation_group.is_mobile{ + display: block !important; +} + +.file_list_header .icon_sort { + display: inline-block; + height: 40px; + line-height: 40px; + transition: all 500ms; + float: right; +} + +.file_list_header .icon_sort.active { + transform: rotate(180deg); +} + +.file_list_header .icon_sort .iconfont { + vertical-align: bottom; +} + +.file_table_view.list_view .file_list_shadow { + width: 100%; + height: 8px; + position: absolute; + left: 0px; + right: 0px; + background: -webkit-linear-gradient(top, rgba(220, 220, 220, .5), rgba(255, 255, 255, 0)); + z-index: 99; +} + +.file_table_view.list_view .file_shadow_bottom { + background: -webkit-linear-gradient(top, rgba(255, 255, 255, 0), rgba(220, 220, 220, .5)); + bottom: 0; +} + +.align-center { + text-align: center; +} + +.align-left { + text-align: left; +} + +.align-right { + text-align: right; +} + +.btlink { + color: #20a53a; + text-decoration: none; +} + +.file_table_view.list_view .file_list_content { + min-width: 750px; + overflow: auto; + border-top: 1px solid #ececec; +} + +.file_table_view.list_view .file_list_content .file_tr { + height: 45px; + box-sizing: border-box; + color: #fff; + border-bottom: 1px solid #f3f3f3; + border-left: 1px solid transparent; + border-right: 1px solid transparent; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.file_table_view.list_view .file_list_content .file_tr.editr_tr .file_td { + display: none; +} + +.file_table_view.list_view .file_list_content .file_tr.editr_tr .file_name { + display: inline-block; + margin-left: 40px; +} + +.file_table_view.list_view .file_name .iconfont { + display: block; +} + +.file_table_view.list_view .file_list_content .file_tr.editr_tr .file_name .iconfont { + display: none +} + +.file_table_view.list_view .file_name .icon-favorites, +.file_table_view.list_view .file_name .icon-share1 { + font-size: 18px; + width: 18px; + height: 18px; + vertical-align: middle; + position: absolute; + top: 50%; + right: 5px; + margin-top: -9px; + color: #2e973e; + display: inline-block; +} + +.file_table_view.list_view .file_name .icon-favorites { + color: #f5a623; + font-size: 17px; +} + +.file_table_view.list_view .file_name .icon-favorites:before, +.file_table_view.list_view .file_name .icon-share1:before { + position: relative; + top: -16px; + height: 18px; + width: 18px; + cursor: pointer; +} + +.file_table_view.list_view .file_list_content .file_tr.editr_tr .rename_file_input { + height: 32px; + line-height: 30px; + border: 1px solid #cfcfcf; + border-radius: 2px; + padding-left: 5px; + margin-right: 15px; + width: 150px; +} + +.file_table_view.list_view .file_list_content .file_tr.editr_tr .rename_file_input:focus { + outline: none; + border: 1px solid #20a53a; +} + +.file_table_view.list_view .file_list_content .file_tr.editr_tr .clear_file_btn, +.file_table_view.list_view .file_list_content .file_tr.editr_tr .add_file_btn { + height: 32px; + line-height: 30px; + padding: 0 18px; + margin-right: 10px; + background-color: #20a53a; + border-color: #20a53a; + border-radius: 2px; + color: #fff; + border: 1px solid transparent; +} + +.file_table_view.list_view .file_list_content .file_tr.editr_tr .clear_file_btn { + color: #555; + background-color: #fff; + border-color: #ccc; +} + +.file_table_view.list_view .file_list_content .file_tr.editr_tr .clear_file_btn::focus, +.file_table_view.list_view .file_list_content .file_tr.editr_tr .add_file_btn::focus { + outline: none; +} + +.file_table_view.list_view .file_list_content .file_tr.editr_tr .add_file_btn:hover { + color: #fff; + background-color: #10952a; + border-color: #398439; +} + +/* tr尾部菜单栏 */ +.file_table_view.list_view .file_ps .foo_menu { + display: none; +} + +.file_table_view.list_view .file_tr:hover .foo_menu { + display: inline-block; + position: absolute; + right: 10px; +} +.file_table_view.list_view .file_tr .foo_menu_title{ + position: relative; + padding-right:10px; +} +.file_table_view.list_view .file_tr .foo_menu_title i { + display: inline-block; + width: 7px; + height: 7px; + color: #20a53a; + border-left: 1px solid; + border-bottom: 1px solid; + transform: rotate(-45deg); + position: absolute; + top: 3px; + right: 0px; +} + +.file_table_view.list_view .file_tr.active .foo_menu { + display: inline-block; + position: absolute; + right: 10px; +} + +.file_table_view.list_view .file_tr:hover .foo_menu .foo_menu_title, +.file_table_view.list_view .file_tr.active .foo_menu .foo_menu_title { + border: 1px solid #20a53a; + color: #20a53a !important; + background: #fff; + border-radius: 2px; + padding: 4px 18px 4px 8px; + font-size: 12px; + cursor: pointer; + position: relative; +} + +.file_table_view.list_view .file_tr .foo_menu .foo_menu_title:hover, +.file_table_view.list_view .file_tr.active .foo_menu .foo_menu_title:hover { + border: 1px solid #20a53a; + color: #fff !important; + background: #20a53a; +} + +.file_table_view.list_view .file_tr:hover .foo_menu .foo_menu_title:hover, +.file_table_view.list_view .file_tr.active .foo_menu .foo_menu_title:hover, +.file_table_view.list_view .file_tr .foo_menu.foo_menu_click .foo_menu_title { + border: 1px solid #20a53a; + color: #fff !important; + background: #20a53a; +} + +.file_table_view.list_view .file_tr:hover .foo_menu .foo_menu_title:hover::after, +.file_table_view.list_view .file_tr.active .foo_menu .foo_menu_title:hover::after, +.file_table_view.list_view .file_tr .foo_menu.foo_menu_click .foo_menu_title::after { + color: #fff; +} + +/* tr尾部菜单栏 end*/ + + +/* .file_table_view.list_view .file_list_content .file_tr.editr_tr .file_title{ + width: auto; +} */ + +/* 手机端菜单栏 */ +.app_menu_group ul { + color: #20a53a; + height: 50px; + line-height: 50px; + display: inline-block; + margin-left: 8px; +} + +.app_menu_group ul li { + display: inline-block; + margin-right: 10px; +} + +.file_table_view.list_view .file_list_content .file_tr.app_menu_operation .file_td:nth-child(n+3), +.app_menu_group ul li i, +.app_menu_group ul li.separate { + display: none; +} + +/* 手机端菜单栏 end*/ +.file_table_view.list_view .file_list_content .file_tr:last-child { + border-bottom: 1px solid #ececec; +} + +.file_table_view.list_view .file_list_content .file_tr:hover, +.file_table_view.list_view .file_list_content .file_tr.active { + background: #f0f9f7 !important; + border: 1px solid #ddefeb; + border-top: none; + +} +.file_table_view.list_view .file_list_content .file_tr:hover .set_operation_group{ + display: block; +} +.file_table_view.list_view .file_list_content .file_tr:hover .set_file_ps, +.file_table_view.list_view .file_list_content .file_tr.active .set_file_ps{ + border: 1px solid transparent; + background-color: #eff9f7; +} +.file_table_view.list_view .file_list_content .file_td { + height: 45px; + line-height: 45px; + padding: 0 8px; + color: #777; + overflow: hidden; + position: relative; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + display: inline-block; + vertical-align: top; +} +.file_table_view.list_view .file_list_content .file_td.file_operation{ + text-overflow: clip; + text-align: right; +} + +.file_table_view.list_view .file_list_content .file_checkbox { + padding: 14px 12px !important; +} + +.file_table_view.list_view .file_list_content .file_ico_type { + height: 40px; + line-height: 40px; + display: inline-block; + position: relative; +} + +.file_table_view.list_view .file_title { + vertical-align: top; + padding-left: 38px; + width: 100%; + box-sizing: border-box; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + display: inline-block; +} + +.file_table_view.list_view .file_title.file_file_status i { + font-style: normal; +} + +.file_table_view.list_view .file_title i { + font-style: normal; + cursor: pointer; + color: #555; +} +.file_table_view.list_view .file_title i:hover{ + color: #20a53a; +} + +.file_edit_input { + height: 31px; + display: inline-block; + width: 100%; + padding-left: 5px; + outline: none; + border: 1px solid #ebf3f1; + margin-left: -5px; + border-radius: 2px; +} + +.file_table_view .file_list_content .file_icon { + width: 100%; + width: 30px; + height: 30px; + position: absolute; + top: 7.5px; + background-repeat: no-repeat; + background-size: cover; + background-position: center; + image-rendering: -webkit-optimize-contrast; + background-image: url(../img/file_icon/file.png); + cursor: pointer; +} + +.file_table_view .file_list_content .file_html { + background-image: url(../img/file_icon/html.png); +} + +.file_table_view .file_list_content .file_css { + background-image: url(../img/file_icon/css.png); +} + +.file_table_view .file_list_content .file_js { + background-image: url(../img/file_icon/javascript.png); +} + +.file_table_view .file_list_content .file_json { + background-image: url(../img/file_icon/json.png); +} + +.file_table_view .file_list_content .file_folder { + background-image: url(../img/file_icon/folder.png); +} + +.file_table_view .file_list_content .file_php { + background-image: url(../img/file_icon/php.png); +} + +.file_table_view .file_list_content .file_log { + background-image: url(../img/file_icon/log.png); +} + +.file_table_view .file_list_content .file_txt { + background-image: url(../img/file_icon/file.png); +} + +.file_table_view .file_list_content .file_py { + background-image: url(../img/file_icon/python.png); + width: 30px; + height: 30px; + left: 2.5px; + top: 10px; +} + +.file_table_view .file_list_content .file_png { + background-image: url(../img/file_icon/png.png); +} + +.file_table_view .file_list_content .file_lua { + background-image: url(../img/file_icon/lua.png); + width: 30px; + height: 30px; + left: 2.5px; + top: 10px; +} + +/* .file_table_view .file_list_content .file_sh{ + background-image: url(../img/file_icon/shell.png); + width: 30px; + height: 30px; + left: 2.5px; + top: 10px; +} */ +.file_table_view .file_list_content .file_access { + background-image: url(../img/file_icon/access.png); +} + +.file_table_view .file_list_content .file_apk { + background-image: url(../img/file_icon/apk.png); +} + +.file_table_view .file_list_content .file_avi { + background-image: url(../img/file_icon/avi.png); +} + +.file_table_view .file_list_content .file_bmp { + background-image: url(../img/file_icon/bmp.png); +} + +.file_table_view .file_list_content .file_cdr { + background-image: url(../img/file_icon/cdr.png); +} + +.file_table_view .file_list_content .file_gif { + background-image: url(../img/file_icon/gif.png); +} + +.file_table_view .file_list_content .file_ico { + background-image: url(../img/file_icon/ico.png); +} + +.file_table_view .file_list_content .file_java { + background-image: url(../img/file_icon/java.png); +} + +.file_table_view .file_list_content .file_jpeg { + background-image: url(../img/file_icon/jpeg.png); +} + +.file_table_view .file_list_content .file_jpg { + background-image: url(../img/file_icon/jpg.png); +} + +.file_table_view .file_list_content .file_mkv { + background-image: url(../img/file_icon/mkv.png); +} + +.file_table_view .file_list_content .file_mov { + background-image: url(../img/file_icon/mov.png); +} + +.file_table_view .file_list_content .file_mp4 { + background-image: url(../img/file_icon/mp4.png); +} + +.file_table_view .file_list_content .file_mpeg { + background-image: url(../img/file_icon/mpeg.png); +} + +.file_table_view .file_list_content .file_mpg { + background-image: url(../img/file_icon/mpg.png); +} + +.file_table_view .file_list_content .file_pdf { + background-image: url(../img/file_icon/pdf.png); +} + +.file_table_view .file_list_content .file_pptx, +.file_table_view .file_list_content .file_ppt { + background-image: url(../img/file_icon/ppt.png); + width: 30px; + height: 30px; + left: 2.5px; +} + +.file_table_view .file_list_content .file_rar { + background-image: url(../img/file_icon/rar.png); +} + +.file_table_view .file_list_content .file_rm { + background-image: url(../img/file_icon/rm.png); +} + +.file_table_view .file_list_content .file_rmvb { + background-image: url(../img/file_icon/rmvb.png); +} + +.file_table_view .file_list_content .file_sql { + background-image: url(../img/file_icon/sql.png); +} + +.file_table_view .file_list_content .file_swf { + background-image: url(../img/file_icon/swf.png); +} + +.file_table_view .file_list_content .file_tar { + background-image: url(../img/file_icon/tar.png); +} + +.file_table_view .file_list_content .file_webm { + background-image: url(../img/file_icon/webm.png); +} + +.file_table_view .file_list_content .file_webp { + background-image: url(../img/file_icon/webp.png); +} + +.file_table_view .file_list_content .file_wma { + background-image: url(../img/file_icon/wma.png); +} + +.file_table_view .file_list_content .file_wmv { + background-image: url(../img/file_icon/wmv.png); +} + +.file_table_view .file_list_content .file_docx, +.file_table_view .file_list_content .file_doc { + background-image: url(../img/file_icon/doc.png); + width: 30px; + height: 30px; + left: 2.5px; +} + +.file_table_view .file_list_content .file_xlsx, +.file_table_view .file_list_content .file_xls { + background-image: url(../img/file_icon/xls.png); + width: 30px; + height: 30px; + left: 2.5px; +} + +.file_table_view .file_list_content .file_xml { + background-image: url(../img/file_icon/xml.png); +} + +.file_table_view .file_list_content .file_zip { + background-image: url(../img/file_icon/zip.png); +} + +.file_table_view .file_list_content .file_tar, +.file_table_view .file_list_content .file_gz { + background-image: url(../img/file_icon/tar.png); +} + +.file_right_menu, +.content_right_menu, +.selection_right_menu { + padding: 5px 0; + width: 190px; + border: 1px solid #dadada; + box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.15); + position: fixed; + left: -100%; + top: -100%; + z-index: 9999; + background: #fff; +} + + + +.file_right_menu li, +.content_right_menu li, +.selection_right_menu li { + list-style-type: none; + margin: 0; + padding: 0; + height: 30px; + font-size: 12px; + color: #555; + line-height: 30px; + padding-left: 48px; + box-sizing: border-box; + position: relative; + font-weight: 400; + border-radius: 2px; +} + +.selection_right_menu li span { + color: #666; +} + +.file_right_menu li.separate, +.content_right_menu li.separate, +.selection_right_menu li.separate { + height: 1px; + background: #ececec; +} + +.file_right_menu li:hover, +.content_right_menu li:hover, +.selection_right_menu li:hover { + background: #efefef; + cursor: pointer; +} + +.selection_right_menu li:hover .file_menu_down .set_group { + display: inline-block; +} + +.file_right_menu li .file_menu_icon, +.content_right_menu li .file_menu_icon, +.selection_right_menu li .file_menu_icon, +.nav_group .nav_btn_group .file_menu_icon, +.nav_down_list li .file_menu_icon { + display: inline-block; + background-image: url(../img/file_icon/file_menu_icon.png); + background-size: auto !important; + background-repeat: no-repeat; + width: 16px; + height: 16px; + position: absolute; + left: 22px; + top: 50%; + margin-top: -8px; + font-style: normal; + +} + +.nav_down_list:before { + content: ''; + display: inline-block; + width: 100%; + height: 5px; + position: absolute; + top: -5px; +} + +.open_file_icon, +.open_find_dir_file_icon, +.edit_file_icon { + background-position: -16px -16px; +} + +.copy_file_icon { + background-position: 0 -96px; +} + +.paste_file_icon { + background-position: -16px -64px; +} + +.shear_file_icon { + background-position: -16px -80px; +} + +.rename_file_icon { + background-position: 0 -64px; +} + +.del_file_icon { + background-position: 0 -80px; +} + +.download_file_icon { + background-position: -16px -48px; +} + +.folad_file_icon, +.killing_file_icon, +.unzip_file_icon { + background-position: 0 -32px; +} + +.decompression_file_icon { + background-position: 0 -32px; +} + +.dir_kill_file_icon, +.authority_file_icon, +.share_file_icon, +.cancel_share_file_icon { + background-position: -17px -773px; + background-image: none !important; + width: 17px !important; + height: 17px !important; + font-size: 19px; + top: 0 !important; + margin-top: 0 !important; + color: #31dc48; +} + +.dir_kill_file_icon { + font-size: 17px; + color: #c77f22; +} + +.authority_file_icon { + /* font-size: 18px; */ + color: #f2ce4d; +} + +.favorites_file_icon, +.cancel_favorites_file_icon { + background-position: 0 -32px; + background-position: -17px -773px; + width: 17px !important; + height: 17px !important; + margin-top: -8.5px !important; +} + +.file_menu_down .glyphicon-triangle-right { + font-size: 8px; + position: absolute; + right: 8px; + top: 8px; + color: #555; + transform: scale(0.8); +} + +.selection_right_menu.left_menu .file_menu_down .set_group { + top: -6px; + left: -210px; +} + +.file_menu_down .set_group { + display: none; + padding: 5px 0; + background: #fff; + width: 210px; + border: 1px solid #dadada; + position: absolute; + right: -210px; + top: -6px; + box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.15); +} + +.file_right_menu li:hover .set_group { + display: inline-block; +} + +.nav_group .nav_btn_group .power_file_icon, +.file_right_menu li .power_file_icon { + background-image: url(../img/file_icon/power_file_icon.png) !important; + background-size: 16px !important; +} + +.add_favorites_icon { + background-position: -16px -773px; +} + +.refresh_file_icon { + background-position: -16px -513px; +} + +.upload_file_icon { + background-position: 0 -48px; +} + +.create_file_icon, +.create_dir_file_icon, +.newly_file_icon { + background-position: 0 -16px; +} + +.tar_gz_file_icon, +.zip_file_icon, +.rar_file_icon, +.compress_file_icon { + background-position: -16px -32px +} + +.paste_file_icon { + background-position: -16px -64px; +} + +.total_icon_icon { + background-position: 0 -561px; +} + +.total_list_icon { + background-position: -16px -625px; +} + +.selection_right_menu li .file_menu_icon.web_shell_file_icon { + background-image: url(../img/file_icon/ico-cmd.png); +} + +.onselectstart { + position: fixed; + display: none; + width: 0; + height: 0; + background: #bbf1e3; + border: 1px dashed #a1d0c3; + opacity: .5; +} + +.file_list_header .file_check.active, +.file_list_header .file_check.active_2, +.file_tr.active .file_check { + background: #5FB878 !important; + border: 1px solid #5FB878 !important; + color: #fff; +} + +.file_list_header .file_check.active_2::before { + font-weight: 700; + content: ""; + height: 2px; + width: 10px; + display: inline-block; + border-radius: 1px; + position: relative; + background-color: #fff; + top: -4px; + left: 2px; +} + +.file_tr.active .file_check::before, +.file_list_header .file_check.active::before { + font-weight: 700; + content: "\e75e"; + position: relative; + top: -2px; + font-size: 14px; + font-family: "iconfont" !important; + font-style: normal; + -webkit-font-smoothing: antialiased; +} + +.statistics { + display: inline-block; + height: 30px; + line-height: 30px; + padding: 0 10px; + position: absolute; + border-left: 4px solid #20a53a; + bottom: 38px; + font-size: 14px; +} + +.statistics span { + margin: 0 2px; + font-size: 14px; +} + +.bt_file_updated { + position: fixed; + width: 100%; + height: 100%; + left: 0; + top: 0; + right: 0; + bottom: 0; + background: rgba(32, 165, 58, .5); + z-index: 9999; + display: none; +} + +.updated_title { + text-align: center; + position: absolute; + z-index: 99999; + color: #fff; + width: 100%; + font-size: 50px; + opacity: .8; + top: 50%; +} + +.updated_icon { + position: absolute; + top: 50%; + left: 50%; + margin-left: -125px; + margin-top: -200px; +} + +.updated_icon .btn { + width: 250px; + height: 200px; + position: relative; + text-align: center; + margin: 15px; + overflow: hidden; + border-radius: 100%; + display: inline-block; +} + +.updated_icon .cloud { + width: 200px; + height: 80px; + position: relative; + background: #fff; + display: inline-block; + border-radius: 50px; + margin: 40px auto 0; +} + +.updated_icon .cloud:after { + content: ''; + position: absolute; + width: 120px; + height: 80px; + border-radius: 80px 80px 0 0; + top: -40px; + background: #fff; + left: 40px; +} + +.updated_icon .cloud:before { + content: ''; + position: absolute; + background: #dedede; + border-radius: 10px; + width: 90px; + height: 6px; + z-index: 2; + left: 0; + right: 0; + bottom: 25px; + margin: auto; +} + +.updated_icon .file { + position: absolute; + left: 0; + right: 0; + margin: auto; + z-index: 5; + top: 50px; + width: 80px; + height: 100px; + display: inline-block; + overflow: hidden; +} + +.updated_icon .file:after { + content: ''; + position: absolute; + background: #5fb878; + width: 80px; + height: 80px; + left: 0; + top: 0; + border-radius: 0 0 10px 10px; + -webkit-animation: uplaod 3s linear infinite; + animation: uplaod 3s linear infinite; +} + +.updated_icon .file:before { + content: ''; + background: #e2e3e3; + color: #e2e3e3; + width: 60px; + height: 5px; + position: absolute; + left: 0; + right: 0; + top: 20px; + z-index: 3; + margin: auto; + -webkit-animation: uplaod 3s linear infinite; + animation: uplaod 3s linear infinite; + box-shadow: 0 15px, 0 30px; +} + +@-webkit-keyframes uplaod { + 0% { + -webkit-transform: translateY(0px); + transform: translateY(0px); + } + + 100% { + -webkit-transform: translateY(-100px); + transform: translateY(-100px); + } +} + +@keyframes uplaod { + 0% { + -ms-transform: translateY(0px); + -webkit-transform: translateY(0px); + transform: translateY(0px); + } + + 100% { + -ms-transform: translateY(-100px); + -webkit-transform: translateY(-100px); + transform: translateY(-100px); + } +} + +.file_nav_view { + height: 32px; + margin: 15px 0; + font-size: 0; +} + +.file_nav_view .nav_group { + display: inline-block; + vertical-align: top; +} + +.file_nav_view .nav_group.dividing { + border-color: #fff; + height: 100%; + width: 1px; + background: #cfcfcf; + cursor: default; + margin: 0 10px; +} + +.nav_group .nav_btn:hover, +.nav_group .nav_btn_group:hover { + background-color: #20a53a; + border-color: #20a53a; +} + +.nav_group .nav_btn:hover .nav_btn_title, +.nav_group .nav_btn_group:hover .nav_btn_title { + color: #fff; +} + +.nav_group .nav_btn:hover>.iconfont, +.nav_group .nav_btn_group:hover>.iconfont { + color: #fff; +} + +.file_nav_view .nav_btn_group.active:hover { + border-color: #cfcfcf; +} + +.file_nav_view .nav_btn:hover .nav_down_list, +.file_nav_view .nav_btn_group:hover .nav_down_list { + display: block; +} + +.file_nav_view .nav_btn::before { + content: ''; + display: none; + width: 100%; + height: 5px; + position: absolute; + bottom: -5px; + left: 0; +} + +.file_nav_view .nav_btn:hover::before { + display: inline-block; +} + +.nav_group .nav_btn, +.nav_group .nav_btn_group { + padding: 0 10px; + display: inline-block; + box-sizing: border-box; +} + +.terminal_view .nav_btn_title{ + vertical-align: middle !important; + margin-left:5px +} +.terminal_view{ + padding: 4px 10px !important; +} +.terminal_view .iconfont{ + vertical-align: middle; +} + +.nav_group .nav_btn, +.nav_group .nav_btn_group { + display: inline-block; + margin-right: 5px; + border: 1px solid #cfcfcf; + box-sizing: border-box; + cursor: pointer; + border-radius: 2px; + transition: all 100ms; + position: relative; + padding: 7px 10px; +} + +.nav_group { + font-size: 0px; +} + +.nav_group .share_file_list { + margin-right: 8px; +} + +.nav_group .nav_btn_group { + margin-right: 0; + vertical-align: bottom; +} + +.nav_group .nav_btn_group { + padding-left: 28px; +} + +.nav_group .nav_btn_group .file_menu_icon { + left: 7.5px; +} + +.nav_group .nav_btn .icon-xiala, +.nav_group .nav_btn_group .icon-xiala { + font-size: 12px; + margin-left: 2px; + vertical-align: middle; +} + +.nav_group .nav_btn .nav_btn_title, +.nav_group .nav_btn_group .nav_btn_title { + font-size: 12px; + color: #555; + vertical-align: top; +} + +.nav_group .nav_btn_group { + border-right-width: 1px; + border-left-width: 0; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.nav_group .nav_btn_group.active { + background: #ececec; +} + +.nav_group .nav_btn_group:last-child { + border-right-width: 1px; + border-top-right-radius: 2px; + border-bottom-right-radius: 2px; +} + +.nav_group .nav_btn_group:first-child { + border-left-width: 1px; + border-top-left-radius: 2px; + border-bottom-left-radius: 2px; +} + +.nav_group .nav_btn.nav_btn_title .icon-terminal, +.nav_group .nav_btn_group .nav_btn_title .icon-terminal { + font-size: 17px; +} + +.nav_group .nav_btn .icon-shangchuanxiazai, +.nav_group .nav_btn_group .icon-shangchuanxiazai { + font-size: 12px; + margin-right: 5px; + color: #555; +} + +.nav_group.mount_disk_list { + padding-left: 8px; + border-left: 1px solid #ececec; +} + +.nav_group.multi { + padding-right: 8px; + border-right: 1px solid #ececec; +} + +.nav_group.mount_disk_list>.glyphicon { + font-size: 13px; + color: #666; + position: relative; + top: 2px; +} + +.float_r.menu-header-foot { + font-size: 0; +} + +.nav_group.file_all_paste, +.nav_group.recycle_bin { + padding-left: 8px; +} + +.nav_group.recycle_bin .nav_btn { + margin-right: 8px; +} + +.nav_group.recycle_bin .nav_btn, +.nav_group.mount_disk_list .nav_btn { + padding: 7px 10px 7px 5px; +} + +.nav_group.recycle_bin .nav_btn span, +.nav_group.mount_disk_list .nav_btn span { + font-size: 12px; + margin-left: 5px; + color: #666; +} +.file_disk_list .nav_btn span:nth-child(0){ + font-size: 12px; +} + +.nav_group.recycle_bin .nav_btn .glyphicon { + top: 2px; +} + +.nav_group.recycle_bin .nav_btn:hover span, +.nav_group.mount_disk_list .nav_btn:hover span { + color: #fff !important; +} + +.nav_down_list { + display: none; + transition: all 500ms; + list-style: none; + background: #ffffff; + border-radius: 2px; + box-shadow: 4px 2px 5px 0px #ececec; + border: 1px solid #cfcfcf; + position: absolute; + left: -1px; + top: 32px; + z-index: 999999; + overflow: auto; + max-height: 300px; + max-width: 140px; +} + +/* 磁盘、批量缩放样式 */ +.nav_group.mount_disk_list .disk_title_group_btn { + display: none; +} + +.nav_group.mount_disk_list.thezoom .disk_title_group_btn { + border-radius: 2px; + height: 32px; + line-height: 32px; + border: 1px solid #cfcfcf; + padding: 7px 10px; + display: inline-block; + width: 115px; + box-sizing: border-box; + cursor: pointer; + position: relative; + transition: all 500ms; +} + +.nav_group.mount_disk_list .file_disk_list .nav_btn:last-child { + margin-right: 0 !important; +} + +.nav_group.mount_disk_list.thezoom .file_disk_list { + display: none; +} + +.nav_group.mount_disk_list.thezoom .disk_title_group_btn .disk_title_group { + font-size: 12px; + color: #666; + position: absolute; + top: 0px; +} + +.nav_group.multi.thezoom .batch_multi_title::before, +.nav_group.mount_disk_list.thezoom .disk_title_group_btn::before { + content: ''; + display: none; + width: 100%; + height: 5px; + position: absolute; + bottom: -5px; + left: 0; +} + +.nav_group.multi.thezoom .batch_multi_title:hover::before, +.nav_group.mount_disk_list.thezoom .disk_title_group_btn:hover::before { + display: inline-block; +} + +.nav_group.multi.thezoom .batch_multi_title:hover, +.nav_group.mount_disk_list.thezoom .disk_title_group_btn:hover { + background-color: #20a53a; + border-color: #20a53a; +} + +.nav_group.multi.thezoom .batch_multi_title:hover>span, +.nav_group.multi.thezoom .batch_multi_title:hover>i, +.nav_group.mount_disk_list.thezoom .disk_title_group_btn:hover .disk_title_group, +.nav_group.mount_disk_list.thezoom .disk_title_group_btn:hover>i { + color: #fff; +} + +.nav_group.mount_disk_list.thezoom .disk_title_group_btn>i { + font-size: 12px; + margin-left: 2px; + position: absolute; + right: 9px; + top: 0px; +} + +.nav_group.mount_disk_list.thezoom .disk_title_group_btn .nav_down_list { + max-width: 360px; +} + +.nav_group.mount_disk_list.thezoom .disk_title_group_btn .nav_down_list li i { + font-size: 13px; + position: absolute; + left: 8px; + top: 8px; + color: #666; +} + +.nav_group.mount_disk_list.thezoom .disk_title_group_btn .nav_down_list li span { + width: 100%; + padding-right: 10px; +} + +.nav_group.mount_disk_list.thezoom .disk_title_group_btn:hover ul.nav_down_list { + display: block; +} + + +.nav_group.multi.thezoom { + padding-right: 0px; + border-right: none; +} + +.nav_group.multi .batch_multi_title>i, +.nav_group.multi .batch_multi_title>span { + display: none; +} + +.nav_group.multi.thezoom .batch_multi_title>i, +.nav_group.multi.thezoom .batch_multi_title>span { + display: inline-block; + font-size: 12px; + color: #666; +} + +.nav_group.multi.thezoom .batch_multi_title>i { + font-size: 12px; + margin-left: 2px; + position: absolute; + right: 9px; + top: 7px; +} + +.nav_group.multi.thezoom { + position: relative; +} + +.nav_group.multi.thezoom:hover .batch_group_list { + display: block; +} + +.nav_group.multi.thezoom .batch_multi_title { + border-radius: 2px; + height: 32px; + border: 1px solid #cfcfcf; + padding: 7px 10px; + display: inline-block; + width: 85px; + box-sizing: border-box; + cursor: pointer; + position: relative; +} + +.nav_group.multi.thezoom .batch_group_list { + display: none; + width: 85px; + margin-top: 12px; + position: absolute; + left: 0; + border: 1px solid #cfcfcf; + border-radius: 2px; + box-shadow: 4px 2px 5px 0px #ececec; + z-index: 9999; + background-color: #fff; +} + +.nav_group.multi.thezoom .batch_group_list .nav_btn_group { + width: 100%; + border: none; +} + +.nav_group.multi.thezoom .batch_group_list .nav_btn_group:hover { + background-color: #f0f0f0; +} + +.nav_group.multi.thezoom .batch_group_list .nav_btn_group:hover span { + color: #666; +} + +/* 磁盘、批量缩放样式 end */ + + +/* 新建文件夹、文件 */ +.selection_right_menu li .file_menu_icon.create_files_file_icon { + height: 17px; + background-image: url(../img/file_icon/file_text2.png); +} + +.file_nav_view .nav_down_list li i.file_new_icon { + width: 17px; + height: 17px; + position: absolute; + top: 7.5px; + left: 5px; + background-repeat: no-repeat; + background-size: cover; + background-position: center; + image-rendering: -webkit-optimize-contrast; + background-image: url(../img/file_icon/file_text2.png); +} + +.file_nav_view .nav_down_list li i.file_new_folder_icon { + width: 19px; + height: 17px; + position: absolute; + top: 7.5px; + left: 4px; + background-repeat: no-repeat; + background-size: cover; + background-position: center; + image-rendering: -webkit-optimize-contrast; + background-image: url(../img/file_icon/folder.png); +} + +.file_list_content .file_tr textarea:focus { + outline: none !important; + border: 1px solid #ccc; +} + +/* 重命名和新建 - 图标*/ +.file_table_view .file_list_content .file_tr.editr_tr textarea, +.file_table_view.icon_view .createModel textarea { + width: 70px; + padding: 5px 2px; + border-color: #ccc; + overflow: hidden; + resize: none; +} +/* end */ + +/* 重命名和新建 - 列表*/ +.file_table_view.list_view .createModel input , +.file_table_view .file_list_content .file_tr.editr_tr input{ + width: 100%; + padding: 0px 0 0 5px; + height: 25px; + border: 1px solid #ececec; + outline: none; + vertical-align: middle; + line-height: 25px; +} +/* end */ + + +/* 收藏夹 */ +.favorites_file_path .nav_down_list { + max-width: 230px; +} + +.favorites_file_path .nav_down_list li span { + width: 230px !important; + padding-right: 20px +} + +.favorites_body .favorites_span { + width: 680px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + display: inline-block; +} + +.favorites_file_path .nav_down_list li span.icon-shezhi1 { + left: 6px; +} + +/* 收藏夹 end */ + + + +.nav_down_list li { + height: 30px; + line-height: 30px; + position: relative; + box-sizing: border-box; + overflow: hidden; + color: #555; +} + +.nav_down_list li:last-child { + border: none; +} + +.nav_down_list li:hover { + background: #f0f0f0; + color: #555; +} + +.file_dir_item .nav_down_list li span { + line-height: 30px !important; + +} + +.file_dir_item .file_dir span { + color: #666; +} + +.nav_down_list li span:nth-child(1){ + font-size: 14px; + position: absolute; + line-height: 28px; + top: 0; + left: 12px; + color: #666; +} + +.nav_down_list li span:nth-child(2) { + display: inline-block; + font-size: 12px; + color: #555; + line-height: 30px; + padding-left: 28px; + vertical-align: top; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + width: 140px; +} + +.nav_down_list li .iconfont { + color: #aaa; + font-size: 19px; + position: absolute; + left: 5px; +} + +.nav_down_list li .file_menu_icon { + left: 5px; + margin-top: -8.5px; +} + +.nav_down_list li .icon-yingpan { + font-size: 15px; +} + +.nav_group.btn-group-sm>.btn.cut_view_model { + padding: 6px 10px; +} + +/* .recycle_icon { + background-image: url(../img/file_icon/recycle.png); + display: inline-block; + height: 16px; + width: 16px; + background-size: 16px; + background-repeat: no-repeat; + background-position: center; + margin-right: 3px; + position: relative; + top: 2px; +} */ +.file_path_views { + height: 30px; + border-bottom: 1px solid #eee; + font-size: 0; + box-sizing: content-box; + padding-bottom: 15px; +} +.file_path_views .file_path_upper{ + display: inline-block; + height: 30px; + line-height: 30px; + vertical-align: top; + border: 1px solid #cfcfcf; + box-sizing: border-box; + text-align: center; + vertical-align: top; + border-top-left-radius: 2px; + border-bottom-left-radius: 2px; + border-right: none; + color: #666; +} +.file_path_views .file_path_upper{ + padding: 0 12px; +} +.file_path_views .file_path_upper:hover{ + background-color: #20a53a; + color: #fff; + cursor: pointer; + border:1px solid #20a53a; + border-right: none; +} +.file_path_views .file_path_upper:hover i{ + background-position: -60px 6px; +} +.file_path_views .file_path_upper span{ + font-size: 12px; + display: inline-block; + height: 28px; + line-height: 28px; + vertical-align: top; + top: 0; +} + +.file_path_views .forward_path { + display: inline-block; + height: 30px; + line-height: 30px; + vertical-align: top; + margin-right: -1px; +} + + +.file_path_views .forward_path>span { + display: inline-block; + text-align: center; + height: 30px; + line-height: 30px; + width: auto; + padding: 0 9px; + border: 1px solid #cfcfcf; + box-sizing: border-box; + border-radius: 2px; + cursor: pointer; +} +.file_path_views .forward_path>span span{ + font-size: 15px; +} + +.file_path_views .forward_path span:hover { + background: #20a53a; + border: 1px solid #20a53a; +} +.file_path_views .forward_path span:hover:first-child i{ + background-position: -90px 6px; +} +.file_path_views .forward_path span:hover:last-child i{ + background-position: -75px 6px; +} + +.file_path_views .forward_path span.active:hover { + background: #efefef; + box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.1); + border-color: #cfcfcf; +} + +.file_path_views .forward_path span:active { + box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.1); +} + +.file_path_views .forward_path span.active { + background: #efefef; + box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.1); + cursor: no-drop; + transition: all 500ms; +} + +.file_path_views .forward_path span:first-child { + border-right: 0; + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.file_path_views .forward_path span:last-child { + border-left: 1px solid #cfcfcf; + border-radius: 0; +} + +.file_path_input { + display: inline-block; + height: 30px; + width: 50%; + box-sizing: border-box; + position: relative; +} + +.file_path_input input { + border: 1px solid #cfcfcf; + display: inline-block; + width: 100%; + position: absolute; + top: 0; + left: 0; + height: 30px; + padding-left: 5px; + box-sizing: border-box; + background: #f3f3f3; + font-size: 13px; +} + +.file_path_input input.focus { + background-color: #fff; +} + +.file_dir_omit { + display: inline-block; + font-size: 0; + height: 30px; + line-height: 28px; + position: relative; + left: 0; + width: 45px; + cursor: pointer; + border: 1px solid transparent; +} + +.file_dir_omit.active { + background-color: #f0f9f7; + border-top: 1px solid #cfcfcf; + border-bottom: 1px solid #cfcfcf; + border-right: 1px solid #ececec; +} + +.file_dir_omit.active .iconfont { + background-color: #f0f9f7; + border-left: #dadada; + border-right: #dadada; +} + +.file_dir_icon, +.file_dir_omit>span { + display: inline-block; + font-size: 14px; + background-image: url(../img/file_icon/file_menu_icon.png); + background-position: 0px -16px; + background-size: auto; + height: 16px; + position: absolute; + top: 6px; + width: 16px; + left: 5px; + z-index: 99; +} + +.file_dir_icon { + left: 8px; + top: 7px; +} + +.file_dir_omit .iconfont { + position: absolute; + top: 0; + right: 0; + font-size: 12px !important; + padding: 0 2px; +} + +.file_dir_omit:hover { + background: #f3fbf9; + border-top: 1px solid #cfcfcf; + border-bottom: 1px solid #cfcfcf; + border-right: 1px solid #ececec; + /* box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1); */ +} + +.file_dir_omit:hover .iconfont { + background: #f3fbf9; + border-left: 1px solid #ececec; + +} + +.file_dir_omit .nav_down_list { + overflow: hidden; +} + +.file_dir_omit .nav_down_list .file_dir_item { + display: block; + height: 32px; + position: relative; + box-sizing: border-box; + +} + +.file_dir_omit .nav_down_list .file_dir_item .file_dir { + width: 140px; + background: #fff; + height: 32px; + line-height: 32px; + padding-left: 28px; +} + +.file_dir_omit .nav_down_list .file_dir_item .iconfont, +.file_dir_omit .nav_down_list .file_dir_item .nav_down_list { + display: none; +} + +.file_dir_item { + display: inline-block; + font-size: 0; + height: 28px; + line-height: 28px; + cursor: pointer; + color: #777; + box-sizing: border-box; + position: relative; + top: 1px !important; +} + +.file_dir_item.active .nav_down_list { + display: block; + top: 30px; +} + + +.file_dir_view { + position: relative; + font-size: 0; + z-index: 99; + display: inline-block; +} + +.file_dir_view .file_dir_item.active { + background: #f3fbf9; + border: 1px solid #d1e8e0; + box-sizing: border-box; + margin-top: -1px; + box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1); +} + +.file_dir_view .file_dir_item.active .iconfont { + border-left: 1px solid #d1e8e0; +} + +.file_dir_item .iconfont, +.file_dir_omit .iconfont { + vertical-align: top; + font-size: 14px; + font-weight: 600; + height: 28px; + display: inline-block; + border-left: 1px solid #f3f3f3; + border-right: 1px solid #f3f3f3; + transition: all 500ms; + background: #f3f3f3; +} + +.file_dir_item .file_dir { + display: inline-block; + padding: 0 5px; + font-size: 12.5px; + position: relative; + height: 28px; + line-height: 29px; + color: #555; + background: #f3f3f3; + border-left: 1px solid transparent; + max-width: 180px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.file_dir_item .nav_down_list li { + height: 30px; + line-height: 30px; + background: #f9f9f9; +} + +.file_dir_item .nav_down_list li.active { + font-weight: 600; + color: #333; + background-color: #eeeeee; +} + +.file_dir_item .nav_down_list li:hover { + background: #eeeeee; +} + +.file_dir_item:first-child .file_dir { + position: relative; + top: 0; + font-size: 12.4px; + padding-left: 10px; +} + +.file_dir_item:first-child { + left: -1px; +} + +.file_dir_item:first-child .file_dir span:first-child { + vertical-align: text-top; +} + +.file_dir_view .file_dir_item:hover { + background: #f3fbf9; + box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1); +} + +.file_dir_view .file_dir_item:hover .file_dir { + background: #f3fbf9; + border-left: 1px solid #ececec; +} + +.file_dir_view .file_dir_item:hover .iconfont { + border-left: 1px solid #ececec; + border-right: 1px solid #ececec; + background: #f3fbf9; +} + +.file_path_refresh { + display: inline-block; + width: 30px; + height: 30px; + line-height: 30px; + border: 1px solid #cfcfcf; + box-sizing: border-box; + text-align: center; + vertical-align: top; + border-left: 0; + border-top-right-radius: 2px; + border-bottom-right-radius: 2px; + cursor: pointer; +} +.file_path_refresh:hover i{ + background-position:-105px 6px; +} +.file_path_collect:active { + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125) +} + +.file_path_collect i { + font-size: 14px; + position: relative; + top: -1px; +} + +.file_path_collect .icon-wujiaoxing { + color: #ffca2e; +} + +.file_path_collect:hover { + background: #20a53a; + border-color: #38983b; + color: #fff +} + +.search_path_views { + border: 1px solid #20a53a; + display: inline-block; + vertical-align: top; + float: right; + font-size: 0; + position: relative; +} + +.search_path_views .set_updown { + height: 30px; + line-height: 30px; + position: absolute; + +} +.file_path_views .forward_path i{ + top:0 +} +.search_path_views .file_search_input { + border: none; + display: inline-block; + height: 28px; + box-sizing: border-box; + width: 250px; + padding-left: 8px; + box-sizing: border-box; + outline: none; + border-right: none; + font-size: 12px; +} + +.search_path_views .is_search_children { + margin: 0 5px; + color: #cfcfcf; + font-size: 13px; +} + +.search_path_views .is_search_children:hover { + color: #20a53a; + cursor: pointer; +} + +.search_path_views .path_btn { + display: inline-block; + height: 28px; + background: #20a53a; + vertical-align: top; + color: #fff; + border: none; + width: 35px; + text-align: center; + cursor: pointer; + outline: none; +} + +.search_path_views .path_btn:hover { + background-color: #38983b; +} + +.search_path_views .path_btn:active { + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); +} + +.search_path_views .set_up { + display: none; + position: absolute; + top: 30px; + left: 0; + width: 210px; + height: 30px; + background: #fff; + box-shadow: 4px 2px 5px 0px #ececec; + z-index: 9999; + border: 1px solid #ececec; + border-radius: 2px; +} + +.search_path_views .file_search_config { + position: absolute; + right: 35px; + font-size: 12px; + color: #666; + width: 105px; + border-top: none; + background: #fff; + height: 28px; + line-height: 28px; + top: 0; +} + +.search_path_views .file_search_config .file_search_checked { + position: relative; + height: 15px; + width: 15px; + border-radius: 1px; + cursor: pointer; + text-align: center; + margin: 0; + vertical-align: sub; + border:1px solid #aaa; + border-radius: 2px; + display: inline-block; + font-family: 'Glyphicons Halflings'; + font-style: normal; + font-weight: 400; + line-height: 1; + -webkit-font-smoothing: antialiased; +} + +.search_path_views .file_search_config .file_search_checked.active { + background: #20a53a; + color: #fff; + border-color:#20a53a ; +} + +.search_path_views .file_search_config .file_search_checked.active:after { + content: "\e013"; + font-size: 12px; + transform: scale(.85); + position: absolute; + left: .75px; + top: .75px; +} + + +.search_path_views .file_search_config label { + position: absolute; + right: 3px; + cursor: pointer; + top: 0; + font-weight: 400; +} + +.mr0 { + margin-right: 0 !important; +} + +.ml0 { + margin-left: 0 !important; +} + +.plr25 { + padding: 0 25px +} + +.float_r { + float: right; +} + +.file_bodys { + background-color: white; + margin: 10px 15px; + padding: 15px 20px; + font-size: 12px; + -webkit-user-select: none; + -moz-user-select: none; + -o-user-select: none; + user-select: none; + +} + +/* 新样式 */ +.file_list_icon { + border-top: 1px solid #eee; + padding-top: 15px; +} + +.file_list_icon .file_table_view.list_view .file_list_content .file_tr { + display: inline-block; + width: auto; + background: #fff; + border-color: #fff; + position: relative; + height: auto; + margin: 2.5px 5px; + cursor: pointer; + vertical-align: top; +} + +.file_table_view.list_view .file_list_content .file_tr.selected { + background: #f0f9f7 !important; +} + +.file_list_icon .file_table_view.list_view .file_list_content .file_tr .file_td { + height: auto; + padding: 0; + line-height: normal; +} + +.file_list_icon .file_table_view.list_view .file_list_content .file_tr .file_td:not(.file_name) { + display: none; +} + +.file_list_icon .file_table_view.list_view .file_list_content .file_tr .file_td:nth-of-type(1) { + position: absolute; + left: 0; + top: 0; +} + +.file_list_icon .file_table_view.list_view .file_list_content .file_tr .file_td:nth-of-type(2) { + width: 99px; + min-width: 99px; +} + +.file_list_icon .file_table_view.list_view .file_list_content .file_type { + width: 100%; + height: 65px; +} + +.file_list_icon .file_table_view.list_view .file_list_content .file_icon { + top: 15px; + width: 50px; + height: 50px; + left: 50%; + margin-left: -25px; + background-size: auto; +} + +.file_list_icon .file_title { + display: inline-block; + text-align: center; + color: #666; + padding: 10px 5px 15px 5px; + font-size: 12px; + word-break: break-all; + white-space: initial; +} + +[data-type="folder"] .file_title { + cursor: pointer; +} + +.file_tips { + margin-left: 30px; + color: #999; + font-size: 12px; +} + +.file_bodys { + margin-bottom: 57px; + -webkit-box-sizing: initial; + -moz-box-sizing: initial; + box-sizing: initial; +} + +.file_path_input { + position: relative; +} + +.file_path_input .file_dir_view { + white-space: nowrap; + position: absolute; + left: 1px; + height: 30px; + line-height: 28px; +} + +/* .file_path_shadow{ + position: absolute; + left: -21px; + width: 20px; + height: 100%; + z-index: 1; + box-shadow: 21px 0px 9px 1px rgba(0, 0, 0, 0.1); +} */ + +.not-btn-border .layui-layer-btn { + background-color: #fff; + border-top: none; +} + +.not-btn-border .layui-layer-btn a { + line-height: 30px; + padding: 0 15px; +} + +.not-btn-border .layui-layer-btn0 { + margin-left: 15px; + border-radius: 2px; + padding: 0 15px; +} + +.not-btn-border .layui-layer-btn1 { + border-radius: 2px; + +} + +.not-btn-border .layui-layer-btn { + padding: 9px 15px 10px; +} + +.file_upload_view { + padding: 10px 15px 0 15px; +} + +.file_select_file { + padding-bottom: 10px; +} + +.file_select_file button { + padding: 7.5px 12px; + border-radius: 2px; + border: none; + background-color: #4592f0; + border-color: #367fa9; + margin-right: 15px; + color: #fff; + outline: none; +} + +.file_select_file button:hover { + background-color: #4188de; + border-color: #367fa9; +} + +.file_select_file button:active { + box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.2); +} + +.file_content_list { + width: 100%; + height: 355px; + background-color: #fafbfe; + border-radius: 2px; + border: #e4e5e9 1px solid; + position: relative; +} + +.file_upload_tips { + text-align: center; + color: #ccc; + font-size: 28px; + position: absolute; + width: 100%; + height: 40px; + line-height: 40px; + top: 50%; + margin-top: -40px; +} + +/* 文件上传 */ +.upload_or_download .glyphicon { + color: #666; +} + +.upload_or_download_view { + padding: 10px 20px; +} + +.upload_btn_group { + margin-top: 15px; + display: inline-block; + text-align: right; + width: 100%; +} + +.upload_btn_group button { + margin-right: 15px; +} + +.upload_btn_group button:last-child { + margin: auto; +} + + + +/* 文件管理分页 */ +.filePage { + width: 100%; + height: auto; +} + +.filePage>div { + margin-top: 10px; +} + +.filePage>.page_num { + float: left; + line-height: 30px; + padding: 0 5px; +} + +.filePage>.page_num a { + float: initial; + border: none; + line-height: 30px; + /* height: 30px; */ + color: #20a53a; + display: inline; + font-size: 13px; + padding: 0 5px; +} + +.filePage>.page_num a:hover { + background: #fff; + color: #20a53a; + text-shadow: 0 1px 0 #fff; + cursor: pointer; +} + +.filePage.showRow { + margin: 0 3px; + border: #cfcfcf 1px solid; +} + +.filePage .page span { + height: 30px; + line-height: 30px; + padding: 0 12px +} + +.filePage .Pcount-item { + border-left: none; + border-right: 1px solid #ececec; + color: #333; +} + +.filePage .Pcount-item .showRow { + margin: 0 3px; + border: 1px solid #eee; + border-radius: 2px; +} + +/* 预览图片 */ +.preview_images_mask { + position: fixed; + left: 50%; + top: 50%; + background: rgb(0 0 0 /.85); + z-index: 9999; + height: 650px; + width: 750px; + margin-left: -375px; + margin-top: -325px; + overflow: hidden; + -webkit-box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.3); + box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.3); + border-radius: 4px; +} + +.preview_images_mask .preview_head { + height: 45px; + line-height: 45px; + width: 100%; + position: absolute; + z-index: 999; +} + +.preview_images_mask .preview_title { + text-align: center; + width: 100%; + display: inline-block; + font-size: 16px; + background-color: rgb(0 0 0 /.45); + color: #cacaca; + cursor: all-scroll; +} + +.preview_images_mask .preview_close, +.preview_images_mask .preview_full, +.preview_images_mask .preview_small { + position: absolute; + right: 0; + width: 45px; + height: 45px; + line-height: 47px; + font-size: 19px; + text-align: center; + color: #d6d6d6; +} + +.preview_images_mask .preview_full, +.preview_images_mask .preview_small { + right: 45px; + font-size: 18px; +} + +.preview_images_mask .preview_close:hover, +.preview_images_mask .preview_full:hover, +.preview_images_mask .preview_small:hover { + background-color: #444; + color: #fff; + cursor: pointer; +} + +.preview_images_mask .preview_body { + position: relative; + height: 100%; + z-index: 99; + padding: 45px 0; +} + +.preview_images_mask:hover .preview_cut_view { + opacity: 1; +} + +.preview_images_mask:hover .preview_toolbar { + opacity: 1; +} + +.preview_images_mask .preview_body img { + position: absolute; + display: none; + transition: all 200ms; + cursor: all-scroll; + display: inline-block; + opacity: 0; + webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.preview_images_mask .preview_toolbar { + position: absolute; + bottom: 0; + width: 250px; + left: 50%; + margin-left: -125px; + height: 45px; + border-radius: 3px; + background-color: rgb(0 0 0 /.65); + font-size: 18px; + z-index: 999; + opacity: 0; + transition: all 1000ms; +} + +.preview_images_mask .preview_toolbar a { + width: 50px; + height: 45px; + line-height: 45px; + text-align: center; + display: inline-block; + transition: all 500ms; + border-radius: 3px; +} + +.preview_images_mask .preview_toolbar a:hover { + background-color: rgb(86 86 86 / 75%); +} + +.preview_images_mask .preview_toolbar span { + vertical-align: middle; + color: #bbb; +} + +.preview_images_mask .preview_toolbar span.reverse-repeat { + transform: rotateY(180deg); +} + +.preview_images_mask .preview_cut_view { + opacity: 0; + transition: all 500ms; +} + +.preview_images_mask .preview_cut_view a:hover { + background-color: #3a3a3a; + color: #fff; +} + +.preview_images_mask .preview_cut_view a { + position: absolute; + font-size: 26px; + width: 50px; + height: 50px; + text-align: center; + line-height: 50px; + top: 50%; + margin-top: -25px; + background-color: rgb(194 194 194 / 80%); + border-radius: 50%; + transition: all 200ms; + z-index: 999; +} + +.preview_images_mask .preview_cut_view a:nth-child(1) { + left: 3%; + +} + +.preview_images_mask .preview_cut_view a:nth-child(2) { + right: 3%; +} + +.preview_images_mask .preview_cut_view span { + vertical-align: top; + height: 50px; + width: 50px; + text-align: center; + line-height: 50px; +} + +/* 覆盖样式调整 */ +.exists_files_style { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + display: inline-block; + width: 145px; +} + +/* 覆盖样式调整 end*/ +/* end */ + + +.readonly-form-input:focus { + outline: none; + background-color: -internal-light-dark(rgba(239, 239, 239, 0.4), rgba(59, 59, 59, 0.4)); + cursor: default; +} + +.readonly-form-input:active { + border-color: #ccc; + box-shadow: none; + -webkit-box-shadow: none; +} +.icon-file-upper{ + background-position:0 6px; +} +.icon-file-back{ + background-position:-30px 6px; +} +.icon-file-forward{ + background-position:-15px 6px; +} +.icon-file-refresh{ + background-position:-45px 6px; +} +.icon-file{ + display: inline-block; + background-image:url("../images/iconfont-file.png"); + height: 28px; + line-height: 28px; + width: 15px; + background-repeat: no-repeat; +} +.bt-warp{ + min-width: 1400px; +} +.file_menu_tips{ + display: inline-block; + font-size: 14px; + line-height: 32px; +} +.file_menu_tips span{ + vertical-align: middle; + margin-right:3px; + color: #f0ad4e; +} +.file_menu_tips span:nth-child(2){ + font-size: 12px; +} +.file_path_refresh:hover, .file_path_collect:hover { + background: #20a53a; + border-color: #38983b; + color: #fff; +} \ No newline at end of file diff --git a/BTPanel/static/css/files_style.min.css b/BTPanel/static/css/files_style.min.css new file mode 100644 index 00000000..ebfb2a20 --- /dev/null +++ b/BTPanel/static/css/files_style.min.css @@ -0,0 +1 @@ +.webDelete .vcode #vcodeResult{width:50px;height:26px}*{margin:0;padding:0}.file_table_view.list_view::-webkit-scrollbar{width:12px;height:7px;padding:2px;position:relative}.file_table_view.list_view::-webkit-scrollbar-thumb{border-radius:3px;box-shadow:inset 0 0 6px rgba(0,0,0,.1);background:#bbb}.file_table_view.list_view::-webkit-scrollbar-track{border-radius:3px;box-shadow:inset 0 0 6px rgba(0,0,0,.1);background:#ededed}.file_list_header{height:40px;background:#f6f6f6;border-bottom:none;position:relative;z-index:999;overflow-y:hidden}.file_list_header .file_checkbox,.file_table_view.list_view .file_list_content .file_checkbox{padding:12px!important;margin-left:0!important;cursor:default}.file_list_header .file_checkbox input,.file_table_view.list_view .file_list_content .file_checkbox input{display:none}.file_list_header .file_check,.file_table_view.list_view .file_list_content .file_check{width:16px;height:16px;line-height:16px;border:1px solid #d2d2d2;box-sizing:border-box;border-radius:2px;cursor:pointer;transition:all .2s;background-color:#fff}.file_list_header .file_main_title{line-height:40px;height:40px;overflow:hidden;border:1px solid transparent;border-bottom:none}.file_list_header .file_check i,.file_table_view.list_view .file_list_content .file_check i{position:relative;top:-2px;font-size:14px}.file_table_view.icon_view{position:relative;overflow:hidden}.file_table_view.list_view{position:relative;overflow:auto;z-index:1}.file_table_view .file_name .file_title i:hover{color:#000;cursor:pointer}.file_table_view.list_view .file_name{min-width:120px}.file_table_view.icon_view .file_list_header{display:none}.file_table_view.icon_view .app_menu_group,.file_table_view.icon_view .file_accept,.file_table_view.icon_view .file_checkbox,.file_table_view.icon_view .file_mtime,.file_table_view.icon_view .file_name .iconfont,.file_table_view.icon_view .file_ps,.file_table_view.icon_view .file_size,.file_table_view.icon_view .file_type,.file_table_view.icon_view .file_user{display:none}.file_table_view.icon_view .file_tr{display:inline-block;width:80px!important;min-height:90px;padding:5px;vertical-align:top;margin:0 10px 10px 0}.file_table_view.icon_view .file_name{width:100%!important;position:relative}.file_table_view.icon_view .file_ico_type{height:60px}.file_table_view.icon_view .file_list_content .file_icon{width:45px;height:45px;left:21%}.file_table_view.icon_view .file_name i{font-style:inherit}.file_table_view.icon_view .file_title.file_dir_status,.file_table_view.icon_view .file_title.file_file_status{width:70px;text-align:center;word-break:break-all;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}.file_table_view.icon_view .file_list_content .file_tr:hover{background:#f0f9f7!important}.file_table_view.icon_view .file_list_content .file_tr.active{background:#f0f9f7!important;border:1px solid #ddefeb;box-sizing:border-box;padding:4px}.file_list_header .file_th{float:left;padding-left:10px;padding-right:10px;height:40px;line-height:40px;font-size:13px;color:#333;position:relative;cursor:pointer;margin-left:-5px}.file_list_header .file_th>span{vertical-align:middle}.file_table_view.list_view .file_type{min-width:80px;max-width:300px}.file_list_header .file_th{color:#333}.file_list_header .file_th.active{background:#eee;color:#555}.file_list_header .file_th:hover{background:#eee}.file_list_header .file_checkbox:hover,.file_list_header .file_operation:hover{background:#f3f3f3}.file_ps_title .set_file_ps{height:25px;line-height:25px;border:1px solid transparent;width:100%;border-radius:2px;padding-left:5px;outline:0}.file_ps_title .set_file_ps:hover{border:1px solid #20a53a!important;background-color:#fff!important}.file_list_header .file_width_resize{float:left;width:10px;margin-left:-5px;height:40px;overflow:hidden;position:relative;z-index:998}.file_list_header .file_width_resize::after{content:'';display:block;background:#e2e2e2;width:1px;height:25px;position:absolute;top:50%;left:50%;margin-left:-1px;margin-top:-12.5px}.file_list_header .file_name{margin-left:0}.file_operation.file_td .set_operation_group{display:none}.file_table_view.list_view .file_tr.active .set_operation_group.is_mobile{display:block!important}.file_list_header .icon_sort{display:inline-block;height:40px;line-height:40px;transition:all .5s;float:right}.file_list_header .icon_sort.active{transform:rotate(180deg)}.file_list_header .icon_sort .iconfont{vertical-align:bottom}.file_table_view.list_view .file_list_shadow{width:100%;height:8px;position:absolute;left:0;right:0;background:-webkit-linear-gradient(top,rgba(220,220,220,.5),rgba(255,255,255,0));z-index:99}.file_table_view.list_view .file_shadow_bottom{background:-webkit-linear-gradient(top,rgba(255,255,255,0),rgba(220,220,220,.5));bottom:0}.align-center{text-align:center}.align-left{text-align:left}.align-right{text-align:right}.btlink{color:#20a53a;text-decoration:none}.file_table_view.list_view .file_list_content{min-width:750px;overflow:auto;border-top:1px solid #ececec}.file_table_view.list_view .file_list_content .file_tr{height:45px;box-sizing:border-box;color:#fff;border-bottom:1px solid #f3f3f3;border-left:1px solid transparent;border-right:1px solid transparent;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file_table_view.list_view .file_list_content .file_tr.editr_tr .file_td{display:none}.file_table_view.list_view .file_list_content .file_tr.editr_tr .file_name{display:inline-block;margin-left:40px}.file_table_view.list_view .file_name .iconfont{display:block}.file_table_view.list_view .file_list_content .file_tr.editr_tr .file_name .iconfont{display:none}.file_table_view.list_view .file_name .icon-favorites,.file_table_view.list_view .file_name .icon-share1{font-size:18px;width:18px;height:18px;vertical-align:middle;position:absolute;top:50%;right:5px;margin-top:-9px;color:#2e973e;display:inline-block}.file_table_view.list_view .file_name .icon-favorites{color:#f5a623;font-size:17px}.file_table_view.list_view .file_name .icon-favorites:before,.file_table_view.list_view .file_name .icon-share1:before{position:relative;top:-16px;height:18px;width:18px;cursor:pointer}.file_table_view.list_view .file_list_content .file_tr.editr_tr .rename_file_input{height:32px;line-height:30px;border:1px solid #cfcfcf;border-radius:2px;padding-left:5px;margin-right:15px;width:150px}.file_table_view.list_view .file_list_content .file_tr.editr_tr .rename_file_input:focus{outline:0;border:1px solid #20a53a}.file_table_view.list_view .file_list_content .file_tr.editr_tr .add_file_btn,.file_table_view.list_view .file_list_content .file_tr.editr_tr .clear_file_btn{height:32px;line-height:30px;padding:0 18px;margin-right:10px;background-color:#20a53a;border-color:#20a53a;border-radius:2px;color:#fff;border:1px solid transparent}.file_table_view.list_view .file_list_content .file_tr.editr_tr .clear_file_btn{color:#555;background-color:#fff;border-color:#ccc}.file_table_view.list_view .file_list_content .file_tr.editr_tr .add_file_btn::focus,.file_table_view.list_view .file_list_content .file_tr.editr_tr .clear_file_btn::focus{outline:0}.file_table_view.list_view .file_list_content .file_tr.editr_tr .add_file_btn:hover{color:#fff;background-color:#10952a;border-color:#398439}.file_table_view.list_view .file_ps .foo_menu{display:none}.file_table_view.list_view .file_tr:hover .foo_menu{display:inline-block;position:absolute;right:10px}.file_table_view.list_view .file_tr .foo_menu_title{position:relative;padding-right:10px}.file_table_view.list_view .file_tr .foo_menu_title i{display:inline-block;width:7px;height:7px;color:#20a53a;border-left:1px solid;border-bottom:1px solid;transform:rotate(-45deg);position:absolute;top:3px;right:0}.file_table_view.list_view .file_tr.active .foo_menu{display:inline-block;position:absolute;right:10px}.file_table_view.list_view .file_tr.active .foo_menu .foo_menu_title,.file_table_view.list_view .file_tr:hover .foo_menu .foo_menu_title{border:1px solid #20a53a;color:#20a53a!important;background:#fff;border-radius:2px;padding:4px 18px 4px 8px;font-size:12px;cursor:pointer;position:relative}.file_table_view.list_view .file_tr .foo_menu .foo_menu_title:hover,.file_table_view.list_view .file_tr.active .foo_menu .foo_menu_title:hover{border:1px solid #20a53a;color:#fff!important;background:#20a53a}.file_table_view.list_view .file_tr .foo_menu.foo_menu_click .foo_menu_title,.file_table_view.list_view .file_tr.active .foo_menu .foo_menu_title:hover,.file_table_view.list_view .file_tr:hover .foo_menu .foo_menu_title:hover{border:1px solid #20a53a;color:#fff!important;background:#20a53a}.file_table_view.list_view .file_tr .foo_menu.foo_menu_click .foo_menu_title::after,.file_table_view.list_view .file_tr.active .foo_menu .foo_menu_title:hover::after,.file_table_view.list_view .file_tr:hover .foo_menu .foo_menu_title:hover::after{color:#fff}.app_menu_group ul{color:#20a53a;height:50px;line-height:50px;display:inline-block;margin-left:8px}.app_menu_group ul li{display:inline-block;margin-right:10px}.app_menu_group ul li i,.app_menu_group ul li.separate,.file_table_view.list_view .file_list_content .file_tr.app_menu_operation .file_td:nth-child(n+3){display:none}.file_table_view.list_view .file_list_content .file_tr:last-child{border-bottom:1px solid #ececec}.file_table_view.list_view .file_list_content .file_tr.active,.file_table_view.list_view .file_list_content .file_tr:hover{background:#f0f9f7!important;border:1px solid #ddefeb;border-top:none}.file_table_view.list_view .file_list_content .file_tr:hover .set_operation_group{display:block}.file_table_view.list_view .file_list_content .file_tr.active .set_file_ps,.file_table_view.list_view .file_list_content .file_tr:hover .set_file_ps{border:1px solid transparent;background-color:#eff9f7}.file_table_view.list_view .file_list_content .file_td{height:45px;line-height:45px;padding:0 8px;color:#777;overflow:hidden;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;vertical-align:top}.file_table_view.list_view .file_list_content .file_td.file_operation{text-overflow:clip;text-align:right}.file_table_view.list_view .file_list_content .file_checkbox{padding:14px 12px!important}.file_table_view.list_view .file_list_content .file_ico_type{height:40px;line-height:40px;display:inline-block;position:relative}.file_table_view.list_view .file_title{vertical-align:top;padding-left:38px;width:100%;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block}.file_table_view.list_view .file_title.file_file_status i{font-style:normal}.file_table_view.list_view .file_title i{font-style:normal;cursor:pointer;color:#555}.file_table_view.list_view .file_title i:hover{color:#20a53a}.file_edit_input{height:31px;display:inline-block;width:100%;padding-left:5px;outline:0;border:1px solid #ebf3f1;margin-left:-5px;border-radius:2px}.file_table_view .file_list_content .file_icon{width:100%;width:30px;height:30px;position:absolute;top:7.5px;background-repeat:no-repeat;background-size:cover;background-position:center;image-rendering:-webkit-optimize-contrast;background-image:url(../img/file_icon/file.png);cursor:pointer}.file_table_view .file_list_content .file_html{background-image:url(../img/file_icon/html.png)}.file_table_view .file_list_content .file_css{background-image:url(../img/file_icon/css.png)}.file_table_view .file_list_content .file_js{background-image:url(../img/file_icon/javascript.png)}.file_table_view .file_list_content .file_json{background-image:url(../img/file_icon/json.png)}.file_table_view .file_list_content .file_folder{background-image:url(../img/file_icon/folder.png)}.file_table_view .file_list_content .file_php{background-image:url(../img/file_icon/php.png)}.file_table_view .file_list_content .file_log{background-image:url(../img/file_icon/log.png)}.file_table_view .file_list_content .file_txt{background-image:url(../img/file_icon/file.png)}.file_table_view .file_list_content .file_py{background-image:url(../img/file_icon/python.png);width:30px;height:30px;left:2.5px;top:10px}.file_table_view .file_list_content .file_png{background-image:url(../img/file_icon/png.png)}.file_table_view .file_list_content .file_lua{background-image:url(../img/file_icon/lua.png);width:30px;height:30px;left:2.5px;top:10px}.file_table_view .file_list_content .file_access{background-image:url(../img/file_icon/access.png)}.file_table_view .file_list_content .file_apk{background-image:url(../img/file_icon/apk.png)}.file_table_view .file_list_content .file_avi{background-image:url(../img/file_icon/avi.png)}.file_table_view .file_list_content .file_bmp{background-image:url(../img/file_icon/bmp.png)}.file_table_view .file_list_content .file_cdr{background-image:url(../img/file_icon/cdr.png)}.file_table_view .file_list_content .file_gif{background-image:url(../img/file_icon/gif.png)}.file_table_view .file_list_content .file_ico{background-image:url(../img/file_icon/ico.png)}.file_table_view .file_list_content .file_java{background-image:url(../img/file_icon/java.png)}.file_table_view .file_list_content .file_jpeg{background-image:url(../img/file_icon/jpeg.png)}.file_table_view .file_list_content .file_jpg{background-image:url(../img/file_icon/jpg.png)}.file_table_view .file_list_content .file_mkv{background-image:url(../img/file_icon/mkv.png)}.file_table_view .file_list_content .file_mov{background-image:url(../img/file_icon/mov.png)}.file_table_view .file_list_content .file_mp4{background-image:url(../img/file_icon/mp4.png)}.file_table_view .file_list_content .file_mpeg{background-image:url(../img/file_icon/mpeg.png)}.file_table_view .file_list_content .file_mpg{background-image:url(../img/file_icon/mpg.png)}.file_table_view .file_list_content .file_pdf{background-image:url(../img/file_icon/pdf.png)}.file_table_view .file_list_content .file_ppt,.file_table_view .file_list_content .file_pptx{background-image:url(../img/file_icon/ppt.png);width:30px;height:30px;left:2.5px}.file_table_view .file_list_content .file_rar{background-image:url(../img/file_icon/rar.png)}.file_table_view .file_list_content .file_rm{background-image:url(../img/file_icon/rm.png)}.file_table_view .file_list_content .file_rmvb{background-image:url(../img/file_icon/rmvb.png)}.file_table_view .file_list_content .file_sql{background-image:url(../img/file_icon/sql.png)}.file_table_view .file_list_content .file_swf{background-image:url(../img/file_icon/swf.png)}.file_table_view .file_list_content .file_tar{background-image:url(../img/file_icon/tar.png)}.file_table_view .file_list_content .file_webm{background-image:url(../img/file_icon/webm.png)}.file_table_view .file_list_content .file_webp{background-image:url(../img/file_icon/webp.png)}.file_table_view .file_list_content .file_wma{background-image:url(../img/file_icon/wma.png)}.file_table_view .file_list_content .file_wmv{background-image:url(../img/file_icon/wmv.png)}.file_table_view .file_list_content .file_doc,.file_table_view .file_list_content .file_docx{background-image:url(../img/file_icon/doc.png);width:30px;height:30px;left:2.5px}.file_table_view .file_list_content .file_xls,.file_table_view .file_list_content .file_xlsx{background-image:url(../img/file_icon/xls.png);width:30px;height:30px;left:2.5px}.file_table_view .file_list_content .file_xml{background-image:url(../img/file_icon/xml.png)}.file_table_view .file_list_content .file_zip{background-image:url(../img/file_icon/zip.png)}.file_table_view .file_list_content .file_gz,.file_table_view .file_list_content .file_tar{background-image:url(../img/file_icon/tar.png)}.content_right_menu,.file_right_menu,.selection_right_menu{padding:5px 0;width:190px;border:1px solid #dadada;box-shadow:5px 5px 12px rgba(0,0,0,.15);position:fixed;left:-100%;top:-100%;z-index:9999;background:#fff}.content_right_menu li,.file_right_menu li,.selection_right_menu li{list-style-type:none;margin:0;padding:0;height:30px;font-size:12px;color:#555;line-height:30px;padding-left:48px;box-sizing:border-box;position:relative;font-weight:400;border-radius:2px}.selection_right_menu li span{color:#666}.content_right_menu li.separate,.file_right_menu li.separate,.selection_right_menu li.separate{height:1px;background:#ececec}.content_right_menu li:hover,.file_right_menu li:hover,.selection_right_menu li:hover{background:#efefef;cursor:pointer}.selection_right_menu li:hover .file_menu_down .set_group{display:inline-block}.content_right_menu li .file_menu_icon,.file_right_menu li .file_menu_icon,.nav_down_list li .file_menu_icon,.nav_group .nav_btn_group .file_menu_icon,.selection_right_menu li .file_menu_icon{display:inline-block;background-image:url(../img/file_icon/file_menu_icon.png);background-size:auto!important;background-repeat:no-repeat;width:16px;height:16px;position:absolute;left:22px;top:50%;margin-top:-8px;font-style:normal}.nav_down_list:before{content:'';display:inline-block;width:100%;height:5px;position:absolute;top:-5px}.edit_file_icon,.open_file_icon,.open_find_dir_file_icon{background-position:-16px -16px}.copy_file_icon{background-position:0 -96px}.paste_file_icon{background-position:-16px -64px}.shear_file_icon{background-position:-16px -80px}.rename_file_icon{background-position:0 -64px}.del_file_icon{background-position:0 -80px}.download_file_icon{background-position:-16px -48px}.folad_file_icon,.killing_file_icon,.unzip_file_icon{background-position:0 -32px}.decompression_file_icon{background-position:0 -32px}.authority_file_icon,.cancel_share_file_icon,.dir_kill_file_icon,.share_file_icon{background-position:-17px -773px;background-image:none!important;width:17px!important;height:17px!important;font-size:19px;top:0!important;margin-top:0!important;color:#31dc48}.dir_kill_file_icon{font-size:17px;color:#c77f22}.authority_file_icon{color:#f2ce4d}.cancel_favorites_file_icon,.favorites_file_icon{background-position:0 -32px;background-position:-17px -773px;width:17px!important;height:17px!important;margin-top:-8.5px!important}.file_menu_down .glyphicon-triangle-right{font-size:8px;position:absolute;right:8px;top:8px;color:#555;transform:scale(.8)}.selection_right_menu.left_menu .file_menu_down .set_group{top:-6px;left:-210px}.file_menu_down .set_group{display:none;padding:5px 0;background:#fff;width:210px;border:1px solid #dadada;position:absolute;right:-210px;top:-6px;box-shadow:5px 5px 12px rgba(0,0,0,.15)}.file_right_menu li:hover .set_group{display:inline-block}.file_right_menu li .power_file_icon,.nav_group .nav_btn_group .power_file_icon{background-image:url(../img/file_icon/power_file_icon.png)!important;background-size:16px!important}.add_favorites_icon{background-position:-16px -773px}.refresh_file_icon{background-position:-16px -513px}.upload_file_icon{background-position:0 -48px}.create_dir_file_icon,.create_file_icon,.newly_file_icon{background-position:0 -16px}.compress_file_icon,.rar_file_icon,.tar_gz_file_icon,.zip_file_icon{background-position:-16px -32px}.paste_file_icon{background-position:-16px -64px}.total_icon_icon{background-position:0 -561px}.total_list_icon{background-position:-16px -625px}.selection_right_menu li .file_menu_icon.web_shell_file_icon{background-image:url(../img/file_icon/ico-cmd.png)}.onselectstart{position:fixed;display:none;width:0;height:0;background:#bbf1e3;border:1px dashed #a1d0c3;opacity:.5}.file_list_header .file_check.active,.file_list_header .file_check.active_2,.file_tr.active .file_check{background:#5fb878!important;border:1px solid #5fb878!important;color:#fff}.file_list_header .file_check.active_2::before{font-weight:700;content:"";height:2px;width:10px;display:inline-block;border-radius:1px;position:relative;background-color:#fff;top:-4px;left:2px}.file_list_header .file_check.active::before,.file_tr.active .file_check::before{font-weight:700;content:"\e75e";position:relative;top:-2px;font-size:14px;font-family:iconfont!important;font-style:normal;-webkit-font-smoothing:antialiased}.statistics{display:inline-block;height:30px;line-height:30px;padding:0 10px;position:absolute;border-left:4px solid #20a53a;bottom:38px;font-size:14px}.statistics span{margin:0 2px;font-size:14px}.bt_file_updated{position:fixed;width:100%;height:100%;left:0;top:0;right:0;bottom:0;background:rgba(32,165,58,.5);z-index:9999;display:none}.updated_title{text-align:center;position:absolute;z-index:99999;color:#fff;width:100%;font-size:50px;opacity:.8;top:50%}.updated_icon{position:absolute;top:50%;left:50%;margin-left:-125px;margin-top:-200px}.updated_icon .btn{width:250px;height:200px;position:relative;text-align:center;margin:15px;overflow:hidden;border-radius:100%;display:inline-block}.updated_icon .cloud{width:200px;height:80px;position:relative;background:#fff;display:inline-block;border-radius:50px;margin:40px auto 0}.updated_icon .cloud:after{content:'';position:absolute;width:120px;height:80px;border-radius:80px 80px 0 0;top:-40px;background:#fff;left:40px}.updated_icon .cloud:before{content:'';position:absolute;background:#dedede;border-radius:10px;width:90px;height:6px;z-index:2;left:0;right:0;bottom:25px;margin:auto}.updated_icon .file{position:absolute;left:0;right:0;margin:auto;z-index:5;top:50px;width:80px;height:100px;display:inline-block;overflow:hidden}.updated_icon .file:after{content:'';position:absolute;background:#5fb878;width:80px;height:80px;left:0;top:0;border-radius:0 0 10px 10px;-webkit-animation:uplaod 3s linear infinite;animation:uplaod 3s linear infinite}.updated_icon .file:before{content:'';background:#e2e3e3;color:#e2e3e3;width:60px;height:5px;position:absolute;left:0;right:0;top:20px;z-index:3;margin:auto;-webkit-animation:uplaod 3s linear infinite;animation:uplaod 3s linear infinite;box-shadow:0 15px,0 30px}@-webkit-keyframes uplaod{0%{-webkit-transform:translateY(0);transform:translateY(0)}100%{-webkit-transform:translateY(-100px);transform:translateY(-100px)}}@keyframes uplaod{0%{-ms-transform:translateY(0);-webkit-transform:translateY(0);transform:translateY(0)}100%{-ms-transform:translateY(-100px);-webkit-transform:translateY(-100px);transform:translateY(-100px)}}.file_nav_view{height:32px;margin:15px 0;font-size:0}.file_nav_view .nav_group{display:inline-block;vertical-align:top}.file_nav_view .nav_group.dividing{border-color:#fff;height:100%;width:1px;background:#cfcfcf;cursor:default;margin:0 10px}.nav_group .nav_btn:hover,.nav_group .nav_btn_group:hover{background-color:#20a53a;border-color:#20a53a}.nav_group .nav_btn:hover .nav_btn_title,.nav_group .nav_btn_group:hover .nav_btn_title{color:#fff}.nav_group .nav_btn:hover>.iconfont,.nav_group .nav_btn_group:hover>.iconfont{color:#fff}.file_nav_view .nav_btn_group.active:hover{border-color:#cfcfcf}.file_nav_view .nav_btn:hover .nav_down_list,.file_nav_view .nav_btn_group:hover .nav_down_list{display:block}.file_nav_view .nav_btn::before{content:'';display:none;width:100%;height:5px;position:absolute;bottom:-5px;left:0}.file_nav_view .nav_btn:hover::before{display:inline-block}.nav_group .nav_btn,.nav_group .nav_btn_group{padding:0 10px;display:inline-block;box-sizing:border-box}.terminal_view .nav_btn_title{vertical-align:middle!important;margin-left:5px}.terminal_view{padding:4px 10px!important}.terminal_view .iconfont{vertical-align:middle}.nav_group .nav_btn,.nav_group .nav_btn_group{display:inline-block;margin-right:5px;border:1px solid #cfcfcf;box-sizing:border-box;cursor:pointer;border-radius:2px;transition:all .1s;position:relative;padding:7px 10px}.nav_group{font-size:0}.nav_group .share_file_list{margin-right:8px}.nav_group .nav_btn_group{margin-right:0;vertical-align:bottom}.nav_group .nav_btn_group{padding-left:28px}.nav_group .nav_btn_group .file_menu_icon{left:7.5px}.nav_group .nav_btn .icon-xiala,.nav_group .nav_btn_group .icon-xiala{font-size:12px;margin-left:2px;vertical-align:middle}.nav_group .nav_btn .nav_btn_title,.nav_group .nav_btn_group .nav_btn_title{font-size:12px;color:#555;vertical-align:top}.nav_group .nav_btn_group{border-right-width:1px;border-left-width:0;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:0}.nav_group .nav_btn_group.active{background:#ececec}.nav_group .nav_btn_group:last-child{border-right-width:1px;border-top-right-radius:2px;border-bottom-right-radius:2px}.nav_group .nav_btn_group:first-child{border-left-width:1px;border-top-left-radius:2px;border-bottom-left-radius:2px}.nav_group .nav_btn.nav_btn_title .icon-terminal,.nav_group .nav_btn_group .nav_btn_title .icon-terminal{font-size:17px}.nav_group .nav_btn .icon-shangchuanxiazai,.nav_group .nav_btn_group .icon-shangchuanxiazai{font-size:12px;margin-right:5px;color:#555}.nav_group.mount_disk_list{padding-left:8px;border-left:1px solid #ececec}.nav_group.multi{padding-right:8px;border-right:1px solid #ececec}.nav_group.mount_disk_list>.glyphicon{font-size:13px;color:#666;position:relative;top:2px}.float_r.menu-header-foot{font-size:0}.nav_group.file_all_paste,.nav_group.recycle_bin{padding-left:8px}.nav_group.recycle_bin .nav_btn{margin-right:8px}.nav_group.mount_disk_list .nav_btn,.nav_group.recycle_bin .nav_btn{padding:7px 10px 7px 5px}.nav_group.mount_disk_list .nav_btn span,.nav_group.recycle_bin .nav_btn span{font-size:12px;margin-left:5px;color:#666}.file_disk_list .nav_btn span:nth-child(0){font-size:12px}.nav_group.recycle_bin .nav_btn .glyphicon{top:2px}.nav_group.mount_disk_list .nav_btn:hover span,.nav_group.recycle_bin .nav_btn:hover span{color:#fff!important}.nav_down_list{display:none;transition:all .5s;list-style:none;background:#fff;border-radius:2px;box-shadow:4px 2px 5px 0 #ececec;border:1px solid #cfcfcf;position:absolute;left:-1px;top:32px;z-index:999999;overflow:auto;max-height:300px;max-width:140px}.nav_group.mount_disk_list .disk_title_group_btn{display:none}.nav_group.mount_disk_list.thezoom .disk_title_group_btn{border-radius:2px;height:32px;line-height:32px;border:1px solid #cfcfcf;padding:7px 10px;display:inline-block;width:115px;box-sizing:border-box;cursor:pointer;position:relative;transition:all .5s}.nav_group.mount_disk_list .file_disk_list .nav_btn:last-child{margin-right:0!important}.nav_group.mount_disk_list.thezoom .file_disk_list{display:none}.nav_group.mount_disk_list.thezoom .disk_title_group_btn .disk_title_group{font-size:12px;color:#666;position:absolute;top:0}.nav_group.mount_disk_list.thezoom .disk_title_group_btn::before,.nav_group.multi.thezoom .batch_multi_title::before{content:'';display:none;width:100%;height:5px;position:absolute;bottom:-5px;left:0}.nav_group.mount_disk_list.thezoom .disk_title_group_btn:hover::before,.nav_group.multi.thezoom .batch_multi_title:hover::before{display:inline-block}.nav_group.mount_disk_list.thezoom .disk_title_group_btn:hover,.nav_group.multi.thezoom .batch_multi_title:hover{background-color:#20a53a;border-color:#20a53a}.nav_group.mount_disk_list.thezoom .disk_title_group_btn:hover .disk_title_group,.nav_group.mount_disk_list.thezoom .disk_title_group_btn:hover>i,.nav_group.multi.thezoom .batch_multi_title:hover>i,.nav_group.multi.thezoom .batch_multi_title:hover>span{color:#fff}.nav_group.mount_disk_list.thezoom .disk_title_group_btn>i{font-size:12px;margin-left:2px;position:absolute;right:9px;top:0}.nav_group.mount_disk_list.thezoom .disk_title_group_btn .nav_down_list{max-width:360px}.nav_group.mount_disk_list.thezoom .disk_title_group_btn .nav_down_list li i{font-size:13px;position:absolute;left:8px;top:8px;color:#666}.nav_group.mount_disk_list.thezoom .disk_title_group_btn .nav_down_list li span{width:100%;padding-right:10px}.nav_group.mount_disk_list.thezoom .disk_title_group_btn:hover ul.nav_down_list{display:block}.nav_group.multi.thezoom{padding-right:0;border-right:none}.nav_group.multi .batch_multi_title>i,.nav_group.multi .batch_multi_title>span{display:none}.nav_group.multi.thezoom .batch_multi_title>i,.nav_group.multi.thezoom .batch_multi_title>span{display:inline-block;font-size:12px;color:#666}.nav_group.multi.thezoom .batch_multi_title>i{font-size:12px;margin-left:2px;position:absolute;right:9px;top:7px}.nav_group.multi.thezoom{position:relative}.nav_group.multi.thezoom:hover .batch_group_list{display:block}.nav_group.multi.thezoom .batch_multi_title{border-radius:2px;height:32px;border:1px solid #cfcfcf;padding:7px 10px;display:inline-block;width:85px;box-sizing:border-box;cursor:pointer;position:relative}.nav_group.multi.thezoom .batch_group_list{display:none;width:85px;margin-top:12px;position:absolute;left:0;border:1px solid #cfcfcf;border-radius:2px;box-shadow:4px 2px 5px 0 #ececec;z-index:9999;background-color:#fff}.nav_group.multi.thezoom .batch_group_list .nav_btn_group{width:100%;border:none}.nav_group.multi.thezoom .batch_group_list .nav_btn_group:hover{background-color:#f0f0f0}.nav_group.multi.thezoom .batch_group_list .nav_btn_group:hover span{color:#666}.selection_right_menu li .file_menu_icon.create_files_file_icon{height:17px;background-image:url(../img/file_icon/file_text2.png)}.file_nav_view .nav_down_list li i.file_new_icon{width:17px;height:17px;position:absolute;top:7.5px;left:5px;background-repeat:no-repeat;background-size:cover;background-position:center;image-rendering:-webkit-optimize-contrast;background-image:url(../img/file_icon/file_text2.png)}.file_nav_view .nav_down_list li i.file_new_folder_icon{width:19px;height:17px;position:absolute;top:7.5px;left:4px;background-repeat:no-repeat;background-size:cover;background-position:center;image-rendering:-webkit-optimize-contrast;background-image:url(../img/file_icon/folder.png)}.file_list_content .file_tr textarea:focus{outline:0!important;border:1px solid #ccc}.file_table_view .file_list_content .file_tr.editr_tr textarea,.file_table_view.icon_view .createModel textarea{width:70px;padding:5px 2px;border-color:#ccc;overflow:hidden;resize:none}.file_table_view .file_list_content .file_tr.editr_tr input,.file_table_view.list_view .createModel input{width:100%;padding:0 0 0 5px;height:25px;border:1px solid #ececec;outline:0;vertical-align:middle;line-height:25px}.favorites_file_path .nav_down_list{max-width:230px}.favorites_file_path .nav_down_list li span{width:230px!important;padding-right:20px}.favorites_body .favorites_span{width:680px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block}.favorites_file_path .nav_down_list li span.icon-shezhi1{left:6px}.nav_down_list li{height:30px;line-height:30px;position:relative;box-sizing:border-box;overflow:hidden;color:#555}.nav_down_list li:last-child{border:none}.nav_down_list li:hover{background:#f0f0f0;color:#555}.file_dir_item .nav_down_list li span{line-height:30px!important}.file_dir_item .file_dir span{color:#666}.nav_down_list li span:nth-child(1){font-size:14px;position:absolute;line-height:28px;top:0;left:12px;color:#666}.nav_down_list li span:nth-child(2){display:inline-block;font-size:12px;color:#555;line-height:30px;padding-left:28px;vertical-align:top;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:140px}.nav_down_list li .iconfont{color:#aaa;font-size:19px;position:absolute;left:5px}.nav_down_list li .file_menu_icon{left:5px;margin-top:-8.5px}.nav_down_list li .icon-yingpan{font-size:15px}.nav_group.btn-group-sm>.btn.cut_view_model{padding:6px 10px}.file_path_views{height:30px;border-bottom:1px solid #eee;font-size:0;box-sizing:content-box;padding-bottom:15px}.file_path_views .file_path_upper{display:inline-block;height:30px;line-height:30px;vertical-align:top;border:1px solid #cfcfcf;box-sizing:border-box;text-align:center;vertical-align:top;border-top-left-radius:2px;border-bottom-left-radius:2px;border-right:none;color:#666}.file_path_views .file_path_upper{padding:0 12px}.file_path_views .file_path_upper:hover{background-color:#20a53a;color:#fff;cursor:pointer;border:1px solid #20a53a;border-right:none}.file_path_views .file_path_upper:hover i{background-position:-60px 6px}.file_path_views .file_path_upper span{font-size:12px;display:inline-block;height:28px;line-height:28px;vertical-align:top;top:0}.file_path_views .forward_path{display:inline-block;height:30px;line-height:30px;vertical-align:top;margin-right:-1px}.file_path_views .forward_path>span{display:inline-block;text-align:center;height:30px;line-height:30px;width:auto;padding:0 9px;border:1px solid #cfcfcf;box-sizing:border-box;border-radius:2px;cursor:pointer}.file_path_views .forward_path>span span{font-size:15px}.file_path_views .forward_path span:hover{background:#20a53a;border:1px solid #20a53a}.file_path_views .forward_path span:hover:first-child i{background-position:-90px 6px}.file_path_views .forward_path span:hover:last-child i{background-position:-75px 6px}.file_path_views .forward_path span.active:hover{background:#efefef;box-shadow:inset 0 3px 6px rgba(0,0,0,.1);border-color:#cfcfcf}.file_path_views .forward_path span:active{box-shadow:inset 0 3px 6px rgba(0,0,0,.1)}.file_path_views .forward_path span.active{background:#efefef;box-shadow:inset 0 3px 6px rgba(0,0,0,.1);cursor:no-drop;transition:all .5s}.file_path_views .forward_path span:first-child{border-right:0;border-top-right-radius:0;border-bottom-right-radius:0}.file_path_views .forward_path span:last-child{border-left:1px solid #cfcfcf;border-radius:0}.file_path_input{display:inline-block;height:30px;width:50%;box-sizing:border-box;position:relative}.file_path_input input{border:1px solid #cfcfcf;display:inline-block;width:100%;position:absolute;top:0;left:0;height:30px;padding-left:5px;box-sizing:border-box;background:#f3f3f3;font-size:13px}.file_path_input input.focus{background-color:#fff}.file_dir_omit{display:inline-block;font-size:0;height:30px;line-height:28px;position:relative;left:0;width:45px;cursor:pointer;border:1px solid transparent}.file_dir_omit.active{background-color:#f0f9f7;border-top:1px solid #cfcfcf;border-bottom:1px solid #cfcfcf;border-right:1px solid #ececec}.file_dir_omit.active .iconfont{background-color:#f0f9f7;border-left:#dadada;border-right:#dadada}.file_dir_icon,.file_dir_omit>span{display:inline-block;font-size:14px;background-image:url(../img/file_icon/file_menu_icon.png);background-position:0 -16px;background-size:auto;height:16px;position:absolute;top:6px;width:16px;left:5px;z-index:99}.file_dir_icon{left:8px;top:7px}.file_dir_omit .iconfont{position:absolute;top:0;right:0;font-size:12px!important;padding:0 2px}.file_dir_omit:hover{background:#f3fbf9;border-top:1px solid #cfcfcf;border-bottom:1px solid #cfcfcf;border-right:1px solid #ececec}.file_dir_omit:hover .iconfont{background:#f3fbf9;border-left:1px solid #ececec}.file_dir_omit .nav_down_list{overflow:hidden}.file_dir_omit .nav_down_list .file_dir_item{display:block;height:32px;position:relative;box-sizing:border-box}.file_dir_omit .nav_down_list .file_dir_item .file_dir{width:140px;background:#fff;height:32px;line-height:32px;padding-left:28px}.file_dir_omit .nav_down_list .file_dir_item .iconfont,.file_dir_omit .nav_down_list .file_dir_item .nav_down_list{display:none}.file_dir_item{display:inline-block;font-size:0;height:28px;line-height:28px;cursor:pointer;color:#777;box-sizing:border-box;position:relative;top:1px!important}.file_dir_item.active .nav_down_list{display:block;top:30px}.file_dir_view{position:relative;font-size:0;z-index:99;display:inline-block}.file_dir_view .file_dir_item.active{background:#f3fbf9;border:1px solid #d1e8e0;box-sizing:border-box;margin-top:-1px;box-shadow:inset 0 0 2px rgba(0,0,0,.1)}.file_dir_view .file_dir_item.active .iconfont{border-left:1px solid #d1e8e0}.file_dir_item .iconfont,.file_dir_omit .iconfont{vertical-align:top;font-size:14px;font-weight:600;height:28px;display:inline-block;border-left:1px solid #f3f3f3;border-right:1px solid #f3f3f3;transition:all .5s;background:#f3f3f3}.file_dir_item .file_dir{display:inline-block;padding:0 5px;font-size:12.5px;position:relative;height:28px;line-height:29px;color:#555;background:#f3f3f3;border-left:1px solid transparent;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file_dir_item .nav_down_list li{height:30px;line-height:30px;background:#f9f9f9}.file_dir_item .nav_down_list li.active{font-weight:600;color:#333;background-color:#eee}.file_dir_item .nav_down_list li:hover{background:#eee}.file_dir_item:first-child .file_dir{position:relative;top:0;font-size:12.4px;padding-left:10px}.file_dir_item:first-child{left:-1px}.file_dir_item:first-child .file_dir span:first-child{vertical-align:text-top}.file_dir_view .file_dir_item:hover{background:#f3fbf9;box-shadow:inset 0 0 2px rgba(0,0,0,.1)}.file_dir_view .file_dir_item:hover .file_dir{background:#f3fbf9;border-left:1px solid #ececec}.file_dir_view .file_dir_item:hover .iconfont{border-left:1px solid #ececec;border-right:1px solid #ececec;background:#f3fbf9}.file_path_refresh{display:inline-block;width:30px;height:30px;line-height:30px;border:1px solid #cfcfcf;box-sizing:border-box;text-align:center;vertical-align:top;border-left:0;border-top-right-radius:2px;border-bottom-right-radius:2px;cursor:pointer}.file_path_refresh:hover i{background-position:-105px 6px}.file_path_collect:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.file_path_collect i{font-size:14px;position:relative;top:-1px}.file_path_collect .icon-wujiaoxing{color:#ffca2e}.file_path_collect:hover{background:#20a53a;border-color:#38983b;color:#fff}.search_path_views{border:1px solid #20a53a;display:inline-block;vertical-align:top;float:right;font-size:0;position:relative}.search_path_views .set_updown{height:30px;line-height:30px;position:absolute}.file_path_views .forward_path i{top:0}.search_path_views .file_search_input{border:none;display:inline-block;height:28px;box-sizing:border-box;width:250px;padding-left:8px;box-sizing:border-box;outline:0;border-right:none;font-size:12px}.search_path_views .is_search_children{margin:0 5px;color:#cfcfcf;font-size:13px}.search_path_views .is_search_children:hover{color:#20a53a;cursor:pointer}.search_path_views .path_btn{display:inline-block;height:28px;background:#20a53a;vertical-align:top;color:#fff;border:none;width:35px;text-align:center;cursor:pointer;outline:0}.search_path_views .path_btn:hover{background-color:#38983b}.search_path_views .path_btn:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.search_path_views .set_up{display:none;position:absolute;top:30px;left:0;width:210px;height:30px;background:#fff;box-shadow:4px 2px 5px 0 #ececec;z-index:9999;border:1px solid #ececec;border-radius:2px}.search_path_views .file_search_config{position:absolute;right:35px;font-size:12px;color:#666;width:105px;border-top:none;background:#fff;height:28px;line-height:28px;top:0}.search_path_views .file_search_config .file_search_checked{position:relative;height:15px;width:15px;border-radius:1px;cursor:pointer;text-align:center;margin:0;vertical-align:sub;border:1px solid #aaa;border-radius:2px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased}.search_path_views .file_search_config .file_search_checked.active{background:#20a53a;color:#fff;border-color:#20a53a}.search_path_views .file_search_config .file_search_checked.active:after{content:"\e013";font-size:12px;transform:scale(.85);position:absolute;left:.75px;top:.75px}.search_path_views .file_search_config label{position:absolute;right:3px;cursor:pointer;top:0;font-weight:400}.mr0{margin-right:0!important}.ml0{margin-left:0!important}.plr25{padding:0 25px}.float_r{float:right}.file_bodys{background-color:#fff;margin:10px 15px;padding:15px 20px;font-size:12px;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none}.file_list_icon{border-top:1px solid #eee;padding-top:15px}.file_list_icon .file_table_view.list_view .file_list_content .file_tr{display:inline-block;width:auto;background:#fff;border-color:#fff;position:relative;height:auto;margin:2.5px 5px;cursor:pointer;vertical-align:top}.file_table_view.list_view .file_list_content .file_tr.selected{background:#f0f9f7!important}.file_list_icon .file_table_view.list_view .file_list_content .file_tr .file_td{height:auto;padding:0;line-height:normal}.file_list_icon .file_table_view.list_view .file_list_content .file_tr .file_td:not(.file_name){display:none}.file_list_icon .file_table_view.list_view .file_list_content .file_tr .file_td:nth-of-type(1){position:absolute;left:0;top:0}.file_list_icon .file_table_view.list_view .file_list_content .file_tr .file_td:nth-of-type(2){width:99px;min-width:99px}.file_list_icon .file_table_view.list_view .file_list_content .file_type{width:100%;height:65px}.file_list_icon .file_table_view.list_view .file_list_content .file_icon{top:15px;width:50px;height:50px;left:50%;margin-left:-25px;background-size:auto}.file_list_icon .file_title{display:inline-block;text-align:center;color:#666;padding:10px 5px 15px 5px;font-size:12px;word-break:break-all;white-space:initial}[data-type=folder] .file_title{cursor:pointer}.file_tips{margin-left:30px;color:#999;font-size:12px}.file_bodys{margin-bottom:57px;-webkit-box-sizing:initial;-moz-box-sizing:initial;box-sizing:initial}.file_path_input{position:relative}.file_path_input .file_dir_view{white-space:nowrap;position:absolute;left:1px;height:30px;line-height:28px}.not-btn-border .layui-layer-btn{background-color:#fff;border-top:none}.not-btn-border .layui-layer-btn a{line-height:30px;padding:0 15px}.not-btn-border .layui-layer-btn0{margin-left:15px;border-radius:2px;padding:0 15px}.not-btn-border .layui-layer-btn1{border-radius:2px}.not-btn-border .layui-layer-btn{padding:9px 15px 10px}.file_upload_view{padding:10px 15px 0 15px}.file_select_file{padding-bottom:10px}.file_select_file button{padding:7.5px 12px;border-radius:2px;border:none;background-color:#4592f0;border-color:#367fa9;margin-right:15px;color:#fff;outline:0}.file_select_file button:hover{background-color:#4188de;border-color:#367fa9}.file_select_file button:active{box-shadow:inset 0 3px 6px rgba(0,0,0,.2)}.file_content_list{width:100%;height:355px;background-color:#fafbfe;border-radius:2px;border:#e4e5e9 1px solid;position:relative}.file_upload_tips{text-align:center;color:#ccc;font-size:28px;position:absolute;width:100%;height:40px;line-height:40px;top:50%;margin-top:-40px}.upload_or_download .glyphicon{color:#666}.upload_or_download_view{padding:10px 20px}.upload_btn_group{margin-top:15px;display:inline-block;text-align:right;width:100%}.upload_btn_group button{margin-right:15px}.upload_btn_group button:last-child{margin:auto}.filePage{width:100%;height:auto}.filePage>div{margin-top:10px}.filePage>.page_num{float:left;line-height:30px;padding:0 5px}.filePage>.page_num a{float:initial;border:none;line-height:30px;color:#20a53a;display:inline;font-size:13px;padding:0 5px}.filePage>.page_num a:hover{background:#fff;color:#20a53a;text-shadow:0 1px 0 #fff;cursor:pointer}.filePage.showRow{margin:0 3px;border:#cfcfcf 1px solid}.filePage .page span{height:30px;line-height:30px;padding:0 12px}.filePage .Pcount-item{border-left:none;border-right:1px solid #ececec;color:#333}.filePage .Pcount-item .showRow{margin:0 3px;border:1px solid #eee;border-radius:2px}.preview_images_mask{position:fixed;left:50%;top:50%;background:rgb(0 0 0 /.85);z-index:9999;height:650px;width:750px;margin-left:-375px;margin-top:-325px;overflow:hidden;-webkit-box-shadow:0 0 3px 1px rgba(0,0,0,.3);-moz-box-shadow:0 0 3px 1px rgba(0,0,0,.3);box-shadow:0 0 3px 1px rgba(0,0,0,.3);border-radius:4px}.preview_images_mask .preview_head{height:45px;line-height:45px;width:100%;position:absolute;z-index:999}.preview_images_mask .preview_title{text-align:center;width:100%;display:inline-block;font-size:16px;background-color:rgb(0 0 0 /.45);color:#cacaca;cursor:all-scroll}.preview_images_mask .preview_close,.preview_images_mask .preview_full,.preview_images_mask .preview_small{position:absolute;right:0;width:45px;height:45px;line-height:47px;font-size:19px;text-align:center;color:#d6d6d6}.preview_images_mask .preview_full,.preview_images_mask .preview_small{right:45px;font-size:18px}.preview_images_mask .preview_close:hover,.preview_images_mask .preview_full:hover,.preview_images_mask .preview_small:hover{background-color:#444;color:#fff;cursor:pointer}.preview_images_mask .preview_body{position:relative;height:100%;z-index:99;padding:45px 0}.preview_images_mask:hover .preview_cut_view{opacity:1}.preview_images_mask:hover .preview_toolbar{opacity:1}.preview_images_mask .preview_body img{position:absolute;display:none;transition:all .2s;cursor:all-scroll;display:inline-block;opacity:0;webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.preview_images_mask .preview_toolbar{position:absolute;bottom:0;width:250px;left:50%;margin-left:-125px;height:45px;border-radius:3px;background-color:rgb(0 0 0 /.65);font-size:18px;z-index:999;opacity:0;transition:all 1s}.preview_images_mask .preview_toolbar a{width:50px;height:45px;line-height:45px;text-align:center;display:inline-block;transition:all .5s;border-radius:3px}.preview_images_mask .preview_toolbar a:hover{background-color:rgb(86 86 86 / 75%)}.preview_images_mask .preview_toolbar span{vertical-align:middle;color:#bbb}.preview_images_mask .preview_toolbar span.reverse-repeat{transform:rotateY(180deg)}.preview_images_mask .preview_cut_view{opacity:0;transition:all .5s}.preview_images_mask .preview_cut_view a:hover{background-color:#3a3a3a;color:#fff}.preview_images_mask .preview_cut_view a{position:absolute;font-size:26px;width:50px;height:50px;text-align:center;line-height:50px;top:50%;margin-top:-25px;background-color:rgb(194 194 194 / 80%);border-radius:50%;transition:all .2s;z-index:999}.preview_images_mask .preview_cut_view a:nth-child(1){left:3%}.preview_images_mask .preview_cut_view a:nth-child(2){right:3%}.preview_images_mask .preview_cut_view span{vertical-align:top;height:50px;width:50px;text-align:center;line-height:50px}.exists_files_style{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;width:145px}.readonly-form-input:focus{outline:0;background-color:-internal-light-dark(rgba(239,239,239,.4),rgba(59,59,59,.4));cursor:default}.readonly-form-input:active{border-color:#ccc;box-shadow:none;-webkit-box-shadow:none}.icon-file-upper{background-position:0 6px}.icon-file-back{background-position:-30px 6px}.icon-file-forward{background-position:-15px 6px}.icon-file-refresh{background-position:-45px 6px}.icon-file{display:inline-block;background-image:url(../images/iconfont-file.png);height:28px;line-height:28px;width:15px;background-repeat:no-repeat}.bt-warp{min-width:1400px}.file_menu_tips{display:inline-block;font-size:14px;line-height:32px}.file_menu_tips span{vertical-align:middle;margin-right:3px;color:#f0ad4e}.file_menu_tips span:nth-child(2){font-size:12px}.file_path_collect:hover,.file_path_refresh:hover{background:#20a53a;border-color:#38983b;color:#fff} \ No newline at end of file diff --git a/BTPanel/static/css/site.css b/BTPanel/static/css/site.css index 8fe24c8a..ad22e03e 100644 --- a/BTPanel/static/css/site.css +++ b/BTPanel/static/css/site.css @@ -5,7 +5,7 @@ @WebSite: bt.cn */ -body { + body { line-height: 1.4; color: #333; font-family: "微软雅黑", Arial, Helvetica, sans-serif; @@ -233,6 +233,10 @@ html { padding-left: 7px } +.line .pb0 { + padding-bottom: 0 +} + .pb15 { padding-bottom: 15px } @@ -269,6 +273,10 @@ html { margin: 0 20px } +.line .mb0 { + margin-bottom: 0 +} + .mb15 { margin-bottom: 15px } @@ -294,6 +302,10 @@ html { margin-right: 5px } +.mr10{ + margin-right: 10px; +} + .mr20 { margin-right: 20px } @@ -324,6 +336,13 @@ html { cursor: help } +.limit-text-length{ + display: inline-block; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + .btlink { color: #20a53a } @@ -967,7 +986,6 @@ html { .menu .menu_xterm:hover{ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK6wAACusBgosNWgAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAACwSURBVDiNpZPRDYJADEAfhgVc4ViFFVzBGRjBGVxFR2AFHEFGeH5YkVwAj/iSpjR3fSmXtFIJEvt4AKCi9m7zXMi9Cmr60dyrJ3VQ28inOEuVmoBhGqmcBDSox48tfqckpp5DZr1EFHMAjrP6CowFkqknn+AB3Asli4Ld1FmdgJb3iF1854wRk2CcHZ4jd5FvK4JmbYIuq6sFAWw84m7qmW3PMn3vFi7TEoNK5Z/r/AIpZQNuvOKqnwAAAABJRU5ErkJggg==") } - .menu .menu_folder { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAE3SURBVDiNpZO9SgNBFIW/OySiaBCtbCwE8ReUgGDpE9gExNJmd6O+hM8gmGJn3yKxt7WyEARBUUSbIPhTGFAwxyarSwoZ2AO3mjkf98y9Y5IoI1fKDVQA0jRtOOd2B8BRST5Jkk4IwCSRZVkbOAYeACdpD3iX9DrUpQO+gHaz2XwuRnCSLuM4vpU0AnSAvplNmdlkocbNbN3MTrz3de/9WKVA/07TdN85twbcA5/A8AsLuAO6wI6k2UrhoGZmy3EcH4Zk995vAAd5hA9gBXgJMQ+0ZWanOaAH1IGrEGer1TJgxszOckAFWATOQwDVanUO6EVR9JYD5oGJJEmeAtvfBG7gb4xLwEWgGWA1v59PoQs8Zlm2ANg/RgETwLRz7voXIOnIzBrAdgCgBvgoivowWOUyKv0bfwCvBmEVd9ynHgAAAABJRU5ErkJggg==") } @@ -1144,7 +1162,7 @@ html .menu .menu_exit:hover { border-bottom: 1px solid #e6e6e6; color: #666; font-weight: normal; - padding: 8px; + padding: 8px 10px; font-size: 12.5px; } .divtable .table_toolbar{ @@ -1679,7 +1697,7 @@ html .menu .menu_exit:hover { .placeholder { cursor: text; left: 20px; - line-height: 24px; + line-height: 18px; position: absolute; top: 27px } @@ -1984,17 +2002,6 @@ html .menu .menu_exit:hover { height: 80px } -.sl-s-info { - width: 150px; - height: 28px; - border: #ccc 1px solid -} - -.rec-list .pull-right input{ - height: 15px; - width: 15px; -} - .rec-install { padding: 16px; width: 100%; @@ -2008,13 +2015,14 @@ html .menu .menu_exit:hover { .rec-install h3 { font-size: 20px; - margin-bottom: 10px + margin-bottom: 10px; + margin-left: 5px; } .rec-box-con { border: #ddd 1px solid; border-radius: 3px; - padding: 10px + padding: 20px 15px 5px 15px; } .rec-install .rec-box:hover .rec-box-con,.rec-box-con-hover { @@ -2023,32 +2031,163 @@ html .menu .menu_exit:hover { } .rec-box-con .ico img { - width: 22px; + width: 28px; margin-right: 10px } .rec-box-con ul li { - line-height: 30px; - margin-bottom: 5px + line-height: 26px; + margin-bottom: 10px } .fangshi { - line-height: 19px; - margin-top: 10px; - display: block; - margin-bottom: 15px + line-height: 19px; + margin-top: 10px; + display: block; + margin-bottom: 15px; +} +.fangshi1 { + margin-top: 20px; + display: block; + margin-bottom: 15px; + height: 28px; + line-height: 28px; } - .fangshi label { font-weight: normal; - margin-right: 30px; - margin-left: 10px; + margin-right: 30px; + margin-left: 10px; +} +.fangshi1 label { + font-weight: normal; + margin: 0 10px; +} +.fangshi1 label span{ + font-size: 14px; + cursor: pointer; +} +.fangshi1 .bt_checkbox_group{ + width: 18px; + height: 18px; + vertical-align:-8px; +} +.fangshi1 .bt_checkbox_group.active:after{ + width: 10px; + height: 5px; + margin-left: -5px; + margin-top: -3.5px; } - .fangshi label input { vertical-align: -2px; margin-left: 5px } +.bt_select_group{ + height: 28px; + line-height: 26px; + border: 1px solid #c2c2c2; + border-radius: 2px; + box-sizing: border-box; + position: relative; + display: inline-block; + width: 190px; + transition: all 500ms; +} +.bt_select_active{ + height: 100%; + max-width: 240px; + width: 100%; +} +.bt_select_active .select_val{ + cursor: pointer; + height: 100%; + width: 100%; + display: inline-block; + padding-left: 15px; + color: #555; +} +.bt_select_active .select_val.default{ + color: #D2D2D2; +} +.bt_select_active .glyphicon{ + color: #aaa; + font-size: 12px; + position: absolute; + right: 10px; + top:50%; + margin-top:-6px; + transition: all 400ms; +} +.bt_select_ul{ + border: 1px solid #d2d2d2; + padding: 5px 0; + border-radius: 2px; + box-shadow: 0 2px 4px rgba(0,0,0,.12); + position: absolute; + z-index: 9999; + background: #fff; + left: -1px; + right: -1px; + top: 29px; + border-radius: 2px; + display: none; +} +.bt_select_ul.active{ + display: block; +} +.bt_select_ul li{ + padding-left: 15px; + cursor: pointer; + color: #555; + margin:0 !important; +} +.bt_select_ul li.active{ + background: #20a53a !important; + color: #fff; +} +.bt_select_ul li:hover{ + background: #f2f2f2; + transition: .2s all; +} +.bt_checkbox_group::active{ + background: #1b8c31; + border-color: #1b8c31; +} +.bt_checkbox_group{ + display: inline-block; + height: 20px; + width: 20px; + border-radius: 2px; + cursor: pointer; + border: 1px solid #c2c2c2; + position: relative; + text-align: center; + line-height: 20px; + margin: 4px; + vertical-align: top; +} +.bt_checkbox_group.active{ + background: #20a53a; + border-color: #20a53a; +} +.bt_checkbox_group.active:after{ + content: ''; + display: inline-block; + width: 13px; + height: 6px; + border-width: 0px; + border-left-width: 2px; + border-bottom-width: 2px; + border-color: #fff; + border-style: solid; + transform: rotate(-45deg); + -webkit-transform-origin: center center; + transform-origin: center center; + position: absolute; + top:50%; + left: 50%; + margin-top: -4px; + margin-left: -6.5px; +} .zun-form-new .fangshi { padding: 0 30px 0; @@ -2183,9 +2322,12 @@ html .menu .menu_exit:hover { } .softlist td img { - width: 25px; - height: 25px; - margin-right: 5px + max-width: 25px; + max-height: 25px; + margin-right: 5px; + margin-top: -1px; + margin-bottom: -1px; + image-rendering: -webkit-optimize-contrast; } .softlist .glyphicon-folder-open { @@ -2313,10 +2455,13 @@ html .menu .menu_exit:hover { } .setting-con div.mtb15 .modify { - margin-left: -57px; - vertical-align: 0; + /* margin-left: -57px; + vertical-align: 0; */ /* position: relative; right: 60px; */ + position: absolute; + right: 4px; + top: 4px; } .setting-con div.mtb15 .set-info { @@ -2579,6 +2724,15 @@ html .menu .menu_exit:hover { padding: 10px } +.tab-con .tab-block{ + display: none; + height: 100%; +} + +.tab-con .tab-block.on{ + display: inline-block; +} + .tab-con ul.cmdlist { list-style-type: decimal } @@ -4043,7 +4197,7 @@ html .menu .menu_exit:hover { overflow: hidden; } .conf_p p{ - margin-bottom: 1px; + margin-bottom: 8px; } .conf_p span{ display: inline-block; @@ -4223,7 +4377,6 @@ html .menu .menu_exit:hover { } .libPay-item .li-c-item li{ font-size: 0; - margin-bottom:20px; border: #ddd 1px solid; border-radius: 4px; height: 42px; @@ -4879,12 +5032,6 @@ select[disabled]{ text-overflow:ellipsis; white-space: nowrap; } -#form_proxy .line .tname{ - width: 110px; -} -#form_proxy .line .info-r{ - margin-left: 110px; -} #form_proxy .sub-groud .bt-input-text{ margin-right: 10px; } @@ -4911,6 +5058,18 @@ select[disabled]{ text-overflow: ellipsis; white-space: nowrap; } +.proxy_list_limit_3 tr td:nth-child(4) >span{ + max-width: 143px; +} +.proxy_list_limit_4 tr td:nth-child(4) >span{ + max-width: 110px; +} +#proxy_list tr td:nth-child(3) >span{ + max-width: 80px; +} +#proxy_list tr th:last-child,#proxy_list tr td:last-child >span{ + text-align: right; +} #softList tr td:nth-child(3) >span{ white-space: inherit; min-width: 151px; @@ -5273,9 +5432,10 @@ select[disabled]{ line-height:30px; } .user_set_info .tit{ - width: 165px; + width: 160px; display: inline-block; - text-align: left; + text-align: right; + padding-right: 20px; } .user_set_info .btswitch-p{ width: 165px; @@ -5632,9 +5792,9 @@ select[disabled]{ position: relative; height: 35px; background: #565656; - /* transition: all 500ms; */ + transition: all 500ms; } -.ace_header span { +.ace_header>span { float: left; height: 35px; line-height: 35px; @@ -5645,14 +5805,14 @@ select[disabled]{ border-right: 1px solid #4c4c4c; cursor: pointer; } -.ace_header span i{ +.ace_header>span i{ margin-right: 5px; vertical-align: text-top; } -.ace_header span .fa { +.ace_header>span .fa { margin-right: 5px; } -.ace_header span:hover { +.ace_header>span:hover { background: #2f2f2f; } .ace_header .pull-down{ @@ -6678,13 +6838,6 @@ select[disabled]{ height: 16px; width: 16px; } -.softlist td img { - max-width: 25px; - max-height: 25px; - margin-right: 5px; - margin-top: -1px; - margin-bottom: -1px; -} .checkbox_grourd { height: 30px; @@ -6697,6 +6850,34 @@ select[disabled]{ .external_link button{ vertical-align: middle; } +.external_link button .icon{ + font-size:17px; +} +/*固定表格头样式*/ +.thead_div .btlink{color:#666} +.thead_div,.tbody_div{ position: relative; } +.tbody_div{overflow: auto;margin-top: -1px;} +.tbody_shadow_top{ + width: 100%; + height: 6px; + position: absolute; + background: -webkit-linear-gradient(top,rgba(220, 220, 220, .8),rgba(255, 255, 255, 0)); + background: -moz-linear-gradient(top,rgba(220, 220, 220, .8),rgba(255, 255, 255, 0)); + background: -o-linear-gradient(top,rgba(220, 220, 220, .8),rgba(255, 255, 255, 0)); + background: linear-gradient(top,rgba(220, 220, 220, .8),rgba(255, 255, 255, 0)); + display: none; +} +.tbody_shadow_bottom{ + width: 100%; + height: 6px; + position: absolute; + bottom: 0; + background: -webkit-linear-gradient(top,rgba(255, 255, 255, 0),rgba(220, 220, 220, .8)); + background: -moz-linear-gradient(top,rgba(255, 255, 255, 0),rgba(220, 220, 220, .8)); + background: -o-linear-gradient(top,rgba(255, 255, 255, 0),rgba(220, 220, 220, .8)); + background: linear-gradient(top,rgba(255, 255, 255, 0),rgba(220, 220, 220, .8)); + display: block; +} /* 结束 */ @@ -6759,7 +6940,7 @@ select[disabled]{ width: 100%; left: 0; top: 0; - height: 445px; + height: 335px; border: 2px dashed #e0e0e0; text-align: center; } @@ -6767,7 +6948,7 @@ select[disabled]{ position: relative; } .upload_file_body.active{ - height: 445px; + height: 335px; border: 2px dashed #e0e0e0; text-align: center; } @@ -6784,7 +6965,7 @@ select[disabled]{ .dropUpLoadFile{ position: relative; overflow: auto; - height: 410px; + height: 303px; padding-top:0; } .dropUpLoadFile::-webkit-scrollbar { @@ -6877,7 +7058,7 @@ select[disabled]{ height: 38px; line-height: 38px; margin-right: 0; - padding-left: 10px; + padding-left: 6px; } .dropUpLoadFile li .fileItem{ position: relative; @@ -7354,6 +7535,512 @@ select[disabled]{ } +.term_item_tab .list>span.active .icon-trem-close, +.term_item_tab .list>span:hover .icon-trem-close{ + display: inline-block !important; +} +.term_item_tab .list>span i{ + transition: all 50ms; +} +.term_item_tab .list>span .icon{ + height: 9px; + width: 9px; + border-radius: 5px; + display: inline-block; + background: #fff; + position: absolute; + left: 8px; + top: 50%; + margin-top:-4.5px; +} +.term_item_tab .list>span .icon.icon-sucess{ + background-color: #10952a; +} +.term_item_tab .list>span .icon.icon-info{ + background-color: #fc6d26; +} +.term_item_tab .list>span .icon.icon-warning{ + background-color: #ff5d2c; +} + +.term_item_tab .list>span:hover{ + background-color: #dadada; +} + +.term_item_tab .list> span.active{ + background-color: #424242; +} + +.term_item_tab .list span.active span{ + color: #fff; +} +.term_item_tab .list .content{ + position: relative; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} +.term_item_tab .item .glyphicon{ + vertical-align: top; + position: absolute; + right: 12px; + font-size: 15px; + height: 38px; + line-height: 38px; + color: #ff7070 !important; + display: none; + transition: all 500ms; +} +.term_item_tab .item .glyphicon:hover{ + color: red; +} +.term_item_tab .list span span{ + vertical-align: middle; + font-size: 13px; + font-weight: 500; + color: #666; + display: inline-block; + line-height: 37px; +} +.term_item_tab .glyphicon{ + font-size: 15px; + margin-left: 8px; + vertical-align: middle; + transition: all 500ms; + cursor: pointer; + display: inline-block; + color: #ea7575; +} +.term_item_tab span.glyphicon{ + color: #888; +} +.term_item_tab .glyphicon:hover{ + color: red; +} + +.term_item_tab .addServer{ + display: inline-block; + width: 40px; + text-align: center; + padding:0; + height: 38px; + line-height: 38px; + vertical-align: top; +} +.term_item_tab .addServer span{ + margin:0; + color: #20a53a; +} +.term_item_tab>span:hover{ + background-color:#ececec; + cursor: pointer; +} +.term_item_tab .addServer span:hover{ + color: #4c4c4c; +} +.term_content_tab .term_item{ + height: 100%; + width: 100%; + display: none; +} +.term_content_tab .term_item.active{ + display: inline-block; +} +.term_content_tab{ + background-color: #000; + position: absolute; + top: 38px; + left: 0; + right: 0; + bottom: 0; + padding: 10px 5px 10px 10px; +} +.quick_links_input{ + height: 35px; + line-height: 35px; + padding-left: 5px; + border: none; + width: 100%; + padding-left:70px; + border:1px solid #e1e1e1; + background-color: #fcfcfc; + border-radius: 3px; + transition: all 500ms; +} +.quick_links_input:focus{ + outline: none; + border:1px solid #20a53a; + background-color: fff; +} +.quick_links_input:active{ + outline: none; +} +.term_box{ + height: 100%; + border-radius: 3px; + margin-right: 260px; + position: relative; +} +.term_tootls{ + width:250px; + position: absolute; + right: 15px; + top: 15px; + /* border: 1px solid #ececec; */ +} +.term_tootls .tootls_tab{ + display: inline-block; + /* border: 1px solid #20a53a; */ + width: 100%; + position: relative; +} +.term_tootls .tootls_tab a{ + display: inline-block; + width: 38px; + text-align: center; + height: 38px; + line-height: 38px; + position: absolute; + right:0; + color: #ececec; + background-color: #c7c7c71a; +} +.term_tootls .tootls_tab a:hover{ + background-color: #8282824d; +} +.term_tootls .tootls_tab i{ + font-style: normal; + font-size: 12px; + color: #ececec; + margin-left: 5px; +} +.main-content .safe{ + position: relative; +} +.xterm .xterm-viewport::-webkit-scrollbar{ + width:8px; + height:5px; + border-radius: 4px; +} +.xterm .xterm-viewport::-webkit-scrollbar-thumb{ + border-radius:0; + box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.2); + background:#666; + border-radius: 4px; + transition: all 1s; +} +.xterm .xterm-viewport:hover::-webkit-scrollbar-thumb{ + background:#aaa; + +} +.xterm .xterm-viewport::-webkit-scrollbar-track{ + box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.2); + border-radius:0; + background:#222; + border-radius: 4px; + transition: all 1s; +} +.xterm .xterm-viewport:hover::-webkit-scrollbar-track{ + background-color:#444; +} + +.tootls_tab>span{ + display: inline-block; + height: 38px; + line-height: 38px; + text-align: center; + width: 100%; + font-size: 13px; +} +.tootls_tab a span{ + margin-right: 1px; +} +.tootls_tab>span.active{ + background-color: #28903c; + color: #fff; + padding-left: 15px; + text-align: left; + font-weight: 600; +} +.tootls_content{ + position: absolute; + top: 38px; + left: 0; + right: 0; + bottom: 0; + border-top: 1px solid #ececec; +} +.tootls_host_list, +.tootls_commonly_list{ + list-style: none; + border-top: none; + border: 1px solid #ececec; + overflow-y: auto; +} +.tootls_host_list{ + height: 380px; + overflow:auto; + /* margin-bottom: 10px; */ + overflow-x: hidden; + font-size: 0; +} +.tootls_commonly_list li, +.tootls_host_list li{ + display: inline-block; + height: 38px; + line-height: 38px; + color: #444; + border-bottom:1px solid #ececec; + font-size: 13px; + cursor: pointer; + position: relative; + width: 100%; +} +.tootls_commonly_list li{ + padding-left: 15px; +} +.tootls_commonly_list li:hover, +.tootls_host_list li:hover{ + background-color: #eee; +} +.tootls_commonly_list li:hover .tootls, +.tootls_host_list li:hover .tootls{ + display: inline-block; +} +.tootls_host_list li i{ + display: inline-block; + height:100%; + width:38px; + background-size: 16px; + background: url('../img/soft_ico/ico-cmd.png') no-repeat center center; +} + +.tootls_commonly_list li>span, +.tootls_host_list li>span{ + vertical-align: top; + display: inline-block; +} +.tootls_commonly_list li:hover >span:nth-child(2), +.tootls_host_list li:hover >span:nth-child(2){ + width: 135px; +} +.tootls_commonly_list li>span:nth-child(2), +.tootls_host_list li>span:nth-child(2){ + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; + font-size: 12px; + max-width: 210px; +} +/* .tootls_host_list li>span:nth-child(2){ + margin-left: 35px; +} */ +.tootls_commonly_list li>span:nth-child(2){ + max-width: 210px; +} +.tootls_commonly_list li span:nth-child(3), +.tootls_host_list li span:nth-child(3){ + padding-left: 10px; +} +.tootls_commonly_list li .tootls, +.tootls_host_list li .tootls{ + width: 70px; + text-align: right; + padding-right: 10px; + display: none; +} +.tootls_commonly_list li .tootls{ + width: 90px; +} +.tootls_commonly_list li .tootls span, +.tootls_host_list li .tootls span{ + width: 22px; + height: 22px; + line-height: 22px; + text-align: center; +} +.tootls_commonly_list li .tootls span:nth-child(1), +.tootls_host_list li .tootls span:nth-child(1){ + color:#888; + font-size: 14px; +} +.tootls_commonly_list li .tootls span:nth-child(2), +.tootls_host_list li .tootls span:nth-child(2){ + color: #ea7575; +} +.tootls_commonly_list li .tootls span:nth-child(2):hover, +.tootls_host_list li .tootls span:nth-child(2):hover{ + color: red; +} +.bt-form-2x .tname, +.bt-form-2x .bt-input-text{ + height: 38px; + line-height: 38px; +} +.bt-form-2x .bt-input-text{ + padding-left: 8px; +} +.bt-form-2x .auth_type_checkbox{ + /* height: 34px; + line-height: 34px; */ + padding: 8px 12px; +} +.menu_right_list{ + width: 140px; + position: fixed; + border: 1px solid #ccc; + border: 1px solid rgba(0,0,0,.15); + border-radius: 2px; + -webkit-box-shadow: 0 6px 12px rgba(0,0,0,.175); + box-shadow: 0 6px 12px rgba(0,0,0,.175); + z-index: 999999; + background: #fff; + padding: 6px 0; + display: inline-block; + webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.menu_right_list li{ + height: 28px; + line-height:28px; + +} +.menu_right_list li:hover{ + background-color: #ececec; + transition: all 500ms; + cursor: pointer; +} +.menu_right_list li a{ + padding-left: 15px; + display: inline-block; + width: 100%; + transition: all 500ms; + text-decoration: none; +} +.menu_right_list li:hover a{ + color: #20a532; +} +.menu_right_list li.split_line{ + height: 1px; + background-color: #ececec; +} +/* end */ + +/* 终端管理页面 */ + +.pd25{ + padding: 25px; +} + +.quick_links{ + width: 100%; + height: 35px; + background-color: #fcfcfc; + position: relative; + margin-bottom: 15px; + display: none; +} +.quick_links>span.glyphicon{ + position: absolute; + right: 12px; + top: 12px; + color: #999; +} +.quick_links_title{ + height: 35px; + line-height: 37px; + vertical-align: top; + display: inline-block; + padding: 0 0 0 15px; + position: absolute; + left: 0; + top: 0; + color: #555; +} +.quick_links_title span{ + margin-right: 4px; + color: #ffa515; +} +.term_item_tab{ + background: #f1f1f1; + font-size: 0; +} +.term_item_tab .list{ + display: inline-block; + webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + /* display: flex; */ + height: 38px; + overflow: hidden; + overflow-x: auto; +} +.term_item_tab .list::-webkit-scrollbar{ + width:8px; + height:4px; + background-color: transparent; +} +.term_item_tab .list ::-webkit-scrollbar-thumb{ + border-radius:0; + background:transparent; + border-radius: 4px; + transition: all 1s; +} +.term_item_tab .list:hover::-webkit-scrollbar-thumb{ + background:rgba(1, 3, 18, 0.4); +} +.term_item_tab .list::-webkit-scrollbar-track{ + background-color:transparent; +} + +.term_item_tab .list>span{ + height: 38px; + line-height: 38px; + text-align: left; + padding: 0 25px 0 22px; + display: inline-block; + vertical-align: middle; + border-right: 1px solid #e2e2e2; + cursor: pointer; + width: 150px; + position: relative; + flex-shrink: 0; +} + +.icon-trem-close{ + height: 18px; + width: 18px; + position: absolute; + top: 50%; + margin-top: -8.5px; + right: 8px; + display: none !important; +} +.icon-trem-close::after, +.icon-trem-close::before{ + content: ''; + height: 14px; + width: 2px; + display: inline-block; + background: #fb0000; + z-index: 999; + position: absolute; + position: absolute; + top: 1.5px; + left: 8px; + transform: rotate(-45deg); +} +.icon-trem-close::after{ + transform: rotate(45deg); +} +.icon-trem-close::before{ + transform: rotate(-45deg); +} + + .term_item_tab .list>span.active .icon-trem-close, .term_item_tab .list>span:hover .icon-trem-close{ display: inline-block !important; @@ -7440,17 +8127,25 @@ select[disabled]{ .term_item_tab .tab_tootls{ padding: 0; float:right; - padding-right: 15px; + /* padding-right: 15px; */ /* display: inline-block; */ - display: none; + /* display: none; */ } -.term_item_tab .tab_tootls span{ +/* .term_item_tab .tab_tootls span{ margin-left: 0; font-size: 12px; display: block; height: 19px; color: #bbb; - /* vertical-align: bottom; */ + /* vertical-align: bottom; +} */ +.term_item_tab .tab_tootls .glyphicon-resize-full, +.term_item_tab .tab_tootls .glyphicon-resize-small{ + height: 38px; + line-height: 38px; + width:40px; + text-align: center; + margin:0 } @@ -7762,4 +8457,1672 @@ select[disabled]{ height: 1px; background-color: #ececec; } -/* 终端管理页面 结束*/ \ No newline at end of file +.localhost-form-shade{ + position: absolute; + left: 0; + right: 0; + bottom:0; + top: 0; + z-index: 99999; + background: rgb(0 0 0 / 50%); +} +.localhost-form-view{ + padding-left: 25px; + padding-top: 40px; + width: 500px; + background: #fff; + top: 50%; + left: 50%; + position: absolute; + margin-left: -250px; + margin-top: -200px; + border-radius: 2px; + padding-bottom: 45px; + +} +.localhost-form-view>button{ + margin-left: 100px; + margin-top: 10px; + width: 120px; + height: 36px; + font-size: 14px; +} +.localhost-form-title{ + font-size: 15px; + color: red; + text-align: center; + height: 60px; + line-height: 50px; +} +.localhost-form_tip{ + height: 30px; + width: 30px; + background-image: url(/static/layer/skin/default/icon.png); + background-size: auto; + display: inline-block; + background-position: -150px -0px; + vertical-align:middle; + margin-right: 15px; +} +/*end*/ + + + + + + +/* ssl商业证书 */ +.business_ssl_application{ + padding: 25px 20px 40px 20px; +} +.business_ssl_application .guide_body{ + position: relative; +} +.guide_content{ + padding-top: 10px; + margin: 0 auto; + width: 540px; +} +.guide_content .line{ + margin-bottom: 5px; +} +.ssl_product_table{ + position: relative; + display: inline-block; + vertical-align: middle; + width: 410px; +} +.ssl_product_table tbody tr td:nth-child(1) input{ + height: 15px; + width: 15px; + margin-right: 5px !important; + color: #20a532; +} +.ssl_product_table tbody tr.active{ + background-color: #ececec; +} +.ssl_product_table tbody tr:hover{ + cursor: pointer; +} +.ssl_product_table tbody tr td:nth-child(1) input, +.ssl_product_table tbody tr td:nth-child(1) span{ + vertical-align: text-top; + margin: 0; +} +.guide_path_progress{ + margin: 0 150px; + height: 3px; + display: inline-block; + position: absolute; + top: 35px; +} +.guide_path_progress span{ + height: 3px; + z-index: 980; + display: inline-block; + position: absolute; + left: 0; +} +.guide_path_progress span:nth-child(1) { + width: 0; + background: #20a53a; +} +.guide_path_progress span:nth-child(2) { + width: 300px; + background: #cccccc; + z-index: 910; +} +.business_ssl_application .tname{ + width: 90px; +} +.business_ssl_application .line .info-r{ + margin-left: 90px; +} +.business_ssl_application .guide_path{ + padding:20px 10px 10px; + display: flex; +} + +.business_ssl_application .guide_path span { + display: inline-block; + flex: 1; + text-align: center; + position: relative; + z-index: 99999; +} + +.business_ssl_application .guide_path span i:nth-child(1) { + display: block; + width: 30px; + height: 30px; + margin: 0 auto; + border-radius: 50%; + background: #d0d0d0; + color: #777; + text-align: center; + line-height: 31px; + font-size: 16px; + font-style: inherit; +} + +.business_ssl_application .guide_path span i:nth-child(2) { + display: block; + font-style: inherit; + font-size: 12px; + margin-top: 10px; + color: #666; +} + +.business_ssl_application .guide_path span.active i:nth-child(1) { + background: #20a53a; + color: #fff; +} + +.business_ssl_application .guide_path span.active i:nth-child(2) { + color: #20a53a; +} + +.ssl_valid_year label{ + height: 32px; + line-height: 32px; + width: 70px; + margin: 0; +} +.ssl_valid_year label.disabled span{ + color: #bbb; +} +.ssl_valid_year label input{ + vertical-align: middle; + margin: 0; + margin-right: 5px; + height: 15px; + width:15px; +} +.ssl_valid_year label span{ + vertical-align: middle; +} +.ssl_valid_year .pay-cycle-btn{ + width: 80px; + height: 35px; + line-height: 35px; +} +.ssl_valid_year .pay-cycle-btn.disabled{ + border: 1px solid #DDD; + background-color: #F5F5F5; + color: #ACA899; + cursor:no-drop; +} +.guide_price{ + color: #FF6232; +} +.guide_price span:nth-child(1){ + font-size: 23px; +} +.guide_price span:nth-child(2){ + font-size: 14px; +} +.ssl_class_table input { + margin: 0; + margin-right: 5px; + height: 14px; + width: 14px; +} +.ssl_class_table span{ + vertical-align: text-bottom; +} + +.ssl-brand-info{ + width: 410px; + display: inline-block; + background-color: #efefef; + border: 1px solid #ececec; + border-radius: 5px; + display: inline-block; + background-color: #f5f5f5; + color: #666; + z-index: 2; + cursor: pointer; + background-repeat: no-repeat; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIwAAAAoCAYAAAAsTRLGAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi372/EAe/tt68ABxmkCZrcCjg/1xYW52rlKO58sEQjFu9+cj/seFf/2OKdHiNLFcLBWK8ViJuFAiTcd5uVKRRCHJleIS6X8y8R+W/QmTdw0ArIZPwE62B7XLbMB+7gECiw5Y0nYAQH7zLYwaC5EAEGc0Mnn3AACTv/mPQCsBAM2XpOMAALzoGFyolBdMxggAAESggSqwQQcMwRSswA6cwR28wBcCYQZEQAwkwDwQQgbkgBwKoRiWQRlUwDrYBLWwAxqgEZrhELTBMTgN5+ASXIHrcBcGYBiewhi8hgkEQcgIE2EhOogRYo7YIs4IF5mOBCJhSDSSgKQg6YgUUSLFyHKkAqlCapFdSCPyLXIUOY1cQPqQ28ggMor8irxHMZSBslED1AJ1QLmoHxqKxqBz0XQ0D12AlqJr0Rq0Hj2AtqKn0UvodXQAfYqOY4DRMQ5mjNlhXIyHRWCJWBomxxZj5Vg1Vo81Yx1YN3YVG8CeYe8IJAKLgBPsCF6EEMJsgpCQR1hMWEOoJewjtBK6CFcJg4Qxwicik6hPtCV6EvnEeGI6sZBYRqwm7iEeIZ4lXicOE1+TSCQOyZLkTgohJZAySQtJa0jbSC2kU6Q+0hBpnEwm65Btyd7kCLKArCCXkbeQD5BPkvvJw+S3FDrFiOJMCaIkUqSUEko1ZT/lBKWfMkKZoKpRzame1AiqiDqfWkltoHZQL1OHqRM0dZolzZsWQ8ukLaPV0JppZ2n3aC/pdLoJ3YMeRZfQl9Jr6Afp5+mD9HcMDYYNg8dIYigZaxl7GacYtxkvmUymBdOXmchUMNcyG5lnmA+Yb1VYKvYqfBWRyhKVOpVWlX6V56pUVXNVP9V5qgtUq1UPq15WfaZGVbNQ46kJ1Bar1akdVbupNq7OUndSj1DPUV+jvl/9gvpjDbKGhUaghkijVGO3xhmNIRbGMmXxWELWclYD6yxrmE1iW7L57Ex2Bfsbdi97TFNDc6pmrGaRZp3mcc0BDsax4PA52ZxKziHODc57LQMtPy2x1mqtZq1+rTfaetq+2mLtcu0W7eva73VwnUCdLJ31Om0693UJuja6UbqFutt1z+o+02PreekJ9cr1Dund0Uf1bfSj9Rfq79bv0R83MDQINpAZbDE4Y/DMkGPoa5hpuNHwhOGoEctoupHEaKPRSaMnuCbuh2fjNXgXPmasbxxirDTeZdxrPGFiaTLbpMSkxeS+Kc2Ua5pmutG003TMzMgs3KzYrMnsjjnVnGueYb7ZvNv8jYWlRZzFSos2i8eW2pZ8ywWWTZb3rJhWPlZ5VvVW16xJ1lzrLOtt1ldsUBtXmwybOpvLtqitm63Edptt3xTiFI8p0in1U27aMez87ArsmuwG7Tn2YfYl9m32zx3MHBId1jt0O3xydHXMdmxwvOuk4TTDqcSpw+lXZxtnoXOd8zUXpkuQyxKXdpcXU22niqdun3rLleUa7rrStdP1o5u7m9yt2W3U3cw9xX2r+00umxvJXcM970H08PdY4nHM452nm6fC85DnL152Xlle+70eT7OcJp7WMG3I28Rb4L3Le2A6Pj1l+s7pAz7GPgKfep+Hvqa+It89viN+1n6Zfgf8nvs7+sv9j/i/4XnyFvFOBWABwQHlAb2BGoGzA2sDHwSZBKUHNQWNBbsGLww+FUIMCQ1ZH3KTb8AX8hv5YzPcZyya0RXKCJ0VWhv6MMwmTB7WEY6GzwjfEH5vpvlM6cy2CIjgR2yIuB9pGZkX+X0UKSoyqi7qUbRTdHF09yzWrORZ+2e9jvGPqYy5O9tqtnJ2Z6xqbFJsY+ybuIC4qriBeIf4RfGXEnQTJAntieTE2MQ9ieNzAudsmjOc5JpUlnRjruXcorkX5unOy553PFk1WZB8OIWYEpeyP+WDIEJQLxhP5aduTR0T8oSbhU9FvqKNolGxt7hKPJLmnVaV9jjdO31D+miGT0Z1xjMJT1IreZEZkrkj801WRNberM/ZcdktOZSclJyjUg1plrQr1zC3KLdPZisrkw3keeZtyhuTh8r35CP5c/PbFWyFTNGjtFKuUA4WTC+oK3hbGFt4uEi9SFrUM99m/ur5IwuCFny9kLBQuLCz2Lh4WfHgIr9FuxYji1MXdy4xXVK6ZHhp8NJ9y2jLspb9UOJYUlXyannc8o5Sg9KlpUMrglc0lamUycturvRauWMVYZVkVe9ql9VbVn8qF5VfrHCsqK74sEa45uJXTl/VfPV5bdra3kq3yu3rSOuk626s91m/r0q9akHV0IbwDa0b8Y3lG19tSt50oXpq9Y7NtM3KzQM1YTXtW8y2rNvyoTaj9nqdf13LVv2tq7e+2Sba1r/dd3vzDoMdFTve75TsvLUreFdrvUV99W7S7oLdjxpiG7q/5n7duEd3T8Wej3ulewf2Re/ranRvbNyvv7+yCW1SNo0eSDpw5ZuAb9qb7Zp3tXBaKg7CQeXBJ9+mfHvjUOihzsPcw83fmX+39QjrSHkr0jq/dawto22gPaG97+iMo50dXh1Hvrf/fu8x42N1xzWPV56gnSg98fnkgpPjp2Snnp1OPz3Umdx590z8mWtdUV29Z0PPnj8XdO5Mt1/3yfPe549d8Lxw9CL3Ytslt0utPa49R35w/eFIr1tv62X3y+1XPK509E3rO9Hv03/6asDVc9f41y5dn3m978bsG7duJt0cuCW69fh29u0XdwruTNxdeo94r/y+2v3qB/oP6n+0/rFlwG3g+GDAYM/DWQ/vDgmHnv6U/9OH4dJHzEfVI0YjjY+dHx8bDRq98mTOk+GnsqcTz8p+Vv9563Or59/94vtLz1j82PAL+YvPv655qfNy76uprzrHI8cfvM55PfGm/K3O233vuO+638e9H5ko/ED+UPPR+mPHp9BP9z7nfP78L/eE8/sl0p8zAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAaiSURBVHja7Fp7kJZjFP+xqKSo5JrGJayoI6MaGZmhqcRi3EaRVrpsTdJlm6SLlOiiwVDKJeWS1WJcUmZoasK20ey21W50qlEZZIxaiZHL55/zzXzzzjnve773+8eM54/fP9/3O+e5nfc5tweZTAYBAV6ETQgIBhMQDCYgGExAMJiAYDABAcFgAoLBBASDCfgvGgyDLBzDoC4M6s+gMQwqZ9BYBWMYNEt4lq5jGVTCoPkMWsWgGgZtZ1ADg+oZtIFBrzFoJINOjdGTRTMGjWLQQwyaxKBSBrV0yGlrvFV0jGPQDAZ1dMhdImOvYFCVrKFB1lTLoJUMeoxB3ZzzuE3GHmtgHIPGM+g+BvVm0Okp1prF0Qzqw6C5DPqAQZtyzqFBzqJCxm0XldcUdmTQcgYdYlAmD8w3JjiZQX/kqetlBh0Xs+hLFZn9DDotj41rw6Cdip6bYmSuko3NZy1fMahrwlzeyVNnhkHMoInyMXrXPDrFua5g0AmWwcxOMfEMg75XvvA2YrGZlNgtOrSF9zJk3nJuXBMGbTN0nGfIzChgLRkGDUo4yLR6f2ZQJ8d6qwoYYz+D2kcN5oUYgd/ka6xlUJ1gK4N2MGg1gy5UJllr6Kpn0EwGlTFomHwl1QZ3pbEBZTFzvdNhMOsM2QMMaqHwJxn8Xxi0RA58qLjJZQw6YvAvipnT4wz6WvanLgebxYX/GLPmAwluaq0ht0suiZFyFuNjuF/kGswAg7SRQT3zvPbAoOmGvgkxMk8aMpcr3Gkxm/ctg5rHjFMZI7vZcNEat5pBTY0xLjNknigg9sjGTqvyDAms22t2zDjWB9InS6hR/vww5aKaM+gHRd8iR0zRqMiNUrivJlyhC40xFibIaWt+RuH9xKDWCet5UZH7XOFdLAc0mkH3MugMxx5rMU+twW1I4bqLGLRHkZsMBl1hbF6XlAZzo6Gv2CGrGe40hbfG4Xd75XErZbFYGYsV3kzHWsYYgaonbkzKroYYcUY0UbDO9krH/D9S5J6zrqxtBVybjyj6tjhltyiy5c6vRouVsvxhzuBuYmSccw3eNY61lCtyWxXeS0aWGKe71GkwDyi8vQw6yjH/TzQ3BvF9abMNDUsVfW845I6Xqz4qe7fiug4rvHWSMeT+NlgCTS3+2KX8XhoZq69hMOc41vO0M4j/VOEtSdA9QZGpUXhzFN5a5znuVmTvB4PeVf6YU4DBrFf0PeWQO984nO4RXrHBu1aJURoZdFDZ2M4M+k7R0SMy1iCFs08Kfmmu9OcV3nanG07KaN9WeNrZLnXMvbVRrymBZELRP8oKMJgdir4RDrk+zq+5n8E7UWooSW6nFYM6GP9doKS6WuaIlPHYgxFOWylZRHkD0sQXCk8rV0x3zL2rsT+dYWQ0/VIayynGBtzgkB2hyO1R/K3mv/+WsZOqplmX098oPjaJjLVE4b3prCL/6qgRFTsD9ig0dzpeKdZpt+hAZ6siKneIQW1gpLJ9UxpM+5QbAClBR+VWKbxZhmEV5VEDedgZkFakCEjBoOucmWJJntVmiDvVZK6P8FpJYTHKu8sx/8WKXFW2cFef8trS0FS+VE8tJVqL0DZhpDOr2JDAWe2ox7zvrNtsTBm/fKbwhhul/hYxulcadaEWzmxyasLc2xleYlLWYBbFHJYnuCuSDmhcoLVX/LUmf6bRBNwnXWlPDaZSSYf/kv++yW2eCT5WdCxQxrrd2JshMfthFQfvULjznNlOS+mqW/0vK6lYZhikdYOdJNVurfXQNmswxTE+/4gcZk2kv5HtcTQqh2U1Bg9H+i5jJR7403nFxhXStKyuRNxcB+W/OkcNJotNxvzWy1c3XD6ueWLkGvf1PCq2jQz6MqeHtDNmjzKSZFgtim4x57pczmCoFBlfYdDvBn9gtFvdi0H/pOxkznJWOfOB1UBsqdRavA3H3K/ooKKjp8E/y0gMvKiImUt1gftUz6CTE9Z7T4FjDLPew7Rm0LNGUcxCXcQd5aJ7iucN72mPdhLSvcoUDbx8+1zNErr51vOMmxP0zk15iNul7+Rdc6eYm9LCGu0VgvUKrYf46alyg8zIwaPye6kSG2joIllJpTTfqiXirpIsaIFUZNs6s7CpUnaf4jgQK6ibLNXSKc4MLjddHizGs0YC4CpZ0zq51idKpubVebXIlMe8uCuX2tgtDDq7gBpZR3kpWCEV5uxZbJBAfbGcu/lUIrxTDQiPwAOCwQQEgwkIBhMQDCYgIBhMQDCYgGAwAcFgAoLBBPyv8O8AvcYpbXUrBQ4AAAAASUVORK5CYII=); + background-size: 120px; + background-position: 10px center; + padding:15px; + padding-left:150px; + position: relative; +} +.ssl-brand-info::after{ + content: ''; +} +.prev-plan,.next-plan,.play-plan{ + padding: 5px 30px; + font-size: 14px; +} +.guide_content .line input[type=text]{ + width: 400px; +} +.ssl-info-line{ + line-height: 32px; + height: 32px; + font-size: 15px; + color: #20a53a; +} +.ssl_verification label{ + height: 32px; + line-height: 32px; + margin-bottom: 0; + cursor: pointer; +} +.ssl_verification label input { + vertical-align: middle; + margin-top: 0; + margin-right: 5px; +} +.ssl_verification label span{ + font-weight: 400; +} +.ssl_applay_info{ + padding: 20px 0; + border-radius: 4px; +} +.ssl_applay_info .payTitle{ + margin-bottom: 15px; + height: 50px; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALcAAAAyCAYAAAAeE0r0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RERDMENDNjk2OTNDMTFFNzhFQTlBQ0RDMzI3NzNCQzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RERDMENDNkE2OTNDMTFFNzhFQTlBQ0RDMzI3NzNCQzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpEREMwQ0M2NzY5M0MxMUU3OEVBOUFDREMzMjc3M0JDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpEREMwQ0M2ODY5M0MxMUU3OEVBOUFDREMzMjc3M0JDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pu+PnjYAABY7SURBVHja7F0JnBXFma+qfm9mOBS5ImIAbzFCNF7sBjcHaFhZQUXUqMGoYAh4RNlFophdiRFdNUHReLMeGFbQhSgBDS7giogBDEokGEWCgLCEQzniwMx0Vf7/7mqmp6f7vX5vBpjZfTW/b/qo7jr/9dX3ffVVP3nIMpEYpK4Q0mSFVhpHKYyoFtKLyAhhanBtcL9MCGWE0IhXrpCu00FKcSgePxyRXXH/SF7jLRNJ3sGNjchkudRqgzFiq1F6LTLYpbQjNCIVMjMK+SAx/iE93HC9hJQuR9xuEEuUBWlL6YJuqUXrhQeLTnd1E7qVm+odpZSQqIzWGmUy3rXXHLjnuu7ecwbG12tPxMXdT5tvXLrBfYagDOG4cPzeumtdJ+2c7aR16nrkSyttiCtzUJak9nMcp15cRjROOAKI6yON6o2CfQVZHAscthfGFjKhP71Y49gKiS1A6rs4Jb0HmisI/lIohSJDQ8DdCpDsBQCPkBpHKboEYJbFpdcBfOYsDISzCHkw5DU4zgFNAnF+qSl1VykUNOMV8c4hAOA1EEcWKlM2Fxx3MO51aeRycXwcCRoudWaxFOpF3Pp2qbtKYd+B2zjnS5GZKY3zOK5O2l+FhLx/HmgOxJ5puDyj1G2l0JjgPgz0iBLOVAgMZyYK0ftahDLyIii4c4TO3IIyVJS6rxQaBG7A+BvgmrNAP8Rl2YEvsmyjpBqPk1+jdEeVurAUigX3ICh5MwDsrzW5kkvRD3L/bIhK3zxAM0kpNFtw67IRUmenAjjtmnDxj5famYGTviWAl0IMuDOiDnFRRpddJnX5RHDHTFOvgBSirdJqOuTxc0vdWQp1lTRvdS8QsJUAJ+wLwPxSSJNpJnUwRpulGKaV3iKm66Tj4TV4WKsSAv5vgzsMBXMo6D5BW3bTx/QW0DyjzEMA6SLhLfJU2xXPFMtIXHAycn8XWormLz91BPUHvQN6fx+kzzUTduInBbRVa1Bn0DpQZa1YQu7lk0Rn343WP7mJN+461PhuI9z+RlVdArws8Pgw6+D7FvQClTc2KJVSI6SUF8TEfRX0E9CXc8p/St2Lw/frJZzg/xEKvRB/p/BWhHOGU5DHszgeF067wXKrUlHqBnoYdHY0rjHEZJR5ljFmnNZa0pckTDnCt0Cvg3rWlblrwd1bGXVlk5SqvSFsVmpjbsCRFbkFd5cYz5HKxzTunyR1i9lSqt8g/sw0yZoyk5Y3HItGfxiN/vWYRj4N9FNQtxzvH4T3/wV0fBKog+soATSXIt9bQW3inIZC9/6K54eArmgsYCeZGpiX8KbJRg90veiJOr1pKGyibkH9bFskDaIWwl+LKasLbnr0KVOBl+9qgly62sia+UbqqyB+0Bz5IEC5mt6IWlV7Hok474JuvBPawgJU/xzh+aiIG/BcmTcu4gh1llVSlK+qECZj8nEu5TjOPTj9DA39JOhItNU1oIPtI3tsR9dYQBLIo0DdeE1vNVBvC76FvE7ickFnhqiFnS2m4fx/k5UO79k/gX6BtG/EO4fuQ3A3gpJkRJQrW6ZxPWg1yj4jOisE9QlAHjPgaqJiTMZKgX1kE1rWRldVoVxTpZbThNozS5hyoLEGskHWF5MNK2ccadQVYN6jUOMekal+oFH6FKTxdmwGjhHO9oxoO72DMBU6X0d8F+mdh8YfSwDh1pW4vgPH10A7YkQMmk5/DvoD5UZ2Gu79I8634v0FOSeT+oDkrNAV790Oaol4DpIk/1wXz2zHcROe64fjhoTnKM+uBn1UZPfssSBqbM59Osr9Hdt2W3LNPgHAc4kqfIbgltLIwaJJrD6KzQD2czg+jdb7g/QaUflgNq41V3qj9u+krvgZqtA3sXJafT8R3J4fOrhBC1pXVC79k+LIAwAN07k3sLPYaVnnmLbZ8a5t/HKk8Q2rgG0vhLuhA3+A009Br4LOQDpTcyhZGvFsoCrQfbaxZHy/ywk4jguBh3rKQAvcXMG1ukUrvDsAZexgB0uuQHMcmcJzeWbIm9i2rutO8EagkzvZXAAP6pWR3ExgPM6SNrCCnyGJDo2l+EPsWCKNmQHRY5LQzl/8PtE+jt1yz9nbhhNQ1utwNQyR+QYjGl+MiXJXHzigcp3PqNJG+O62DjpxGKg6DSDD3MZOn1QIuyNulxX9snaA7LFK4lLQ82GxxHYQxZ9zDdvFmI2eMGXMSJF7R4axlEu7YzorInI/Z76hKbgx866wMi5993uK/KvcROn8MLijugPa6Uykdamt3+a0ymkI4Dvtre3h9s9gmj8ZU/th6TmKmAm2OB6y8EVKl4/2dscUL37MQxGfQlqzcbXNt0xyRw+kEolC+wIy/lO4Lrse3BYymeyWZlBJmqyMAUeSr8WJJe1eaC/kHpkkc38JjfQfOP4D6HLQiqg5DyHgctW2QassOPfYa22P5+AerQDkqF+3ADoc1N2a0rYkdPqFNMmi4x601+TgU4rZyZNrMNowHfS7lODuibo8gXcfxvmzKcCdCTOY8AAOgZ86zXKk+ysrX9Oq1K8AgHvmQzsjbbZRVRlg8/TCjDXQYoVegnou0VIvRFEmUi4swMwLEIs5UIUfw8D4HXhHZd1HDGWFoM34D0qivEuZTM9a5pQqlHnTrdT1wA15XFSsK0eU9LbKxYSvgM62Jr4ptgP+3oKcheO2uctAa9Cg1PCzaOBB6LTjQZ1xz9v3htAC96l8TqDcHHBWhAtx/1eU53H9QQzY2iN+iLXZLkvieA0EdDh8Ziltu3LmWV+M3B7O3wLzR2xbtNVkxO2w4kh32/5pOXi5BdfpoQFaSXAX5pdt5PnQ5aDoOEsBxJe00u9CpLhHmszFebj0n6EUvoySPI003vX3ZEaBr0KzqzwVz9yEgl9evNXUfJX7OuvL40ZsvHatOGJYd2HilZI3acdF3m/YfXtd0OhzcX4dzrkFbj3iR9pCM4MVePYSyenGD8vw3Oc4nkeg4r2lAUe3ogu9GXdZru0VMCw7Iv58az/finyDmSKIHm4VTV1waxjziVXYKuPEqKR7kRAAKVuIiBatow2ngsYGikBgRUHb3kJzb9rBAhqAd6ZbU+LSWrHEiI6FWI2kLyeMgHw8VPjr3WiwmiHGZN9CVnfKyGIDMl6JN55CEV6CHPChDLth0/QRWbPDc+2lKRsljTPUcsiGCPPthOtk6023nHtQjM/P3epZTHRrNzoh1KDcbwRTKNqdit0OmvJw/BD3zskBLqswiB1o8Gn23tERObwV0tgclCvCTamAjo5OdyFFiUrcEUVYK9DXZndUjAhAGJQhBbhrQrpXPtBFbfZh7k2l9H6cZ+2s4UTfy1eWYDAExhBcl9dVKKU8rvBlFXmRkWY8+vBjy2UhT5oHjNo937dimBNAG4yRTyDyZbNX5goh2UGh3DoacQViLkTat2EW6N5IC0AZZJepBwTOGlktdvXeKQ56o41wdjmYjBIXSKjYjcQ5FaI/2qg1KbgWzYVHWlnylLCdFvEn4nQt6IuYKfY6a0OnDNwzpjz0Zb9bFK7NB42v40AYea61BZuJUVgPCT1zcJJFBvR5eODGrMQ+ieszAU6aVkeK0H7egMMH70QHSo6ZoM4AzeSbXhJX3LQYDtn15lqdwKvRciiDA5F2Oyn1NuFWxLSPa60fYWCrb+HmKKXVgEZ2vTBJIJCuFC44dnWnauF8kPE/NBEjG4LbDKeJDdf32AbPWpm8IoF7Zy1wO+OdSaANSGMwjmQk5HpZHI/GNf1hdkfMV8fg2X9DHBW2XTjvFVMmk49rNjC0FXScgx5l6yojlrI23kKZlDdapTdqs+PKYhXi3+LKakxZOTNR5KC+8QhosuCiW/wg6USzL+g3SKsm/DmNPMvxezXZohpKGvVdYaoeN9JdZezKn6wt37YwunzbAe3JFb4lpHZmpJXmX8GpL5VeozW6T1HinMZ1oYrVFaLlO62F2746KeuvoSNGoFGXW8AGJsLHcL9LDtMXrRq34BmuSl5KUxs6o6W1GpRDjj4O8U9HuBFXie/GPZoex0VEkzB35RJ+x2JkbtBOqxTn+pIA5XGa5g5Hni9au7mKWEwW2kGcjRFZwNjkP3HgBopCSHwIrEgDQK/gfAyOOoetnDP4C8JfuXw0LaiDPMmR/oQMTi0CN12A1AFS6An+ZbXFUibEMNFxVOi8uIrwTHcwRIMhSsofizwORw1k3C5GoY6DPAWpsvVlQrd0k4DtgEv8wk69u0JT+A7LaVokzAoEwibQXyxo19tOPwb0e9rqrdnqw8g0TfCfgPR/YuX7TMQWHJzSj+XiImRuDpp3QGfnWUyqxDN3Iv9HcPxPXM9Iu5RvsfxjghsgvC08AEODk6bTO1zXXYbjzjwy9QKWgdYm0Gs4/7ggJQMv7Sh2xpe67Fojs0/s7XyCWFV7ADeai58moi+iriaLAaFuhJDbZ597f0qzSSi3KsZuINRuR7R9MXn5He0yFsQpcbUdmYH8xyl3cVKnRJ19rKlvI7j1WRbcA2iLRdyqCFfbBgBfYuPqzTohcNDuPcty1EIVys1xcn5MHWjjp4luHGh2yHafr85HoZ6jUR/qJ4tzZPHrtAuGdgakB+K9GBCXhUW5/BWW5gNpivwmiBRH4/2Bvi2Y7FB5n13zmVcmIvp6ytHNymQG+2DZD27NGtzR1J/xdEaLjk91sv7csZ89G4TGHIeGHW85aL8IwMpwvyzmZSZI8FeFQLsW13R66ku5Hen2IQdC3AcxJX4/rO1HFyts/m9a2peB5R+Jss7D8d9BNwbiQHj1MGxhsbb+Z61IOiafwpvC1TdI+1PkfbNNu79dcEq7JONp5Q1gjoqyYataEKu6VhEhOwuT4ehbgOp8L+CC+yFUoSiLPOU1So6ESFKeS2rtjUalrXqsqPUlDIcf2cWVFdaCEhA588gIQJnL21Ys6WfNgq/QrBvt4LDClAYYhVLSu7F8Qev5BBXiWdfL4zh1oDNYz8nH6diFe5SPNzSqcGnMVNAc5PFza6VJB25OsQWsTsWJrz3QTf24sigjO1sMG8Wo2dKUjcdVG7Efg6ETljLzQSKWZE7wPIjGHBiyfkQDfbe7ovPngGZammUb/ugo90VaU2jeAwaon7TE9X8V0cENl9LyAD8mT66sckn8Uev8lZQuzZNXoA2GgV5N+ghodJAVOJP8jBYovHdrWq5PzwrKlIukz/KLCfxYztUY69ND9hEqqOOV9FaM1IHYWYX6/BZiSaxc6uxWYuuwTeKw27v6fLV+O62JTsExYQsa/Lqw7Itr+nCXhe209nwJ4t7lUj2Oz4DqiST5vOBCgQtIE0StF2dalFCppX50TxLwYiwRfOdK0DOIn4Nyc8X1t+G1CdD9oB/g3R/S9Bnb3qhbuE2KDFQu6ed9E02luP5zvgFPeXIPHpki/aXLsiKB1B8AnwjevRgy7kmgG/xt9AcsVGtV81CiUxfuVx1qEmGRYpWOCW9BQ5sYQASmVXoDLkfHVtpOoAhDcD9fb/osbItWe9Cx5Kg4fijyOy4Z4e8Eol26axJHjyjB4ZmC9uVhduMFuTJdUx+wyiNBdira4CoO2kLl6UJnLiqXaKtVtLKk47rKczOYbkzFWMjPJxTFZT2fcHW93GvmPbB7YNEIrwitVuRqKLUHVacriIrnfUlKnfAXYbpZP42aEDCkXcCgHXeo9VC7GNcEBPc3XmXToEWkztSdYjBFA1f/HspjkQjLz+XI/8K4muaoZ3gJvNKuJK4E0VecfjfHWv+Zb+P4++h7cd/wLqKe0UBufVvaNBR3uIAqpaFrZWOA8oBv7q400tyHmaRq7w73BCpCBiXRJ+J0K7qY0N4+bgnjQswg0JNUIrkKCVDweYoiG3F+A845zQ9poDwtRf4NwyK06HGw5fAN6Rw6NlGJ5sJUfzt7UFT5KE3bNabuEKpXHnDbhSb09WOg2aKZBwD7OeG4C0QGgzYH6dZVBX3jNmQd+CYuO3F2CL70bzuVK5Z0+ueqK1cfL0b8FwD904g7Edc3gzwbNe7RTfjkQjsrX9milC/NlByQjlrf44oiys3N1+8h7dGgl3E9FsTFmH8W/uLU/tOpUpRd+R6M/AkO77dBbgU6NjRbYBvzR+H7M+R+LmtEx+c7eZsVCvxSfkdOy9x2BvqfAFh2g+sGLtOD7sf5UNDn6Hgu0w/G+XiCwYJ4OM7/Cnn1xbAMnAaMUeYV4/SUZEsu1MWCuhgXsB7C+4tAkzl4kdcQWpFAbAOKXPSZ2cY2QV3ZHjTZcfW0Tb6B2FiWn5DiW89km6lbb/Me3hiF288JITLNC9pyu3G+uFpIvSXn7Muf72kJNf/jCkhjMu/u99o+8Tj07SCaAOlT/UVkqt3JzuYRz3CTwi9xpKJ1L+XE0LPcUUPf73kAOE2I3N2+ughLQiEPqzzP01nqcLtjn5+luwTlb4uybsX5UpSRO+pf56AMlXGPNWnOxLEPnr+WG5NBBD1B9d/C30TNn4HhIha3ym0rRvZOsiQFeyiRHj0VK6kbRMBdGZrSvQ82TRWmZQ+lnduaEbKrtDTXcGdPPrGS7uStlx4kMlvKPQ6eIlBuq7CdMRNEh595Cc8GWjxl3DPQ6I+i8cfEjJSFuD8EnUO3z9MCcMfkm6TUtLUutetFfq9OF/nQb6VLeMdDCFz8UtPL9C+y99bhMYqni3B8HfdW5Gt7Ksi0b1P8oj3cui30sbvwg5mD/jgP52jjTIHix0g7IANleTXKsCo6/cSpDndoZdop7fnZNnlpBGN3NAr9Qqq5HFJYq6VtRPbTclHTtjqNivW65ToE5asp2fwm0CCR45NgiJ/mui4//7U0oSPfECHnrJDIspJffKJ5LzDlpigPHaVog54bo9iRLdLjkRsrKFpQvFpXZF+ssPSIFbk6otw97MBZlgOoi3PlmSDG9AHxWzb0P3kL+fDrBHUcwmT8T/VxoEsljR4jdeanTVhE2QlgD/M6hg2ncn1xwbIQQKLD5M6iw5Qv4zz9b0gFsmKwINGYG3XT2IcL+Xm9YpXSsI07vBMm7pi2/Pa7LWksMXX20qVok7CMreP0lRytJLWRVXdBfLpahHZoNxl2LfRH2qm6AM0yTZRCszdyFWGmDHYV6VyKRh6dRU420pyPcbW2iTQE2CZdJnVfKMlzD8CXWkuhmQSVcoxw58WrTWB4rzDSvcIofQFAva7oX7wshf8XIROvbAfb9JQw3MhLNwzjVBw4UBv+bPZESGRUGteWIF0KKcGdSQC3VaS9j+Tws2vixP27su75LayEOjIJYH6pKcr9pdDEwS3dVK6WPYHwpK9KfQKZ/BVpZA2OXTEAekC/ParIHxFYBUXxfbz3tlFiHr/BLbRT6qVSKJJzp5G6jTgN1D5yr8oodyJAPMnfqubQr4O/znAMIrsKWdVNmGx3MH5uz/+S8e2ee21vUoo1xvduW4NxsE5q+TGOazFGVnliB3+SR5Z+oawUGgBuk5+7crdOLzy291tnhi6bQtyO08Uyso9VeN+PMx8ZehuarJC1W+LLI6x8D3ene/t3SkJ0KewLcCs3L7Lo5fYdH8PmHdCDwPsz+ZOWYcBXi33zMxOlUArJ4NZOXs69HcrkUxRDhDJPAqubSr9nWgrNIfxNgAEAtFu/YPhnJ+0AAAAASUVORK5CYII=) no-repeat center center; + text-indent: -999px; + background-size:150px; +} +.ssl_applay_info .paymethod{ + width: 200px; +} +.ssl_applay_info .paymethod .pay-wx canvas{ + width: 200px; + height: 200px; + margin: 0; +} +.ssl_applay_info .paymethod .pay-wx{ + height: 200px; +} +.ssl_applay_info .lib-price-box{ + margin-top: 10px; +} +.ssl_applay_info .lib-price-box .lib-price-name{ + font-size: 18px; +} +.ssl_applay_info .lib-price-box .price-txt{ + font-size: 20px; +} +.ssl_applay_info .lib-price-box .price-txt b{ + font-size: 28px; +} +.ssl_order_check .lib-price-detailed, +.ssl_applay_info .lib-price-detailed{ + margin: 0 auto; + margin-top: 15px; + width: 420px; + border-top: 1px solid #dedede; + border-bottom: 1px solid #dedede; + +} +.ssl_order_check .lib-price-detailed .info, +.ssl_applay_info .lib-price-detailed .info{ + overflow: hidden; + display: flex; +} +.ssl_order_check .lib-price-detailed .info span, +.ssl_applay_info .lib-price-detailed .info span{ + flex:1; + display: inline-block; + padding: 10px 15px; + font-weight: 500; + color: #555; +} +.ssl_applay_info .lib-price-detailed .info span:nth-child(2){ + flex:2; +} +.ssl_order_check .order_paly_success{ + font-size: 24px; +} + +.ssl_applay_info .lib-prompt span{ + display: block; + margin: 0 auto; + margin-top: 25px; + padding-left: 45px; + width: 200px; + height: 45px; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAADMElEQVR4Xu1abU7bQBB9YxupUo3qcoHSE5QI+N1wg9yg9AQNJ6A9AekNwg1yA+jvtEo4QeEC1AgjVYq9g9bUNA0f3vFqqVE2v9/OvHnzdrO7XsKS/2jJ64cXwDtgyRXwU8DGAMkECTh+VxuD8rO08/u0FjcHSCYv1sHRm9oxlJ2kHaS1uAcAjRygCw/yeB9EfZPEDKQczjqmIujig2Llp0nsEsM8UFH2pYkQYgF08ZTHR0S0YUwQgCL1Md28GpqMWRvHn0G0b4KtMMw85SjbkYogFmDtezwA6JOEnMaqcPbWmQNuyfDX863MyJXVEJEApfWL1V+3qgMXBB4qxuhRQaL81LT4Kk65BuTR+mNxA0KPQbsEvKpwKrx8LXGBTIBx3A2Ijv6SkisudU4dftGRinkn3c6O68Y1c8CCANJkpqQkuMSSk5UDvABCu0k6a4r1DvBT4N+FWTot/RpgOtc0zna+SXKZYm05eQeYKl06YO6QwsAFh7MN6Q5Pks8Eu3hwkmy5dXyRA25FyKNdFeXD/138/LY5aMhJLIBJV54TxgvwnLrlgqvYAWvj+IAJossQF8Tvi0mM6fl2tifJJxJg8T9XkuipsE+6E3yqoiR5nAqgiegLCAb1CKi/sZUwt8QycEbgkdMrMUuOrRwuWgNaWYElKS+AVMDytrYI3yMsvrVpK9yUk8gBC4ch0dceqdCmeM2JipUJAYke4/QwZHv2Ni1KgrPlJHOA5f2bpDBTrBfAsineAaZWKy9DLNWW5DLF2nLyDjBV2jvAT4G7awCwbJ/H7z6QSIl4oAiPf4939EgqYHSZqV/tAm92gg4fSNzcB6zqdz4fJGtHk0dS89tbQa7D863LXQG+yXcBJFTExwSqfx43x0SR2ks3rwYm5JIfL/sBBwcm2ArD4BMOs67keYweK/obrJL9eSukizF2guSQIn4mBxyq8LIvLb6xAPNCII83AqD7ULdUwCmCYiQ9OpfHbhX2AkXlKe++nwKOEWXTJoVX8Ro5QGLNtmO9AG3vkGt+3gGuFW57fO+AtnfINT/vANcKtz2+d0DbO+San3eAa4XbHt87oO0dcs1v6R1wDSbCMF8UwqNRAAAAAElFTkSuQmCC) no-repeat; + text-align: center; + line-height: 45px; + background-size: 45px; + font-size: 15px; + color: #777; + font-weight: 500; + background-position: 20px 3px; +} + +.ssl_order_check{ + padding:20px; +} +.ssl_order_check .order_paly_success{ + font-size: 25px; + text-align: center; + padding: 15px 0 0; + color: #20a53a; +} + +.lib-price-button button { + padding: 8px 45px; + margin:0 15px; +} +.lib-price-button{ + margin: 25px 179px 45px; +} + +.ssl_order_check .lib-price-detailed{ + width: 480px; + font-size: 15px; +} +.ssl_order_check .lib-ssl-parsing{ + margin:20px 0 5px 0; +} +.ssl_order_check .lib-price-button{ + margin: 0px 0 0 65px; +} + +.lib-file-verify .parsing_input{ + border-radius: 4px; + border-right: 1px solid #ccc !important; + width: 320px !important; +} + +.lib-ssl-parsing .parsing_parem .parsing_textarea{ + display: inline-block; + height: 90px; + line-height: 20px; + border-radius: 3px; + border:1px solid #ccc; + width: 320px; + padding-left: 10px; + padding-top: 10px; +} + +.lib-ssl-parsing{ + width: 510px; + margin: 50px 50px 50px 45px; +} +.lib-ssl-parsing .parsing_tips .highlight{ + color: #20a53a; +} +.lib-ssl-parsing .parsing_parem button{ + margin-right: 25px; + padding: 7px 20px; +} +.lib-ssl-parsing .parsing_parem, +.lib-ssl-parsing .parsing_tips{ + margin-bottom: 20px; + color: #666; + font-size: 15px; +} +.lib-ssl-parsing .parsing_parem .parsing_title{ + display: inline-block; + width: 100px; + font-weight: 600; + font-size: 14px; + text-align: right; +} +.lib-ssl-parsing .parsing_parem .parsing_info { + display: inline-block; +} +.lib-ssl-parsing .parsing_parem .parsing_input{ + display: inline-block; + height: 38px; + line-height: 38px; + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + border:1px solid #ccc; + width: 330px; + padding-left: 10px; + border-right: 0; +} +.lib-ssl-parsing .parsing_parem .parsing_textarea{ + width: 388px; +} +.lib-ssl-parsing .parsing_parem .parsing_input.border{ + border-right:1px solid #ccc; + width: 388px; +} +.lib-ssl-parsing .parsing_parem .parsing_icon, +.lib-ssl-parsing .parsing_parem .parsing_bottom{ + height: 38px; + line-height: 38px; + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + display: inline-block; + padding: 0 15px; + color: #fff; + background: #20a532; + cursor: pointer; +} +.lib-ssl-parsing .parsing_parem .parsing_bottom{ + display: block; + width: 60px; + border-radius: 3px; +} +.full_term_view .sidebar-scroll{ + display: none; +} +.full_term_view .main-content{ + margin: 0; +} +.full_term_view .container-fluid{ + padding: 0; +} +.full_term_view .container-fluid .safe{ + margin: 0; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + padding: 0; +} +.full_term_view .term_tootls{ + top:0; + right: 0; +} +.full_term_view .term_box{ + margin-right: 250px; +} +.full_term_view .footer{ + display: none; +} + +/* 预览图片 */ +.preview_images_mask { + position: fixed; + left: 50%; + top: 50%; + background: rgb(0 0 0 /.85); + z-index: 9999; + height: 650px; + width: 750px; + margin-left: -375px; + margin-top: -325px; + overflow: hidden; + -webkit-box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.3); + box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.3); + border-radius: 4px; +} +.preview_images_mask .preview_head{ + height: 45px; + line-height: 45px; + width: 100%; + position: absolute; + z-index: 999; +} +.preview_images_mask .preview_title{ + text-align: center; + width: 100%; + display: inline-block; + font-size: 16px; + background-color: rgb(0 0 0 /.45); + color: #cacaca; + cursor: all-scroll; +} +.preview_images_mask .preview_close, +.preview_images_mask .preview_full, +.preview_images_mask .preview_small{ + position: absolute; + right: 0; + width: 45px; + height: 45px; + line-height: 47px; + font-size: 19px; + text-align: center; + color: #d6d6d6; +} +.preview_images_mask .preview_full, +.preview_images_mask .preview_small{ + right: 45px; + font-size: 18px; +} +.preview_images_mask .preview_close:hover, +.preview_images_mask .preview_full:hover, +.preview_images_mask .preview_small:hover{ + background-color: #444; + color: #fff; + cursor: pointer; +} +.preview_images_mask .preview_body{ + position: relative; + height: 100%; + z-index: 99; + padding:45px 0; +} +.preview_images_mask:hover .preview_cut_view{ + opacity:1; +} +.preview_images_mask:hover .preview_toolbar{ + opacity:1; +} +.preview_images_mask .preview_body img{ + position: absolute; + display: none; + transition: all 200ms; + cursor: all-scroll; + display: inline-block; + opacity: 0; + webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.preview_images_mask .preview_toolbar{ + position: absolute; + bottom: 0; + width: 250px; + left: 50%; + margin-left: -125px; + height:45px; + border-radius: 3px; + background-color: rgb(0 0 0 /.65); + font-size: 18px; + z-index: 999; + opacity:0; + transition: all 1000ms; +} +.preview_images_mask .preview_toolbar a{ + width: 50px; + height: 45px; + line-height: 45px; + text-align: center; + display: inline-block; + transition: all 500ms; + border-radius: 3px; +} +.preview_images_mask .preview_toolbar a:hover{ + background-color: rgb(86 86 86 / 75%); +} +.preview_images_mask .preview_toolbar span{ + vertical-align: middle; + color: #bbb; +} +.preview_images_mask .preview_toolbar span.reverse-repeat{ + transform: rotateY(180deg); +} +.preview_images_mask .preview_cut_view{ + opacity:0; + transition: all 500ms; +} +.preview_images_mask .preview_cut_view a:hover{ + background-color: #3a3a3a; + color: #fff; +} +.preview_images_mask .preview_cut_view a{ + position: absolute; + font-size: 26px; + width: 50px; + height: 50px; + text-align: center; + line-height: 50px; + top:50%; + margin-top: -25px; + background-color: rgb(0 0 0 / 0.2); + border-radius: 50%; + transition: all 200ms; + z-index: 999; +} +.preview_images_mask .preview_cut_view a:nth-child(1){ + left: 3%; + +} +.preview_images_mask .preview_cut_view a:nth-child(2){ + right: 3%; +} +.preview_images_mask .preview_cut_view span{ + vertical-align: top; + height: 50px; + width: 50px; + text-align: center; + line-height: 50px; +} + +/* end */ + +/* Nginx日志格式 */ +.nginx-add-format .bt-select{ + width: 211px; + height: 30px; + line-height: 30px; + border: 1px solid #ccc; + border-radius: 2px; + position: relative; + display: inline-block; +} +.nginx-add-format .bt-select-tips{ + color: #999; +} +.nginx-add-format .bt-select-list{ + display: none; + position: absolute; + z-index: 999; + max-height: 235px; + overflow-y: auto; + top: 33px; + background: #fff; + border: 1px solid #ccc; + line-height: 30px; + width: 211px; + left: 10px; +} +.nginx-add-format .bt-select-list.active{ + display: block; +} +.nginx-add-format .bt-select-list li{ + padding: 2px 10px; + cursor: pointer; + word-break: break-word; +} +.nginx-add-format .bt-select-list li.active{ + background: #efefef; +} +.nginx-add-format .bt-select-list li:hover{ + background: #efefef; +} +.nginx-add-format .bt-select-input{ + position: relative; + padding-left: 10px; + cursor: pointer; +} +.nginx-add-format .bt-select .bt-down-icon{ + position: absolute; + top: 9px; + right: 10px; + width: 8px; + height: 8px; + border-left: 2px solid #666; + border-bottom: 2px solid #666; + transform: rotate(-45deg); + transition: all 300ms; +} +#tab-nginx-logs-format tbody .nginx-one-format{ + display: inline-block; + margin-right: 10px; +} +.nginx-add-site .bt_checkbox_groups{ + display: inline-block; + height: 16px; + width: 16px; + border-radius: 1px; + cursor: pointer; + border: 1px solid #c2c2c2; + position: relative; + text-align: center; + line-height: 20px; + margin: 0; + vertical-align: middle; + margin-right: 10px; +} +.nginx-add-site .format-site-list{ + width: 250px; + margin-left: 45px; + display: inline-block; + overflow: auto; + max-height: 200px; + border: 1px solid #ececec; + border-radius: 2px; +} +.nginx-add-site .bt_checkbox_groups.active { + border: none; + position: relative; + top: 1px; + display: inline-block; + font-family: 'Glyphicons Halflings'; + font-style: normal; + font-weight: 400; + line-height: 1; + -webkit-font-smoothing: antialiased; + background: #20a53a; + color: #fff; +} +.nginx-add-site .bt_checkbox_groups.active:after { + content: "\e013"; + font-size: 12px; + transform: scale(.85); + position: absolute; + left: 2px; + top: 2px; +} +.nginx-add-site .format-site-list li:hover{ + cursor: pointer; + background: #efefef; +} +.nginx-add-format .format-table{ + max-height: 300px; + overflow: auto; + border: 1px solid #ccc; + padding-left: 10px; + margin-top: 10px; +} +.nginx-add-format .format-table .del-format{ + color: red; + vertical-align: middle; + margin-left: 7px; +} +/* end */ + + + +/* 添加站点扩展 */ +.ssl_checkbox{ + height: 60px; +} +.redirect_checkbox, +.ssl_checkbox{ + padding: 0; +} +.ssl_checkbox label{ + margin: 0; + height: 24px; + margin-right: 15px; + font-weight: normal; +} +.redirect_checkbox label, +.ssl_checkbox label{ + vertical-align: middle; + margin-left: 5px; + color: #444; +} +.redirect_check label span, +.redirect_checkbox label span, +.ssl_checkbox label span, +.redirect_tourl label span{ + max-width: 55px; + display: inline-block; + text-overflow: ellipsis; + white-space: pre; + overflow: hidden; + vertical-align: middle; +} +.redirect_check label span{ + max-width: 140px; +} +.ssl_checkbox input{ + vertical-align: middle; +} +.ssl_checkbox .info-r{ + height: 26px; + line-height: 26px; +} + +.redirect_tourl .radio_item{ + height: 24px; + line-height: 24px; +} +.redirect_tourl .radio_item input, +.redirect_tourl .radio_item label{ + vertical-align: middle; + margin: 0; +} +.redirect_tourl .radio_item input{ + margin-right: 5px; +} + + +/*首页概览网卡选择*/ +select[name="network-io"]{ + font-size: 13px; + height: 24px; + line-height: 24px; + padding: 2px; + border-radius: 0; + border-color: #ececec; +} + +/*批量操作*/ +.batch_title{ + height: 30px; + display: inline-block; + width: 100%; + margin-top: 25px; + text-align: center; +} +.batch_title .batch_text{ + vertical-align: top; + height: 30px; + line-height: 30px; + display: inline-block; + margin-left: 8px; + font-size: 18px; +} + +.batch_title .batch_icon{ + background-image: url('/static/layer/skin/default/icon.png'); + background-position: -30px 0; + height: 30px; + width: 30px; + display: inline-block +} + +.bt_table{ + position: relative; +} +.bt_table .divtable{ + overflow: auto; +} + +.bt_table .table-mask{ + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} + +.bt_table tr th>span, +.bt_table tr td>span{ + display: inline-block; + width: 100%; + position: relative; +} +.bt_table .cust—checkbox{ + display: inline-block; + width: 16px; + height: 16px; + border: 1px solid #ccc; + background-color: #fff; + vertical-align: top; + border-radius: 1px; + position: relative; + border-radius: 2px; +} +.bt_table .cust—checkbox.active, +.bt_table .cust—checkbox.selected{ + background-color: #20a53a; + border-color: #20a53a; +} +.bt_table .cust—checkbox.active::after{ + content: ''; + position: absolute; + display: block; + left: 50%; + top: 50%; + margin-left:-2.5px; + margin-top:-6px; + width: 5px; + height: 10px; + border: solid #fff; + border-width: 0 2px 2px 0; + transform: rotate(45deg); +} +.bt_table .cust—checkbox.selected::after{ + content: ''; + position: absolute; + display: block; + left: 50%; + top: 50%; + margin-left:-5px; + margin-top:-1px; + height: 2px; + width: 10px; + background-color: #fff; +} +.bt_table .cust—checkbox+input{ + display: none; +} +.bt_table .cursor-pointer{ + cursor: pointer; +} +.bt_table thead .sort-active span{ + font-weight: 500; +} +/* .bt_table thead .sort-active .glyphicon{ + color: #20a53a; +} */ +.bt_table thead .glyphicon{ + color: #bbb; + transform: scale(.9); + top: 2px; + left: -1px; +} +.bt_table label{ + margin: 0; +} +.bt_table .table-input{ + border: 1px solid transparent; + border-radius:2px; + padding-left: 3px; + width: 100%; + outline: none; +} +.bt_table table tr:hover .table-input{ + background-color:#f5f5f5; +} +.bt_table .table-input:hover, +.bt_table .table-input:focus{ + border:1px solid #ccc; + background-color: #fff !important; +} +.bt_table .table-input:focus{ + border-color: #20a53a; +} +.bt_table .bt_batch{ + height: 28px; +} +.bt_table .bt_batch label{ + padding: 5px 10px; + height: 28px; +} + +.tootls_group{ + height:30px; + line-height: 30px; +} + +.tootls_group .bt_search{ + display: inline-block; + height: 30px; + line-height: 30px; + position: relative; +} +.tootls_group .bt_search .search_input{ + height: 30px; + line-height: 30px; + border-radius: 2px; + border:1px solid #ccc; + outline: none; + padding-left: 8px; + vertical-align: top; + width:230px; +} +.tootls_group .bt_search .search_input:focus{ + border-color: #20a53a; +} +.tootls_group .bt_search .search_input:focus + span.glyphicon-search{ + color: #20a53a; +} + +.tootls_group .bt_search .glyphicon-remove-sign{ + position: absolute; + top: 8px; + right: 30px; + font-size: 15px; + cursor: pointer; +} +.tootls_group .bt_search .glyphicon-search{ + height: 28px; + line-height: 28px; + padding: 0 10px; + color: #888; + position: absolute; + right: 0; + font-size: 14px; + cursor: pointer; +} + +.tootls_group .page .page_jump_group .page_jump_btn:hover{ + background-color: #10952a; + border-color: #398439; +} +.tootls_group .bt_search .search-btn span{ + font-size: 15px; + vertical-align: middle; + position: relative; + top: -1px; +} +.tootls_group .page { + padding: 0; + height: 30px; +} +.tootls_group .page .page_select_number, +.tootls_group .page .page_jump_group{ + height: 28px; + line-height: 28px; + margin-left: 8px; + vertical-align: top; + float: left; +} +.tootls_group .page .page_jump_group span{ + border: none; + padding:0 8px; +} +.tootls_group .page .page_select_number{ + border: 1px solid #ececec; + border-radius: 0; + padding: 0 5px; + border-left: 0; + margin-left: 0; +} +.tootls_group .page .page_jump_group input{ + height: 28px; + line-height: 28px; + width: 30px; + max-width: 50px; + vertical-align: top; + border: 1px solid #ececec; + outline: none; + text-align: center; + float: left; +} +.tootls_group .page .page_jump_group input:focus{ + border-color: #20a53a; +} +.tootls_group .page .page_jump_group .page-jump-title{ + height: 28px; + line-height: 28px; + color: #555; + border: none; + padding:0 5px +} +.tootls_group .page .page_jump_group .page_jump_btn{ + height: 28px; + line-height: 26px; + border-radius:0; + outline: none; + margin-left: 8px; + border-radius: 2px; + color: #555; + background-color: #fff; + border: 1px solid #ccc; +} +.tootls_group .page .page_jump_group .page_jump_btn:hover{ + color: #fff; + background-color: #20a53a; + border-color: #20a53a; +} + + + +.bt_table .bt_success{ + color: #20a53a; +} +.bt_table .bt_warning{ + color: #f0ad4e; +} +.bt_table .bt_danger{ + color: #d9534f; +} + + +.bt_table .bt_selects{ + display: inline-block; +} +.bt_table input::-webkit-outer-spin-button, +.bt_table input::-webkit-inner-spin-button { + -webkit-appearance: none; +} +.bt_tableinput[type="number"]{ + -moz-appearance: textfield; +} + +.bt_table_select_group, +.bt_select_updown{ + display: inline-block; + border: 1px solid #ccc; + border-radius: 2px; + height: 28px; + line-height: 28px; + vertical-align: top; + cursor: pointer; + color:#666; + position: relative; +} + +.bt_select_updown{ + height: 30px; + line-height: 30px; +} +.bt_select_updown .bt_select_value{ + height: 28px; + line-height: 28px; + padding:0 10px; + width: 100%; + position: relative; +} +.bt_select_updown .bt_select_list{ + display: none; + transition: all 500ms; + background: #fff; + position: absolute; + top: 30px; + display: none; + box-shadow: 0 1px 5px rgba(0, 0, 0, .5); + border-radius: 1px; + width: 100%; + z-index: 999; + background-color: #fff; + max-height: 200px; + overflow: auto; +} +.bt_select_list.show+.bt_select_value .glyphicon{ + transform: rotate(180deg); + transition: all 500ms; +} +.bt_select_updown .bt_select_list .item{ + height: 28px; + line-height: 28px; + color: #333; + padding:0 10px; +} +.bt_select_updown .bt_select_list .item.disabled{ + opacity: .65; + cursor: no-drop; + box-shadow: none; +} +.bt_select_updown .bt_select_list .item:hover{ + background-color: #f2f2f2; +} +.bt_select_updown .bt_select_list .item.active{ + color: #fff; + background-color: #20a53a; +} +.bt_select_updown .bt_select_list.active{ + display: inline-block; +} +.bt_select_value{ + padding:0 6px; + height: 26px; + line-height: 26px; + color: #777; + display: inline-block; + vertical-align: top; +} +.bt_select_updown .bt_select_value .bt_select_content{ + margin-right: 15px; +} +.bt_select_value .bt_select_content{ + font-size: 12px; + margin-right: 5px; + color: #333; +} + + +.bt_select_updown .bt_select_value .glyphicon{ + position: absolute; + right: 5px; + top:50%; + margin-top: -6px; +} +.bt_select_value .glyphicon{ + position: relative; + top: 2px; +} +.bt_select_value em{ + font-style: inherit; + margin: 0 5px; +} +.bt_table_select_group.bt_disabled, +.bt_table_select_group.bt_disabled{ + opacity: .65; + cursor: no-drop; + box-shadow: none; + +} +.bt_table_select_group .bt_selects{ + display: none; + background-color: #fff; + border:1px solid #ccc; + position: absolute; + left: -1px; + right: -1px; + top: 100%; + box-shadow: 0 2px 4px rgba(0,0,0,.12); + z-index: 9999; +} +.bt_table_select_group .bt_selects.top{ + box-shadow: 0 -2px 4px rgba(0,0,0,.12); + top: auto; + bottom:100%; +} +.bt_table_select_group.active .bt_selects{ + display: inline-block; + +} +.bt_table_select_group .bt_selects .item{ + width: 100%; + height: 28px; + line-height: 28px; + padding:0 8px; +} +.bt_table_select_group .bt_selects .item.no_drop{ + cursor: no-drop; + opacity: .65; + color: #666; + background-color: #ececec !important; +} +.bt_table_select_group .bt_selects .item.active, +.bt_table_select_group .bt_selects .item:hover{ + background-color: #20a53a; + color: #fff; +} +.bt_batch .bt-disabled, +.bt_batch .bt-disabled:hover, +.bt_batch .bt-disabled:active{ + opacity: .65; + box-shadow: none; + color: #777; + background-color: #ffffff; + cursor: no-drop; +} +.bt_batch .bt-disabled.btn-default:hover{ + border-color: #ccc; +} +.bt_batch .btn-default, +.bt_batch .btn-success{ + vertical-align: top; + padding: 4px 10px; + margin-left: 5px; +} +.not-select{ + moz-user-select: -moz-none; + -moz-user-select: none; + -o-user-select:none; + -khtml-user-select:none; + -webkit-user-select:none; + -ms-user-select:none; + user-select:none; +} + +.inlineBlock{ + display: inline-block; +} +/*批量操作end*/ + +/*批量创建站点*/ +/*.custom_layer .layui-layer-content{*/ +/* overflow: initial !important;*/ +/*}*/ +.offsetY7{ + position: relative; + top: 7px; +} + +.blur_checked{ + font-size:0;position:fixed;left:-9999px; +} +.none-list-style li{ + list-style: none !important; +} +/*.custom_layer .layui-layer-content {*/ +/* overflow: initial !important;*/ +/*}*/ +.custom_layer .layui-layer-content .tab-body .tab-con{ + overflow: initial; +} +.limit-site-height{ + max-height: 402px; + overflow-y: auto; +} +.block.redirect_check label{ + vertical-align: middle; + margin-left: 5px; + color: #444; + font-weight: normal; + margin-top: 10px; +} +.block.redirect_check input{ + vertical-align: middle; +} +.block.redirect_tourl{ + height: 24px; + line-height: 24px; +} +.block.redirect_tourl label{ + font-weight: normal; + margin-left: 5px; + vertical-align: middle; +} +/*批量创建站点end*/ + +.custom_layer .layui-layer-content .tab-body .tab-con{ + max-height: 505px; + overflow: auto; +} +.success-layer .table tbody tr td:nth-of-type(1) span{ + display: inline-block; + overflow: hidden; + text-overflow: ellipsis; + max-width: 140px; +} + +/* 企业版支付 */ +#PayCycle .pay-cycle-btn{ + width: 85px; +} +.price-compare-item{ + border:#ECECFB 1px solid; + background-color:#fcfcfc; +} +.price-header{ + background-color:#20a53a; + height:70px; + text-align:center; + font-size:24px; + color:#fff; + line-height:70px; + position:relative; +} +.title-wrap{ + text-align:center; + padding:30px 0; + margin:0 50px 20px; + border-bottom:#ECECFB 1px solid; +} +.title-wrap .user-number{ + color:#FE7039; + font-size:14px; + margin-bottom:20px; +} +.title-wrap .title-info{ + font-size:18px; + font-family:"微软雅黑"; +} +.title-desc{ + height:182px; + margin:0 70px; + font-size:13px; + color:#646472; + line-height:26px; +} +.price-wrap{ + text-align: center; + margin-top: 20px; + height:36px; + color:#FF6232; +} +.price-wrap>div{ + display: inline-block; +} +.price-wrap .div-line{ + height: 24px; + width: 1px; + background-color: #eee; + margin: 0 30px; +} +.price-wrap .price-unit{ + font-size:18px; +} +.price-wrap .price-value{ + font-size:26px; +} +.price-wrap .price-ext{ + font-size:16px; +} +.price-compare-item .btn-price{ + width:240px; + height:44px; + line-height:42px; + text-align:center; + background-color:#20a53a; + font-size:16px; + color:#fff; + border-radius: 3px; + border: 0 none; + margin:30px auto; + display: block; +} +.price-compare-item .btn-price:hover{ + background-color:#FF6232; +} +.recommend-tips { +background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODIiIGhlaWdodD0iODIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNDggMGwzNCAzNHY0OEwwIDBoNDh6IiBmaWxsPSIjRkY2MjMyIi8+PHRleHQgdHJhbnNmb3JtPSJyb3RhdGUoNDUgNTIuMDQyIDI5LjA0MikiIGZvbnQtZmFtaWx5PSJQaW5nRmFuZ1NDLU1lZGl1bSwgUGluZ0ZhbmcgU0MiIGZvbnQtc2l6ZT0iMjAiIGZvbnQtd2VpZ2h0PSI0MDAiIGZpbGw9IiNGRkYiPjx0c3BhbiB4PSIzMi4wNDIiIHk9IjM2LjA0MiI+5o6o6I2QPC90c3Bhbj48L3RleHQ+PC9nPjwvc3ZnPg==) 50% no-repeat; + background-size: 70px; + position: absolute; + right: 0; + top: 0; + height: 70px; + width: 70px; +} +.pro-font-icon{ + background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAAATCAYAAAFTgessAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAQqADAAQAAAABAAAAEwAAAADt3mdsAAAHFElEQVRYCe2YfZCOVRTAz3137WJZMq2vqDETrZIaIYoMIwy2aX0sWuQPYyIZkxmU8VU0NFOaigzThEnaXR+7CaORr5QZKmLKKiVFLSYlSct6n37nPO/z7Pu+bHZq/FPdnfvcc88599xzzz3n3POuSDWa84pksESl0HhryO1SwdyTpyRPMmStNJLLstFoMPYKBHqFkhbCRZLvrZW7gnmVo/MKEExzQ8Qh4RTgqxKRVW6QfAXtqK2EsMKApI9XInWd4mC4BzkzxclLjO+rtCRem3qrpaVKtjX+znvhzIz4VFnHmCMpcg5kE8PFPhymlYLeGulgY4EsN5KTM2zW0eVJts3/yUcNcB4B6RwhBQ3UGD2RfFCFYoyt7NTDYDXtJdkfM9omuOdwR7siLKzNwgXKRNML/EwBBM8Av91GRcQa8xGsSedC22P1HEODPKnXElxNwKwjtAM2rpF2AR0nmAS8IZgbP4ylBiR9uIG2SSifvwS3ooXXhtRl+OCj4HZKqkzhfLuN00nbwCY2vw4f9cqFqJKLbY5h3HEossH28VDDSWfgvTpHkaaG54NrdMKO2dDTsaXZHfRxN1COQ+sO/gxyfofny9jFLWL9OCz1Aft0gT5RaslSk3dBPN+xC2QViKEI7M7ibUZ0hIUnLRRWQYaL+9g9OPk4QLFJ4LPvSA2ZHiiBzKVusIxRvvDuIvIcsn8EtYGxU4JwNI1CUIZpbLsEAZuIpmIVkNwQOAucRuQ5FMhUOkHUEPv1BryZfhE5z0MfqTTaabq6+gHw6sWfAx+hl9ETG4qk4Uh3JGL/AzPfJwrlTkxkcUhkdMah5jHvxnUs5z5HXW87aJryFdAU5eQRvGILm64H7st4L30nd56RrAghXYCCQ5LxOjcHrIHcCrnE2sOGK5RFjHM5WEMO+CQ9h16PfWprxt4MoJ7aDgXeMNhZGusA06vgzyJ0IaM1lM6yEI1Kno5BVyJ8i32uyi/0nuHMEdYeThuV2wjRprhnBkpeSIWhMQTH31Tg5sB+87CKkA90HpHtPtK+Y7kuTXP7GXsFeCLjLCcv9NZJfeKislXIm0waGyIiX7CmArie/EHkeHIDcH4ETYL3azyCjxqz//GTlsjbmL0owMP/DPB39Jp0Tfpq1kw3QA5B28rL8iy4+GYvEIib2P4Hxn7scwhrjAAepoy+AsGjmRJ3x54UQP+eRGWMyhw0NltGb03XBNUAs84IaIxhZmWzJtjl4RitRZj0NMk5+RDlX1SaKYGwMlJ2LqYabQscDiSSxSJNOlc0rSG4/yPmgCJ5LocUTcNf9HR+crtsVurIJQ2wJCbSJiaoB3utAe5Kn+R5MUPEiCpkBb00vk4KaFWNJLbgpFWxGB65tRTQmoYelh/gU65YqNkSQtoVhP8R198C4SOKG+QTNdPwkomMm2Nbn8SJe+DEfrQ6ossjCsUviLjMPvjyAtbMJYpXVldd9uqPnDbEw7xqr3mXlHIBX0+jEo6yc4U8RBovdn3l12QZ5k1ZaHUa7SMk/hTK7lz5JZ6P2GpEOmuFHh567HLeRiqB34haT1rGGLUCqA1cBk5zW6KyEZmCIqls0JTxPPTJts5Rw9eR9ldVrMCKxmXGd+3PbBLDrGQ2gtwKbA7Vir3TSYkH0TObQ9jLFM+PIfSVakEfzRmOs0YfpAeYa5Wk9dxh8KXoWxrom4oRtFAcQ69saeTUclJdhGQn1HvJzWHdNF68i9Ia0qaQrLJE9oRzAJTqx6CZ74ThtaQSbtd/MaOGS/yMZs1eDqh1/GL46gMPTWRJnOFhr3OwmvDlhxQPb6XotXlUVjO+DE8W/emQ55zpd4J1zVL57GHjGTDMDhnKOWTEUrhf8IaEGJDCy1ou+1jTJCQ5mYksfdgSGjgNq2aK9NbLjbh3GeA48K8p7i+bk8ehn0K/QYz2qzGZnzLhfvx2FIV1pS7CXTt5D97hxp/FD8pTMhbcbvrX4NK0DkLuR8w/VZ7QD7xtvMqnZQeH62iLHYo64i9KKMS3iMyHJ5M+Nsa3Bzt3c90pDq7ReA0Gsk4f3cTmEa+eVZCvEBYT4onc9mRowwnGEfrbMyE01OUvU+ZE5AkOtiJYhyftMN3FwkBLmQnMuyKnnPXzMdw34PSCukldaa7hERoiFFIod7NgF/MMNugJvJh+q9EdvxCcPIZxtjA/D9yFm90frL3WaA92kbzFum+RXYycCL2E+THW9keWestVW3VzBLdcBwE/I3MQxilh/hNzNeY8RjVIMeNa5n3YfTo8c5iDrqIhYCrMk7iJ3ljwE2NL5R8gFVYRv4DSKvhvN+R3ZrFWP0PYpwFKLUSp8YFAPOE+8BuDebVG/6dBLYw7Fc96UNfEDLEP8Axda5NszpSrdSh7jGSPJeCGVWkIiMKLkk505WOuW3TOomO40kpcqdzm/6LPn2VLecVt1xB4AAAAAElFTkSuQmCC); + background-repeat: no-repeat; + background-size: auto; + display: inline-block; + width: 66px; + height: 19px; +} +.ltd-font-icon{ + background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEMAAAARCAYAAAHxiyEZAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAQ6ADAAQAAAABAAAAEQAAAAAQuP9PAAAIzklEQVRYCd1XfXBVxRU/u/fel5Avklo+glXGVinWjyIFBGSoKNa8xGSkEL6kYEgC49RhOtYpFCS5eRE/mLbOWOy05oWAyqjQqUwgeXz4UTuOjEhtWoYCRcq0ED6CIknM17v37vZ37uO+PDCZ6mj/6c68t2fPnnP27NlzfruXCC1aHX67IVJ4C9MDNZOZWuvprqv/BlLUVRXoysguUV9b8m3lxI8ITPuKW+3SkE8M9he1w5tYe7B5Uyu9BJMnWAB+fYJ1D0N6Ci8Hxe2DKSb5Ilpd+JwmPR6ao+GYC20T2qNYAhYumtKarJQzT0vK14qWSys0tnxt49FoTcHd2hNPjpTmndBLNPj7uNY0rLImtjzg1VWHu2A8wyC5UMG4JvWCkGJliNI3LbZfa6urLbqRHO/vvhHerCnFFFfpfbyHwMjn7XnTp4UpirSrm0Ihc2I87r7P22mw78+VppvpxL0dFZHYeDYYtYtulkQjFakfSiF2D9PG3mJ7Rzdo8bZWxlDI5MPAqSAeZfb2i0se29mKeN3mG6gO/5p7T3srscWrsfW8c9o9wzyzoia2IFpVoBBQwn5nMZMbeKWSJGfJQp+hxX4oFwuSLxCpzVqoduhIbdtw7lLbFCm+KaC/aJ8ILJ+CIacLV70HA83YQrEhxd2e1i8jG4ebpry1rKr54JXG6+zCqFBq/rirr82bsPx5J3WeD0tI4xZhGA6nBM8hA35jmcY6R3nDyROPaK2KwR46NDc7w+StozAyyPUOkBC/AP0oK3lKv4GYb4BTD3uu+itYya1Hq8KNIZlegVSpwILl7ERD7X03KE92CXLGCkr7wFW9bMZvkD+LAx7JAylCSpo9pzxPT4LFl4QWeXMf2dYjKyK7tnF6ITQnsejihCoOzaRJcOphU8p8yCSd4HkYLYnrXn+XgXzZ2p3Hyu3G00vt2Jue7q0P+MpT+aHsr3+LxyiaaT9a84czOi6KsMkXhRLfxMJ+kgTyyb7eDv8AUToStQuQDF9t2/qr0iFskaPXYBePDaxv3Vpq+DnCoOa6ijGLEkVIT8H/7yN7N1fYsQcDhf9VL5IOCGoTkhZqj14XJHZgwULAwu1IlD8BWjKvdODA75ZZLa3//gQ59SrKrjx1vj5y33eloG7Xcf+RiijR6oIY6rUAYDFNu/QMNjoRUTgqEYHdMHAmZJnjyaMGppEjE8ikiXBgA2q1nUEzdRFAb01L68n3RkhreEiYNQzFW58qZQCh+pqiGamyTHOVJHgiy+9dMYGBdKS0MnNys2+Dw8QZnO843iqAwTVM+z8PoKH1ZJ/W6o/o/Ra1S66XQm7Oyc264zypqR4ZHYhEXkf3py+ygFZec0Iy8e+DixL7/JHWTnpaho/457Rz6Dx5d7W3f/qunxNc45cUT6C/zqelOYOU+xay+RVGuUvzya6uqrAM2HLSU95eZgZh51IWprE2OA7kVR3yahnLJNcR4gmujpBhNrmON9kvQS5HFkJ5zuPeb9p9FR6eHMiBQIR7U6bnBQ7w2DB1LUrQYJobciAtQfG/eBSLX4DdcXBsQ5/j/HNppPllPxI8jXO7HwphaC2D9+tI6dVX4gTLcdtYVbjAE/pOkB8hUiekoi4t9ccWpbfEVd+9yKlrJYk4bp/1wP4EBkk6b5nyoOO4XIUZWotDKIQPQZ9NOoEBHAE+KJoEJ1aU27E9zPuqW31V+AGVZr2Oq6q7fGVjJ1fSZ9bgi+m/PmM+o/XlGMlIsIfIzjUI0U+U0ly2BLw4JyXdpbRu4jEu8yKl6E2EewSPDcMoADw/AyPryiOxLcz7Io3XZPnPq7vlyaK83j5cgkOs12SPNBT1lSDhti+yYx1XrsuB7KJMmZnTJTo7uwqlDr3Bb45Uubp1JSNMzxujlKfL7V3viJfscE6vogPY4A0siFxbjw654+cMHnQaKN7fkDIrsXlTkR6FC7EL993PeBaBO5YuacJAjvVrE21+YtZVTm/PNk1ijDCJb3cCgO5A4RzPEObshfaOj1LlU2lOIeW6LaZljsGlnAZYOhg8KFPlmPYxUuvrLMus4EcYgHo8uWI6VlujBdUBRY5qMo6kk3ck8NnsJWMsXqo+pLARH7ssedh03HyXZC5YM5gfNJ43SF1UlnVGO+pGRCHGc8zvJeI7cj+PU5sPAkpvwobTnHjfuhyZXTDX3hbfaBfNZMhjxCHK7e3W535eVxVeCbkevs3Kq2Mx1O1vEepcoMv8VJtX0rhA+DGRDnTzs43n+bbiQPiyHv0e/bM43GFwdrX/yiSXesDEmq2Vkdg3zAp75344W4WPhBpfif/6cJuZcha57ltJXgqBucnUF/8LWD7k8hQyphoOR1LEkiT4/JHBgfU/QNp1VyvIBh5z06E+69arkNV0zeOdZ0bVzrBtNzFDlPOd7B93HOps22iH5yDgxwJ+ah+NhO/AM+DBNJGe9AdWs5Dle2QaLWJZER/R6emzDyGr98HZ4/jCCFXW7JqHh9S7QNwPWMa/R3gTphw5BCcSnGo+cGMJNvg0C6U25vEceP7CrMO6gwUiVXcwGk/A2S2tp+bz7zjtn5kqN3fuNg+1+7SnqCqVH9C4pDPwHGlG2pfxZ1PAJy1GI3hxHZdT8Aw+rqhtPuzcDOBrIYseQ3jm8MUL3k1DSKxmPf728FuZvQlZTrc32IXjPKXeQaY8hKtxJjY7G+l2PQuB/pCE3pt4jFGXIeW0Mru5xTfwJf4khV4pi1wObqnmEOj1GK8f6NoRwuour2n031eBDsAzq113ToV/c5ZWNzXigefgfja0ECWGEiuyMjLbOto79yBYxULItYvsZh+AkTUDtzq7YBWi+1NDmPd6yvkzSxnS+p6n3d0IyC8r7V2XAevAVvq5qEvUrk48+PrZA1OC3kcK3wNMmQpMueztNrBCP9eQRqES3hB8eKxiGzyDYHyMvaCs9QUEIIRNj9WWMatybdNhfHMsxg35vDT0gkGDwUaanw2nnb5ADwBwRvMYYPmvUV+jLYUrYn3++P/s7z9Qrvg7vnEC6QAAAABJRU5ErkJggg==); + background-repeat: no-repeat; + background-size: auto; + display: inline-block; + width: 66px; + height: 19px; +} +.recommend-pay-icon{ + background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAAoCAYAAAEUO+PFAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAKaADAAQAAAABAAAAKAAAAAD9QK3vAAAF+0lEQVRYCc2YXWhcRRTHZ24+TGJdNclCCFho0ZY8xCIKLSZKmhYhlqooCrVgUexDUVFRq/igpRDEFws+FB+0WCpqKdUiKAWlpK0t1YLgBzTFirFEMWmz2KSN+dpcf2funbv3a7ObD5sOzM7MmXP+858zZ+bOrFah5NbXu6bpOBnHyt3GxneU42wiZ/TFiyNG7jY0dJL76bzBKmrfPI/mzYEmvR5UTChW2poGA1ttI9D6XaOVy2kPu6Zmqcrnb9IDAz8bS9EKmwZCUwn9BANZmY+/V7nuFiuzE6y0Al9pkPbzqqLiSzU1NYTSjvDclOHQ0HAAb/S42ey9lN+EvWLBpLQe8mRhf4a1/LpHo4SStUtOMJtdgq+81bJalMGyigy+S9T09NlQv6lqPB4oGqXa2ipVVdWGF+63yqIkdcPTKMlwExPLyL8jn5ZOqyR1J1BynF2+kpGHlURQaYg7TofS+k/al8g74krIQv50nE4mciRNKaooVj5x6YinYNYzKRmjRNzFofx2YmXieoFX4h1pbT8cghCN6wRg+Xwf3mth0cbU5GQvcX5dXNfGu5UHc7cCATPTnJ7uRXkXPllG3zYAj+uhoRqrZ0phJhvVnhB+ZzD9gJnj7ITZ56zxacoJ9A5QvsXy9RrGrnsmziwyEA0dApN172Lk7W5z81I1Pv4yMfop4PvRyzDtTCkwCx7dnDIK02H6kwC2MMh7gK0rF8yCJhbK+NNxXoLhrwZsaCixR61xsTLB1CiWeVIUA40ynSeYHcQDXSAwCxqElBWklfj5W+RtaX0x2YmSgLMCy+XaEzspPKIPdjdhtSIsT6mfIATbRV4UMGBWX19LjH7BDno7BUhEAZg0UgENmNZZVVl5q8rl5LNwSDU1vUHZR/auBlRIETARJHwYMJNp5vM7CfazsPsIlo+yk5Zj87QYkhJgIowwDMDks5LPfw9QHyDnqH9NuQrGH4oRKRVMOirkR5I/zdtZgFaMjwG2hvJBGHbTPUz7KVgupT5oF0Ds4slMOWBWXS0fvjsxPgXYByifJ6+mnaW8hGxoJjABl30tQbsaZpthkKO+AsMHOMUf4fIxAFgH8tPIi06TviAVDgrHWYnhKqZ4IyC91A+r2tqsGh0dRbssMEEtLIrcGrTeTB4G7BMWYPlswQSwwNC09L8UEmfbyHLg/lDKZ2IWTlFA26O1hEndbMHEvDBlCyblHMHENA2w7AUQgHiKA84LTMDDgPMGM2wJbLmoS3AvTFpQMCgljq+50PRvJYexLee7U+4QJ9i1XXKvmhfJBDmt/4JBFaEsB9RcU0DOAoSDx8pKlkLOLKn3YpEjeL35Pmq9H4KjtJ8BxDwpSoIVFISc3Erbi95KC7rFaxHPaX0BzQmA1/Lx2QqxftoHyc+Ra2l/xnnYQ71USngublCWJ2Oea4OAPJnu4EBeieceUtXVu2k3k7dD+n36/0Beb77xSsktOS0V9VxcecaYjHjOWmrdDYk6vPQw5DpUTc0/anh4N7KTqLwKuSnIraf/FgiP+5/46605ZUnPhXRNNdWTEc9pPQWBo2SJPflLYBACL1KeNy/VkZFu4uhx2hnyXvJ3fJDPQfYFJiDPq9+QSSrbc5564TdCMkauHk/Ict6D+h7V2tpA+RrtrQwu95RKH6YOO3mgP8sk9pF/MnLX3aguX5bbxAg4qRvCty9ZmOWOLKvWhyCyEcsKwF/Ba19R/5HcC7m1eE+OmKO099B/0vS7rrwd7YUs79dnvazYpSYndJTYg/g+jpMWlcnILXkdVv2mLbflsbELENwCuQ3I99H/JvG3Bu/1hNBPzddzISxTlSWz5Gyfw+DH1MiIvFk3qLq6Cq5UT9D5JGRvo+8x8hHIdRF7Lq9w71+wOWwIO2Cp0sZVQc9buiYjcN1GdeWKvOYPQvgXduoZ6n9T74Tgx3j1LvQWbFkLJKK19CtfVMdryaZw3ddpnCdLLP/v5LyB4xddK525vGrkLI3kctueZHnVyVkK5ZBcNHLlkFx0cjORvGbIpZG85shZkvKfwvFi//oHSotc+Q+iPNYSwowvrwAAAABJRU5ErkJggg==); + background-repeat: no-repeat; + background-size: auto; + display: inline-block; + width: 40px; + height: 40px; + position: absolute; + top: -1px; + left: -1px; +} +.soft_tips_text { + font-weight: 700; + display: inline; + font-size: 13px; +} +/*插件付费*/ +.wx-pay-ico{ + background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAB2UlEQVQ4T62UPWgUQRiGn2/XZHYXQkgpGEtTWphGVDTiXuQgWAhiaSMiShoxiLap0oiN2FmIhSRgIhF17yBnoSCohcROgrWNonL7c7n9ZPd+vDu9sMVNszA8+8w778yuMKIhI/LwX5F5ZXzLYkFgRuEwYICvwFtUa2EpWR0M0CdyX7vTJOkScH3PpMK6NNPl+nzjQ4friryX3n7d13yB5gkKjRT82I+rGdwSvWfM+W7WBcoFDN9QVtMsFbIb+VGtK3IC55KIPtxLospnLH2c2jy1sCJ29bbAZVQvZJ3lidzA3ENYbItqFrqYIpvAQYQtVXkUudEax/nlBuNLKpJJJtv8/dCPr7VEFbMFnOokUmTO1uYPtawD9TNxJsStjJ8H6xbo7EDyWujHc7nIqzjLit7pAT6FfpyX7gVjs4p9A9GLQ7b+N5EXmLIKz3tBERZU5RjoTcAe1p8oV+ul+EGeaKrCZCTmHcpMgVPrRXbsVM/9nk+2u/fIqTonBDZQnSooixU523f8nRdbhcpaAdEbsVmpn46f/XOz84kNJlzP/ET4iJI9j6BMtOEE2Eb1SVhKVgYX6/vWnMA5iaRHo0ZylzJxBpuqOaSqdrKTfOEKjaGlF9hGIWRk/6M/w0isE5qoYoAAAAAASUVORK5CYII='); + display: inline-block; + width: 18px; + height: 18px; +} +.wx-pay-ico.alipay{ + background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAABx0lEQVQ4T62UTUhUURTHf+dNgzHRe43ovoW0CGrpRhcjCu4KAvMOkmC4SmwhtGlVK3EZ5UpBaOPooiBtE0ITVqvaCOVWdCMF6vNjUeo98uY9mTfOe8wsPMt7/vd3Pu45V7gkkwpnfreASBfIKHCzSfYG6Cyq3yjmyyGo5E8DT5oE1MrUvqSYf3EO+gO0J4LU9lTOxfmc6BdZYtC9dw7S1GyM10AjZYzbUy9ynEIN9OH1L2H5+7dwnBynNkdGslhbDnVpoMARN+OGpc37qwhXIlcb0NEYJPoBZAc09oJyhPjTWK8XdKkaKy0j5SciBxWh2lZE7kaX3mC8cUr7M6DBmESWBBImkOwix//a+c8GI/k93m5fI9vSC2xhnUMyfAeC0lJBr4FWYCgm+oWwDHaFwRsrUa8e4TCM0pfWozEgGMwLJnMY9zELfj96vIlpW68IFg/vYE+6Qbox3lD1+VWeIdoJDESR1tDT98HUsuA/RXkV9o2PIFMU3dV4xNo5CmFfUXs12B9Kuw8gcx90uD5TfoCdxOTfBb6UFZE1sB0guQTAxaNPGK//EpZWJim6z2PfiHMbKIAkL29davoXKKP2d/UbaSL/RpIzc/+vE/N55R4AAAAASUVORK5CYII='); +} +.pay-wx-info span{ + vertical-align: middle; +} +#pay_product_view{ + padding: 25px 45px 30px 45px; + height: 100%; +} +#libPay-content .pay-cycle-btn{ + width: 90px; +} +.libPay-mask{ + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + width: 100%; + height: 100%; + z-index: 9999; + display: none; +} +.libPay-item{ + margin-bottom: 30px; +} +.libPay-select{ + overflow: hidden; +} +.libPay-item .li-tit{ + margin-bottom: 10px; + font-size: 14px; +} +.libPay-item .li-c-item li:nth-child(1){ + margin-left: 0; +} +.libPay-item .li-c-item li{ + font-size: 0; + border: #ddd 1px solid; + width: 170px; + height:80px ; + cursor: pointer; + box-sizing: border-box; + transition: border-color .1s ease-in,color .1s ease-in; + padding: 5px 0; + display: inline-block; + position: relative; + margin-left: -1px; +} +.pro-tips{ + clear: both; + padding-top: 10px; + font-size: 13px; + color: #bbb; +} + + +.libPay-item .li-c-item li:first-child{ + border-top-left-radius:4px; + border-bottom-left-radius:4px; +} +.libPay-item .li-c-item li:last-child{ + border-top-right-radius:4px; + border-bottom-right-radius:4px; +} +.libPay-item .li-c-item li:hover{ + border: #20a53a 1px solid; + color: #20A53A; + z-index: 9999; +} +.libPay-item .li-c-item li.active,.libPay-item .li-c-item li.active:hover{ + border: #20a53a 2px solid; + color: #20A53A; + z-index: 9999; + box-sizing: border-box; +} +.libPay-item .li-c-item li .item-name{ + font-size: 14px; + vertical-align: middle; + width: 100%; + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; + text-align: center; + margin-bottom: 5px; + padding-top: 10px; +} +.libPay-item .endTime, +.libPay-item .bindUser{ + font-size: 14px; +} +.libPay-item .endTime span, +.libPay-item .bindUser span{ + font-weight: 600; + color: #555; +} +.libPay-item .endTime{ + float: right; +} +.libPay-item .li-c-item li .item-info{ + display: block; + text-align: center; + width: 100%; + font-size: 13px; + vertical-align: middle; +} +.pay-btn-group{ + position: relative; + display: inline-block; + vertical-align: middle; +} +.pay-btn-group>.pay-cycle-btn { + position: relative; + float: left; +} +.pay-cycle-btn { + font-size: 0; + width: 106px; + height: 40px; + line-height: 38px; + display: block; + margin-bottom: -1px; + text-align: center; + vertical-align: middle; + border: 1px solid #ddd; + box-sizing: border-box; + margin-left: -1px; + transition: border-color .1s ease-in,color .1s ease-in; +} +.pay-cycle-btn span{ + font-size: 14px; + line-height: 25px; + vertical-align: middle; +} +.pay-btn-group>.pay-cycle-btn:first-child { + margin-left: 0; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; +} +/*.pay-btn-group>.pay-cycle-btn:nth-of-type(5n+1){*/ +/* margin-left: 0;*/ +/*}*/ + +.pay-btn-group>.pay-cycle-btn:last-child { + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; +} +.pay-btn-group .active,.li-c-item .active{ + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAAA3NCSVQICAjb4U/gAAAAclBMVEX///8fpTofpTogpTogpTogpTrw+fLt+O/i8+be8uLb8d/T7djP7NXR7NbE58u548G34sCr3bWU1KGT05+FzpN+y413yIZ0x4RxxoJwxYFnwnliv3RWu2pUumhMt2FGtVxDs1k6sFE4r1Avq0cjpjwgpTpRW86VAAAAJnRSTlMAEXd3iO7//////////////////////////////////////////0c8mUAAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAWdEVYdENyZWF0aW9uIFRpbWUAMDUvMjkvMThc7W1eAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAAHhJREFUGJVtzskSgkAMBFB2AUcR2QTcEPr/fxFmmFiW0znk8CrVac9jE1CNYqoAV8JaXTbq8K7/bBVcwRVcwRVcwbRTIDqcWrjaJ3cJ0VrdjDaHh2Sb2/F43XadPuWlTfjkJersLU2+ufNFnSdb0P/5thQv6R2CzQo9Oh+AlBF9bAAAAABJRU5ErkJggg==") no-repeat right bottom; +} +.pay-btn-group .pay-cycle-btn:hover{ + border: 1px solid #20a53a; + color: #20a53a; + z-index: 2; + cursor: pointer; +} +.pay-btn-group .active,.pay-btn-group .active:hover{ + border: 2px solid #20a53a; + color: #20a53a; + z-index: 2; + cursor: pointer; +} +.pay-btn-group .active span{ + line-height: 22px; +} +.pay-cycle-btn em { + position: absolute; + right: -2px; + top: -9px; + width: 33px; + height: 19px; + background: #ff7300; + border-radius: 2px; + font-size: 10px; + line-height: 19px; + color: #fff; + transform: scale(.9, .8); + font-style: normal; +} +.pay-btn-group .active em{ + right: -3.5px; + top: -10px; +} +.paymethod{ + margin: 0 auto; + width: 160px; +} +.paymethod .pay-wx{ + height:175px; +} +.paymethod .pay-wx canvas { + width: 160px; + height: 160px; + border: #ddd 1px solid; + margin: 6px auto; + padding: 5px; + border-bottom-color: #00c800; +} +.lib-price-box{ + padding-bottom: 5px; +} +.price-txt{ + color:#FF7301 +} +.sale-price{ + font-size: 20px; + margin-right: 5px; +} +.lib-price-name,.price-txt{ + margin-right: 10px; +} +/* 企业版支付end */ diff --git a/BTPanel/static/images/iconfont-file.png b/BTPanel/static/images/iconfont-file.png new file mode 100644 index 00000000..bceca2e1 Binary files /dev/null and b/BTPanel/static/images/iconfont-file.png differ diff --git a/BTPanel/static/img/file_icon/access.png b/BTPanel/static/img/file_icon/access.png new file mode 100644 index 00000000..296f26a2 Binary files /dev/null and b/BTPanel/static/img/file_icon/access.png differ diff --git a/BTPanel/static/img/file_icon/apk.png b/BTPanel/static/img/file_icon/apk.png new file mode 100644 index 00000000..d0787f33 Binary files /dev/null and b/BTPanel/static/img/file_icon/apk.png differ diff --git a/BTPanel/static/img/file_icon/avi.png b/BTPanel/static/img/file_icon/avi.png new file mode 100644 index 00000000..d5efc651 Binary files /dev/null and b/BTPanel/static/img/file_icon/avi.png differ diff --git a/BTPanel/static/img/file_icon/bmp.png b/BTPanel/static/img/file_icon/bmp.png new file mode 100644 index 00000000..d13ec353 Binary files /dev/null and b/BTPanel/static/img/file_icon/bmp.png differ diff --git a/BTPanel/static/img/file_icon/cdr.png b/BTPanel/static/img/file_icon/cdr.png new file mode 100644 index 00000000..f64a94bf Binary files /dev/null and b/BTPanel/static/img/file_icon/cdr.png differ diff --git a/BTPanel/static/img/file_icon/compress.png b/BTPanel/static/img/file_icon/compress.png new file mode 100644 index 00000000..3f07904f Binary files /dev/null and b/BTPanel/static/img/file_icon/compress.png differ diff --git a/BTPanel/static/img/file_icon/css.png b/BTPanel/static/img/file_icon/css.png new file mode 100644 index 00000000..fa3bb4db Binary files /dev/null and b/BTPanel/static/img/file_icon/css.png differ diff --git a/BTPanel/static/img/file_icon/doc.png b/BTPanel/static/img/file_icon/doc.png new file mode 100644 index 00000000..8be79cee Binary files /dev/null and b/BTPanel/static/img/file_icon/doc.png differ diff --git a/BTPanel/static/img/file_icon/file.png b/BTPanel/static/img/file_icon/file.png new file mode 100644 index 00000000..c115dba4 Binary files /dev/null and b/BTPanel/static/img/file_icon/file.png differ diff --git a/BTPanel/static/img/file_icon/file_menu_icon.png b/BTPanel/static/img/file_icon/file_menu_icon.png new file mode 100644 index 00000000..71da15bf Binary files /dev/null and b/BTPanel/static/img/file_icon/file_menu_icon.png differ diff --git a/BTPanel/static/img/file_icon/file_text2.png b/BTPanel/static/img/file_icon/file_text2.png new file mode 100644 index 00000000..379f4913 Binary files /dev/null and b/BTPanel/static/img/file_icon/file_text2.png differ diff --git a/BTPanel/static/img/file_icon/folder.png b/BTPanel/static/img/file_icon/folder.png new file mode 100644 index 00000000..7827c435 Binary files /dev/null and b/BTPanel/static/img/file_icon/folder.png differ diff --git a/BTPanel/static/img/file_icon/folder_win10.png b/BTPanel/static/img/file_icon/folder_win10.png new file mode 100644 index 00000000..4f1e233d Binary files /dev/null and b/BTPanel/static/img/file_icon/folder_win10.png differ diff --git a/BTPanel/static/img/file_icon/gif.png b/BTPanel/static/img/file_icon/gif.png new file mode 100644 index 00000000..3e425939 Binary files /dev/null and b/BTPanel/static/img/file_icon/gif.png differ diff --git a/BTPanel/static/img/file_icon/html.png b/BTPanel/static/img/file_icon/html.png new file mode 100644 index 00000000..e4305f7b Binary files /dev/null and b/BTPanel/static/img/file_icon/html.png differ diff --git a/BTPanel/static/img/file_icon/ico-cmd.png b/BTPanel/static/img/file_icon/ico-cmd.png new file mode 100644 index 00000000..c88796d6 Binary files /dev/null and b/BTPanel/static/img/file_icon/ico-cmd.png differ diff --git a/BTPanel/static/img/file_icon/ico.png b/BTPanel/static/img/file_icon/ico.png new file mode 100644 index 00000000..6b23e214 Binary files /dev/null and b/BTPanel/static/img/file_icon/ico.png differ diff --git a/BTPanel/static/img/file_icon/image.png b/BTPanel/static/img/file_icon/image.png new file mode 100644 index 00000000..b3c2ed35 Binary files /dev/null and b/BTPanel/static/img/file_icon/image.png differ diff --git a/BTPanel/static/img/file_icon/image_ico.png b/BTPanel/static/img/file_icon/image_ico.png new file mode 100644 index 00000000..00a2cb11 Binary files /dev/null and b/BTPanel/static/img/file_icon/image_ico.png differ diff --git a/BTPanel/static/img/file_icon/java.png b/BTPanel/static/img/file_icon/java.png new file mode 100644 index 00000000..ae1fef72 Binary files /dev/null and b/BTPanel/static/img/file_icon/java.png differ diff --git a/BTPanel/static/img/file_icon/javascript.png b/BTPanel/static/img/file_icon/javascript.png new file mode 100644 index 00000000..12ebd202 Binary files /dev/null and b/BTPanel/static/img/file_icon/javascript.png differ diff --git a/BTPanel/static/img/file_icon/jpeg.png b/BTPanel/static/img/file_icon/jpeg.png new file mode 100644 index 00000000..10d5b999 Binary files /dev/null and b/BTPanel/static/img/file_icon/jpeg.png differ diff --git a/BTPanel/static/img/file_icon/jpg.png b/BTPanel/static/img/file_icon/jpg.png new file mode 100644 index 00000000..7a5d6fdf Binary files /dev/null and b/BTPanel/static/img/file_icon/jpg.png differ diff --git a/BTPanel/static/img/file_icon/json.png b/BTPanel/static/img/file_icon/json.png new file mode 100644 index 00000000..18a53b92 Binary files /dev/null and b/BTPanel/static/img/file_icon/json.png differ diff --git a/BTPanel/static/img/file_icon/log.png b/BTPanel/static/img/file_icon/log.png new file mode 100644 index 00000000..d4bbb67c Binary files /dev/null and b/BTPanel/static/img/file_icon/log.png differ diff --git a/BTPanel/static/img/file_icon/lua.png b/BTPanel/static/img/file_icon/lua.png new file mode 100644 index 00000000..7d113f3c Binary files /dev/null and b/BTPanel/static/img/file_icon/lua.png differ diff --git a/BTPanel/static/img/file_icon/mkv.png b/BTPanel/static/img/file_icon/mkv.png new file mode 100644 index 00000000..ab915cd3 Binary files /dev/null and b/BTPanel/static/img/file_icon/mkv.png differ diff --git a/BTPanel/static/img/file_icon/mov.png b/BTPanel/static/img/file_icon/mov.png new file mode 100644 index 00000000..38796907 Binary files /dev/null and b/BTPanel/static/img/file_icon/mov.png differ diff --git a/BTPanel/static/img/file_icon/mp4.png b/BTPanel/static/img/file_icon/mp4.png new file mode 100644 index 00000000..68affe6b Binary files /dev/null and b/BTPanel/static/img/file_icon/mp4.png differ diff --git a/BTPanel/static/img/file_icon/mpeg.png b/BTPanel/static/img/file_icon/mpeg.png new file mode 100644 index 00000000..6d8d02db Binary files /dev/null and b/BTPanel/static/img/file_icon/mpeg.png differ diff --git a/BTPanel/static/img/file_icon/mpg.png b/BTPanel/static/img/file_icon/mpg.png new file mode 100644 index 00000000..cb3a7a44 Binary files /dev/null and b/BTPanel/static/img/file_icon/mpg.png differ diff --git a/BTPanel/static/img/file_icon/pdf.png b/BTPanel/static/img/file_icon/pdf.png new file mode 100644 index 00000000..be611632 Binary files /dev/null and b/BTPanel/static/img/file_icon/pdf.png differ diff --git a/BTPanel/static/img/file_icon/php.png b/BTPanel/static/img/file_icon/php.png new file mode 100644 index 00000000..0f9c6b2e Binary files /dev/null and b/BTPanel/static/img/file_icon/php.png differ diff --git a/BTPanel/static/img/file_icon/png.png b/BTPanel/static/img/file_icon/png.png new file mode 100644 index 00000000..d168037d Binary files /dev/null and b/BTPanel/static/img/file_icon/png.png differ diff --git a/BTPanel/static/img/file_icon/power_file_icon.png b/BTPanel/static/img/file_icon/power_file_icon.png new file mode 100644 index 00000000..998eb24b Binary files /dev/null and b/BTPanel/static/img/file_icon/power_file_icon.png differ diff --git a/BTPanel/static/img/file_icon/ppt.png b/BTPanel/static/img/file_icon/ppt.png new file mode 100644 index 00000000..828f5760 Binary files /dev/null and b/BTPanel/static/img/file_icon/ppt.png differ diff --git a/BTPanel/static/img/file_icon/py.png b/BTPanel/static/img/file_icon/py.png new file mode 100644 index 00000000..3e103383 Binary files /dev/null and b/BTPanel/static/img/file_icon/py.png differ diff --git a/BTPanel/static/img/file_icon/python.png b/BTPanel/static/img/file_icon/python.png new file mode 100644 index 00000000..98ab3c0a Binary files /dev/null and b/BTPanel/static/img/file_icon/python.png differ diff --git a/BTPanel/static/img/file_icon/rar.png b/BTPanel/static/img/file_icon/rar.png new file mode 100644 index 00000000..a85516e3 Binary files /dev/null and b/BTPanel/static/img/file_icon/rar.png differ diff --git a/BTPanel/static/img/file_icon/recycle.png b/BTPanel/static/img/file_icon/recycle.png new file mode 100644 index 00000000..1805f3fa Binary files /dev/null and b/BTPanel/static/img/file_icon/recycle.png differ diff --git a/BTPanel/static/img/file_icon/rm.png b/BTPanel/static/img/file_icon/rm.png new file mode 100644 index 00000000..c064b9e3 Binary files /dev/null and b/BTPanel/static/img/file_icon/rm.png differ diff --git a/BTPanel/static/img/file_icon/rmvb.png b/BTPanel/static/img/file_icon/rmvb.png new file mode 100644 index 00000000..8189e772 Binary files /dev/null and b/BTPanel/static/img/file_icon/rmvb.png differ diff --git a/BTPanel/static/img/file_icon/shell.png b/BTPanel/static/img/file_icon/shell.png new file mode 100644 index 00000000..49e2680c Binary files /dev/null and b/BTPanel/static/img/file_icon/shell.png differ diff --git a/BTPanel/static/img/file_icon/sql.png b/BTPanel/static/img/file_icon/sql.png new file mode 100644 index 00000000..eaac56b1 Binary files /dev/null and b/BTPanel/static/img/file_icon/sql.png differ diff --git a/BTPanel/static/img/file_icon/swf.png b/BTPanel/static/img/file_icon/swf.png new file mode 100644 index 00000000..9c7c48e6 Binary files /dev/null and b/BTPanel/static/img/file_icon/swf.png differ diff --git a/BTPanel/static/img/file_icon/tar.png b/BTPanel/static/img/file_icon/tar.png new file mode 100644 index 00000000..569a4172 Binary files /dev/null and b/BTPanel/static/img/file_icon/tar.png differ diff --git a/BTPanel/static/img/file_icon/text_icon.png b/BTPanel/static/img/file_icon/text_icon.png new file mode 100644 index 00000000..e22cf420 Binary files /dev/null and b/BTPanel/static/img/file_icon/text_icon.png differ diff --git a/BTPanel/static/img/file_icon/webm.png b/BTPanel/static/img/file_icon/webm.png new file mode 100644 index 00000000..4c088c47 Binary files /dev/null and b/BTPanel/static/img/file_icon/webm.png differ diff --git a/BTPanel/static/img/file_icon/webp.png b/BTPanel/static/img/file_icon/webp.png new file mode 100644 index 00000000..afe9f078 Binary files /dev/null and b/BTPanel/static/img/file_icon/webp.png differ diff --git a/BTPanel/static/img/file_icon/wma.png b/BTPanel/static/img/file_icon/wma.png new file mode 100644 index 00000000..2dcdbcb8 Binary files /dev/null and b/BTPanel/static/img/file_icon/wma.png differ diff --git a/BTPanel/static/img/file_icon/wmv.png b/BTPanel/static/img/file_icon/wmv.png new file mode 100644 index 00000000..c05a44d8 Binary files /dev/null and b/BTPanel/static/img/file_icon/wmv.png differ diff --git a/BTPanel/static/img/file_icon/xls.png b/BTPanel/static/img/file_icon/xls.png new file mode 100644 index 00000000..9a9a153b Binary files /dev/null and b/BTPanel/static/img/file_icon/xls.png differ diff --git a/BTPanel/static/img/file_icon/xml.png b/BTPanel/static/img/file_icon/xml.png new file mode 100644 index 00000000..ad2da462 Binary files /dev/null and b/BTPanel/static/img/file_icon/xml.png differ diff --git a/BTPanel/static/img/file_icon/zip.png b/BTPanel/static/img/file_icon/zip.png new file mode 100644 index 00000000..76988334 Binary files /dev/null and b/BTPanel/static/img/file_icon/zip.png differ diff --git a/BTPanel/static/js/config.js b/BTPanel/static/js/config.js index ff0cf21f..90f73500 100644 --- a/BTPanel/static/js/config.js +++ b/BTPanel/static/js/config.js @@ -376,7 +376,7 @@ function bindBTName(a,type){ closeBtn: 2, shift: 5, shadeClose: false, - content: "
"+lan.public.user+"
"+lan.public.pass+"
"+btn+"
" + content: "
"+lan.public.user+"
"+lan.public.pass+"
"+btn+"
" }) } //解除绑定宝塔账号 @@ -385,7 +385,10 @@ function UnboundBt(){ layer.confirm(lan.config.binding_un_msg,{closeBtn:2,icon:3,title:lan.config.binding_un},function(){ $.get("/ssl?action=DelToken",function(b){ layer.msg(b.msg,{icon:b.status? 1:2}) - $("input[name='btusername']").val(''); + if(b.status){ + window.location.reload(); + $("input[name='btusername']").val(''); + } }) }) } @@ -574,11 +577,11 @@ function SavePanelSSL(){ } function SetDebug() { - var status_s = {false:'Open',true:'Close'} + var status_s = {false:'open',true:'close'} var debug_stat = $("#panelDebug").prop('checked'); bt.confirm({ - title: status_s[debug_stat] + "Developer mode", - msg: "Do you really want "+ status_s[debug_stat]+" developer mode?", + title: (debug_stat?'Open':'Close') + " developer mode", + msg: "Do you confirm to "+ (debug_stat?'open':'close') +" developer mode?", cancel: function () { $("#panelDebug").prop('checked',debug_stat); }}, function () { @@ -772,11 +775,11 @@ function open_wxapp(){ $(function () { - $.get("/ssl?action=GetUserInfo", function (b) { + $.get("/ssl?action=GetUserInfo", function (b) { if (b.status) { $("input[name='btusername']").val(b.data.username); - $("input[name='btusername']").next().text(lan.public.edit).attr("onclick", "bindBTName(2,'c')").css({ "margin-left": "-82px" }); - $("input[name='btusername']").next().after('' + lan.config.binding_un + ''); + $("input[name='btusername']").next().text(lan.public.edit).attr("onclick", "bindBTName(2,'c')").css({ "right": "57px" }); + $("input[name='btusername']").next().after('' + lan.config.binding_un + ''); } else { $("input[name='btusername']").next().text(lan.config.binding).attr("onclick", "bindBTName(2,'b')").removeAttr("style"); @@ -804,7 +807,7 @@ function GetPanelApi() { isOpen = rdata.open ? 'checked' : ''; layer.open({ type: 1, - area: "500px", + area: "522px", title: lan.config.set_api, closeBtn: 2, shift: 5, @@ -814,7 +817,7 @@ function GetPanelApi() { '+lan.config.api+'\
\ \ - \ + \
\ \
\ @@ -872,10 +875,12 @@ function SetPanelApi(t_type,index) { return false } set_token_req(pdata,function(rdata){ - layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 }); - if (rdata.msg == lan.config.open_successfully) { - if(t_type == 2 && index != '0') GetPanelApi(); - } + layer.close(layer.index); + if (rdata.msg == 'Open success!') { + if(t_type == 2 && index != '1') GetPanelApi(); + } + if(t_type == 2) $('#panelApi').prop('checked',rdata.msg == 'Open success!'?true:false); + layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 }); }); } @@ -1259,3 +1264,329 @@ function show_basic_auth(rdata) {
' }) } +function get_panel_hide_list(){ + var loadT = bt.load('Getting panel menu bar, please wait...'),arry = []; + $.post('/config?action=get_menu_list',function(rdata){ + loadT.close(); + $.each(rdata,function(index,item){ + if(!item.show) arry.push(item.title) + }); + $('#panel_menu_hide').val(arry.length > 0?arry.join('/'):'No hidden bar'); + }); + +} + +get_panel_hide_list(); + +// 设置面板菜单显示功能 +function set_panel_ground(){ + var loadT = bt.load('Getting panel menu bar, please wait...'); + $.post('/config?action=get_menu_list',function(rdata){ + var html = '',arry = ["dologin","memuAconfig","memuAsoft","memuA"],is_option = ''; + loadT.close(); + $.each(rdata,function(index,item){ + is_option = '
' + + if(item.id == 'dologin' || item.id == 'memuAconfig' || item.id == 'memuAsoft' || item.id == 'memuA') is_option = 'Inoperable'; + html += ''+ item.title +'
'+ is_option +'
'; + }); + layer.open({ + type:1, + title:'Manage panel menu bar', + area:['350px','536px'], + shadeClose:false, + closeBtn:2, + content:'
'+ html +'
Menu barDisplay
', + success:function(){ + $('#panel_menu_tab input').click(function(){ + var arry = []; + $(this).parents('tr').siblings().each(function(index,el){ + if($(this).find('input').length >0 && !$(this).find('input').prop('checked')){ + arry.push($(this).find('input').attr('name')); + } + }); + if(!$(this).prop('checked')){ + arry.push($(this).attr('name')); + } + var loadT = bt.load('Setting panel menu bar display status, please wait...'); + $.post('/config?action=set_hide_menu_list',{hide_list:JSON.stringify(arry)},function(rdata){ + loadT.close(); + bt.msg(rdata); + }); + }); + } + }); + }); +} + + +/** + * @description 获取临时授权列表 + * @param {Function} callback 回调函数列表 + * @returns void + */ +function get_temp_login(data,callback){ + var loadT = bt.load('Get temporary authorization list, please wait...'); + bt.send('get_temp_login','config/get_temp_login',data,function(res){ + if(res.status === false){ + layer.closeAll(); + bt.msg(res); + return false; + } + loadT.close(); + if(callback) callback(res) + }); +} + +/** + * @description 设置临时链接 + * @param {Function} callback 回调函数列表 + * @returns void + */ +function set_temp_login(callback){ + var loadT = bt.load('Setting temporary links, please wait...'); + bt.send('set_temp_login','config/set_temp_login',{},function(res){ + loadT.close(); + if(callback) callback(res) + }); +} + +/** + * @description 设置临时链接 + * @param {Object} data 传入参数,id + * @param {Function} callback 回调函数列表 + * @returns void +*/ +function remove_temp_login(data,callback){ + var loadT = bt.load('Deleting temporary authorization record, please wait...'); + bt.send('remove_temp_login','config/remove_temp_login',{id:data.id},function(res){ + loadT.close(); + if(callback) callback(res) + }); +} +/** + * @description 强制用户登出 + * @param {Object} data 传入参数,id + * @param {Function} callback 回调函数列表 + * @returns void +*/ +function clear_temp_login(data,callback){ + var loadT = bt.load('Forcing user to log out, please wait...'); + bt.send('clear_temp_login','config/clear_temp_login',{id:data.id},function(res){ + loadT.close(); + if(callback) callback(res) + }); +} + +/** + * @description 渲染授权管理列表 + * @param {Object} data 传入参数,id + * @param {Function} callback 回调函数列表 + * @returns void +*/ +function reader_temp_list(data,callback){ + if(typeof data == 'function') callback = data,data = {p:1}; + get_temp_login(data,function(rdata){ + var html = ''; + $.each(rdata.data,function(index,item){ + html += ''+ (item.login_addr || 'Not login') +''+ (function(){ + switch(item.state){ + case 0: + return 'Not login'; + break; + case 1: + return 'Logged in'; + break; + case -1: + return 'Expired'; + break; + } + }()) +''+ (item.login_time == 0?'Not login':bt.format_data(item.login_time)) +''+ bt.format_data(item.expire) +''+ (function(){ + if(item.state != 1){ + return 'Del'; + } + if(item.online_state){ + return 'Force logout   |  Logs'; + } + return 'Logs'; + }()) +''; + }); + $('#temp_login_view_tbody').html(html); + $('.temp_login_view_page').html(rdata.page); + if(callback) callback() + }); +} + + + + +/** + * @description 获取操作日志 + * @param {Object} data 传入参数,id + * @param {Function} callback 回调函数列表 + * @returns void +*/ +function get_temp_login_logs(data,callback){ + var loadT = bt.load('Getting operation log, please wait...'); + bt.send('clear_temp_login','config/get_temp_login_logs',{id:data.id},function(res){ + loadT.close(); + if(callback) callback(res) + }); +} + +/** + * @description 渲染操作日志 + * @param {Object} data 传入参数,id + * @param {Function} callback 回调函数列表 + * @returns void +*/ +function reader_temp_login_logs(data,callback){ + get_temp_login_logs(data,function(res){ + var html = ''; + $.each(res,function(index,item){ + html += ''+ item.type +''+ item.addtime +''+ item.log +''; + }); + if(callback) callback({tbody:html,data:res}); + }) +} + + + + +/** + * @description 设置临时链接 + * @param {Function} callback 回调函数列表 + * @returns void +*/ +function get_temp_login_view(){ + layer.open({ + type: 1, + area:["700px",'600px'], + title: "Temporary authorization management", + closeBtn: 2, + shift: 5, + shadeClose: false, + content:'
'+ + ''+ + '
'+ + ''+ + ''+ + ''+ + '
Login IPStatusLogin timeExpiration timeOpt
'+ + ''+ + '
'+ + '
', + success:function(){ + reader_temp_list(); + // 创建临时授权 + $('.create_temp_login').click(function(){ + bt.confirm({title:'Risk tips',msg:'Note 1: Abuse of temporary authorization may lead to security risks.
Note 2: Not publish temporary authorized connections in public

Temporary authorization connection is about to be created. Continue?'},function(){ + layer.open({ + type: 1, + area:'570px', + title: "Create temporary authorization", + closeBtn: 2, + shift: 5, + shadeClose: false, + content:'
'+ + '
Temporary authorized address
'+ + '
'+ + ''+ + '
', + success:function(){ + set_temp_login(function(res){ + if(res.status){ + var temp_link = location.origin+ '/login?tmp_token=' + res.token; + $('#temp_link').val(temp_link); + $('.btn-copy-temp-link').attr('data-clipboard-text',temp_link); + } + }); + var clipboard = new ClipboardJS('.btn'); + clipboard.on('success', function(e) { + bt.msg({status:true,msg:'Copy succeeded!'}); + e.clearSelection(); + }); + clipboard.on('error', function(e) { + bt.msg({status:false,msg:'Copy failed, please copy address manually'}); + }); + }, + end:function(){ + reader_temp_list(); + } + }); + }); + }); + // 操作日志 + $('#temp_login_view_tbody').on('click','.logs_temp_login',function(){ + var id = $(this).data('id'),ip = $(this).data('ip'); + layer.open({ + type: 1, + area:['700px','550px'], + title:'Operation logs ['+ ip +']', + closeBtn: 2, + shift: 5, + shadeClose: false, + content:'
'+ + ''+ + '
'+ + ''+ + ''+ + ''+ + '
OperationTimelogs
'+ + '
'+ + '
', + success:function(){ + reader_temp_login_logs({id:id},function(data){ + $('#logs_login_view_table tbody').html(data.tbody); + }); + $('.refresh_login_logs').click(function(){ + reader_temp_login_logs({id:id},function(data){ + $('#logs_login_view_table tbody').html(data.tbody); + }); + }); + bt.fixed_table('logs_login_view_table'); + } + }); + }); + + + + //删除授权记录,仅未使用的授权记录 + $('#temp_login_view_tbody').on('click','.remove_temp_login',function(){ + var id = $(this).data('id'); + bt.confirm({ + title:'Remove unused licenses', + msg:'Delete unused authorization record, continue?' + },function(){ + remove_temp_login({id:id},function(res){ + reader_temp_list(function(){ + bt.msg(res); + }) + }) + }) + }); + //强制下线,强制登录的用户下线 + $('#temp_login_view_tbody').on('click','.clear_temp_login',function(){ + var id = $(this).data('id'),ip= $(this).data('ip'); + bt.confirm({ + title:'Force logout [ '+ ip +' ]', + msg:'Confirm to force logout [ '+ ip +' ]?' + },function(){ + clear_temp_login({id:id},function(res){ + reader_temp_list(function(){ + bt.msg(res); + }); + }); + }) + }); + // 分页操作 + $('.temp_login_view_page').on('click','a',function(ev){ + var href = $(this).attr('href'),reg = /([0-9]*)$/,page = reg.exec(href)[0]; + reader_temp_list({p:page}); + ev.stopPropagation(); + ev.preventDefault(); + }); + } + }); + +} \ No newline at end of file diff --git a/BTPanel/static/js/crontab.js b/BTPanel/static/js/crontab.js index 06b130b4..22625078 100644 --- a/BTPanel/static/js/crontab.js +++ b/BTPanel/static/js/crontab.js @@ -900,7 +900,7 @@ function toBackup(type){ sBody += '

\

'+lan.crontab.exclusion_rule+'
\ \

'; } diff --git a/BTPanel/static/js/database.js b/BTPanel/static/js/database.js index e96b9998..c8546eb0 100644 --- a/BTPanel/static/js/database.js +++ b/BTPanel/static/js/database.js @@ -18,26 +18,27 @@ var database = { } }, { - field: 'password', width: '15%', title: lan.database.add_pass, templet: function (item) { - var _html = '**********'; + field: 'password', title: lan.database.add_pass, templet: function (item) { + var _html = '**********'; _html += ''; - _html += ''; + _html += ''; return _html; } }, { field: 'backup', title: lan.database.backup, templet: function (item) { - var backup = ''; + var backup = ''; var _msg = lan.database.backup_empty; if (item.backup_count > 0) _msg = lan.database.backup_ok; - backup = "" + _msg + " | " + backup += "" + _msg + " | " backup += "" + lan.database.input + ""; + backup += ''; return backup; } }, { field: 'ps', title: lan.database.add_ps, templet: function (item) { - var _ps = "" + var _ps = "" if (item.password) { _ps += item.ps } else { @@ -48,18 +49,22 @@ var database = { } }, { - field: 'opt', width: 300, title: lan.database.operation, align: 'right', templet: function (item) { - var option = ""+lan.database.admin+" | "; + field: 'opt', title: lan.database.operation, align: 'right', templet: function (item) { + var option = ""+lan.database.admin+" | "; option += ""+lan.database.tools+" | "; option += ""+lan.database.auth+" | "; option += ""+lan.database.edit_pass+" | "; - option += ""+lan.database.del+""; + option += ""+lan.database.del+""; return option; } }, ], data: rdata.data - }) + }); + $(window).resize(function() { + database.forSize(); + }); + database.forSize(); }) }, rep_tools: function (db_name, res) { @@ -303,7 +308,11 @@ var database = { var _tab = bt.render({ table: '#DataBackupList', columns: [ - { field: 'name', title: lan.database.backup_name }, + { field: 'name', title: lan.database.backup_name, templet: function (item) { + var _opt = ''+item.name+'' + return _opt; + } + }, { field: 'size', title: lan.database.backup_size, templet: function (item) { return bt.format_size(item.size); @@ -325,6 +334,7 @@ var database = { bt.database.backup_data(id, dataname, function (rdata) { if (rdata.status) database.database_detail(id, dataname); database.get_list(); + if (!rdata.status) layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 }); }) }) }, 100) @@ -431,5 +441,11 @@ var database = { database.input_database(name); }); }); + }, + //浏览器窗口大小变化时调整内容宽度 + forSize:function(){ + var ticket_with = $('#DataBody').parent().width(), + td_width = ticket_with*0.8-30-$('#DataBody th:eq(2)').width()-$('#DataBody th:eq(3)').width()-$('#DataBody th:eq(4)').width()-$('#DataBody th:eq(6)').width(); + $('#DataBody .webNote').css('max-width',td_width); } } \ No newline at end of file diff --git a/BTPanel/static/js/files.js b/BTPanel/static/js/files.js index e4d4a1cb..5c06e049 100644 --- a/BTPanel/static/js/files.js +++ b/BTPanel/static/js/files.js @@ -1,3771 +1,4516 @@ -var fileDrop = { - startTime: 0, - endTime:0, - uploadLength:0, //上传数量 - splitSize: 1024 * 1024 * 2, //文件上传分片大小 - splitEndTime: 0, - splitStartTime:0, - fileSize:0, - speedLastTime:0, - filesList:[], // 文件列表数组 - errorLength:0, //上传失败文件数量 - isUpload:true, //上传状态,是否可以上传 - uploadSuspend:[], //上传暂停参数 - isUploadNumber:800,//限制单次上传数量 - uploadAllSize:0, // 上传文件总大小 - uploadedSize:0, // 已上传文件大小 - updateedSizeLast:0, - topUploadedSize:0, // 上一次文件上传大小 - uploadExpectTime:0, // 预计上传时间 - initTimer:0, // 初始化计时 - speedInterval:null, //平局速度定时器 - timerSpeed:0, //速度 - isLayuiDrop:false, //是否是小窗口拖拽 - uploading:false, - is_webkit:(function(){ - if(navigator.userAgent.indexOf('WebKit') > -1) return true; - return false; - })(), - init:function(){ - if($('#mask_layer').length == 0) { - window.UploadFiles = function(){ fileDrop.dialog_view()}; - $("body").append($('')); - this.event_relation(document.querySelector('#container'),document,document.querySelector('#mask_layer')); +var bt_file = { + area: [], // Win视图大小 + loadT:null, // 加载load对象 + loadY:null, // 弹窗layer对象,仅二级弹窗 + vscode:null, + file_table_arry:[], // 选中的文件列表 + timerM: null, // 定时器 + is_update_down_list: true, + is_recycle:false, // 是否开启回收站 + is_editor:false, // 是否处于重命名、新建编辑状态 + file_header:{'file_checkbox': 40,'file_name':'auto','file_accept':130,'file_size': 90,'file_mtime':155,'file_ps':'auto','file_operation':350,'file_tr':0,'file_list_header':0}, + file_operating:[], // 文件操作记录,用于前进或后退 + file_pointer:-1, // 文件操作指针,用于指定前进和后退的路径,的指针位数 + file_path:'C:/', // 文件目录 + file_page_num:bt.get_storage('local','showRow') || 100,//每页个数 + file_list: [], // 文件列表 + file_store_list:[], // 文件收藏列表 + file_store_current: 0, //文件收藏当前分类索引 + file_images_list:[], // 文件图片列表 + file_drop: null, // 拖拽上传 + file_present_task: null, + file_selection_operating: [], + file_share_list:[], + scroll_width:(function(){ + // 创建一个div元素 + var noScroll, scroll, oDiv = document.createElement('DIV'); + oDiv.style.cssText = 'position:absolute; top:-1000px; width:100px; height:100px; overflow:hidden;'; + noScroll = document.body.appendChild(oDiv).clientWidth; + oDiv.style.overflowY = 'scroll'; + scroll = oDiv.clientWidth; + document.body.removeChild(oDiv); + return noScroll - scroll; + }()), + is_mobile:function(){ + if(navigator.userAgent.match(/mobile/i) || /(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent)){ + layer.msg(navigator.userAgent.match(/mobile/i),{icon:2,time:0}) + return true; } + return false; }, - // 事件关联 (进入,离开,放下) - event_relation:function(enter,leave,drop){ - var that = this,obj = Object.keys(arguments); - for(var item in arguments){ - if(typeof arguments[item] == "object" && typeof arguments[item].nodeType != 'undefined'){ - arguments[item] = { - el:arguments[item], - callback:null + method_list:{ + GetFileBody:lan.public.get_file_contents, // 获取文件内容 + DeleteDir:lan.public.deleting, + DeleteFile:lan.public.deleting, + GetDiskInfo:['system',lan.public.getting_disk_list], + CheckExistsFiles:lan.files.check_same_name_file, + GetFileAccess:lan.files.getting_permission_list, + SetFileAccess:lan.public.config, + DelFileAccess:lan.files.deleting_user, + get_path_size:lan.files.getting_dir_size, + add_files_store_types:lan.files.create_favorite, + get_files_store:lan.files.getting_favorite, + del_files_store:lan.files.unfavorite, + dir_webshell_check:'目录查杀', + file_webshell_check:'查杀文件', + get_download_url_list:lan.files.getting_share_list, + get_download_url_find:lan.files.getting_s_share_info, + create_download_url:lan.files.create_share, + remove_download_url:lan.files.cancel_share, + add_files_store:lan.files.adding_favorite, + CopyFile:lan.files.copy_the, + MvFile:lan.files.mv_the, + SetBatchData:lan.files.performing_bulk_opt, + Get_Recycle_bin:lan.files.getting_recycle_list, + get_path_premissions:lan.files.getting_permission_list, + back_path_permissions:lan.files.setting_permission_list, + get_all_back: lan.files.getting_permission_list, + fix_permissions: lan.files.fix_permission, + del_path_premissions: lan.files.deleting_permission, + }, + file_drop:{ + f_path:null, + startTime: 0, + endTime:0, + uploadLength:0, //上传数量 + splitSize: 1024 * 1024 * 2, //文件上传分片大小 + splitEndTime: 0, + splitStartTime:0, + fileSize:0, + speedLastTime:0, + filesList:[], // 文件列表数组 + errorLength:0, //上传失败文件数量 + isUpload:true, //上传状态,是否可以上传 + uploadSuspend:[], //上传暂停参数 + isUploadNumber:800,//限制单次上传数量 + uploadAllSize:0, // 上传文件总大小 + uploadedSize:0, // 已上传文件大小 + updateedSizeLast:0, + topUploadedSize:0, // 上一次文件上传大小 + uploadExpectTime:0, // 预计上传时间 + initTimer:0, // 初始化计时 + speedInterval:null, //平局速度定时器 + timerSpeed:0, //速度 + isLayuiDrop:false, //是否是小窗口拖拽 + uploading:false, + is_webkit:(function(){ + if(navigator.userAgent.indexOf('WebKit') > -1) return true; + return false; + })(), + init:function(){ + if($('#mask_layer').length == 0) { + window.UploadFiles = function(){ bt_file.file_drop.dialog_view()}; + $("body").append($('')); + this.event_relation(document.querySelector('#container'),document,document.querySelector('#mask_layer')); + } + }, + // 事件关联 (进入,离开,放下) + event_relation:function(enter,leave,drop){ + var that = this,obj = Object.keys(arguments); + for(var item in arguments){ + if(typeof arguments[item] == "object" && typeof arguments[item].nodeType != 'undefined'){ + arguments[item] = { + el:arguments[item], + callback:null + } } } - } - leave.el.addEventListener("dragleave",(leave.callback != null)?leave.callback:function(e){ - if(e.x == 0 && e.y == 0) $('#mask_layer').hide(); - e.preventDefault(); - },false); - enter.el.addEventListener("dragenter", (enter.callback != null)?enter.callback:function(e){ - if(e.dataTransfer.items[0].kind == 'string') return false - $('#mask_layer').show(); - that.isLayuiDrop = false; - e.preventDefault(); - },false); - drop.el.addEventListener("dragover",function(e){ e.preventDefault() }, false); - drop.el.addEventListener("drop",(enter.callback != null)?drop.callback:that.ev_drop, false); - }, - // 事件触发 - ev_drop:function(e){ - if(!this.is_webkit){ - $('#mask_layer').hide(); - return false; - } - e.preventDefault(); - if(fileDrop.uploading){ - layer.msg('Uploading, please wait...'); - return false; - } - var items = e.dataTransfer.items,time,num = 0; - loadT = layer.msg('Getting upload file information, please wait...',{icon:16,time:0,shade:.3}); - fileDrop.isUpload = true; - if(items && items.length && items[0].webkitGetAsEntry != null) { - if(items[0].kind != 'file') return false; - } - if(fileDrop.filesList == null) fileDrop.filesList = [] - for(var i = fileDrop.filesList.length -1; i >= 0 ; i--){ - if(fileDrop.filesList[i].is_upload) fileDrop.filesList.splice(-i,1) - } - $('#mask_layer').hide(); - function update_sync(s){ - s.getFilesAndDirectories().then(function(subFilesAndDirs) { - return iterateFilesAndDirs(subFilesAndDirs, s.path); - }); - } - var iterateFilesAndDirs = function(filesAndDirs, path) { - if(!fileDrop.isUpload) return false - for (var i = 0; i < filesAndDirs.length; i++) { - if (typeof(filesAndDirs[i].getFilesAndDirectories) == 'function') { - update_sync(filesAndDirs[i]) - // var path = filesAndDirs[i].path; - // filesAndDirs[i].getFilesAndDirectories().then(function(subFilesAndDirs) { - // iterateFilesAndDirs(subFilesAndDirs, path); - // }); - } else { - if(num > fileDrop.isUploadNumber){ - fileDrop.isUpload = false; - layer.msg(' '+ fileDrop.isUploadNumber +'file. Unable to upload, please upload after compression!',{icon:2,area:'405px'}); - clearTimeout(time); - return false; - } - // if(/^\.\w*/.test(filesAndDirs[i].name) ||/\/\.\w*/g.test(path)) continue; //排查隐藏文件目录和文件 - fileDrop.filesList.push({ - file:filesAndDirs[i], - path:bt.get_file_path(path +'/'+ filesAndDirs[i].name).replace('//','/'), - name:filesAndDirs[i].name.replace('//','/'), - icon:GetExtName(filesAndDirs[i].name), - size:fileDrop.to_size(filesAndDirs[i].size), - upload:0, //上传状态,未上传:0、上传中:1,已上传:2,上传失败:-1 - is_upload:false - }); - fileDrop.uploadAllSize += filesAndDirs[i].size - clearTimeout(time); - time = setTimeout(function(){ - layer.close(loadT); - fileDrop.dialog_view(); - },100); - num ++; - } - } - } - if('getFilesAndDirectories' in e.dataTransfer){ - e.dataTransfer.getFilesAndDirectories().then(function(filesAndDirs) { - return iterateFilesAndDirs(filesAndDirs, '/'); - }); - } + leave.el.addEventListener("dragleave",(leave.callback != null)?leave.callback:function(e){ + if(e.x == 0 && e.y == 0) $('#mask_layer').hide(); + e.preventDefault(); + },false); + enter.el.addEventListener("dragenter", (enter.callback != null)?enter.callback:function(e){ + if(e.dataTransfer.items[0].kind == 'string') return false + $('#mask_layer').show(); + that.isLayuiDrop = false; + e.preventDefault(); + },false); + drop.el.addEventListener("dragover",function(e){ e.preventDefault() }, false); + drop.el.addEventListener("drop",(enter.callback != null)?drop.callback:that.ev_drop, false); + }, + - }, - // 上传视图 - dialog_view:function(config){ - var that = this,html = ''; - if(!$('.file_dir_uploads').length > 0){ - if(that.filesList == null) that.filesList = [] - for(var i =0; i'+ (item.path + '/' + item.name).replace('//','/') +''+ item.size +''+ that.is_upload_status(item.upload) +'
'; + // 事件触发 + ev_drop:function(e){ + if(e.dataTransfer.items[0].kind == 'string') return false; + if(!bt_file.file_drop.is_webkit){ + $('#mask_layer').hide(); + return false; } - var is_show = that.filesList.length > 11; - layer.open({ - type: 1, - closeBtn: 1, - maxmin:true, - area: ['640px','609px'], - btn:['Start upload','Cancel upload'], - title: 'Upload files to【'+ bt.get_cookie('Path') +'】--- Support breakpoint renewal', - skin:'file_dir_uploads', - content:'
'+ (html!=''?('
  • File nameFile sizeFile status
    '+ html +'
'):'Please drag the file here'+ (!that.is_webkit?'This browser not support drag upload.
Please choose Chrome or WebKit kernel browser.
':'') +'
') +'
', - success:function(){ - $('#mask_layer').hide(); - $('.file_dir_uploads .layui-layer-max').hide(); - $('.upload_btn_groud .upload_file_btn').click(function(){$('.upload_btn_groud .dropdown-menu [data-type=file]').click()}); - $('.upload_btn_groud .dropdown-menu a').click(function(){ - var type = $(this).attr('data-type'); - $('').change(function(e){ - var files = e.target.files,arry = []; - for(var i=0;i= 0 ; i--){ + if(bt_file.file_drop.filesList[i].is_upload) bt_file.file_drop.filesList.splice(-i,1) + } + $('#mask_layer').hide(); + function update_sync(s){ + s.getFilesAndDirectories().then(function(subFilesAndDirs) { + return iterateFilesAndDirs(subFilesAndDirs, s.path); + }); + } + + var iterateFilesAndDirs = function(filesAndDirs, path) { + if(!bt_file.file_drop.isUpload) return false + for (var i = 0; i < filesAndDirs.length; i++) { + if (typeof(filesAndDirs[i].getFilesAndDirectories) == 'function') { + update_sync(filesAndDirs[i]) + } else { + if(num > bt_file.file_drop.isUploadNumber){ + bt_file.file_drop.isUpload = false; + layer.msg(' '+ bt_file.file_drop.isUploadNumber +' items cannot upload, please compress first!。',{icon:2,area:'405px'}); + bt_file.file_drop.filesList = []; + clearTimeout(time); return false; } - $('.layui-layer-btn0').css({'cursor':'no-drop','background':'#5c9e69'}).attr('data-upload','true').text('Uploading'); - that.upload_file(); - that.initTimer = new Date(); - that.uploading = true; - //that.get_timer_speed(); - } - }, - btn2:function (index, layero){ - if(that.uploading){ - 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){ - layer.close(index); - layer.close(indexs); + bt_file.file_drop.filesList.push({ + file:filesAndDirs[i], + path:bt.get_file_path(path +'/'+ filesAndDirs[i].name).replace('//','/'), + name:filesAndDirs[i].name.replace('//','/'), + icon:bt_file.get_ext_name(filesAndDirs[i].name), + size:bt_file.file_drop.to_size(filesAndDirs[i].size), + upload:0, //上传状态,未上传:0、上传中:1,已上传:2,上传失败:-1 + is_upload:false }); - return false; - }else{ - layer.close(index); + bt_file.file_drop.uploadAllSize += filesAndDirs[i].size + clearTimeout(time); + time = setTimeout(function(){ + layer.close(loadT); + bt_file.file_drop.dialog_view(); + },100); + num ++; } - }, - cancel:function(index, layero){ - if(that.uploading){ - 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){ - layer.close(index); - layer.close(indexs); + } + } + if('getFilesAndDirectories' in e.dataTransfer){ + e.dataTransfer.getFilesAndDirectories().then(function(filesAndDirs) { + return iterateFilesAndDirs(filesAndDirs, '/'); + }); + } + + }, + // 上传视图 + dialog_view:function(config){ + var that = this,html = ''; + this.f_path = bt_file.file_path; + if(!$('.file_dir_uploads').length > 0){ + if(that.filesList == null) that.filesList = [] + for(var i =0; i'+ (item.path + '/' + item.name).replace('//','/') +'
'+ item.size +''+ that.is_upload_status(item.upload) +'
'; + } + var is_show = that.filesList.length > 11; + layer.open({ + type: 1, + closeBtn: 1, + maxmin:true, + area: ['550px','505px'], + btn:['Upload','Cancel'], + title: 'Upload files to【'+ bt.get_cookie('Path') +'】--- Support breakpoint renewal', + skin:'file_dir_uploads', + content:'
'+ (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':'') +'') +'
', + success:function(){ + $('#mask_layer').hide(); + $('.file_dir_uploads .layui-layer-max').hide(); + $('.upload_btn_groud .upload_file_btn').click(function(){$('.upload_btn_groud .dropdown-menu [data-type=file]').click()}); + $('.upload_btn_groud .dropdown-menu a').click(function(){ + var type = $(this).attr('data-type'); + $('').change(function(e){ + var files = e.target.files,arry = []; + for(var i=0;i
  • File nameFile sizeUpload status
  • ').removeClass('active'); - if(Array.isArray(config)){ - for(var i =0; i'+ (item.path + '/' + item.name).replace('//','/') +''+ item.size +''+ that.is_upload_status(item.upload) +'
    '; - } - $('.dropUpLoadFile').append(html); + }); }else{ - $('.dropUpLoadFile').append('
  • '+ config.name +''+ config.size +''+ that.is_upload_status(config.upload) +'
  • '); + if(config == undefined && !that.isLayuiDrop) return false; + if(that.isLayuiDrop) config = that.filesList; + $('.upload_file_body').html('
    • File nameFile sizeFile status
      ').removeClass('active'); + if(Array.isArray(config)){ + for(var i =0; i'+ (item.path + '/' + item.name).replace('//','/') +''+ item.size +''+ that.is_upload_status(item.upload) +'
      '; + } + $('.dropUpLoadFile').append(html); + }else{ + $('.dropUpLoadFile').append('
    • '+ (config.path + '/' + config.name).replace('//','/') +''+ config.size +''+ that.is_upload_status(config.upload) +'
    • '); + } + } - - } - }, - // 上传单文件状态 - is_upload_status:function(status,val){ - if(val === undefined) val = '' - switch(status){ - case -1: - return 'Upload failed'+ (val != ''?','+val:'') +''; - break; - case 0: - return 'Waiting to upload'; - break; - case 1: - return 'Uploaded'; - break; - case 2: - return 'Uploading'+ val+''; - break; - case 3: - return 'Paused'; - break; - } - }, - // 设置上传实时反馈视图 - set_upload_view:function(index,config){ - var item = $('.dropUpLoadFile li:eq('+ index +')'),that = this; - var file_info = $('.file_upload_info'); - if($('.file_upload_info .uploadProgress').length == 0){ - $('.file_upload_info').html('Total progress , Uploading Upload failed Upload speed GettingExpect time Getting'); - } - file_info.show().prev().hide().parent().css('paddingRight',0); - if(that.errorLength > 0) file_info.find('.uploadError').text('('+ that.errorLength +'file)').parent().show(); - file_info.find('.uploadNumber').html('('+ that.uploadLength +'/'+ that.filesList.length +')'); - file_info.find('.uploadProgress').html( ((that.uploadedSize / that.uploadAllSize) * 100).toFixed(2) +'%'); - if(config.upload === 1 || config.upload === -1){ - that.filesList[index].is_upload = true; - that.uploadLength += 1; - item.find('.fileLoading').css({'width':'100%','opacity':'.5','background': config.upload == -1?'#ffadad':'#20a53a21'}); - item.find('.filesize').text(config.size); - item.find('.fileStatus').html(that.is_upload_status(config.upload,(config.upload === 1?('(耗时:'+ that.diff_time(that.startTime,that.endTime) +')'):config.errorMsg))); - item.find('.fileLoading').fadeOut(500,function(){ - $(this).remove(); - var uploadHeight = $('.dropUpLoadFile'); - if(uploadHeight.length == 0) return false; - if(uploadHeight[0].scrollHeight > uploadHeight.height()){ - uploadHeight.scrollTop(uploadHeight.scrollTop()+40); + }, + // 上传单文件状态 + is_upload_status:function(status,val){ + if(val === undefined) val = '' + switch(status){ + case -1: + return 'Fail'+ (val != ''?','+val:'') +''; + break; + case 0: + return 'Waiting to upload'; + break; + case 1: + return 'Uploaded'; + break; + case 2: + return 'Uploading '+ val+''; + break; + case 3: + return 'Stoped'; + break; + } + }, + // 设置上传实时反馈视图 + set_upload_view:function(index,config){ + var item = $('.dropUpLoadFile li:eq('+ index +')'),that = this; + var file_info = $('.file_upload_info'); + if($('.file_upload_info .uploadProgress').length == 0){ + $('.file_upload_info').html('Total process ,Uploading ,Fail Speed Getting,Expect time Getting'); + } + file_info.show().prev().hide().parent().css('paddingRight',0); + if(that.errorLength > 0) file_info.find('.uploadError').text('('+ that.errorLength +'份)').parent().show(); + file_info.find('.uploadNumber').html('('+ that.uploadLength +'/'+ that.filesList.length +')'); + file_info.find('.uploadProgress').html( ((that.uploadedSize / that.uploadAllSize) * 100).toFixed(2) +'%'); + if(config.upload === 1 || config.upload === -1){ + that.filesList[index].is_upload = true; + that.uploadLength += 1; + item.find('.fileLoading').css({'width':'100%','opacity':'.5','background': config.upload == -1?'#ffadad':'#20a53a21'}); + item.find('.filesize').text(config.size); + item.find('.fileStatus').html(that.is_upload_status(config.upload,(config.upload === 1?('(Time:'+ that.diff_time(that.startTime,that.endTime) +')'):config.errorMsg))); + item.find('.fileLoading').fadeOut(500,function(){ + $(this).remove(); + var uploadHeight = $('.dropUpLoadFile'); + if(uploadHeight.length == 0) return false; + if(uploadHeight[0].scrollHeight > uploadHeight.height()){ + uploadHeight.scrollTop(uploadHeight.scrollTop()+40); + } + }); + }else{ + item.find('.fileLoading').css('width',config.percent); + item.find('.filesize').text(config.upload_size +'/'+ config.size); + item.find('.fileStatus').html(that.is_upload_status(config.upload,'('+ config.percent +')')); + } + }, + // 清除上传状态 + clear_drop_stauts:function(status){ + var time = new Date(),that = this; + if(!status){ + try { + var s_peed = bt_file.file_drop.to_size(bt_file.file_drop.uploadedSize / ((time.getTime() - bt_file.file_drop.initTimer.getTime()) / 1000)) + $('.file_upload_info').html(''+ this.uploadLength +' uploaded,'+ (this.errorLength>0?(this.errorLength +'failures, '):'') +'time'+ this.diff_time(this.initTimer,time) + ',speed '+ s_peed +'/s').append($('').click(function(){ + $('.file_upload_info').hide().prev().show(); + })); + } catch (e) { + + } + } + $('.layui-layer-btn0').removeAttr('style data-upload').text(lan.upload.upload); + $.extend(bt_file.file_drop,{ + startTime: 0, + endTime:0, + uploadLength:0, //上传数量 + splitSize: 1024 * 1024 * 2, //文件上传分片大小 + filesList:[], // 文件列表数组 + errorLength:0, //上传失败文件数量 + isUpload:false, //上传状态,是否可以上传 + isUploadNumber:800,//限制单次上传数量 + uploadAllSize:0, // 上传文件总大小 + uploadedSize:0, // 已上传文件大小 + topUploadedSize:0, // 上一次文件上传大小 + uploadExpectTime:0, // 预计上传时间 + initTimer:0, // 初始化计时 + speedInterval:null, //平局速度定时器 + timerSpeed:0, //速度 + uploading:false + }); + clearInterval(that.speedInterval); + }, + // 上传文件,文件开始字段,文件编号 + upload_file:function(fileStart,index){ + if(fileStart == undefined && this.uploadSuspend.length == 0) fileStart = 0,index = 0; + if(this.filesList.length === index){ + clearInterval(this.speedInterval); + this.clear_drop_stauts(); + bt_file.reader_file_list({path:bt_file.file_path,is_operating:false}); + return false; + } + var that = this; + that.splitEndTime = new Date().getTime() + that.get_timer_speed() + + that.splitStartTime = new Date().getTime() + var item = this.filesList[index],fileEnd = ''; + if(item == undefined) return false; + fileEnd = Math.min(item.file.size, fileStart + this.splitSize), + that.fileSize = fileEnd - fileStart + form = new FormData(); + if(fileStart == 0){ + that.startTime = new Date(); + item = $.extend(item,{percent:'0%',upload:2,upload_size:'0B'}); + } + form.append("f_path", this.f_path + item.path); + form.append("f_name", item.name); + form.append("f_size", item.file.size); + form.append("f_start", fileStart); + form.append("blob", item.file.slice(fileStart, fileEnd)); + that.set_upload_view(index,item); + $.ajax({ + url:'/files?action=upload', + type: "POST", + data: form, + async: true, + processData: false, + contentType: false, + success:function(data){ + if(typeof(data) === "number"){ + that.set_upload_view(index,$.extend(item,{percent:(((data / item.file.size)* 100).toFixed(2) +'%'),upload:2,upload_size:that.to_size(data)})); + if(fileEnd != data){ + that.uploadedSize += data; + }else{ + that.uploadedSize += parseInt(fileEnd - fileStart); + } + + that.upload_file(data,index); + }else{ + if(data.status){ + that.endTime = new Date(); + that.uploadedSize += parseInt(fileEnd - fileStart); + that.set_upload_view(index,$.extend(item,{upload:1,upload_size:item.size})); + that.upload_file(0,index += 1); + }else{ + that.set_upload_view(index,$.extend(item,{upload:-1,errorMsg:data.msg})); + that.errorLength ++; + } + } + + }, + error:function(e){ + if(that.filesList[index].req_error === undefined) that.filesList[index].req_error = 1 + if(that.filesList[index].req_error > 2){ + that.set_upload_view(index,$.extend(that.filesList[index],{upload:-1,errorMsg:e.statusText == 'error'?lan.public.network_err:e.statusText })); + that.errorLength ++; + that.upload_file(fileStart,index += 1) + return false; + } + that.filesList[index].req_error += 1; + that.upload_file(fileStart,index) + + } }); - }else{ - item.find('.fileLoading').css('width',config.percent); - item.find('.filesize').text(config.upload_size +'/'+ config.size); - item.find('.fileStatus').html(that.is_upload_status(config.upload,'('+ config.percent +')')); + }, + // 获取上传速度 + get_timer_speed:function(speed){ + var done_time = new Date().getTime() + if(done_time - this.speedLastTime > 1000){ + var that = this,num = 0; + if(speed == undefined) speed = 200 + var s_time = (that.splitEndTime - that.splitStartTime) / 1000; + that.timerSpeed = (that.fileSize / s_time).toFixed(2) + that.updateedSizeLast = that.uploadedSize + if(that.timerSpeed < 2) return; + + $('.file_upload_info .uploadSpeed').text(that.to_size(isNaN(that.timerSpeed)?0:that.timerSpeed)+'/s'); + var estimateTime = that.time(parseInt(((that.uploadAllSize - that.uploadedSize) / that.timerSpeed) * 1000)) + if(!isNaN(that.timerSpeed)) $('.file_upload_info .uploadEstimate').text(estimateTime.indexOf('NaN') == -1?estimateTime:'0 '+lan.bt.s); + this.speedLastTime = done_time; + } + }, + time:function(date){ + var hours = Math.floor(date / (60 * 60 * 1000)); + var minutes = Math.floor(date / (60 * 1000)); + var seconds = parseInt((date % (60 * 1000)) / 1000); + var result = seconds + 'sec'; + if(minutes > 0) { + result = minutes + "min" + seconds + 'sec'; + } + if(hours > 0){ + result = hours + 'hour' + Math.floor((date - (hours * (60 * 60 * 1000))) / (60 * 1000)) + "min"; + } + return result + }, + diff_time: function (start_date, end_date) { + var diff = end_date.getTime() - start_date.getTime(); + var minutes = Math.floor(diff / (60 * 1000)); + var leave3 = diff % (60 * 1000); + var seconds = leave3 / 1000 + var result = seconds.toFixed(minutes > 0?0:2) + lan.bt.s; + if (minutes > 0) { + result = minutes + "min" + seconds.toFixed(0) + lan.bt.s + } + return result + }, + + to_size: function (a) { + var d = [" B", " KB", " MB", " GB", " TB", " PB"]; + var e = 1024; + for (var b = 0; b < d.length; b += 1) { + if (a < e) { + var num = (b === 0 ? a : a.toFixed(2)) + d[b]; + return (!isNaN((b === 0 ? a : a.toFixed(2))) && typeof num != 'undefined')?num:'0B'; + } + a /= e + } } }, - // 清除上传状态 - clear_drop_stauts:function(status){ - var time = new Date(),that = this; - if(!status){ - try { - var s_peed = fileDrop.to_size(fileDrop.uploadedSize / ((time.getTime() - fileDrop.initTimer.getTime()) / 1000)) - $('.file_upload_info').html('Uploaded : '+ this.uploadLength +' files,  '+ (this.errorLength>0?('Upload failed '+ this.errorLength +' files, '):'') +'Time consuming : '+ this.diff_time(this.initTimer,time) + ',  average speed : '+ s_peed +'/s').append($('').click(function(){ - $('.file_upload_info').hide().prev().show(); - })); - } catch (e) { - - } + init:function(){ + if (bt.get_cookie('rank') == undefined || bt.get_cookie('rank') == null || bt.get_cookie('rank') == 'a' || bt.get_cookie('rank') == 'b') { + bt.set_cookie('rank', 'list'); } - $('.layui-layer-btn0').removeAttr('style data-upload').text('Start upload'); - $.extend(fileDrop,{ - startTime: 0, - endTime:0, - uploadLength:0, //上传数量 - splitSize: 1024 * 1024 * 2, //文件上传分片大小 - filesList:[], // 文件列表数组 - errorLength:0, //上传失败文件数量 - isUpload:false, //上传状态,是否可以上传 - isUploadNumber:800,//限制单次上传数量 - uploadAllSize:0, // 上传文件总大小 - uploadedSize:0, // 已上传文件大小 - topUploadedSize:0, // 上一次文件上传大小 - uploadExpectTime:0, // 预计上传时间 - initTimer:0, // 初始化计时 - speedInterval:null, //平局速度定时器 - timerSpeed:0, //速度 - uploading:false - }); - clearInterval(that.speedInterval); + this.area = [window.innerWidth, window.innerHeight]; + this.file_path = bt.get_cookie('Path'); + this.event_bind(); // 事件绑定 + this.reader_file_list({is_operating:true}); // 渲染文件列表 + this.render_file_disk_list(); // 渲染文件磁盘列表 + this.file_drop.init(); // 初始化文件上传 + this.set_file_table_width(); // 设置表格宽度 }, - // 上传文件,文件开始字段,文件编号 - upload_file:function(fileStart,index){ - if(fileStart == undefined && this.uploadSuspend.length == 0) fileStart = 0,index = 0; - if(this.filesList.length === index){ - clearInterval(this.speedInterval); - this.clear_drop_stauts(); - GetFiles(bt.get_cookie('Path')); - return false; - } + // 事件绑定 + event_bind: function(){ var that = this; - that.splitEndTime = new Date().getTime() - that.get_timer_speed() - - that.splitStartTime = new Date().getTime() - var item = this.filesList[index],fileEnd = ''; - if(item == undefined) return false; - fileEnd = Math.min(item.file.size, fileStart + this.splitSize), - that.fileSize = fileEnd - fileStart - form = new FormData(); - if(fileStart == 0){ - that.startTime = new Date(); - item = $.extend(item,{percent:'0%',upload:2,upload_size:'0B'}); - } - form.append("f_path", bt.get_cookie('Path') + item.path); - form.append("f_name", item.name); - form.append("f_size", item.file.size); - form.append("f_start", fileStart); - form.append("blob", item.file.slice(fileStart, fileEnd)); - that.set_upload_view(index,item); - $.ajax({ - url:'/files?action=upload', - type: "POST", - data: form, - async: true, - processData: false, - contentType: false, - success:function(data){ - if(typeof(data) === "number"){ - that.set_upload_view(index,$.extend(item,{percent:(((data / item.file.size)* 100).toFixed(2) +'%'),upload:2,upload_size:that.to_size(data)})); - if(fileEnd != data){ - that.uploadedSize += data; - }else{ - that.uploadedSize += parseInt(fileEnd - fileStart); - } - that.upload_file(data,index); - }else{ - if(data.status){ - that.endTime = new Date(); - that.uploadedSize += parseInt(fileEnd - fileStart); - that.set_upload_view(index,$.extend(item,{upload:1,upload_size:item.size})); - that.upload_file(0,index += 1); - }else{ - that.set_upload_view(index,$.extend(item,{upload:-1,errorMsg:data.msg})); - that.errorLength ++; - } + // 窗口大小限制 + $(window).resize(function(ev){ + if($(this)[0].innerHeight != that.area[1]){ + that.area[1] = $(this)[0].innerHeight; + that.set_file_view(); + } + if($(this)[0].innerWidth != that.area[0]){ + that.area[0] = $(this)[0].innerWidth; + that.set_dir_view_resize(); //目录视图 + that.set_menu_line_view_resize(); //菜单栏视图 + that.set_file_table_width(); //设置表头宽度 + } + }).keydown(function(e){ // 全局按键事件 + e = window.event || e; + var keyCode = e.keyCode,tagName = e.target.tagName.toLowerCase(); + if(!that.is_editor){ //非编辑模式 + // Ctrl + v 粘贴事件 + if(e.ctrlKey && keyCode == 86 && tagName != 'input' && tagName != 'textarea'){ + that.paste_file_or_dir(); } - }, - error:function(e){ - if(that.filesList[index].req_error === undefined) that.filesList[index].req_error = 1 - if(that.filesList[index].req_error > 2){ - that.set_upload_view(index,$.extend(that.filesList[index],{upload:-1,errorMsg:e.statusText == 'error'?'Network interruption':e.statusText })); - that.errorLength ++; - that.upload_file(fileStart,index += 1) - return false; + // 退格键 + if(keyCode == 8 && tagName !== 'input' && tagName !== 'textarea' && typeof $(e.target).attr('data-backspace') === "undefined"){ + $('.file_path_upper').click() } - that.filesList[index].req_error += 1; - that.upload_file(fileStart,index) } }); - }, - // 获取上传速度 - // get_timer_speed:function(speed){ - // var that = this,num = 0; - // if(speed == undefined) speed = 1000 - // that.speedInterval = setInterval(function(){ - // if(that.uploadedSize - that.topUploadedSize === 0){ - // that.timerSpeed = that.timerSpeed == 0 ? 0:(parseInt(that.timerSpeed / num)); - // num += 1; - // }else{ - // that.timerSpeed = that.uploadedSize - that.topUploadedSize; - // num = 0; - // } - // that.topUploadedSize = that.uploadedSize; - // $('.file_upload_info .uploadSpeed').text(that.to_size(isNaN(that.timerSpeed)?0:that.timerSpeed)+'/s'); - // var estimateTime = that.time(parseInt(((that.uploadAllSize - that.uploadedSize) / that.timerSpeed) * 1000)) - // if(!isNaN(that.timerSpeed)) $('.file_upload_info .uploadEstimate').text(estimateTime.indexOf('NaN') == -1?estimateTime:'0sec'); - // },speed); - // }, - get_timer_speed:function(speed){ - var done_time = new Date().getTime() - if(done_time - this.speedLastTime > 1000){ - var that = this,num = 0; - if(speed == undefined) speed = 200 - var s_time = (that.splitEndTime - that.splitStartTime) / 1000; - that.timerSpeed = (that.fileSize / s_time).toFixed(2) - that.updateedSizeLast = that.uploadedSize - if(that.timerSpeed < 2) return; + // 搜索事件绑定 + $('.search_path_views').find('.file_search_checked').unbind('click').click(function(){ + if($(this).hasClass('active')){ + $(this).removeClass('active') + }else{ + $(this).addClass('active'); + } + }) + // 搜索按钮 + $('.search_path_views').on('click','.path_btn',function(e){ + var _obj = {path:that.file_path,search:$('.file_search_input').val()} + if($('#search_all').hasClass('active')) _obj['all'] = 'True' + that.loadT = bt.load('Searching file, please wait...'); + that.reader_file_list(_obj,function(res){ + if(!res.msg){ + that.loadT.close(); + } + }) + $('.file_search_config').addClass('hide') + e.stopPropagation(); + }) + $('.search_path_views').on('click','.file_search_config label',function(e){ + $(this).prev().click(); + }); + // 搜索框(获取焦点、回车提交) + $('.search_path_views .file_search_input').on('focus keyup',function(e){ + e = e || window.event; + var _obj = {path:that.file_path,search:$(this).val()}; + switch(e.type){ + case 'keyup': + var isCheck = $('.file_search_checked').hasClass('active') + if(isCheck) _obj['all'] = 'True' + if(e.keyCode != 13 && e.type == 'keyup') return false; + that.loadT = bt.load('Searching file, please wait...'); + that.reader_file_list(_obj,function(res){ + if(!res.msg){ + that.loadT.close(); + } + }) + break; + } + e.stopPropagation(); + e.preventDefault(); + }) + // 文件路径事件(获取焦点、失去焦点、回车提交) + $('.file_path_input .path_input').on('focus blur keyup',function(e){ + e = e || window.event; + var path = $(this).attr('data-path'),_this = $(this); + switch(e.type){ + case 'focus': + $(this).addClass('focus').val(path).prev().hide(); + break; + case 'blur': + $(this).removeClass('focus').val('').prev().show(); + break; + case 'keyup': + if(e.keyCode != 13 && e.type == 'keyup') return false; + if($(this).data('path') != $(this).val()){ + that.reader_file_list({path:that.path_check($(this).val()),is_operating:true},function(res){ + if(res.status === false){ + _this.val(path); + }else{ + _this.val(that.path_check(res.PATH)); + _this.blur().prev().show(); + } + }); + } + break; + } + e.stopPropagation(); + }); + // 文件路径点击跳转 + $('.file_path_input .file_dir_view').on('click','.file_dir',function(){ + that.reader_file_list({path:$(this).attr('title'),is_operating:true}); + }); - $('.file_upload_info .uploadSpeed').text(that.to_size(isNaN(that.timerSpeed)?0:that.timerSpeed)+'/s'); - var estimateTime = that.time(parseInt(((that.uploadAllSize - that.uploadedSize) / that.timerSpeed) * 1000)) - if(!isNaN(that.timerSpeed)) $('.file_upload_info .uploadEstimate').text(estimateTime.indexOf('NaN') == -1?estimateTime:'0sec'); - this.speedLastTime = done_time; + // 文件操作前进或后退 + $('.forward_path span').click(function(){ + var index = $(this).index(),path = ''; + if(!$(this).hasClass('active')){ + switch(index){ + case 0: + that.file_pointer = that.file_pointer - 1 + path = that.file_operating[that.file_pointer]; + break; + case 1: + that.file_pointer = that.file_pointer + 1 + path = that.file_operating[that.file_pointer]; + break; + } + that.reader_file_list({path:path,is_operating:false}); + } + }); + + //展示已隐藏的目录 + $('.file_path_input .file_dir_view').on('click','.file_dir_omit',function(e){ + var _this = this,new_down_list = $(this).children('.nav_down_list'); + $(this).addClass('active'); + new_down_list.addClass('show'); + $(document).one('click',function(){ + $(_this).removeClass('active'); + new_down_list.removeClass('show'); + e.stopPropagation(); + }); + e.stopPropagation(); + }); + //目录获取子级所有文件夹(箭头图标) + $('.file_path_input .file_dir_view').on('click','.file_dir_item i',function(e){ + var children_list = $(this).siblings('.nav_down_list') + var _path = $(this).siblings('span').attr('title'); + children_list.show().parent().siblings().find('.nav_down_list').removeAttr('style'); + that.render_path_down_list(children_list,_path); + $(document).one('click',function(){ + children_list.removeAttr('style'); + e.stopPropagation(); + }); + e.stopPropagation(); + }) + //目录子级文件路径跳转(下拉) + $('.file_path_input .file_dir_view').on('click','.file_dir_item .nav_down_list li',function(e){ + that.reader_file_list({path:$(this).data('path'),is_operating:true}); + }); + // 文件上一层 + $('.file_path_upper').click(function(){ + that.reader_file_list({path:that.retrun_prev_path(that.file_path),is_operating:true}); + }); + + // 文件刷新 + $('.file_path_refresh').click(function(){ + that.reader_file_list({path:that.file_path},function(res){ + if(!res.msg) layer.msg('Refresh succeeded') + }); + }); + $('.upload_file').on('click',function(e){ + that.file_drop.dialog_view(); + }); + // 下载 + $('.upload_download').on('click',function(e){ + that.open_download_view(); + }); + + // 新建文件夹或文件 + $('.file_nav_view .create_file_or_dir li').on('click',function(e){ + var type = $(this).data('type'),nav_down_list = $('.create_file_or_dir .nav_down_list'); + nav_down_list.css({'display':function(){ + setTimeout(function(){nav_down_list.removeAttr('style')},100) + return 'none'; + }}); + if(!that.is_editor){ + that.is_editor = true; + // 首位创建“新建文件夹、文件” + $('.file_list_content').prepend('
      '+ + '
      ' + + '
      ' + + '
      ' + + (bt.get_cookie('rank') == 'icon'? '':'')+ + '
      ' + + '
      ' + ) + + // 输入增高、回车、焦点、失去焦点 + $((bt.get_cookie('rank') == 'icon'?'textarea':'input')+'[name=createArea]').on('input',function(){ + if(bt.get_cookie('rank') == 'icon'){ + this.style.height = 'auto'; + this.style.height = this.scrollHeight + "px"; + } + }).keyup(function(e){ + if(e.keyCode == 13) $(this).blur(); + }).blur(function(e){ + var _val = $(this).val().replace(/[\r\n]/g,""); + if(that.match_unqualified_string(_val)) return layer.msg('Name cannot contain /\\:*?"<>| symbol',{icon:2}) + if(_val == '') _val = (type == 'newBlankDir'? 'New directory':'New blank file'); + setTimeout(function(){ //延迟处理,防止Li再次触发 + that.create_file_req({type:(type == 'newBlankDir' ? 'folder':'file'),path:that.file_path+'/'+_val},function(res){ + if(res.status) that.reader_file_list({path:that.file_path}); + layer.msg(res.msg,{icon:res.status?1:2}); + }) + $('.createModel').remove(); // 删除模板 + that.is_editor = false; + },300) + e.preventDefault(); + }).focus(); + }else{ + return false; + } + e.stopPropagation(); + e.preventDefault(); + }) + // 收藏夹列表跳转 + $('.file_nav_view .favorites_file_path ul').on('click','li',function(e){ + var _href = $(this).data('path'),_type = $(this).data('type'),nav_down_list = $('.favorites_file_path .nav_down_list'); + if(_type == 'dir'){ + that.reader_file_list({path:_href,is_operating:true}); + }else{ + if($(this).data('null') != undefined) return false; + var _file = $(this).attr('title').split('.'),_fileT = _file[_file.length -1],_fileE = that.determine_file_type(_fileT); + switch(_fileE){ + case 'text': + openEditorView(0,_href) + break; + case 'video': + that.open_video_play(_href); + break; + case 'images': + that.open_images_preview({filename:$(this).attr('title'),path:_href}); + break; + default: + that.reader_file_list({path:that.retrun_prev_path(_href),is_operating:true}); + break; + } + } + //点击隐藏 + nav_down_list.css({'display':function(){ + setTimeout(function(){nav_down_list.removeAttr('style')},100) + return 'none'; + }}); + e.stopPropagation(); + e.preventDefault(); + }) + // 打开终端 + $('.terminal_view').on('click',function(){ + web_shell(); + }); + + // 分享列表 + $('.share_file_list').on('click',function(){ + that.open_share_view(); + }) + // 打开硬盘挂载的目录 + $('.mount_disk_list').on('click','.nav_btn',function(){ + var path = $(this).data('menu'); + that.reader_file_list({path:path,is_operating:true}); + }); + // 硬盘磁盘挂载 + $('.mount_disk_list').on('click','.nav_down_list li',function(){ + var path = $(this).data('disk'),disk_list = $('.mount_disk_list.thezoom .nav_down_list'); + disk_list.css({'display':function(){ + setTimeout(function(){disk_list.removeAttr('style')},100) + return 'none'; + }}); + that.reader_file_list({path:path,is_operating:true}); + }); + + // 全部权限备份按钮 + $('.file_nav_view').on('click','.manage_backup',function(ev){ + that.manage_backup(); + ev.stopPropagation(); + ev.preventDefault(); + }); + // 回收站 + $('.file_nav_view').on('click','.recycle_bin',function(ev){ + that.recycle_bin_view(); + ev.stopPropagation(); + ev.preventDefault(); + }); + // 批量操作 + $('.file_nav_view .multi').on('click','.nav_btn_group',function(ev){ + var batch_type = $(this).data('type'); + if(typeof batch_type != 'undefined') that.batch_file_manage(batch_type); + ev.stopPropagation(); + ev.preventDefault(); + }); + // 批量操作 + $('.file_nav_view .multi').on('click','.nav_btn_group li',function(ev){ + var batch_type = $(this).data('type'); + that.batch_file_manage(batch_type); + ev.stopPropagation(); + ev.preventDefault(); + }); + // 全部粘贴按钮 + $('.file_nav_view').on('click','.file_all_paste',function(){ + that.paste_file_or_dir(); + }); + + // 表头点击事件,触发排序字段和排序方式 + $('.file_list_header').on('click','.file_name,.file_size,.file_mtime,.file_accept,.file_user', function (e) { + var _tid = $(this).attr('data-tid'), + _reverse = $(this).find('.icon_sort').hasClass('active'), + _active = $(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 (!_active) _reverse = true + bt.set_cookie('files_sort', _tid); + bt.set_cookie('name_reverse', _reverse ? 'True' : 'False'); + that.reader_file_list({reverse: _reverse ? 'True' : 'False',sort: _tid}); + return false; + }); + + // 设置排序显示 + $('.file_list_header .file_th').each(function (index, item) { + var files_sort = bt.get_cookie('files_sort'), + name_reverse = bt.get_cookie('name_reverse'); + if ($(this).attr('data-tid') === files_sort){ + $(this).addClass('active').siblings().removeClass('active').find('.icon_sort').removeClass('active').empty(); + $(this).find('.icon_sort').html(''); + if (name_reverse === 'False') $(this).find('.icon_sort').addClass('active'); + } + }); + + // 全选选中文件 + $('.file_list_header .file_check').on('click', function (e){ + var checkbox = parseInt($(this).data('checkbox')); + switch(checkbox){ + case 0: + $(this).addClass('active').removeClass('active_2').data('checkbox',1); + $('.file_list_content .file_tr').addClass('active').removeClass('active_2'); + $('.nav_group.multi').removeClass('hide'); + $('.file_menu_tips').addClass('hide'); + that.file_table_arry = that.file_list.slice(); + break; + case 2: + $(this).addClass('active').removeClass('active_2').data('checkbox',1); + $('.file_list_content .file_tr').addClass('active'); + $('.nav_group.multi').removeClass('hide'); + $('.file_menu_tips').addClass('hide'); + that.file_table_arry = that.file_list.slice(); + break; + case 1: + $(this).removeClass('active active_2').data('checkbox',0); + $('.file_list_content .file_tr').removeClass('active'); + $('.nav_group.multi').addClass('hide'); + $('.file_menu_tips').removeClass('hide'); + that.file_table_arry = []; + break; + } + that.calculate_table_active(); + }); + // 文件勾选 + $('.file_list_content').on('click', '.file_checkbox', function (e) { //列表选择 + var _tr = $(this).parents('.file_tr'),index = _tr.data('index'),filename = _tr.data('filename'); + if(_tr.hasClass('active')){ + _tr.removeClass('active'); + that.remove_check_file(that.file_table_arry,'filename',filename); + }else{ + _tr.addClass('active'); + _tr.attr('data-filename',that.file_list[index]['filename']); + that.file_table_arry.push(that.file_list[index]); + } + that.calculate_table_active(); + e.stopPropagation(); + }); + + // 文件列表滚动条事件 + $('.file_list_content').scroll(function(e){ + 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(e){ + if($(e.target).hasClass('foo_menu_title') || $(e.target).parents().hasClass('foo_menu_title')) return true; + $(this).addClass('active').siblings().removeClass('active'); + that.file_table_arry = [that.file_list[$(this).data('index')]]; + that.calculate_table_active(); + e.stopPropagation(); + e.preventDefault(); + }); + + // 打开文件的分享、收藏状态 + $('.file_table_view .file_list_content').on('click','.file_name .iconfont',function(e){ + var file_tr = $(this).parents('.file_tr'),index = file_tr.data('index'),data = that.file_list[index]; + data['index'] = index + if($(this).hasClass('icon-share1')){that.info_file_share(data);} + if($(this).hasClass('icon-favorites')){that.cancel_file_favorites(data);} + e.stopPropagation(); + }); + // 打开文件夹和文件 --- 双击 + $('.file_table_view .file_list_content').on('dblclick','.file_tr',function(e){ + var index = $(this).data('index'),data = that.file_list[index]; + if( + $(e.target).hasClass('file_check') || + $(e.target).parents('.foo_menu').length > 0 || + $(e.target).hasClass('set_file_ps') || + that.is_editor + ) return false; + if(data.type == 'dir'){ + if(data['filename'] == 'Recycle_bin') return that.recycle_bin_view(); + that.reader_file_list({path:that.file_path + '/' + data['filename'],is_operating:true}); + }else{ + switch(data.open_type){ + case 'text': + openEditorView(0,data.path) + break; + case 'video': + that.open_video_play(data); + break; + case 'images': + that.open_images_preview(data); + break; + case 'compress': + that.unpack_file_to_path(data) + break; + } + } + e.stopPropagation(); + e.preventDefault(); + }); + + // 打开文件夹或文件 --- 文件名单击 + $('.file_table_view .file_list_content').on('click','.file_title i,.file_ico_type .file_icon',function(e){ + var file_tr = $(this).parents('.file_tr'),index = file_tr.data('index'),data = that.file_list[index]; + if(data.type == 'dir'){ + if(data['filename'] == 'Recycle_bin') return that.recycle_bin_view(); + that.reader_file_list({path:that.file_path + '/' + data['filename'],is_operating:true}); + }else{ + layer.msg(data.open_type == 'compress'?'Double click to unzip the file':'Double click to edit the file'); + } + e.stopPropagation(); + e.preventDefault(); + }); + + // 禁用浏览器右键菜单 + $('.file_list_content').on('contextmenu',function(ev){ + if($(ev.target).attr('name') == 'createArea' || $(ev.target).attr('name') == 'rename_file_input'){ + return true + }else{ + return false; + } + }) + + // 禁用菜单右键默认浏览器右键菜单 + $('.selection_right_menu').on('contextmenu',function(ev){ + return false; + }); + + // 文件夹和文件鼠标右键 + $('.file_list_content').on('mousedown','.file_tr',function(ev){ + if(ev.which === 1 && ($(ev.target).hasClass('foo_menu_title') || $(ev.target).parents().hasClass('foo_menu_title'))){ + that.render_file_groud_menu(ev,this); + $(ev.target).parent().addClass('foo_menu_click'); + $(this).siblings().find('.foo_menu').removeClass('foo_menu_click'); + $(this).addClass('active').siblings().removeClass('active'); + }else if(ev.which === 3 && !that.is_editor){ + if(that.file_table_arry.length > 1){ + that.render_files_multi_menu(ev); + }else{ + that.render_file_groud_menu(ev,this); + $('.content_right_menu').removeAttr('style'); + $(this).addClass('active').siblings().removeClass('active'); + } + }else{return true} + ev.stopPropagation(); + ev.preventDefault(); + }); + + + //设置单页显示的数量,默认为100,设置local本地缓存 + $('.filePage').on('change','.showRow',function(){ + var val = $(this).val(); + bt.set_cookie('showRow',val) + that.reader_file_list({showRow:val,p:1,is_operating:false}); + }); + + // 页码跳转 + $('.filePage').on('click','div:nth-child(2) a',function(e){ + var num = $(this).attr('href').match(/p=([0-9]+)$/)[1]; + that.reader_file_list({path:that.path,p:num}) + e.stopPropagation(); + e.preventDefault(); + }) + + // 获取文件夹大小 + $('.file_list_content').on('click','.folder_size',function(e){ + var data = that.file_list[$(this).parents('.file_tr').data('index')],_this = this; + that.get_file_size({path:data.path},function(res){ + $(_this).text(bt.format_size(res.size)); + }); + e.stopPropagation(); + e.preventDefault(); + }); + // 获取目录总大小 + $('.filePage').on('click','#file_all_size',function(e){ + if(that.file_path === '/'){ + layer.tips('The current directory is root directory (/),calculate size will occupymassive server IO,continue?',this,{tips:[1,'red'],time:5000}); + return false; + } + that.get_dir_size({path:that.file_path}); + }) + // 文件区域【鼠标按下】 + $('.file_list_content').on('mousedown',function(ev){ + if( + $(ev.target).hasClass('file_checkbox') || + $(ev.target).hasClass('file_check') || + $(ev.target).hasClass('icon-share1') || + $(ev.target).hasClass('icon-favorites') || + ev.target.localName == 'i' || + $(ev.target).parents('.app_menu_group').length > 0 || + $(ev.target).hasClass('createModel') || + $(ev.target).hasClass('editr_tr') || + $(ev.target).attr('name') == 'createArea' || + $(ev.target).attr('name') == 'rename_file_input' || + $(ev.target).hasClass('set_file_ps') || + that.is_editor + ) return true; + if(ev.which == 3 && !that.is_editor){ + $('.selection_right_menu').removeAttr('style'); + that.render_file_all_menu(ev,this); + return true; + } //是否为右键 + $('.file_list_content').bind('mousewheel', function() {return false;}); //禁止滚轮(鼠标抬起时解绑) + var container = $(this), //当前选区容器 + scroll_h = 0, + con_t = container.offset().top, //选区偏移上 + con_l = container.offset().left //选区偏移左 + var startPos = { //初始位置 + top: ev.clientY - $(this).offset().top, + left: ev.clientX - $(this).offset().left + }; + // 鼠标按下后拖动 + $(document).unbind('mousemove').mousemove(function(ev){ + // 鼠标按下后移动到的位置 + var endPos = { + top: ev.clientY - con_t > 0 && ev.clientY - con_t < container.height() ? ev.clientY - con_t : (ev.clientY - (con_t+container.height()) > 1 ?container.height():0), + left: ev.clientX - con_l > 0 && ev.clientX - con_l < container.width() ? ev.clientX - con_l : (ev.clientX - (con_l+container.width()) > 1 ?container.width():0) + }; + var fixedPoint = { // 设置定点 + top: endPos.top > startPos.top ? startPos.top : endPos.top, + left: endPos.left > startPos.left ? startPos.left : endPos.left + }; + if(bt.get_cookie('rank') == 'list'){ //在列表模式下减去表头高度 + fixedPoint.top = fixedPoint.top + 40 + } + // 拖拽范围的宽高 + var w = Math.min(Math.abs(endPos.left - startPos.left), con_l + container.width() - fixedPoint.left); + var h = Math.min(Math.abs(endPos.top - startPos.top), con_t + container.height() - fixedPoint.top); + + // 超出选区上时 + if(ev.clientY - con_t < 0){ + var beyond_t = Math.abs(ev.clientY - con_t); + container.scrollTop(container.scrollTop() - beyond_t) + if(container.scrollTop() != 0){ + scroll_h += beyond_t + } + h = h+scroll_h + } + // 超出选区下时 + if(ev.clientY - (con_t + container.height()) > 1){ + var beyond_b = ev.clientY - (con_t + container.height()); + container.scrollTop(container.scrollTop() + beyond_b) + if(container[0].scrollHeight - container[0].scrollTop !== container[0].clientHeight){ + scroll_h += beyond_b + } + h = h+ scroll_h + fixedPoint.top = fixedPoint.top-scroll_h + } + if(startPos.top == endPos.top || startPos.left == endPos.left) return true; + // 设置拖拽盒子位置 + that.enter_files_box().show().css({ + left: fixedPoint.left+'px', + top: fixedPoint.top+'px', + width: w+'px', + height: h+'px' + }); + + var box_offset_top = that.enter_files_box().offset().top; + var box_offset_left = that.enter_files_box().offset().left; + var box_offset_w = that.enter_files_box().offset().left + that.enter_files_box().width(); + var box_offset_h = that.enter_files_box().offset().top + that.enter_files_box().height(); + $(container).find('.file_tr').each(function(i,item){ + var offset_top = $(item).offset().top; + var offset_left = $(item).offset().left; + var offset_h = $(item).offset().top + $(item).height(); + var offset_w = $(item).offset().left + $(item).width(); + if(bt.get_cookie('rank') == 'icon'){ // 为Icon模式时 + if(offset_w >= box_offset_left && offset_left <= box_offset_w && offset_h >= box_offset_top && offset_top <= box_offset_h){ + $(item).addClass('active'); + }else{ + $(item).removeClass('active') + } + }else{// 为List模式时 + if (offset_w >= box_offset_left && offset_h >= box_offset_top && offset_top <= box_offset_h ) { + $(item).addClass('active') + }else{ + $(item).removeClass('active') + } + } + }); + }) + + // 鼠标抬起 + $(document).on('mouseup',function(){ + var _move_array = []; + var box_offset_top = that.enter_files_box().offset().top; + var box_offset_left = that.enter_files_box().offset().left; + var box_offset_w = that.enter_files_box().offset().left + that.enter_files_box().width(); + var box_offset_h = that.enter_files_box().offset().top + that.enter_files_box().height(); + $(container).find('.file_tr').each(function(i,item){ + var offset_top = $(item).offset().top; + var offset_left = $(item).offset().left; + var offset_h = $(item).offset().top + $(item).height(); + var offset_w = $(item).offset().left + $(item).width(); + + if(bt.get_cookie('rank') == 'icon'){ // 为Icon模式时 + if(offset_w >= box_offset_left && offset_left <= box_offset_w && offset_h >= box_offset_top && offset_top <= box_offset_h){ + _move_array.push($(item).data('index')) + } + }else{// 为List模式时 + if (offset_w >= box_offset_left && offset_h >= box_offset_top && offset_top <= box_offset_h ) { + _move_array.push($(item).data('index')) + } + } + }); + that.render_file_selected(_move_array); //渲染数据 + that.enter_files_box().remove(); //删除盒子 + $('.file_list_content').unbind('mousewheel'); //解绑滚轮事件 + }) + ev.stopPropagation(); + ev.preventDefault(); + }) + // 备注设置 + $('.file_list_content').on('blur','.set_file_ps',function(ev){ + var tr_index = $(this).parents('.file_tr').data('index'),item = that.file_list[tr_index],nval = $(this).val(),oval = $(this).data('value'),_this = this; + if(nval == oval) return false; + bt_tools.send('files/set_file_ps',{filename:item.path,ps_type:0,ps_body:nval},function(rdata){ + $(_this).data('value',nval); + },{tips:'Set ps',tips:true}); + }); + // 备注回车事件 + $('.file_list_content').on('keyup','.set_file_ps',function(ev){ + if(ev.keyCode == 13){ + $(this).blur(); + } + ev.stopPropagation(); + }); + // 表头拉伸 + $('.file_list_header').on('mousedown','.file_width_resize',function(ev){ + return false; + if(ev.which == 3) return false; + var th = $(this),Minus_v = $(this).prev().offset().left,_header = $('.file_list_header').innerWidth(),maxlen = 0; + maxlen = _header - $('.file_main_title').data + $(document).unbind('mousemove').mousemove(function(ev){ + var thatPos = ev.clientX - Minus_v; + that.set_style_width(th.prev().data('tid'),thatPos); + }) + $(document).one('mouseup',th,function(ev){ + $(document).unbind('mousemove'); + }) + ev.stopPropagation(); + ev.preventDefault(); + }) + // 视图调整 + $('.cut_view_model').on('click',function(){ + var type = $(this).data('type'); + $('.file_table_view').addClass(type == 'icon'?'icon_view':'list_view').removeClass(type != 'icon'?'icon_view':'list_view').scrollLeft(0); + bt.set_cookie('rank',type); + $(this).addClass('active').siblings().removeClass('active'); + }); + //老版快捷操作 + $('.file_list_content').on('click','.set_operation_group a',function(ev){ + var data = $(this).parents('.file_tr').data(),type = $(this).data('type'),item = that.file_list[data.index] + if(type == 'more') return true; + item.open = type; + item.index = data.index; + item.type_tips = item.type == 'file'?'File':'Directory'; + that.file_groud_event(item); + }); + }, + /** + * @descripttion: 文件拖拽范围 + * @author: Lifu + * @return: 拖拽元素 + */ + enter_files_box:function(){ + if($('#web_mouseDrag').length == 0){ + $('
      ',{id:'web_mouseDrag', style: [ + 'position:absolute; top:0; left:0;', + 'border:1px solid #072246; background-color: #cce8ff;', + 'filter:Alpha(Opacity=15); opacity:0.15;', + 'overflow:hidden;display:none;z-index:9;' + ].join('')}).appendTo('.file_table_view'); + } + return $('#web_mouseDrag'); + }, + /** + * @description 清除表格选中数据和样式 + * @returns void + */ + clear_table_active:function(){ + this.file_table_arry = []; + $('.file_list_header .file_check').removeClass('active active_2'); + $('.file_list_content .file_tr').removeClass('active app_menu_operation'); + $('.file_list_content .file_tr .file_ps .foo_menu').removeClass('foo_menu_click'); + $('.app_menu_group').remove(); + }, + /** + * @description 计算表格中选中 + * @returns void + */ + calculate_table_active:function(){ + var that = this,header_check = $('.file_list_header .file_check'); + //判断数量 + if(this.file_table_arry.length == 0){ + header_check.removeClass('active active_2').data('checkbox',0); + }else if(this.file_table_arry.length == this.file_list.length){ + header_check.addClass('active').removeClass('active_2').data('checkbox',1); + }else{ + header_check.addClass('active_2').removeClass('active').data('checkbox',2); + } + //数量大于0开启键盘事件 + if(this.file_table_arry.length > 0){ + $(document).unbind('keydown').on('keydown',function(e){ + var keyCode = e.keyCode,tagName = e.target.localName.toLowerCase(),is_mac = window.navigator.userAgent.indexOf('Mac') > -1 + if(tagName == 'input' || tagName == 'textarea' ) return true; + // Ctrl + c 复制事件 + if(e.ctrlKey && keyCode == 67){ + if(that.file_table_arry.length == 1){ + that.file_groud_event($.extend(that.file_table_arry[0],{open:'copy'})); + $('.file_all_paste').removeClass('hide'); + }else if(that.file_table_arry.length > 1){ + that.batch_file_manage('copy') //批量 + } + } + // Ctrl + x 剪切事件 + if(e.ctrlKey && keyCode == 88){ + if(that.file_table_arry.length == 1){ + that.file_groud_event($.extend(that.file_table_arry[0],{open:'shear'})); + $('.file_all_paste').removeClass('hide'); + }else if(that.file_table_arry.length > 1){ + that.batch_file_manage('shear') //批量 + } + } + }) + //数量超过一个显示批量操作 + if(this.file_table_arry.length > 1){ + $('.nav_group.multi').removeClass('hide'); + $('.file_menu_tips').addClass('hide'); + }else{ + $('.nav_group.multi').addClass('hide'); + $('.file_menu_tips').removeClass('hide'); + } + }else{ + $('.nav_group.multi').addClass('hide'); + $('.file_menu_tips.multi').removeClass('hide'); + $(document).unbind('keydown'); + } + $('.selection_right_menu,.file_path_input .file_dir_item .nav_down_list').removeAttr('style'); // 删除右键样式、路径下拉样式 + that.set_menu_line_view_resize(); + }, + /** + * @description 设置文件路径视图自动调整 + * @returns void + */ + set_dir_view_resize:function(){ + var file_path_input = $('.file_path_input'),file_dir_view = $('.file_path_input .file_dir_view'),_path_width = file_dir_view.attr('data-width'),file_item_hide = null; + if(_path_width){ + parseInt(_path_width); + }else{ + _path_width = file_dir_view.width(); + file_dir_view.attr('data-width',_path_width); + } + if(file_dir_view.width() - _path_width < 90){ + var width = 0; + $($('.file_path_input .file_dir_view .file_dir_item').toArray().reverse()).each(function(){ + var item_width = 0; + if(!$(this).attr('data-width')){ + $(this).attr('data-width',$(this).width()); + item_width = $(this).width(); + }else{ + item_width = parseInt($(this).attr('data-width')); + } + width += item_width; + if((file_path_input.width() - width) <= 90){ + $(this).addClass('hide'); + }else{ + $(this).removeClass('hide'); + } + }); + } + var file_item_hide = file_dir_view.children('.file_dir_item.hide').clone(true); + if(file_dir_view.children('.file_dir_item.hide').length == 0){ + file_path_input.removeClass('active').find('.file_dir_omit').addClass('hide'); + }else{ + file_item_hide.each(function(){ + if($(this).find('.glyphicon-hdd').length == 0){ + $(this).find('.file_dir').before(''); + } + }); + file_path_input.addClass('active').find('.file_dir_omit').removeClass('hide'); + file_path_input.find('.file_dir_omit .nav_down_list').empty().append(file_item_hide); + file_path_input.find('.file_dir_omit .nav_down_list .file_dir_item').removeClass('hide'); } }, - time:function(date){ - var hours = Math.floor(date / (60 * 60 * 1000)); - var minutes = Math.floor(date / (60 * 1000)); - var seconds = parseInt((date % (60 * 1000)) / 1000); - var result = seconds + ' sec'; - if(minutes > 0) { - result = minutes + " min" + seconds + ' sec'; + /** + * @descripttion 设置菜单栏视图自动调整 + * @return: 无返回值 + */ + set_menu_line_view_resize:function(){ + //menu_width 菜单栏宽度、all_group所有按钮组宽度 + var menu_width = $('.file_nav_view').width(),disk_list_width = 0,batch_list_width = 0,_width = 0,disk_list = $('.mount_disk_list'),batch_list = $('.nav_group.multi'); + if(!disk_list.attr('data-width')) disk_list.attr('data-width',disk_list.innerWidth()); + if(!batch_list.attr('data-width') && batch_list.innerWidth() != 0 && batch_list.innerWidth() != -1){ + batch_list.attr('data-width',batch_list.innerWidth()) } - if(hours > 0){ - result = hours + ' hour' + Math.floor((date - (hours * (60 * 60 * 1000))) / (60 * 1000)) + " min"; + disk_list_width = parseInt(disk_list.attr('data-width')); + batch_list_width = parseInt(batch_list.attr('data-width')); + $('.file_nav_view>.nav_group').not('.mount_disk_list').each(function(){ + _width += $(this).innerWidth(); + }); + _width += $('.menu-header-foot').innerWidth(); + if(menu_width - _width < (disk_list_width+5)){ + $('.nav_group.mount_disk_list').addClass('thezoom').find('.disk_title_group_btn').removeClass('hide'); + }else{ + $('.nav_group.mount_disk_list,.nav_group.multi').removeClass('thezoom'); + } + if(this.area[0] < 1700){ + indexs = Math.ceil(((1700 - this.area[0]) / 68)); + $('.batch_group_list>.nav_btn_group').each(function(index){ + if(index >= $('.batch_group_list>.nav_btn_group').length - (indexs+2)){ + $(this).hide(); + }else{ + $(this).show(); + } + }); + $('.batch_group_list>.nav_btn_group:last-child').removeClass('hide').show(); + }else{ + $('.batch_group_list>.nav_btn_group').css('display','inline-block'); + $('.batch_group_list>.nav_btn_group:last-child').addClass('hide'); } - return result }, - diff_time: function (start_date, end_date) { - var diff = end_date.getTime() - start_date.getTime(); - var minutes = Math.floor(diff / (60 * 1000)); - var leave3 = diff % (60 * 1000); - var seconds = leave3 / 1000 - var result = seconds.toFixed(minutes > 0?0:2) + ' sec'; - if (minutes > 0) { - result = minutes + "min" + seconds.toFixed(0) + ' sec' + /** + * @description 设置文件前进或后退状态 + * @returns void + */ + set_file_forward:function(){ + var that = this,forward_path = $('.forward_path span'); + if(that.file_operating.length == 1){ + forward_path.addClass('active'); + }else if(that.file_pointer == that.file_operating.length -1){ + forward_path.eq(0).removeClass('active'); + forward_path.eq(1).addClass('active'); + }else if(that.file_pointer == 0){ + forward_path.eq(0).addClass('active'); + forward_path.eq(1).removeClass('active'); + }else{ + forward_path.removeClass('active'); } - return result + }, + /** + * @description 设置文件视图 + * @returns void + */ + set_file_view:function(){ + var file_list_content = $('.file_list_content'),height = this.area[1] - $('.file_table_view')[0].offsetTop - 170; + $('.file_bodys').height(this.area[1] - 100); + if((this.file_list.length * 50) > height){ + file_list_content.attr('data-height',file_list_content.data('height') || file_list_content.height()).css({'overflow':'hidden','overflow-y':'auto','height':height+'px'}); + $('.file_shadow_bottom').css('opacity',1); + }else{ + file_list_content.css({'overflow':'hidden','overflow-y':'auto','height':height+'px'}); + $('.file_shadow_top,.file_shadow_bottom').css('opacity',0); + } + }, + /** + * @description 打开分享列表 + * @returns void + */ + open_share_view:function(){ + var that = this; + layer.open({ + type: 1, + shift: 5, + closeBtn: 2, + area: ['850px','580px'], + title: 'Share list', + content: '
      \ + \ + \ + \ +
      Share nameShare addressExpiration dateOpt
      \ +
      \ +
      ', + success:function(){ + that.render_share_list(); + + // 分享列表详情操作 + $('.download_url_list').on('click','.info_down',function(){ + var indexs = $(this).attr('data-index'); + that.file_share_view(that.file_share_list[indexs],'list'); + }); + + // 分页 + $('.download_table .download_url_page').on('click','a',function(e){ + var _href = $(this).attr('href').match(/p=([0-9]+)$/)[1] + that.render_share_list({p:_href}); + e.stopPropagation(); + e.preventDefault(); + }); + } + }) + }, + /** + * @description 渲染分享列表 + * @param {Number} page 分页 + * @returns void + */ + render_share_list:function(param){ + var that = this,_list = '' + if(typeof param == 'undefined') param = {p:1} + bt_tools.send('files/get_download_url_list',param,function(res){ + that.file_share_list = res.data; + if(res.data.length > 0){ + $.each(res.data,function(index,item){ + _list += '' + +''+ item.ps +'' + +''+ item.filename +'' + +''+ bt.format_data(item.expire) +'' + +'' + +'Details | ' + +'Close' + +'' + }) + }else{ + _list = 'No share data' + } + $('.download_url_list').html(_list); + $('.download_url_page').html(res.page); + // 删除操作 + $('.download_table').on('click','.del_down',function(){ + var id = $(this).attr('data-id'),_ps = $(this).attr('data-ps'); + that.remove_download_url({id:id,fileName:_ps},function(res){ + if(res.status) that.render_share_list(param) + layer.msg(res.msg,{icon:res.status?1:2}) + }); + }); + },'Share list'); + }, + + /** + * @description 删除选中数据 + * @param {Array} arry + * @param {*} value + * @return void + */ + remove_check_file:function(arry,key,value){ + var len = arry.length; + while(len--){ + if(arry[len][key] == value) arry.splice(len,1) + } + }, + + /** + * @description 打开文件下载视图 + * @return void + */ + open_download_view:function(){ + var that = this; + that.reader_form_line({ + url:'DownloadFile', + beforeSend:function(data){ + return {url:data.url,path:data.path,filename:data.filename}; + }, + overall:{width:'310px'}, + data:[ + {label:'URL address:', name:'url', placeholder:'URL address', value:'http://',eventType:['input','focus'],input:function(){ + var value = $(this).val(),url_list = value.split('/'); + $('[name="filename"]').val(url_list[url_list.length-1]); + }}, + {label:'Download to:', name:'path', placeholder:'Download to', value:that.file_path}, + {label:'File name:', name:'filename', placeholder:'Save file name', value:'',eventType:'enter',enter:function(){ + $('.download_file_view .layui-layer-btn0').click(); + }} + ] + },function(form,html){ + var loadT = bt.open({ + type:1, + title:'Download file', + area: '500px', + shadeClose: false, + skin:'download_file_view', + content:html[0].outerHTML, + btn:['Comfirm','Close'], + success:function(){ + form.setEvent(); + }, + yes:function(indexo,layero){ + var ress = form.getVal(); + if(!bt.check_url(ress.url)){ + layer.msg('Please enter valid URL address..',{icon:2}) + return false; + } + form.submitForm(function(res){ + that.render_present_task_list(); + layer.msg(res.msg,{icon:res.status?1:2}) + loadT.close(); + }); + } + }); + }); + }, + + /** + * @description 设置样式文件 + * @param {String} type 表头类型 + * @param {Number} width 宽度 + * @return void + */ + set_style_width: function (type, width) { + var _content = bt.get_cookie('formHeader') || $('#file_list_info').html(),_html = '',_reg = new RegExp("\\.file_" + type + "\\s?\\{width\\s?\\:\\s?(\\w+)\\s\\!important;\\}","g"),_defined_config = {name:150,type:80,size:80,mtime:150,accept:80,user:80,ps:150}; + _html = _content.replace(_reg, function (match, $1, $2, $3) { + return '.file_' + type + '{width:' + ( width < 80?_defined_config[type]+'px':width+'px') +' !important;}' + }); + $('#file_list_info').html(_html); + }, + + /** + * @description 设置文件表格 + * @return void + */ + set_file_table_width:function(){ + var that = this,file_header_width = $('.file_table_view')[0].offsetWidth,auto_num = 0,width = 0,auto_all_width = 0,css = '',_width = 0,tr_heigth = 45,other = '',config ={}; + $.each(this.file_header,function(key,item){ + if(item == 'auto'){ + auto_num ++; + config[key] = 0; + }else{ + width += item; + css += '.'+key+'{width:'+ (key != 'file_operation'?item:item - 16) +'px !important;}'; + } + }); + if(this.is_mobile) $('.file_operation.file_th').attr('style','margin-right:-10px !important;'); + if((this.file_list.length * tr_heigth) > $('.file_list_content').height()){ + config['file_tr'] = file_header_width - (this.is_mobile?0:this.scroll_width); + file_header_width = file_header_width; + other += '.file_td.file_operation{width:'+ (this.file_header['file_operation'] - (this.is_mobile?0:this.scroll_width) - 10) +'px !important;}'; + other += '.file_th.file_operation{padding-right:'+ (10 + (this.is_mobile?0:this.scroll_width)) +'px !important}'; + }else{ + file_header_width = file_header_width; + config['file_tr'] = file_header_width; + if(this.is_mobile) other += '.file_td.file_operation{width:' + (this.file_header['file_operation'] -20) +'px !important;}'; + } + config['file_list_header'] = file_header_width; + auto_all_width = file_header_width - width; + _width = auto_all_width / auto_num; + $.each(config,function(key,item){ + css += '.'+ key +'{width:'+ (item == 0?_width:item) +'px !important;}'; + }); + $('#file_list_info').html(css + other); + }, + + /** + * @description 渲染路径列表 + * @param {Function} callback 回调函数 + * @return void + */ + render_path_list: function (callback){ + var that = this,html = '
      ', path_before = '',dir_list = this.file_path.split("/").splice(1),first_dir = this.file_path.split("/")[0]; + if(bt.os === 'Windows'){ + if(dir_list.length == 0) dir_list = []; + dir_list.unshift('Local disk ('+ first_dir +')'); + }else{ + if(this.file_path == '/') dir_list = []; + dir_list.unshift('Root dir'); + } + for(var i = 0; i < dir_list.length; i++){ + path_before += '/' + dir_list[i]; + if (i == 0) path_before = '/'; + html += '
      \ + ' + dir_list[i] + '\ + \ + \ +
      '; + } + $('.path_input').val('').attr('data-path',this.file_path); + var file_dir_view = $('.file_path_input .file_dir_view'); + file_dir_view.html(html); + file_dir_view.attr('data-width',file_dir_view.width()); + that.set_dir_view_resize.delay(that,100); + }, + + /** + * @description 渲染路径下拉列表 + * @param {Object} el Dom选择器 + * @param {String} path 路径 + * @param {Function} callback 回调函数 + */ + render_path_down_list: function (el, path, callback) { + var that = this,_html = '',next_path = $(el).parent().next().find('.file_dir').attr('title'); + this.get_dir_list({ + path: path + }, function (res) { + $.each(that.data_reconstruction(res.DIR),function(index,item){ + var _path = (path != '/' ? path : '') + '/' + item.filename; + _html += '
    • ' + item.filename + '
    • '; + }); + $(el).html(_html); + }); + }, + + /** + * @description 渲染文件列表 + * @param {Object} data 参数对象,例如分页、显示数量、排序,不传参数使用默认或继承参数 + * @param {Function} callback 回调函数 + * @return void + */ + 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'); + if(isPaste != 'null' && isPaste != undefined){//判断是否显示粘贴 + $('.file_nav_view .file_all_paste').removeClass('hide'); + }else{ + $('.file_nav_view .file_all_paste').addClass('hide'); + } + $('.file_table_view').removeClass('.list_view,.icon_view').addClass(model == 'list'?'list_view':'icon_view'); + $('.cut_view_model:nth-child('+(model == 'list'?'2':'1')+')').addClass('active').siblings().removeClass('active'); + this.file_images_list = []; + this.get_dir_list(data,function(res){ + if(res.status === false && 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); + if(data.is_operating && that.file_operating[that.file_pointer] != res.PATH){ + next_path = that.file_operating[that.file_pointer + 1]; + if(typeof next_path != "undefined" && 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() //设置表格头部宽度 + if(callback) callback(res); + }); + }); + }, + /** + * @descripttion 重组数据结构 + * @param {Number} data 数据 + * @param {String} type 类型 + * @return: 返回重组后的数据 + */ + 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'] + ]; + if(data.length < 1) return []; + $.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; + break; + } + if(itemD[0].indexOf('Recycle_bin') != -1) fileMsg = lan.files.swap_file; + if(itemD[0].indexOf('.upload.tmp') != -1) fileMsg = lan.files.recycle_bin_dir; + for(var i=0;i 0){ + $.each(this.file_store_list,function(index,item){ + html += '
    • ' + +'' + +''+item['name']+'' + +'
    • ' + }) + html+='
    • Management
    • ' + }else{html = '
    • (Empty)
    • '} + + $('.favorites_file_path .nav_down_list').html(html) + }, + /** + * @descripttion 收藏夹目录视图 + * @return: 无返回值 + */ + set_favorites_manage:function(){ + var that = this; + layer.open({ + type:1, + title: "Manage Favorites", + area: ['850px','580px'], + closeBtn: 2, + shift: 5, + shadeClose: false, + content: "
      \ +
      \ + \ + \ + \ +
      PathOpt
      ", + success: function(layers) { + that.render_favorites_type_list(); + setTimeout(function(){ +                 $(layers).css('top',($(window).height() - $(layers).height()) /2); +             },50) + + }, + cancel:function(){ + that.reader_file_list({path:that.file_path}) + } + }) + }, + /** + * @description 渲染收藏夹分类列表 + * @return void + */ + render_favorites_type_list:function(){ + var _detail = ''; + this.$http('get_files_store',function(rdata){ + if(rdata.length > 0){ + $.each(rdata,function(ind,item){ + _detail += '' + +''+item['path']+'' + +'' + +'Del' + +'' + +'' + }) + }else{ + _detail = 'No favorites' + } + $('.favorites_body').html(_detail); + if(jQuery.prototype.fixedThead){ + $('.stroe_tab_list .divtable').fixedThead({resize:false}); + }else{ + $('.stroe_tab_list .divtable').css({'overflow':'auto'}); + } + }) + }, + /** + * @description 重新获取收藏夹列表 + * @return void + */ + load_favorites_index_list:function(){ + var that = this; + this.$http('get_files_store',function(rdata){ + that.file_store_list = rdata; + that.render_favorites_list() + }) + }, + /** + * @description 删除收藏夹 + * @param {String} path 文件路径 + * @return void + */ + del_favorites:function(path){ + var that = this + layer.confirm('Comfirm delete path【'+path+'】?', { title: 'Delete favorites', closeBtn: 2, icon: 3 }, function (index) { + that.$http('del_files_store',{path:path},function(res){ + if(res.status){ + that.render_favorites_type_list(); + } + layer.msg(res.msg,{icon:res.status?1:2}) + }) + }) + }, + /** + * @description 渲染文件列表内容 + * @param {Object} data 文件列表数据 + * @param {Function} callback 回调函数 + * @return void + */ + reader_file_list_content:function(data,callback){ + var _html = '',that = this,is_dir_num = 0,images_num = 0; + $.each(data,function(index,item){ + var _title = item.filename,only_id = bt.get_random(10),path = (that.file_path +'/'+ item.filename).replace('//','/'),is_compress = that.determine_file_type(item.ext,'compress'),is_editor_tips = (function(){ + var _openTitle = 'open'; + switch(that.determine_file_type(item.ext)){ + case 'images': + _openTitle = 'Preview'; + break; + case 'video': + _openTitle = 'Play'; + break; + default: + if(that.determine_file_type(item.ext) == 'compress'){ + _openTitle = ''; + }else{ + _openTitle = 'Edit'; + } + break; + } + item.type == 'dir'?_openTitle = 'Open':''; + return _openTitle; + }(item)); + that.file_list[index]['only_id'] = only_id; + _html += '
      '+ + '
      '+ + '
      '+ + '
      '+ + ''+ item.filename+item.soft_link +''+ (item.caret?'':'') + (item.down_id != 0?'':'') + + '
      '+ + '
      '+ (item.type == 'dir'?'directory':that.ext_type_tips(item.ext)) +'
      '+ + '
      ' + item.user +' / '+item.root_level + '
      '+ + '
      '+ (item.type == 'dir'?'Calculate':bt.format_size(item.size)) +'
      '+ + '
      ' + bt.format_data(item.mtime) + '
      '+ + '
      ' + (item.is_os_ps?item.ps:'') + '
      '+ + '
      '+ + ''+ is_editor_tips +' | '+ + 'Copy | '+ + 'Cut | '+ + 'Rename | '+ + 'PMSN | '+ + ''+ (is_compress?'Unzip':'Zip') +' | '+ + 'Del | '+ + 'More'+ + '
      '+ + '
      '; + if(item.type == 'dir') is_dir_num ++; + item.path = path; // 文件路径; + item.open_type = that.determine_file_type(item.ext); // 打开类型; + if(item.open_type == 'images'){ + item.images_id = images_num; + that.file_images_list.push(item.path); + images_num ++; + } + }); + $('.file_list_content').html(_html); + if(callback) callback({is_dir_num:is_dir_num}) + + that.clear_table_active(); // 清除表格选中内容 + }, + + /** + * @description 渲染文件磁盘列表 + * @return void + */ + render_file_disk_list:function(){ + var that = this,html = '',_li = ''; + that.get_disk_list(function(res){ + $.each(res,function(index,item){ + html += ''; + _li += '
    • '+(item.path == '/'?'Root dir':item.path)+' ('+ item.size[2] +')
    • ' + }); + $('.mount_disk_list').html('
      '+lan.files.mounted_disk+'
      '+html+'
      '); + that.set_menu_line_view_resize(); + }); + }, + + /** + * @description 渲染右键鼠标菜单 + * @param {Object} ev 事件event对象 + * @param {Object} el 事件对象DOM + * @return void + */ + render_file_groud_menu: function (ev,el){ + var that = this,index = $(el).data('index'),_openTitle = 'Open',data = that.file_list[index],config_group = [['open',_openTitle],['split',''],['download','Download'],['share','Share file/directory'],['cancel_share','Cancel share'],['favorites','Favorites file/directory'],['cancel_favorites','Cancel favorites'],['split',''],['dir_kill','目录查杀'],['authority','Permission'],['split',''],['copy','Copy'],['shear','Cut'],['rename','Rename'],['del','Del'],['split',''],['compress','Compress'],['unzip','Decompress']],compression = ['zip','rar','gz','war','tgz','bz2'],offsetNum = 0; + // 文件类型判断 + switch(that.determine_file_type(data.ext)){ + case 'images': + _openTitle = 'Preview'; + break; + case 'video': + _openTitle = 'Play'; + break; + default: + _openTitle = 'Edit'; + break; + } + config_group[0][1] = (data.type == 'dir'?'Open':_openTitle); + if(data.type == 'dir'){ // 判断是否为目录,目录不可下载 + config_group.splice(2,1); + offsetNum ++; + } + if(data.open_type == 'compress'){ //判断是否为压缩类型,不可编辑 + config_group.splice(0,2); + offsetNum = offsetNum + 2; + } + if(data.down_id != 0){ //判断是否分享 + config_group.splice(3-offsetNum,1); + offsetNum ++; + }else{ + config_group.splice(4-offsetNum,1); + config_group[3-offsetNum][1] = (data.type == 'dir'?'Share directory':'Share file'); + offsetNum ++; + } + if(data.caret !== false){ // 判断是否收藏 + config_group.splice((5-offsetNum),1); + offsetNum ++; + }else{ + config_group.splice((6-offsetNum),1); + config_group[5-offsetNum][1] = (data.type == 'dir'?'Favorites directory':'Favorites file'); + offsetNum ++; + } + //if(data.ext == 'php') config_group[8-offsetNum][1] = '文件查杀'; + //if(data.ext != 'php' && data.type != 'dir'){ // 判断是否为php,非php文件(排除目录)无法扫描 + config_group.splice((8-offsetNum),1); + offsetNum ++; + //} + var num = 0; + $.each(compression,function(index,item){ + if(item == data.ext) num ++; + }); + if(num == 0){ + config_group.splice((17-offsetNum),1); + offsetNum ++; + } + if(data.filename.indexOf('/') == -1 || data.type != 'dir'){ + config_group.splice((18-offsetNum),1); + offsetNum ++; + } + that.file_selection_operating = config_group; + that.reader_menu_list({el:$('.selection_right_menu'),ev:ev,data:data,list:config_group}); + }, + + /** + * @description 渲染右键全局菜单 + * @param {Object} ev 事件event对象 + * @param {Object} el 事件对象DOM + * @return void + */ + render_file_all_menu:function (ev,el) { + var that = this,config_group = [['refresh','Refresh'],['split',''],['upload','Upload'],['create','New file/directory',[['create_dir','New directory'],['create_files','New file']]],['web_shell','Terminal'],['split',''],['paste','Paste']],offsetNum = 0,isPaste = bt.get_cookie('record_paste_type'); + if( isPaste == 'null' || isPaste == undefined){ + config_group.splice(5,2); + offsetNum ++; + } + that.reader_menu_list({el:$('.selection_right_menu'),ev:ev,data:{},list:config_group}); + }, + /** + * @descripttion 文件多选时菜单 + * @param {Object} ev 事件event对象 + * @return: 无返回值 + */ + render_files_multi_menu:function(ev){ + var that = this,config_group =[['copy','Copy'],['shear','cut'],['authority','Permission'],['compress','Compress'],['del','Delete']],el = $('.selection_right_menu').find('ul'),el_height = el.height(),el_width = el.width(),left = ev.clientX - ((this.area[0] - ev.clientX) < el_width?el_width:0); + el.empty(); + $.each(config_group,function(index,mitem){ + var $children = null; + if(mitem[0] == 'split'){ + el.append('
    • '); + }else{ + el.append($('
    • '+ mitem[1] +'
    • ').append($children).on('click',{type:mitem[0],data:that.file_table_arry},function(ev){ + $('.selection_right_menu').removeAttr('style'); + that.batch_file_manage(ev.data.type); + ev.stopPropagation(); + ev.preventDefault(); + })); + } + }); + $('.selection_right_menu').css({ + left: left, + top: ev.clientY - ((this.area[1] - ev.clientY) < el_height?el_height:0) + }).removeClass('left_menu right_menu').addClass(this.area[0] - (left + el_width) < 230?'left_menu':'right_menu'); + $(document).one('click',function(e){ + $(ev.currentTarget).removeClass('selected'); + $('.selection_right_menu').removeAttr('style'); + e.stopPropagation(); + e.preventDefault(); + }); }, - to_size: function (a) { - var d = [" B", " KB", " MB", " GB", " TB", " PB"]; - var e = 1024; - for (var b = 0; b < d.length; b += 1) { - if (a < e) { - var num = (b === 0 ? a : a.toFixed(2)) + d[b]; - return (!isNaN((b === 0 ? a : a.toFixed(2))) && typeof num != 'undefined')?num:'0B'; - } - a /= e - } - } -} -function IsDiskWidth() { - var comlistWidth = $("#comlist").width(); - var bodyWidth = $(".file-box").width(); - if (comlistWidth + 530 > bodyWidth) { - $("#comlist").css({ - "width": bodyWidth - 530 + "px", - "height": "34px", - "overflow": "auto" - }); - } else { - $("#comlist").removeAttr("style"); - } -} - -function Recycle_bin(type) { - $.post('/files?action=Get_Recycle_bin', '', function (rdata) { - var body = ''; - switch (type) { - case 1: - for (var i = 0; i < rdata.dirs.length; i++) { - var shortwebname = rdata.dirs[i].name.replace(/'/, "\\'"); - var shortpath = rdata.dirs[i].dname; - if (shortwebname.length > 20) shortwebname = shortwebname.substring(0, 20) + "..."; - if (shortpath.length > 20) shortpath = shortpath.substring(0, 20) + "..."; - body += '\ - ' + shortwebname + '\ - ' + shortpath + '\ - ' + ToSize(rdata.dirs[i].size) + '\ - ' + getLocalTime(rdata.dirs[i].time) + '\ - \ - ' + lan.files.recycle_bin_re + '\ - | ' + lan.files.recycle_bin_del + '\ - \ - '; - } - for (var i = 0; i < rdata.files.length; i++) { - if (rdata.files[i].name.indexOf('BTDB_') != -1) { - var shortwebname = rdata.files[i].name.replace(/'/, "\\'"); - var shortpath = rdata.files[i].dname; - if (shortwebname.length > 20) shortwebname = shortwebname.substring(0, 20) + "..."; - if (shortpath.length > 20) shortpath = shortpath.substring(0, 20) + "..."; - body += '\ - ' + shortwebname.replace('BTDB_', '') + '\ - mysql://' + shortpath.replace('BTDB_', '') + '\ - -\ - ' + getLocalTime(rdata.files[i].time) + '\ - \ - ' + lan.files.recycle_bin_re + '\ - | ' + lan.files.recycle_bin_del + '\ - \ - ' - - continue; - } - var shortwebname = rdata.files[i].name.replace(/'/, "\\'"); - var shortpath = rdata.files[i].dname; - if (shortwebname.length > 20) shortwebname = shortwebname.substring(0, 20) + "..."; - if (shortpath.length > 20) shortpath = shortpath.substring(0, 20) + "..."; - body += '\ - ' + shortwebname + '\ - ' + shortpath + '\ - ' + ToSize(rdata.files[i].size) + '\ - ' + getLocalTime(rdata.files[i].time) + '\ - \ - ' + lan.files.recycle_bin_re + '\ - | ' + lan.files.recycle_bin_del + '\ - \ - ' - } - $("#RecycleBody").html(body); - return; - break; - case 2: - for (var i = 0; i < rdata.dirs.length; i++) { - var shortwebname = rdata.dirs[i].name.replace(/'/, "\\'"); - var shortpath = rdata.dirs[i].dname; - if (shortwebname.length > 20) shortwebname = shortwebname.substring(0, 20) + "..."; - if (shortpath.length > 20) shortpath = shortpath.substring(0, 20) + "..."; - body += '\ - ' + shortwebname + '\ - ' + shortpath + '\ - ' + ToSize(rdata.dirs[i].size) + '\ - ' + getLocalTime(rdata.dirs[i].time) + '\ - \ - ' + lan.files.recycle_bin_re + '\ - | ' + lan.files.recycle_bin_del + '\ - \ - ' - } - $("#RecycleBody").html(body); - return; - break; - case 3: - for (var i = 0; i < rdata.files.length; i++) { - if (rdata.files[i].name.indexOf('BTDB_') != -1) continue; - var shortwebname = rdata.files[i].name.replace(/'/, "\\'"); - var shortpath = rdata.files[i].dname; - if (shortwebname.length > 20) shortwebname = shortwebname.substring(0, 20) + "..."; - if (shortpath.length > 20) shortpath = shortpath.substring(0, 20) + "..."; - body += '\ - ' + shortwebname + '\ - ' + shortpath + '\ - ' + ToSize(rdata.files[i].size) + '\ - ' + getLocalTime(rdata.files[i].time) + '\ - \ - ' + lan.files.recycle_bin_re + '\ - | ' + lan.files.recycle_bin_del + '\ - \ - ' - } - $("#RecycleBody").html(body); - return; - break; - case 4: - for (var i = 0; i < rdata.files.length; i++) { - if (ReisImage(getFileName(rdata.files[i].name))) { - var shortwebname = rdata.files[i].name.replace(/'/, "\\'"); - var shortpath = rdata.files[i].dname; - if (shortwebname.length > 20) shortwebname = shortwebname.substring(0, 20) + "..."; - if (shortpath.length > 20) shortpath = shortpath.substring(0, 20) + "..."; - body += '\ - ' + shortwebname + '\ - ' + shortpath + '\ - ' + ToSize(rdata.files[i].size) + '\ - ' + getLocalTime(rdata.files[i].time) + '\ - \ - ' + lan.files.recycle_bin_re + '\ - | ' + lan.files.recycle_bin_del + '\ - \ - ' - } - } - $("#RecycleBody").html(body); - return; - break; - case 5: - for (var i = 0; i < rdata.files.length; i++) { - if (rdata.files[i].name.indexOf('BTDB_') != -1) continue; - if (!(ReisImage(getFileName(rdata.files[i].name)))) { - var shortwebname = rdata.files[i].name.replace(/'/, "\\'"); - var shortpath = rdata.files[i].dname; - if (shortwebname.length > 20) shortwebname = shortwebname.substring(0, 20) + "..."; - if (shortpath.length > 20) shortpath = shortpath.substring(0, 20) + "..."; - body += '\ - ' + shortwebname + '\ - ' + shortpath + '\ - ' + ToSize(rdata.files[i].size) + '\ - ' + getLocalTime(rdata.files[i].time) + '\ - \ - ' + lan.files.recycle_bin_re + '\ - | ' + lan.files.recycle_bin_del + '\ - \ - ' - } - } - $("#RecycleBody").html(body); - return; - case 6: - for (var i = 0; i < rdata.files.length; i++) { - if (rdata.files[i].name.indexOf('BTDB_') != -1) { - var shortwebname = rdata.files[i].name.replace(/'/, "\\'"); - var shortpath = rdata.files[i].dname; - if (shortwebname.length > 20) shortwebname = shortwebname.substring(0, 20) + "..."; - if (shortpath.length > 20) shortpath = shortpath.substring(0, 20) + "..."; - body += '\ - ' + shortwebname.replace('BTDB_', '') + '\ - mysql://' + shortpath.replace('BTDB_', '') + '\ - -\ - ' + getLocalTime(rdata.files[i].time) + '\ - \ - ' + lan.files.recycle_bin_re + '\ - | ' + lan.files.recycle_bin_del + '\ - \ - ' - } - } - $("#RecycleBody").html(body); - return; - break; - } - - - var tablehtml = '
      \ -
      \ - ' + lan.files.recycle_bin_on + '\ -
      \ - \ - \ -
      \ - ' + lan.files.recycle_bin_on_db + '\ -
      \ - \ - \ -
      \ -
      \ - ' + lan.files.recycle_bin_ps + '\ - \ -
      \ -
      \ -
      \ -

      ' + lan.files.recycle_bin_type1 + '

      \ -

      ' + lan.files.recycle_bin_type2 + '

      \ -

      ' + lan.files.recycle_bin_type3 + '

      \ -

      ' + lan.files.recycle_bin_type4 + '

      \ -

      ' + lan.files.recycle_bin_type5 + '

      \ -

      ' + lan.files.recycle_bin_type6 + '

      \ -
      \ -
      \ -
      \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - ' + body + '\ -
      ' + lan.files.recycle_bin_th1 + '' + lan.files.recycle_bin_th2 + '' + lan.files.recycle_bin_th3 + '' + lan.files.recycle_bin_th4 + '' + lan.files.recycle_bin_th5 + '
      '; - if (type == "open") { - layer.open({ - type: 1, - shift: 5, - closeBtn: 2, - area: ['80%', '606px'], - title: lan.files.recycle_bin_title, - content: tablehtml - }); - - if (window.location.href.indexOf("database") != -1) { - Recycle_bin(6); - $(".re-con-menu p:last-child").addClass("on").siblings().removeClass("on"); - } else { - Recycle_bin(1); - } - } - $(".re-con-menu p").click(function () { - $(this).addClass("on").siblings().removeClass("on"); - }) - }); -} - -function getFileName(name) { - var text = name.split("."); - var n = text.length - 1; - text = text[n]; - return text; -} - -function ReisImage(fileName) { - var exts = ['jpg', 'jpeg', 'png', 'bmp', 'gif', 'tiff', 'ico']; - for (var i = 0; i < exts.length; i++) { - if (fileName == exts[i]) return true - } - return false; -} - -function ReRecycleBin(path, obj) { - layer.confirm(lan.files.recycle_bin_re_msg, { - title: lan.files.recycle_bin_re_title, - closeBtn: 2, - icon: 3 - }, function () { - var loadT = layer.msg(lan.files.recycle_bin_re_the, { - icon: 16, - time: 0, - shade: [0.3, '#000'] - }); - $.post('/files?action=Re_Recycle_bin', 'path=' + encodeURIComponent(path), function (rdata) { - layer.close(loadT); - layer.msg(rdata.msg, { - icon: rdata.status ? 1 : 5 - }); - $(obj).parents('tr').remove(); - }); - }); -} - -function DelRecycleBin(path, obj) { - layer.confirm(lan.files.recycle_bin_del_msg, { - title: lan.files.recycle_bin_del_title, - closeBtn: 2, - icon: 3 - }, function () { - var loadT = layer.msg(lan.files.recycle_bin_del_the, { - icon: 16, - time: 0, - shade: [0.3, '#000'] - }); - $.post('/files?action=Del_Recycle_bin', 'path=' + encodeURIComponent(path), function (rdata) { - layer.close(loadT); - layer.msg(rdata.msg, { - icon: rdata.status ? 1 : 5 - }); - $(obj).parents('tr').remove(); - }); - }); -} - -function CloseRecycleBin() { - layer.confirm(lan.files.recycle_bin_close_msg, { - title: lan.files.recycle_bin_close, - closeBtn: 2, - icon: 3 - }, function () { - var loadT = layer.msg("
      " + lan.files.recycle_bin_close_the + "
      ", { - icon: 16, - time: 0, - shade: [0.3, '#000'] - }); - setTimeout(function () { - getSpeed('.myspeed'); - }, 1000); - $.post('/files?action=Close_Recycle_bin', '', function (rdata) { - layer.close(loadT); - layer.msg(rdata.msg, { - icon: rdata.status ? 1 : 5 - }); - $("#RecycleBody").html(''); - }); - }); -} - -function Set_Recycle_bin(db) { - var loadT = layer.msg(lan.public.the, { - icon: 16, - time: 0, - shade: [0.3, '#000'] - }); - var data = {} - if (db == 1) { - data = { - db: db - }; - } - $.post('/files?action=Recycle_bin', data, function (rdata) { - layer.close(loadT); - layer.msg(rdata.msg, { - icon: rdata.status ? 1 : 5 - }); - }); -} - -function get_path_size(path) { - var loadT = layer.msg(lan.files.calc_size, { - icon: 16, - time: 0, - shade: [0.3, '#000'] - }); - $.post('/files?action=get_path_size', { - path: path - }, function (rdata) { - layer.close(loadT); - var myclass = '.' + rdata.path.replace(/[^\w]/g, '-'); - $(myclass).text(ToSize(rdata.size)); - }); -} - - -function path_check(path) { - if (path == '/') return path; - path = path.replace(/[\/]{2,}/g, '/'); - path = path.replace(/[\/]+$/g, ''); - return path; -} - -function GetFiles(Path, sort) { - var searchtype = Path; - var p = '1'; - if (!isNaN(Path)) { - p = Path; - Path = getCookie('Path'); - } - - Path = path_check(Path); - - var data = {}; - var search = ''; - var searchV = $("#SearchValue").val(); - if (searchV.length > 0 && searchtype == "1") { - data['search'] = searchV; - if ($("#search_all")[0].checked) { - data['all'] = 'True' - } - } - - var old_scroll_top = 0; - if (getCookie('Path') === Path) { - old_scroll_top = $(".oldTable").scrollTop(); - } - - var sorted = ''; - var reverse = ''; - if (!sort) { - sort = getCookie('files_sort'); - reverse = getCookie(sort + '_reverse'); - } else { - reverse = getCookie(sort + '_reverse'); - if (reverse === 'True') { - reverse = 'False'; - } else { - reverse = 'True'; - } - } - if (sort) { - data['sort'] = sort; - data['reverse'] = reverse; - setCookie(sort + '_reverse', reverse); - setCookie('files_sort', sort); - } - - - var showRow = getCookie('showRow'); - if (!showRow) showRow = '200'; - var Body = ''; - data['path'] = Path; - - - if (searchV) { - var loadT = layer.msg(lan.files.search_now, { - icon: 16, - time: 0, - shade: [0.3, '#000'] - }); - } - var totalSize = 0; - $.post('/files?action=GetDir&tojs=GetFiles&p=' + p + '&showRow=' + showRow + search, data, function (rdata) { - if (searchV) layer.close(loadT); - if (rdata.status === false) { - layer.msg(rdata.msg, { - icon: 2 - }); - return; - } - - var rows = ['10', '50', '100', '200', '500', '1000', '2000']; - var rowOption = ''; - for (var i = 0; i < rows.length; i++) { - var rowSelected = ''; - if (showRow == rows[i]) rowSelected = 'selected'; - rowOption += ''; - } - - $("#filePage").html(rdata.PAGE); - $("#filePage div").append("" + lan.files.per_page + "" + lan.files.piece + ""); - $("#filePage .Pcount").css("left", "16px"); - if (rdata.DIR == null) rdata.DIR = []; - for (var i = 0; i < rdata.DIR.length; i++) { - var fmp = rdata.DIR[i].split(";"); - var cnametext = fmp[0] + fmp[5]; - fmp[0] = fmp[0].replace(/'/, "\\'"); - if (cnametext.length > 20) { - cnametext = cnametext.substring(0, 20) + '...' - } - if (isChineseChar(cnametext)) { - if (cnametext.length > 10) { - cnametext = cnametext.substring(0, 10) + '...' - } - } - var fileMsg = ''; - if (fmp[0].indexOf('Recycle_bin') != -1) { - fileMsg = 'PS: Recycle Bin directory, Do not operate'; - } - if (fileMsg != '') { - fileMsg = '' + fileMsg + ''; - } - var timetext = '--'; - //" + lan.files.dir_menu_webshell + " |---在下一行的 - if (getCookie("rank") == "a") { - $("#set_list").addClass("active"); - $("#set_icon").removeClass("active"); - //if (rdata.PATH=='/') rdata.PATH = ''; - Body += "\ - \ - " + cnametext + fileMsg + "\ - " + lan.files.calc_click + "\ - " + getLocalTime(fmp[2]) + "\ - " + fmp[3] + "\ - " + fmp[4] + "\ - \ - " + lan.files.file_menu_copy + " | \ - " + lan.files.file_menu_mv + " | \ - " + lan.files.file_menu_rename + " | \ - " + lan.files.file_menu_auth + " | \ - " + lan.files.file_menu_zip + " | \ - " + lan.files.file_menu_del + "\ - "; - } else { - $("#set_icon").addClass("active"); - $("#set_list").removeClass("active"); - Body += ""; - } - } - for (var i = 0; i < rdata.FILES.length; i++) { - if (rdata.FILES[i] == null) continue; - var fmp = rdata.FILES[i].split(";"); - var displayZip = isZip(fmp[0]); - var bodyZip = ''; - var download = ''; - var file_webshell = ''; - var cnametext = fmp[0] + fmp[5]; - fmp[0] = fmp[0].replace(/'/, "\\'"); - if (cnametext.length > 48) { - cnametext = cnametext.substring(0, 48) + '...' - } - if (isChineseChar(cnametext)) { - if (cnametext.length > 16) { - cnametext = cnametext.substring(0, 16) + '...' - } - } - if (isPhp(fmp[0])) { - file_webshell = "" + lan.files.file_menu_webshell + " | "; - } - if (displayZip != -1) { - bodyZip = "" + lan.files.file_menu_unzip + " | "; - } - if (isText(fmp[0])) { - bodyZip = "" + lan.files.file_menu_edit + " | "; - } - if (isVideo(fmp[0])) { - bodyZip = "Play | "; - } - if (isImage(fmp[0])) { - download = "" + lan.files.file_menu_img + " | "; - } else { - download = "" + lan.files.file_menu_down + " | "; - } - - totalSize += parseInt(fmp[1]); - if (getCookie("rank") == "a") { - var fileMsg = ''; - switch (fmp[0]) { - case '.user.ini': - fileMsg = lan.files.ps_php; - break; - case '.htaccess': - fileMsg = lan.files.ps_ap; - break; - case 'swap': - fileMsg = lan.files.ps_swap; - break; - } - - if (fmp[0].indexOf('.upload.tmp') != -1) { - fileMsg = lan.files.upload_files_tips1; - } - - if (fileMsg != '') { - fileMsg = '' + fileMsg + ''; - } - Body += "\ - " + cnametext + fileMsg + "\ - " + (ToSize(fmp[1])) + "\ - " + ((fmp[2].length > 11) ? fmp[2] : getLocalTime(fmp[2])) + "\ - " + fmp[3] + "\ - " + fmp[4] + "\ - \ - " + lan.files.file_menu_copy + " | \ - " + lan.files.file_menu_mv + " | \ - " + lan.files.file_menu_rename + " | \ - " + lan.files.file_menu_auth + " | \ - " + lan.files.file_menu_zip + " | \ - " + bodyZip + download + "\ - " + lan.files.file_menu_del + "\ - "; - } else { - Body += ""; - } - } - var dirInfo = '(' + lan.files.get_size.replace('{1}', rdata.DIR.length + '').replace('{2}', rdata.FILES.length + '') + '' + lan.files.get + ')'; - $("#DirInfo").html(dirInfo); - if (getCookie("rank") === "a") { - var sort_icon = ''; - var tablehtml = '\ -
      \ -
      '; - $("#fileCon").removeClass("fileList").html(tablehtml); - $("#tipTools").width($("#fileCon")[0].clientWidth - 30); - } else { - $("#fileCon").addClass("fileList").html(Body); - $("#tipTools").width($("#fileCon")[0].clientWidth - 30); - } - $("#DirPathPlace input").val(rdata.PATH); - fileDrop.init(); - var BarTools = '
      \ - \ - \ -
      '; - if (rdata.PATH != '/') { - BarTools += ' '; - } - setCookie('Path', rdata.PATH); - BarTools += ' '; - - - //收藏夹 - var shtml = '
      \ - \ -
      ' - - BarTools += shtml; - - var copyName = getCookie('copyFileName'); - var cutName = getCookie('cutFileName'); - var isPaste = (copyName == 'null') ? cutName : copyName; - if (isPaste != 'null' && isPaste != undefined) { - BarTools += ' '; - } - - $("#Batch").html(''); - var BatchTools = ''; - var isBatch = getCookie('BatchSelected'); - if (isBatch == 1 || isBatch == '1') { - BatchTools += ' '; - } - $("#Batch").html(BatchTools); - $("#setBox").prop("checked", false); - - $("#BarTools").html(BarTools); - $(".oldTable").scrollTop(old_scroll_top); - $("input[name=id]").click(function () { - if ($(this).prop("checked")) { - $(this).prop("checked", true); - $(this).parents("tr").addClass("ui-selected"); - } else { - $(this).prop("checked", false); - $(this).parents("tr").removeClass("ui-selected"); - } - showSeclect() - }); - - // // 鼠标移入移出事件 - // $('.file-types').hover(function () { - // // 鼠标移入时添加hover类 - // $('.dropdown-menu-li').hide(); - // $(this).find('.dropdown-menu-li').show(); - - // }, function () { - // $('.dropdown-menu-li').hide(); - // // 鼠标移出时移出hover类 - - // }); - - $("#setBox").click(function () { - if ($(this).prop("checked")) { - $("input[name=id]").prop("checked", true); - $("#filesBody > tr").addClass("ui-selected"); - - } else { - $("input[name=id]").prop("checked", false); - $("#filesBody > tr").removeClass("ui-selected"); - } - showSeclect(); - }); - - $("#filesBody .btlink").click(function (e) { - e.stopPropagation(); - }); - $("input[name=id]").dblclick(function (e) { - e.stopPropagation(); - }); - $("#filesBody").bind("contextmenu", function (e) { - return false; - }); - bindselect(); - $("#filesBody").mousedown(function (e) { - var count = totalFile(); - if (e.which == 3) { - if (count > 1) { - RClickAll(e); - } else { - return - } - } - }); - $(".folderBox,.folderBoxTr").mousedown(function (e) { - var count = totalFile(); - if (e.which == 3) { - if (count <= 1) { - var a = $(this); - a.contextify(RClick(a.attr("filetype"), a.attr("data-path"), a.find("input").val(), rdata,a.attr('fileshare'),a.attr('data-composer'))); - $(this).find('input').prop("checked", true); - $(this).addClass('ui-selected'); - $(this).siblings().removeClass('ui-selected').find('input').prop("checked", false); - } - else { - RClickAll(e); - } - } - }); - $(".showRow").change(function () { - setCookie('showRow', $(this).val()); - GetFiles(p); - }); - PathPlaceBtn(rdata.PATH); - auto_table_width(); - }); -} - -function webshell_dir(path) { - layer.confirm('Directory scan will include php files in subdirectories, whether to operate?', { - title: lan.files.dir_menu_webshell, - closeBtn: 2, - icon: 3 - }, function (index) { - layer.msg(lan.public.the, { - icon: 16, - time: 0, - shade: [0.3, '#000'] - }); - $.post('/files?action=dir_webshell_check', 'path=' + path, function (rdata) { - layer.close(index); - layer.msg(rdata.msg, { - icon: rdata.status ? 1 : 2 - }); - }); - }); -} - -function php_file_webshell(file) { - var loadT = layer.msg('Scanning files, please wait ...', { - icon: 16, - time: 0, - shade: [0.3, '#000'] - }); - $.post('/files?action=file_webshell_check', 'filename=' + file, function (rdata) { - layer.close(loadT); - layer.msg(rdata.msg, { - icon: rdata.status ? 1 : 2 - }); - }) -} - -function auto_table_width() { - var oldTable = $(window).height() - $('#tipTools')[0].getBoundingClientRect().height - $('#filePage')[0].getBoundingClientRect().height - $('.footer')[0].getBoundingClientRect().height - 111; - var oldTable_heigth = $('.oldTable table').height(); - $('.oldTable thead th').each(function (index, el) { - var table_th = $('.oldTable thead th').length; - $('.newTable thead th').eq(index).attr('width', el.offsetWidth); - if (index == (table_th - 1)) $('.newTable thead th').eq(table_th).attr('width', '10').css('padding', '0'); - }); - if (oldTable_heigth > oldTable) { - $('.oldTableShadow,.newTableShadow').show(); - $('.oldTable').css('marginTop', '0') - } else { - $('.oldTableShadow,.newTableShadow').hide(); - $('.oldTable').css('marginTop', '0') - } - $('.oldTable').height(oldTable); - $('.oldTable table').css({ - 'marginTop': '-36px' - }) - -} - - -function totalFile() { - var el = $("input[name='id']"); - var len = el.length; - var count = 0; - for (var i = 0; i < len; i++) { - if (el[i].checked == true) { - count++; - } - } - return count; -} - -function bindselect() { - $("#filesBody").selectable({ - autoRefresh: false, - filter: "tr,.folderBox", - cancel: "a,span,input,.ico-folder", - selecting: function (e) { - $(".ui-selecting").find("input").prop("checked", true); - showSeclect(); - }, - selected: function (e) { - $(".ui-selectee").find("input").prop("checked", false); - $(".ui-selected", this).each(function () { - $(this).find("input").prop("checked", true); - showSeclect(); - }); - }, - unselecting: function (e) { - $(".ui-selectee").find("input").prop("checked", false); - $(".ui-selecting").find("input").prop("checked", true); - showSeclect(); - $("#rmenu").hide() - } - }); - $("#filesBody").selectable("refresh"); - $(".ico-folder").click(function () { - $(this).parent().addClass("ui-selected").siblings().removeClass("ui-selected"); - $(".ui-selectee").find("input").prop("checked", false); - $(this).prev("input").prop("checked", true); - showSeclect(); - }) -} - -function showSeclect() { - var count = totalFile(); - var BatchTools = ''; - if (count > 1) { - BatchTools = '\ - \ - \ - \ - ' - $("#Batch").html(BatchTools); - } else { - $("#Batch").html(BatchTools); - } -} -$("#tipTools").width($(".file-box")[0].clientWidth - 30); -$("#PathPlaceBtn").width($(".file-box").width() - 700); -$("#DirPathPlace input").width($(".file-box").width() - 700); -if ($(window).width() < 1160) { - $("#PathPlaceBtn").width(290); -} -window.onresize = function () { - $("#tipTools").width($(".file-box")[0].clientWidth - 30); - $("#PathPlaceBtn").width($(".file-box").width() - 700); - $("#DirPathPlace input").width($(".file-box").width() - 700); - if ($(window).width() < 1160) { - $("#PathPlaceBtn,#DirPathPlace input").width(290); - } - PathLeft(); - IsDiskWidth() - auto_table_width(); -} - -function Batch(type, access) { - var path = $("#DirPathPlace input").val(); - var el = document.getElementsByTagName('input'); - var len = el.length; - var data = 'path=' + path + '&type=' + type; - var name = 'data'; - var datas = [] - - var oldType = getCookie('BatchPaste'); - - for (var i = 0; i < len; i++) { - if (el[i].checked == true && el[i].value != 'on') { - datas.push(el[i].value) - } - } - - data += "&data=" + encodeURIComponent(JSON.stringify(datas)) - - if (type == 3 && access == undefined) { - SetChmod(0, lan.files.all); - return; - } - - if (type < 3) setCookie('BatchSelected', '1'); - setCookie('BatchPaste', type); - - if (access == 1) { - var access = $("#access").val(); - var chown = $("#chown").val(); - var all = $("#accept_all").prop("checked") ? 'True' : 'False'; - data += '&access=' + access + '&user=' + chown + "&all=" + all; - layer.closeAll(); - } - if (type == 4) { - AllDeleteFileSub(data, path); - setCookie('BatchPaste', oldType); - return; - } - - if (type == 5) { - var names = ''; - for (var i = 0; i < len; i++) { - if (el[i].checked == true && el[i].value != 'on') { - names += el[i].value + ','; - } - } - Zip(names); - return; - } - if (type == 6) { - webshell_dir() - } - - myloadT = layer.msg("
      " + lan.public.the + "
      ", { - icon: 16, - time: 0, - shade: [0.3, '#000'] - }); - setTimeout(function () { - getSpeed('.myspeed'); - }, 1000); - $.post('/files?action=SetBatchData', data, function (rdata) { - layer.close(myloadT); - GetFiles(path); - layer.msg(rdata.msg, { - icon: 1 - }); - }); -} - -function BatchPaste() { - var path = $("#DirPathPlace input").val(); - var type = getCookie('BatchPaste'); - var data = 'type=' + type + '&path=' + path; - - $.post('/files?action=CheckExistsFiles', { - dfile: path - }, function (result) { - if (result.length > 0) { - var tbody = ''; - for (var i = 0; i < result.length; i++) { - tbody += '' + result[i].filename + '' + ToSize(result[i].size) + '' + getLocalTime(result[i].mtime) + ''; - } - var mbody = '
      \ - ' + tbody + '\ -
      ' + lan.files.file_name + '' + lan.files.file_size + '' + lan.files.last_edit_time + '
      '; - SafeMessage(lan.files.will_cover_this_file, mbody, function () { - BatchPasteTo(data, path); - }); - $(".layui-layer-page").css("width", "500px"); - } else { - BatchPasteTo(data, path); - } - }); -} - -function BatchPasteTo(data, path) { - myloadT = layer.msg("
      " + lan.public.the + "
      ", { - icon: 16, - time: 0, - shade: [0.3, '#000'] - }); - setTimeout(function () { - getSpeed('.myspeed'); - }, 1000); - $.post('files?action=BatchPaste', data, function (rdata) { - layer.close(myloadT); - setCookie('BatchSelected', null); - GetFiles(path); - layer.msg(rdata.msg, { - icon: 1 - }); - }); -} - -function GetExtName(fileName) { - var extArr = fileName.split("."); - var 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', 'flv', 'mkv', 'mov', 'mp3', 'mp4', 'mpeg', 'mpg', 'rm', 'rmvb', 'swf', 'wav', 'webm', 'wma', 'wmv', 'rtf', 'docx', 'fdf', 'potm', 'pptx', 'txt', 'xlsb', 'xlsx', '7z', 'cab', 'iso', 'bz2', 'rar', 'zip', 'gz', 'bt', 'file', 'apk', 'bookfolder', 'folder', 'folder-empty', 'folder-unempty', 'fromchromefolder', 'documentfolder', 'fromphonefolder', 'mix', 'musicfolder', 'picturefolder', 'videofolder', 'sefolder', 'access', 'mdb', 'accdb', 'sql', 'c', 'cpp', 'cs', 'js', 'fla', 'flv', 'htm', 'html', 'java', 'log', 'mht', 'php', 'url', 'xml', 'ai', 'bmp', 'cdr', 'gif', 'ico', 'jpeg', 'jpg', 'JPG', 'png', 'psd', 'webp', 'ape', 'avi', 'flv', 'mkv', 'mov', 'mp3', 'mp4', 'mpeg', 'mpg', 'rm', 'rmvb', 'swf', 'wav', 'webm', 'wma', 'wmv', 'doc', 'docm', 'dotx', 'dotm', 'dot', 'rtf', 'docx', 'pdf', 'fdf', 'ppt', 'pptm', 'pot', 'potm', 'pptx', 'txt', 'xls', 'csv', 'xlsm', 'xlsb', 'xlsx', '7z', 'gz', 'cab', 'iso', 'rar', 'zip', 'bt', 'file', 'apk', 'css']; - var extLastName = extArr[extArr.length - 1]; - for (var i = 0; i < exts.length; i++) { - if (exts[i] == extLastName) { - return exts[i]; - } - } - return 'file'; -} - -function ShowEditMenu() { - $("#filesBody > tr").hover(function () { - $(this).addClass("hover"); - }, function () { - $(this).removeClass("hover"); - }).click(function () { - $(this).addClass("on").siblings().removeClass("on"); - }) -} - -function GetFileName(fileNameFull) { - var pName = fileNameFull.split('/'); - return pName[pName.length - 1]; -} - -function GetDisk() { - var LBody = ''; - $.get('/system?action=GetDiskInfo', function (rdata) { - for (var i = 0; i < rdata.length; i++) { - LBody += " " + (rdata[i].path == '/' ? lan.files.path_root : rdata[i].path) + "(" + rdata[i].size[2] + ")"; - } - var trash = ' ' + lan.files.recycle_bin_title + ''; - var backups = ''; - $("#comlist").html(LBody + trash + backups); - IsDiskWidth(); - }); -} - -function BackDir() { - var str = $("#DirPathPlace input").val().replace('//', '/'); - if (str.substr(str.length - 1, 1) == '/') { - str = str.substr(0, str.length - 1); - } - var Path = str.split("/"); - var back = '/'; - if (Path.length > 2) { - var count = Path.length - 1; - for (var i = 0; i < count; i++) { - back += Path[i] + '/'; - } - if (back.substr(back.length - 1, 1) == '/') { - back = back.substr(0, back.length - 1); - } - GetFiles(back); - } else { - back += Path[0]; - GetFiles(back); - } - setTimeout('PathPlaceBtn(getCookie("Path"));', 200); -} - -function CreateFile(type, path) { - if (type == 1) { - var fileName = $("#newFileName").val(); - layer.msg(lan.public.the, { - icon: 16, - time: 10000 - }); - $.post('/files?action=CreateFile', 'path=' + encodeURIComponent(path + '/' + fileName), function (rdata) { - layer.close(getCookie('layers')); - layer.msg(rdata.msg, { - icon: rdata.status ? 1 : 2 - }); - if (rdata.status) { - GetFiles($("#DirPathPlace input").val()); - openEditorView(0, path + '/' + fileName); - } - }); - return; - } - var layers = layer.open({ - type: 1, - shift: 5, - closeBtn: 2, - area: '320px', - title: lan.files.new_empty_file, - content: '
      \ -
      \ - \ -
      \ -
      \ - \ - \ -
      \ -
      ', - success: function (layers, index) { - $('.layer_close').click(function () { - layer.close(index); - }); - } - }); - setCookie('layers', layers); - $("#newFileName").focus().keyup(function (e) { - if (e.keyCode == 13) $("#CreateFileBtn").click(); - }); -} - -function CreateDir(type, path) { - if (type == 1) { - var dirName = $("#newDirName").val(); - layer.msg(lan.public.the, { - icon: 16, - time: 10000 - }); - $.post('/files?action=CreateDir', 'path=' + encodeURIComponent(path + '/' + dirName), function (rdata) { - layer.close(getCookie('layers')); - layer.msg(rdata.msg, { - icon: rdata.status ? 1 : 2 - }); - GetFiles($("#DirPathPlace input").val()); - }); - return; - } - var layers = layer.open({ - type: 1, - shift: 5, - closeBtn: 2, - area: '320px', - title: lan.files.new_dir, - content: '
      \ -
      \ - \ -
      \ -
      \ - \ - \ -
      \ -
      ', - success: function (layers, index) { - $('.layer_close').click(function () { - layer.close(index); - }); - } - }); - setCookie('layers', layers); - $("#newDirName").focus().keyup(function (e) { - if (e.keyCode == 13) $("#CreateDirBtn").click(); - }); -} -// 删除文件 -function DeleteFile(fileName) { - layer.confirm(lan.get('recycle_bin_confirm', [fileName]), { - title: lan.files.del_file, - closeBtn: 2, - icon: 3 - }, function (index) { - layer.msg(lan.public.the, { - icon: 16, - time: 0, - shade: [0.3, '#000'] - }); - $.post('/files?action=DeleteFile', 'path=' + encodeURIComponent(fileName), function (rdata) { - layer.close(index); - layer.msg(rdata.msg, { - icon: rdata.status ? 1 : 2 - }); - GetFiles($("#DirPathPlace input").val()); - }); - }); -} - -function DeleteDir(dirName) { - layer.confirm(lan.get('recycle_bin_confirm_dir', [dirName]), { - title: lan.files.del_dir, - closeBtn: 2, - icon: 3 - }, function (index) { - layer.msg(lan.public.the, { - icon: 16, - time: 0, - shade: [0.3, '#000'] - }); - $.post('/files?action=DeleteDir', 'path=' + encodeURIComponent(dirName), function (rdata) { - layer.close(index); - layer.msg(rdata.msg, { - icon: rdata.status ? 1 : 2 - }); - GetFiles($("#DirPathPlace input").val()); - }); - }); -} - -function AllDeleteFileSub(data, path) { - layer.confirm(lan.files.del_all_msg, { - title: lan.files.del_all_file, - closeBtn: 2, - icon: 3 - }, function (index) { - layer.msg("
      " + lan.public.the + "
      ", { - icon: 16, - time: 0, - shade: [0.3, '#000'] - }); - setTimeout(function () { - getSpeed('.myspeed'); - }, 1000); - $.post('files?action=SetBatchData', data, function (rdata) { - layer.close(index); - GetFiles(path); - layer.msg(rdata.msg, { - icon: 1 - }); - }); - }); -} - -function ReloadFiles() { - setInterval(function () { - var path = $("#DirPathPlace input").val(); - GetFiles(path); - }, 3000); -} - -function DownloadFile(action) { - if (action == 1) { - var fUrl = $("#mUrl").val(); - fUrl = encodeURIComponent(fUrl); - fpath = $("#dpath").val(); - fname = encodeURIComponent($("#dfilename").val()); - if (!fname) { - durl = $("#mUrl").val() - tmp = durl.split('/') - $("#dfilename").val(tmp[tmp.length - 1]) - fname = encodeURIComponent($("#dfilename").val()); - if (!fname) { - layer.msg(lan.files.file_name_cant_empty); - return; - } - } - layer.close(getCookie('layers')) - layer.msg(lan.files.down_task, { - time: 0, - icon: 16, - shade: [0.3, '#000'] - }); - $.post('/files?action=DownloadFile', 'path=' + fpath + '&url=' + fUrl + '&filename=' + fname, function (rdata) { - layer.msg(rdata.msg, { - icon: rdata.status ? 1 : 2 - }); - GetFiles(fpath); - GetTaskCount(); - task_stat(); - }); - return; - } - var path = $("#DirPathPlace input").val(); - var layers = layer.open({ - type: 1, - shift: 5, - closeBtn: 2, - area: '500px', - title: lan.files.down_title, - content: '
      \ -
      \ - ' + lan.files.down_url + ':\ -
      \ -
      \ - ' + lan.files.down_to + ':\ -
      \ -
      \ - ' + lan.files.file_name + ':\ -
      \ -
      \ - \ - \ -
      \ -
      ', - success: function (layers, index) { - $('.layer_close').click(function () { - layer.close(index) - }); - } - }); - setCookie('layers', layers); - //fly("dlok"); - $("#mUrl").change(function () { - durl = $(this).val() - tmp = durl.split('/') - $("#dfilename").val(tmp[tmp.length - 1]) - }); -} - -function ExecShell(action) { - if (action == 1) { - var path = $("#DirPathPlace input").val(); - var exec = encodeURIComponent($("#mExec").val()); - $.post('/files?action=ExecShell', 'path=' + path + '&shell=' + exec, function (rdata) { - if (rdata.status) { - $("#mExec").val(''); - GetShellEcho(); - } else { - layer.msg(rdata.msg, { - icon: rdata.status ? 1 : 2 - }); - } - - }); - return; - } - layer.open({ - type: 1, - shift: 5, - closeBtn: 2, - area: ['70%', '600px'], - title: lan.files.shell_title, - content: '
      \ -
      \ -
      \ - ' + lan.files.shell_go + '\ -
      \ -
      ' - }); - setTimeout(function () { - outTimeGet(); - }, 1000); - -} - -var outTime = null; - -function outTimeGet() { - outTime = setInterval(function () { - if (!$("#mExec").attr('name')) { - clearInterval(outTime); - return; - } - GetShellEcho(); - }, 1000); -} - -function GetShellEcho() { - $.post('/files?action=GetExecShellMsg', '', function (rdata) { - $("#Result").html(rdata); - $(".shellcode").scrollTop($(".shellcode")[0].scrollHeight); - }); -} - -function ReName(type, fileName) { - if (type == 1) { - var path = $("#DirPathPlace input").val(); - var newFileName = encodeURIComponent(path + '/' + $("#newFileName").val()); - var oldFileName = encodeURIComponent(path + '/' + fileName); - layer.msg(lan.public.the, { - icon: 16, - time: 10000 - }); - $.post('/files?action=MvFile', 'sfile=' + oldFileName + '&dfile=' + newFileName + '&rename=true', function (rdata) { - layer.close(getCookie('layers')); - layer.msg(rdata.msg, { - icon: rdata.status ? 1 : 2 - }); - GetFiles(path); - }); - return; - } - var layers = layer.open({ - type: 1, - shift: 5, - closeBtn: 2, - area: '320px', - title: lan.files.file_menu_rename, - content: '
      \ -
      \ - \ -
      \ -
      \ - \ - \ -
      \ -
      ', - success: function (layers, index) { - $('.layers_close').click(function () { - layer.close(index); - }); - } - }); - setCookie('layers', layers); - $("#newFileName").focus().keyup(function (e) { - if (e.keyCode == 13) $("#ReNameBtn").click(); - }); -} - -function CutFile(fileName) { - var path = $("#DirPathPlace input").val(); - setCookie('cutFileName', fileName); - setCookie('copyFileName', null); - layer.msg(lan.files.mv_ok, { - icon: 1, - time: 1000 - }); - GetFiles(path); -} - -function CopyFile(fileName) { - var path = $("#DirPathPlace input").val(); - setCookie('copyFileName', fileName); - setCookie('cutFileName', null); - layer.msg(lan.files.copy_ok, { - icon: 1, - time: 1000 - }); - GetFiles(path); -} - -function PasteFile(fileName) { - var path = $("#DirPathPlace input").val(); - var copyName = getCookie('copyFileName'); - var cutName = getCookie('cutFileName'); - var filename = copyName; - if (cutName != 'null' && cutName != undefined) filename = cutName; - filename = filename.split('/').pop(); - $.post('/files?action=CheckExistsFiles', { - dfile: path, - filename: filename - }, function (result) { - if (result.length > 0) { - var tbody = ''; - for (var i = 0; i < result.length; i++) { - tbody += '' + result[i].filename + '' + ToSize(result[i].size) + '' + getLocalTime(result[i].mtime) + ''; - } - var mbody = '
      \ - ' + tbody + '\ -
      ' + lan.files.file_name + '' + lan.files.file_size + '' + lan.files.last_edit_time + '
      '; - SafeMessage(lan.files.will_cover_this_file, mbody, function () { - PasteTo(path, copyName, cutName, fileName); - }); - } else { - PasteTo(path, copyName, cutName, fileName); - } - }); -} - - -function PasteTo(path, copyName, cutName, fileName) { - if (copyName != 'null' && copyName != undefined) { - layer.msg(lan.files.copy_the, { - icon: 16, - time: 0, - shade: [0.3, '#000'] - }); - $.post('/files?action=CopyFile', 'sfile=' + encodeURIComponent(copyName) + '&dfile=' + encodeURIComponent(path + '/' + fileName), function (rdata) { - layer.closeAll(); - layer.msg(rdata.msg, { - icon: rdata.status ? 1 : 2 - }); - GetFiles(path); - }); - setCookie('copyFileName', null); - setCookie('cutFileName', null); - return; - } - - if (cutName != 'null' && cutName != undefined) { - layer.msg(lan.files.mv_the, { - icon: 16, - time: 0, - shade: [0.3, '#000'] - }); - $.post('/files?action=MvFile', 'sfile=' + encodeURIComponent(cutName) + '&dfile=' + encodeURIComponent(path + '/' + fileName), function (rdata) { - layer.closeAll(); - layer.msg(rdata.msg, { - icon: rdata.status ? 1 : 2 - }); - GetFiles(path); - }); - setCookie('copyFileName', null); - setCookie('cutFileName', null); - } -} -// 压缩文件 -function Zip(dirName, submits) { - var path = $("#DirPathPlace input").val(); - if (submits != undefined) { - if (dirName.indexOf(',') == -1) { - tmp = $("#sfile").val().split('/'); - sfile = encodeURIComponent(tmp[tmp.length - 1]); - } else { - sfile = encodeURIComponent(dirName); - } - dfile = encodeURIComponent($("#dfile").val()); - var z_type = $("select[name='z_type']").val(); - if (!z_type) z_type = 'tar.gz'; - layer.close(getCookie('layers')); - var layers = layer.msg(lan.files.zip_the, { - icon: 16, - time: 0, - shade: [0.3, '#000'] - }); - $.post('/files?action=Zip', 'sfile=' + sfile + '&dfile=' + dfile + '&z_type=' + z_type + '&path=' + encodeURIComponent(path), function (rdata) { - layer.close(layers); - if (rdata == null || rdata == undefined) { - layer.msg(lan.files.zip_ok, { - icon: 1 - }); - GetFiles(path) - ReloadFiles(); - return; - } - layer.msg(rdata.msg, { - icon: rdata.status ? 1 : 2 - }); - if (rdata.status) { - task_stat() - GetFiles(path); - } - }); - return - } - - param = dirName; - if (dirName.indexOf(',') != -1) { - tmp = path.split('/') - dirName = path + '/' + tmp[tmp.length - 1] - } - - var layers = layer.open({ - type: 1, - shift: 5, - closeBtn: 2, - area: '650px', - title: lan.files.zip_title, - content: '
      ' + - '
      ' + - '' + - '

      ' + lan.files.comp_type + '

      ' + - '' + lan.files.zip_to + '' + - '
      ' + - '
      ' + - '' + - '' + - '
      ' + - '
      ', - success: function (layers, index) { - $('.layer_close').click(function () { - layer.close(index); - }); - } - }); - setCookie('layers', layers); - setTimeout(function () { - $("select[name='z_type']").change(function () { - var z_type = $(this).val(); - dirName = dirName.replace("tar.gz", z_type) - $("#dfile").val(dirName + '.' + z_type); - }); - }, 100); - -} - -function UnZip(fileName, type) { - var path = $("#DirPathPlace input").val(); - if (type.length == 3) { - var sfile = encodeURIComponent($("#sfile").val()); - var dfile = encodeURIComponent($("#dfile").val()); - var password = encodeURIComponent($("#unpass").val()); - coding = $("select[name='coding']").val(); - layer.close(getCookie('layers')); - layer.msg(lan.files.unzip_the, { - icon: 16, - time: 0, - shade: [0.3, '#000'] - }); - $.post('/files?action=UnZip', 'sfile=' + sfile + '&dfile=' + dfile + '&type=' + type + '&coding=' + coding + '&password=' + password, function (rdata) { - layer.msg(rdata.msg, { - icon: rdata.status ? 1 : 2 - }); - task_stat(); - GetFiles(path); - }); - return - } - - type = (type == 1) ? 'tar' : 'zip' - var umpass = ''; - if (type == 'zip') { - umpass = '
      ' + lan.files.zip_pass_title + '
      ' - } - var layers = layer.open({ - type: 1, - shift: 5, - closeBtn: 2, - area: '490px', - title: lan.files.unzip_title, - content: '
      ' + - '
      ' + - '' + lan.files.unzip_name + '
      ' + - '
      ' + lan.files.unzip_to + '
      ' + umpass + - '
      ' + lan.files.unzip_coding + '' + - '
      ' + - '
      ' + - '' + - '' + - '
      ' + - '
      ', - success: function (layers, index) { - $('.layer_close').click(function () { - layer.close(index); - }); - } - }); - setCookie('layers', layers); -} - -function isZip(fileName) { - var ext = fileName.split('.'); - var extName = ext[ext.length - 1].toLowerCase(); - if (extName == 'zip' || extName == 'war' || extName == 'rar') return 0; - if (extName == 'gz' || extName == 'tgz' || extName == 'bz2') return 1; - return -1; -} - -function isText(fileName) { - var exts = ['rar', 'war', 'zip', 'tar.gz', 'gz', 'iso', 'xsl', 'doc', 'xdoc', 'jpeg', 'jpg', 'png', 'gif', 'bmp', 'tiff', 'exe', 'so', '7z', 'bz', 'bz2']; - return isExts(fileName, exts) ? false : true; -} - -function isImage(fileName) { - var exts = ['jpg', 'jpeg', 'png', 'bmp', 'gif', 'tiff', 'ico']; - return isExts(fileName, exts); -} - -function isVideo(fileName) { - var exts = ['mp4', 'mpeg', 'mpg', 'mov', 'avi', 'webm', 'mkv']; - return isExts(fileName, exts); -} - -function isPhp(fileName) { - var exts = ['php']; - return isExts(fileName, exts); -} - -function isExts(fileName, exts) { - var ext = fileName.split('.'); - if (ext.length < 2) return false; - var extName = ext[ext.length - 1].toLowerCase(); - for (var i = 0; i < exts.length; i++) { - if (extName == exts[i]) return true; - } - return false; -} - -function GetImage(fileName) { - var imgUrl = '/download?filename=' + fileName; - layer.open({ - type: 1, - closeBtn: 2, - title: false, - area: '500px', - shadeClose: true, - content: '
      ' - }); - $(".layui-layer").css("top", "30%"); -} - -// function GetPlay(fileName) { -// var imgUrl = '/download?filename=' + fileName; -// layer.open({ -// type: 1, -// closeBtn: 2, -// title: 'Play [' + fileName + ']', -// area: '500px', -// shadeClose: false, -// content: '
      ' -// }); -// $(".layui-layer").css("top", "30%"); -// } -function play_file(obj,filename) { - console.log($('#btvideo video').attr('data-filename'),filename) - if($('#btvideo video').attr('data-filename')== filename) return false; - var imgUrl = '/download?filename=' + filename + '&play=true'; - var 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'); -} -function GetPlay(fileName) { - var old_filename = fileName; - var imgUrl = '/download?filename=' + fileName; - var p_tmp = fileName.split('/') - var path = p_tmp.slice(0, p_tmp.length - 1).join('/') - layer.open({ - type: 1, - closeBtn: 2, - // maxmin:true, - title: 'Playing [' + p_tmp[p_tmp.length-1] + ']', - area: ["890px","402px"], - shadeClose: false, - skin:'movie_pay', - content: '
      ', - success: function () { - $.post('/files?action=get_videos', { path: path }, function (rdata) { - var video_list = ''; - for (var i = 0; i < rdata.length; i++) { - var filename = path + '/' + rdata[i].name - video_list += ''; - } - video_list += '
      File nameSize
      ' - + rdata[i].name + '' + ToSize(rdata[i].size) + '
      '; - $('.video-list').html(video_list); - }); - } - }); -} -function GetFileBytes(fileName, fileSize) { - window.open('/download?filename=' + encodeURIComponent(fileName)); -} - -function UploadFiles() { - - var path = $("#DirPathPlace input").val() + "/"; - bt_upload_file.open(path, null, null, function (path) { - GetFiles(path); - }); - return; - - /* - layer.open({ - type:1, - closeBtn: 2, - title:lan.files.up_title, - area: ['500px','500px'], - shadeClose:false, - content:'
      \ - \ - \ - \ - \ - \ - '+lan.files.up_coding+':\ - \ - \ - \ -
        ' - }); - UploadStart();*/ -} - -// 设置权限 -function Oksend(data, loadT) { - $.post('files?action=SetFileAccess', data, function (rdata) { - layer.close(loadT); - if (rdata.status) layer.close(getCookie('layers')); - layer.msg(rdata.msg, { - icon: rdata.status ? 1 : 2 - }); - var path = $("#DirPathPlace input").val(); - GetFiles(path) - }); -} -//还原备份 -function restore(restore_time) { - var sub_type = $("#accept_all").prop("checked") ? 1 : 0, - file = $(".layui-layer-title").text(); - file = file.match(/\[(.+?)\]/g); - file = file[0].substring(1, file[0].length - 1); - var layerss = layer.open({ - type: 1, - closeBtn: 2, - title: 'Confirm restore?', - area: '330px', - shadeClose: false, - btn: ['Yes', 'No'], - content: '
        \ - Restore would overwrite the current settings, continue?\ -
        ', - yes: function (layerss, index) { - $.post('/files?action=restore_path_permissions', { - restore_sub_dir: sub_type, - date: restore_time, - path: file - }, function (edata) { - layer.closeAll(); - layer.msg(edata.msg, { - icon: 1, - time: 1900 - }); - }); - }, - btn2: function () { - layer.close(layerss); - }, - cancel: function () { - layer.close(layerss); - } - }); -} -//删除备份 -function delback(id) { - layer.confirm('The backup cannot be restored after deletion.
        Continue to delete?',{title: 'Confirm delete?',btn: ['Yes', 'No'],closeBtn:2},function(index, layero){ - $.post('/files?action=del_path_premissions', { - id: id - }, function (edata) { - var file = $(".layui-layer-title:eq(0)").text(); - if(file!=='Manage Backups'){ - file = file.match(/\[(.+?)\]/g); - file = file[0].substring(1, file[0].length - 1); - backup_file(file); + /** + * @description 渲染菜单列表 + * @param {Object} el 菜单DOM + * @param {Object} config 菜单配置列表和数据 + * @returns void + */ + reader_menu_list:function(config){ + var that = this,el = config.el.find('ul'),el_height = 0,el_width = el.width(),left = config.ev.clientX - ((this.area[0] - config.ev.clientX) < el_width?el_width:0),top =0; + el.empty(); + $.each(config.list,function(index,item){ + var $children = null,$children_list = null; + if(item[0] == 'split'){ + el.append('
      • '); }else{ - $(".allback tbody tr[data-id=" + id + "]").remove(); + if(Array.isArray(item[2])){ + $children = $('
          '); + $children_list = $children.find('.set_group'); + $.each(item[2],function(indexs,items) { + $children_list.append($('
        • '+ items[1] +'
        • ').on('click',{type:items[0],data:config.data},function(ev){ + that.file_groud_event($.extend(ev.data.data,{ + open:ev.data.type, + index:parseInt($(config.ev.currentTarget).data('index')), + element:config.ev.currentTarget, + type_tips:config.data.type == 'dir'?'directory':'file' + })); + config.el.removeAttr('style'); + ev.stopPropagation(); + ev.preventDefault(); + })) + }); + } + el.append($('
        • '+ item[1] +'
        • ').append($children).on('click',{type:item[0],data:config.data},function(ev){ + that.file_groud_event($.extend(ev.data.data,{ + open:ev.data.type, + index:parseInt($(config.ev.currentTarget).data('index')), + element:config.ev.currentTarget, + type_tips:config.data.type == 'dir'?'directory':'file' + })); + // 有子级拉下时不删除样式,其余删除 + if(item[0] != 'compress' && item[0] != 'create'){config.el.removeAttr('style');} + ev.stopPropagation(); + ev.preventDefault(); + })); } - layer.msg(edata.msg, { icon: edata.status ? 1 : 2 }); }); - }); - // var layerss = layer.open({ - // type: 1, - // closeBtn: 2, - // title: 'Confirm delete', - // area: '330px', - // shadeClose: false, - // btn: ['yes', 'no'], - // content: '
          The backup cannot be restored after deletion.
          Continue to delete?
          ', - // yes: function (layerss) { - // layer.close(layerss); - // $.post('/files?action=del_path_premissions', { - // id: id - // }, function (edata) { - // $(".allback tbody tr[data-id=" + id + "]").remove(); - // $(".sel ul li[data-id=" + id + "]").remove(); - // }); - // }, - // btn2: function () { - // layer.close(layerss); - // }, - // cancel: function () { - // layer.close(layerss); - // } - // }); -} -//全部文件备份列表 -function backup_list() { - var all_back = ''; - $.ajaxSettings.async = false; - $.post('/files?action=get_all_back', function (edata) { - //for (let i in edata) { - for (var i = 0; i < edata.length; i++) { - var d = new Date(edata[i][2] * 1000); - var minut = d.getMinutes(); - var hours = d.getHours(); - var second = d.getSeconds(); - if (minut <= 9) minut = '0' + minut + ''; - if (hours <= 9) hours = '0' + hours + ''; - if (second <= 9) second = '0' + second + ''; - var date = (d.getFullYear()) + "/" + - (d.getMonth() + 1) + "/" + - (d.getDate()) + " " + - (hours) + ":" + (minut) + ":" + (second); - all_back += '\ - ' + date + '\ - \ - ' + edata[i][3] + '\ - \ - ' + edata[i][1] + '\ - Del\ - '; + el_height = el.innerHeight(); + top = config.ev.clientY - ((this.area[1] - config.ev.clientY) < el_height?el_height:0); + var element = $(config.ev.target); + if(element.hasClass('foo_menu_title') || element.parents().hasClass('foo_menu_title')){ + left = config.ev.clientX - el_width; + top = ((this.area[1] - config.ev.clientY) < el_height)?(config.ev.clientY - el_height -20):(config.ev.clientY + 15); } - }); - $.ajaxSettings.async = true; - return all_back; -} -//管理备份 -function manage() { - var all_back = backup_list(); - var layerss = layer.open({ - type: 1, - closeBtn: 2, - title: 'Manage Backups', - area: ['630px', '500px'], - shadeClose: false, - content: '
          \ -
          \ - \ -
          \ - \ - \ + config.el.css({ + left: (left+10), + top: top + }).removeClass('left_menu right_menu').addClass(this.area[0] - (left + el_width) < 230?'left_menu':'right_menu'); + }, + + /** + * @description 返回后缀类型说明 + * @param {String} ext 后缀类型 + * @return {String} 文件类型 + */ + ext_type_tips:function(ext){ + var config = {ai:"Adobe Illustrator format",apk:"Android package",asp:"Dynamic web file",bat:"Shell File",bin:"Bin File",bas:"BASIC File",bak:"Backup File",css:'CSS',cad:"备份文件",cxx:"C++",crt:"Certificate file",cpp:"C++ File",conf:"Configuration file",dat:"",der:"Certification file",doc:"Microsoft Office Word 97-2003",docx:"Microsoft Office Word 2007",exe:"",gif:"Graphic file",go:"Golang source files",htm:"Hypertext document",html:"Hypertext document",ico:"",java:"Java source files",access:'Database file',jsp:"HTML Page",jpe:"Graphic file",jpeg:"Graphic file",jpg:"Graphic file",log:"Log file",link:"Shortcut file",js:"Javascript source files",mdb:"Microsoft Access database",mp3:"Audio file",ape:'CloudMusic.ape',mp4:"Video",avi:'Video',mkv:'Video',rm:'Video',mov:'Video',mpeg:'Video',mpg:'Video',rmvb:'Video',webm:'Video',wma:'Video',wmv:'Video',swf:'Shockwave Flash Object',mng:"Multi-image network graphics",msi:"Windows package",png:"Graphic file",py:"Python source file",pyc:"Python Bytecode file",pdf:"pdf",ppt:"Microsoft Powerpoint 97-2003",pptx:"Microsoft Powerpoint2007",psd:"Adobe photoshop",pl:"Perl Scripting language",rar:"RAR compressed package",reg:"Registry file",sys:"System Files",sql:"Database file",sh:"Shell script file",txt:"text format",vb:"Visual Basic",xml:"",xls:"Microsoft Office Excel 97-2003",xlsx:"Microsoft Office Excel 2007",gz:"Compressed file",zip:"ZIP compressed file",z:"","7z":"7Z Compressed file",json:'JSON',php:'PHP',mht:'MHTML',bmp:'BMP',webp:'WEBP',cdr:'CDR'}; + return typeof config[ext] != "undefined"?config[ext]:('Unknown file'); + }, + + /** + * @description 文件类型判断,或返回格式类型(不传入type) + * @param {String} ext + * @param {String} type + * @return {Boolean|Object} 返回类型或类型是否支持 + */ + determine_file_type:function(ext,type){ + var config = { + images:['jpg','jpeg','png','bmp','gif','tiff','ico','JPG','webp'], + compress:['zip','rar','gz','war','tgz'], + video:['mp4','mp3', 'mpeg', 'mpg', 'mov', 'avi', 'webm', 'mkv','mkv','mp3','rmvb','wma','wmv'], + ont_text:['iso','xlsx','xls','doc','docx','tiff','exe','so','7z','bz','dmg','apk','pptx','ppt','xlsb','pdf'] + },returnVal = false; + if(type != undefined){ + if(type == 'text'){ + $.each(config,function(key,item){ + $.each(item,function(index,items){ + if(items == ext){ + returnVal = true; + return false; + } + }) + }); + returnVal = !returnVal + }else{ + if(typeof config[type] == "undefined") return false; + $.each(config[type],function(key,item){ + if(item == ext){ + returnVal = true; + return false; + } + }); + } + }else{ + $.each(config,function(key,item){ + $.each(item,function(index,items){ + if(items == ext){ + returnVal = key; + return false; + } + }) + }); + if(typeof returnVal == "boolean") returnVal = 'text'; + } + return returnVal; + }, + + /** + * @description 右键菜单事件组 + * @param {Object} data 当前文件或文件夹右键点击的数据和数组下标,以及Dom元素 + * @return void + */ + file_groud_event:function(data){ + var that = this; + switch(data.open){ + case 'open': // 打开目录、文件编辑、预览图片、播放视频 + if(data.type == 'dir'){ + this.reader_file_list({path:data.path}); + }else{ + switch(data.open_type){ + case 'text': + openEditorView(0,data.path) + break; + case 'video': + this.open_video_play(data); + break; + case 'images': + this.open_images_preview(data); + break; + } + } + break; + case 'download': //下载 + this.down_file_req(data); + break; + case 'share': // 添加分享文件 + this.set_file_share(data); + break; + case 'cancel_share': // 取消分享文件 + this.info_file_share(data); + break; + case 'favorites': //添加收藏夹 + this.$http('add_files_store',{path:data.path},function(res){ + if(res.status){ + that.file_list[data.index] = $.extend(that.file_list[data.index],{caret:true}); + that.reader_file_list_content(that.file_list); + that.load_favorites_index_list(); + } + layer.msg(res.msg,{icon:res.status?1:2}) + }) + break; + case 'cancel_favorites': //取消收藏 + this.cancel_file_favorites(data); + break; + case 'authority': // 权限 + this.set_file_authority(data); + break; + case 'dir_kill': //目录查杀 + this.set_dir_kill(data); + break; + case 'copy': // 复制内容 + this.copy_file_or_dir(data); + break; + case 'shear': // 剪切内容 + this.cut_file_or_dir(data); + break; + case 'rename': // 重命名 + this.rename_file_or_dir(data); + break; + case'compress': + data['open'] = 'tar_gz'; + this.compress_file_or_dir(data); + break; + case 'tar_gz': // 压缩gzip文件 + case 'rar': // 压缩rar文件 + case 'zip': // 压缩zip文件 + this.compress_file_or_dir(data); + break; + case 'unzip': + case 'folad': //解压到... + this.unpack_file_to_path(data) + break; + case 'refresh': // 刷新文件列表 + $('.file_path_refresh').click(); + break; + case 'upload': //上传文件 + this.file_drop.dialog_view(); + break; + case 'create_dir': // 新建文件目录 + $('.file_nav_view .create_file_or_dir li').eq(0).click(); + break; + case 'create_files': // 新建文件列表 + $('.file_nav_view .create_file_or_dir li').eq(1).click(); + break; + case 'del': //删除 + this.del_file_or_dir(data); + break; + case 'paste': //粘贴 + this.paste_file_or_dir(); + break; + case 'web_shell': // 终端 + web_shell() + break; + case 'open_find_dir': // 打开文件所在目录 + this.reader_file_list({path: this.retrun_prev_path(data.path)}); + break; + } + }, + /** + * @descripttion 列表批量处理 + * @param {String} stype 操作 + * @return: 无返回值 + */ + batch_file_manage:function(stype){ + var that = this,_api = '',_fname = [],_obj = {},_path = $(''); + $.each(this.file_table_arry,function(index,item){ + _fname.push(item.filename) + }) + switch(stype){ + case 'copy': //复制 + case 'shear': //剪切 + _api = 'SetBatchData'; + _obj['data'] = JSON.stringify(_fname); + _obj['type'] = stype == 'copy'?'1':'2'; + _obj['path'] = that.file_path; + break; + case 'del': //删除 + _obj['data'] = JSON.stringify(_fname); + _obj['type'] = '4'; + _obj['path'] = that.file_path; + return that.batch_file_delect(_obj) + break; + case 'authority': //权限 + _obj['filename'] = '批量'; + _obj['type'] = '3' + _obj['filelist'] = JSON.stringify(_fname); + _obj['path'] = that.file_path; + return that.set_file_authority(_obj,true) + break; + case 'compress': //压缩 + var arry_f = that.file_path.split('/'),file_title = arry_f[arry_f.length -1]; + _obj['filename'] = _fname.join(','); + _obj['open'] = 'tar_gz' + _obj['path'] = that.file_path+'/'+file_title; + return that.compress_file_or_dir(_obj,true) + break; + } + // 批量标记 + that.$http(_api,_obj,function(res){ + if(res.status){ + bt.set_cookie('record_paste_type',stype == 'copy'?'1':'2') + that.clear_table_active(); + $('.nav_group.multi').addClass('hide'); + $('.file_menu_tips').removeClass('hide'); + $('.file_nav_view .file_all_paste').removeClass('hide'); + } + layer.msg(res.msg,{icon:res.status?1:2}) + }); + }, + /** + * @descripttion 批量删除 + * @param {Object} obj.data 需删除的数据 + * @param {Object} obj.type 批量删除操作 + * @return: 无返回值 + */ + batch_file_delect:function(obj){ + var that = this; + if(this.is_recycle){ + layer.confirm(lan.files.del_to_recycle_bin,{title:lan.files.del_in_bulk,closeBtn:2,icon:3},function(){ + that.$http('SetBatchData',obj,function(res){ + if(res.status) that.reader_file_list({path:that.file_path}) + layer.msg(res.msg,{icon:res.status?1:2}) + }); + }) + }else{ + bt.show_confirm(lan.files.del_in_bulk,''+lan.files.recycle_bin_warning+'',function(){ + that.$http('SetBatchData',obj,function(res){ + if(res.status) that.reader_file_list({path:that.file_path}) + layer.msg(res.msg,{icon:res.status?1:2}) + }); + }) + } + }, + /** + * @description 批量文件粘贴 + * @return void + */ + batch_file_paste:function(){ + var that = this, _pCookie = bt.get_cookie('record_paste_type'); + this.check_exists_files_req({dfile:this.file_path},function(result){ + if(result.length > 0){ + var tbody = ''; + for(var i=0;i'+ToSize(result[i].size)+''+getLocalTime(result[i].mtime)+''; + } + var mbody = '
          \ + '+tbody+'\ +
          File nameSizeLast edit time
          '; + SafeMessage('The following files will be overwritten',mbody,function(){ + that.$http('BatchPaste',{type:_pCookie,path:that.file_path},function(rdata){ + if(rdata.status){ + bt.set_cookie('record_paste_type',null); + that.reader_file_list({path:that.file_path}) + } + layer.msg(rdata.msg,{icon:rdata.status?1:2}) + }) + }); + }else{ + that.$http('BatchPaste',{type:_pCookie,path:that.file_path},function(rdata){ + if(rdata.status){ + bt.set_cookie('record_paste_type',null); + that.reader_file_list({path:that.file_path}) + } + layer.msg(rdata.msg,{icon:rdata.status?1:2}) + }) + } + + }) + }, + /** + * @description 回收站视图 + * @return void + */ + recycle_bin_view:function(){ + var that = this; + layer.open({ + type:1, + shift:5, + closeBtn: 2, + area:['80%','606px'], + title: lan.files.recycle_bin_title, + content:'
          \ +
          \ +
          \ + '+ lan.files.recycle_bin_on + '\ +
          \ + \ + \ +
          \ + '+ lan.files.recycle_bin_on_db + '\ +
          \ + \ + \
          \
          \ - \ - \ - \ - \ - \ - \ - \ - \ - \ -
          Backup timeBackup pathNameDelect
          \ -
          \ - \ - \ - ' + all_back + '\ - \ -
          \ + '+ lan.files.recycle_bin_ps + '\ + \ +
          \ +
          \ +
          \ +

          '+lan.files.recycle_bin_type1+'

          \ +

          '+lan.files.recycle_bin_type2+'

          \ +

          '+lan.files.recycle_bin_type3+'

          \ +

          '+lan.files.recycle_bin_type4+'

          \ +

          '+lan.files.recycle_bin_type5+'

          \ +

          '+lan.files.recycle_bin_type6+'

          \ +
          \ +
          \ +
          \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ +
          '+lan.files.recycle_bin_th1+''+lan.files.recycle_bin_th2+''+lan.files.recycle_bin_th3+''+lan.files.recycle_bin_th4+''+lan.files.recycle_bin_th5+'
          \ +
          \ +
          \
          \
          ', - cancel: function () { - layer.close(layerss); - } - }); -} -//备份 -function backup(file, type) { - //文件夹type为0 - var sub_type = 1; - if (type == 1) { - sub_type = $("#accept_all").prop("checked") ? 1 : 0; - file = file.split(1, file.length - 1)[0]; - } else if (type == 0) { - file = $("#server_path").val(); - } - if (file == '' || typeof (file) == 'undefined') { - layer.msg('Please select a directory or file', { - icon: 2, - time: 1900 - }); - return false; - } - var layerss = layer.open({ - type: 1, - closeBtn: 2, - title: 'Confirm backup?', - area: '300px', - shadeClose: false, - btn: ['Yes', 'No'], - content: '
          \ -

          Please enter the current backup name

          \ -
          Remarks\ - \ -
          \ -
          ', - yes: function (layerss, index) { - $('.layer_close').click(function () { - layer.close(index); - }); - $.post('/files?action=back_path_permissions', { - back_sub_dir: sub_type, - path: file, - remark: $("input.form-control").val() - }, function (edata) { - if (!edata.status) { - layer.msg(edata.msg, { - time: 1900, - icon: 2, - }); - layer.close(layerss); - return false; + success:function(){ + if(window.location.href.indexOf("database") != -1){ + $(".re-con-menu p:last-child").addClass("on").siblings().removeClass("on"); + that.render_recycle_list(6) + }else{ + that.render_recycle_list(1) } - layer.close(layerss); - layer.msg(edata.msg, { - time: 1900, - icon: 1, - }); - if (type == 0) { - var new_back = backup_list(); - $(".buplist").html(new_back); - } else if (type == 3) { - var chmod = $("#access").val(); - var chown = $("#chown").val(); - var all = $("#accept_all").prop("checked") ? 'True' : 'False'; - var data = 'filename=' + encodeURIComponent(file) + '&user=' + chown + '&access=' + chmod + '&all=' + all; - Oksend(data); - layer.closeAll(); - } - }); - }, - btn2: function () { - layer.close(layerss); - }, - cancel: function () { - layer.close(layerss); - } - }); -} -// 选择目录 -function change_path(el, type) { - var _this = this; - layer.open({ - type: 1, - area: "750px", - title: type == 'files' ? 'Select project startup file' : 'Select project directory', - closeBtn: 2, - shift: 5, - shadeClose: false, - content: "
          \ -
          \ - \ -
          " + lan.bt.path + ":
          \ -
          \ -
          \ -
          \ -
          " + lan.bt.comp + "
          \ -
          \ -
          \ -
            \ -
            \ - \ - \ -
            " + lan.bt.filename + "" + lan.bt.etime + "" + lan.bt.access + "" + lan.bt.own + "
            \ -
            \ -
            \ - \ - \ - \ -
            " + lan.bt.filename + "" + lan.bt.etime + "" + lan.bt.access + "" + lan.bt.own + "
            \ -
            \ -
            \ -
            \ -
            \ -
            \ - \ - \ - \ -
            ", - success: function (layero, index) { - //设置文件目录 - switch (type) { - case 'dir': - setCookie('file_paths', $(el).val() || '/www'); - break; - case 'files': - setCookie('file_paths', _this.back_file()); - case 'other': - break; - } - // 返回目录 - $('.btn-back-file').click(function () { - setCookie('file_paths', _this.back_file()); - _this.get_dir_dom(type); - }); - // 关闭layer - $('.btn_close').click(function () { - layer.close(index); - }); - // 选择目录或文件 - $('.btn_path_ok').click(function () { - var file_name = $('#dir_tbody .ui-selected').find('.open_files_event').attr('data-name'); - var types = $('#dir_tbody .ui-selected').find('.open_files_event').attr('data-type'); - switch (type) { - case 'dir': - if (file_name == undefined) file_name = ''; - break; - case 'files': - if ($('#dir_tbody .ui-selected').length == 0) layer.msg('Please select a file', { - icon: 2 - }); - return false; - break; - case 'other': - if (file_name == undefined) file_name = ''; - break; - } - var paths = getCookie('file_paths'); - var paths_arry = paths.split('/'); - if (paths_arry[paths_arry.length - 1] != '') { - paths += '/' - } - $(el).val(paths + (file_name == '' ? '' : file_name)); - layer.close(index) - }); - // 新建文件夹 - $('.btn_create_folder').click(function () { - var isCreate = $('#dir_tbody tr:eq(0)').hasClass('table_add_dir'); - if (isCreate) return false; - $('#dir_tbody').prepend('\ - \ -   \ - '); - document.getElementsByClassName('file-list')[0].scrollTop = 0; - setTimeout(function () { - $('.table_add_dir').on('click', '.newFolderEvent', function (e) { - var fileName = $('.newFolderName').val(); - if (fileName == '') { - layer.msg('Please enter a new file name', { - icon: 0 - }); - return false; - } - _this.new_folder_event(getCookie('file_paths') + '/' + fileName, function (res) { - $(this).parent().parent().remove(); - _this.get_dir_dom(type); - }); - e.stopPropagation(); - }); - $('.table_add_dir').on('click', '.newFolderClaer', function (e) { - $(this).parent().parent().remove(); - e.stopPropagation(); - }); - }, 500); - }); - // 磁盘目录跳转 - $('.path-con-left').on('click', '.open_disk', function () { - var dir = $(this).attr('data-dir'); - setCookie('file_paths', dir) - _this.get_dir_dom(type); - }); - // 选择文目录或文件 - $('#dir_tbody').on('click', 'tr', function (e) { - $(this).find('input[type="checkbox"]').click(); - e.stopPropagation(); - }); - // 选择文件或目录 - $('#dir_tbody').on('click', 'tr input[type="checkbox"]', function (e) { - var checked = $(this).prop('checked'); - if (!checked) { - _this.select = ''; - $(this).parent().parent().removeClass('ui-selected'); - } else { - _this.select = $(this).attr('data-name'); - $(this).parent().parent().addClass('ui-selected').siblings().removeClass('ui-selected').find('input').prop('checked', false); - } - e.stopPropagation(); - }); - // 跳转指定目录,获取选择文件 - $('#dir_tbody').on('click', '.open_files_event', function (e) { - var type = $(this).attr('data-type'); - var name = $(this).attr('data-name'); - var path = getCookie('file_paths'); - if (type == 'dir') { - setCookie('file_paths', path + '/' + name); - _this.get_dir_dom(type); - } else { - $(this).parent().prev().find('input[type="checkbox"]').click(); - } - e.stopPropagation(); - }) - // 跳转指定目录 - $('#dir_tbody').on('click', '.open_files_event .path-con-left dl', function (e) { - var path = $(this).attr('data-name'); - e.stopPropagation(); - }); - // 跳转指定下一层目录 - $('#dir_tbody').on('dblclick', 'tr', function (e) { - $(this).find('.open_files_event').click(); - e.stopPropagation(); - }); - //获取目录DOM - _this.get_dir_dom(type); - } - }); -} -//获取目录DOM -function get_dir_dom(type) { - var _this = this; - this.get_dirk_list(function (res) { - $('.path-con-right .file-list').show(); - var dir = res.DIR, - files = res.FILES, - disk = res.DISK, - path = res.PATH, - page = res.PAGE, - dir_html = '', - files_html = '', - disk_html = ''; - for (var i = 0; i < dir.length; i++) { - var dir_arry = dir[i].split(';'); - dir_html += '' + dir_arry[0] + '' + getLocalTime(dir_arry[2]) + '' + dir_arry[3] + '' + dir_arry[4] + '' - } - for (var j = 0; j < files.length; j++) { - var files_arry = files[j].split(';'); - files_html += '' + files_arry[0] + '' + getLocalTime(files_arry[2]) + '' + files_arry[3] + '' + files_arry[4] + '' - } - for (var z = 0; z < disk.length; z++) { - var disk_info = disk[z]; - var dir_list = disk_info.path.split('/'); - dir_list = dir_list[dir_list.length - 1]; - disk_html += '
            ' + (disk_info.path == '/' ? 'Root Dir (' + disk_info.size[2] + ')' : '' + dir_list + ' (' + disk_info.size[2] + ')') + '
            ' - } - setCookie('file_paths', path); - $('.changepath .path-con-left dl').html(disk_html); - $('#dir_tbody').html(dir_html + files_html); - $('#PathPlace span').html(path); - }); -} -// 获取文件列表 -function get_dirk_list(callback) { - var dir = getCookie('file_paths'); - dir = dir.replace(/\/\//g, "/"); - this.send({ - url: '/files?action=GetDir', - tips: 'Getting file list, please wait...', - data: { - path: dir, - disk: 'True' - }, - success: function (res) { - if (typeof (res.status) !== "undefined") { - if (!res.status) { - layer.msg(res.msg, { - icon: 2 - }); - setCookie('file_paths', back_file()); - return; - } - } - if (callback) callback(res); - } - }) -} -// 过滤一级目录 -function back_file() { - c = getCookie('file_paths'); - if (c == '/') return '/' - if (c.substr(c.length - 1, 1) == "/") { - c = c.substr(0, c.length - 1) - } - var d = c.split("/"); - var a = ""; - if (d.length > 1) { - var e = d.length - 1; - for (var b = 0; b < e; b++) { - a += d[b] + "/" - } - return a.replace("//", "/") - } else { - a = d[0] - } - if (d.length == 1) {} -} -// 获取后缀 -function obtain_suffix(fileName) { - var extArr = fileName.split("."); - var 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', 'flv', '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', 'folder-empty', 'folder-unempty', 'fromchromefolder', 'documentfolder', 'fromphonefolder', 'mix', 'musicfolder', 'picturefolder', 'videofolder', 'sefolder', 'access', 'mdb', 'accdb', 'sql', 'c', 'cpp', 'cs', 'js', 'fla', 'flv', 'htm', 'html', 'java', 'log', 'mht', 'php', 'url', 'xml', 'ai', 'bmp', 'cdr', 'gif', 'ico', 'jpeg', 'jpg', 'JPG', 'png', 'psd', 'webp', 'ape', 'avi', 'flv', 'mkv', 'mov', 'mp3', 'mp4', 'mpeg', 'mpg', 'rm', 'rmvb', 'swf', 'wav', 'webm', 'wma', 'wmv', 'doc', 'docm', 'dotx', 'dotm', 'dot', 'rtf', 'docx', 'pdf', 'fdf', 'ppt', 'pptm', 'pot', 'potm', 'pptx', 'txt', 'xls', 'csv', 'xlsm', 'xlsb', 'xlsx', '7z', 'gz', 'cab', 'iso', 'rar', 'zip', 'bt', 'file', 'apk', 'css']; - var extLastName = extArr[extArr.length - 1]; - for (var i = 0; i < exts.length; i++) { - if (exts[i] == extLastName) { - return exts[i]; - } - } - return 'file'; -} -// 请求封装 -function send(obj) { - var loadT = ''; - if (obj.load == undefined) obj.load = 0; - if (obj.url == undefined) { - if (obj.plugin_name === undefined && this.plugin_name !== undefined) obj.plugin_name = this.plugin_name - if (!obj.plugin_name || !obj.method) { - layer.msg('The plugin class name, or plugin method name is missing!', { - icon: 2 - }); - return false; - } - } - if (obj.load === 0) { - loadT = layer.msg(obj.tips, { - icon: 16, - time: 0, - shade: 0.3 - }); - } else if (obj.load === 1 || (obj.tips == undefined && obj.load == undefined)) { - loadT = layer.load(); - } - $.ajax({ - type: 'POST', - url: obj.url != undefined ? obj.url : ('/plugin?action=a&name=' + obj.plugin_name + '&s=' + obj.method), - data: obj.data || {}, - timeout: obj.timeout || 99999999, - complete: function (res) { - if (obj.load === 0 || obj.load === 1) layer.close(loadT); - }, - success: function (rdata) { - if (!obj.success) { - obj.msg || obj.msg == undefined ? layer.msg(rdata.msg, { - icon: rdata.status ? 1 : 2 - }) : ''; - return; - } - obj.success(rdata); - }, - error: function (ex) { - if (!obj.error) { - obj.msg || obj.msg == undefined ? layer.msg('Request process found error!', { - icon: 2 - }) : ''; - return; - } - return obj.error(ex); - } - }); -} - -function SetChmod(action, fileName, is_files) { - var is_file=false, - backups = true, - toExec = fileName == lan.files.all ? 'Batch(3,1)' : 'SetChmod(1,\'' + fileName + '\')', - tex = '
            \ - \ - \ - \ -
            \ - \ -
            '; - if(is_files) is_file = is_files; - this.send({ - url: '/files?action=GetFileAccess', - tips: 'Getting permission, please wait...', - data: { - filename: fileName - }, - success: function (rdata) { - var layers = layer.open({ - type: 1, - closeBtn: 2, - btn: [lan.public.ok, lan.public.close], - title: lan.files.set_auth + '[' + fileName + ']', - area: ['477px','399px'], - shadeClose: false, - content: '
            \ -
            \ -
            Set permission
            \ -
            Backups list
            \ -
            \ -
            ' + tex + '\ -
            \ - ' + lan.files.file_own + '\ -

            ' + lan.files.file_read + '

            \ -

            ' + lan.files.file_write + '

            \ -

            ' + lan.files.file_exec + '

            \ -
            \ -
            \ - ' + lan.files.file_group + '\ -

            ' + lan.files.file_read + '

            \ -

            ' + lan.files.file_write + '

            \ -

            ' + lan.files.file_exec + '

            \ -
            \ -
            \ - ' + lan.files.file_public + '\ -

            ' + lan.files.file_read + '

            \ -

            ' + lan.files.file_write + '

            \ -

            ' + lan.files.file_exec + '

            \ -
            \ -
            ' + lan.files.file_menu_auth + ',\ - ' + lan.files.file_own + '\ - \ - \ -
            \ -
            \ -
            \ -
            ', - yes: function (layers, index) { - get_backup_file(fileName,function (edata) { - if(edata.length == 0){ - $('.backuptip').text('No backup'); - backups = false; - } - setpromise(1, fileName, backups, is_file); - }); - }, - success: function (layers, index) { - $('.layer_close').click(function () { - layer.close(index); - }); - } - }); - $(".tolist").click(function () { - $(".baclist").click(); - }); - get_backup_file(fileName,function (edata) { - if(edata.length == 0) $('.backuptip').text('No backup'); - }); - setCookie('layers', layers); - - onAccess(); - $("#access").keyup(function () { - onAccess(); - }); - $(".bt_tab_list .bt_tab_index").click(function () { - $(this).addClass('active').siblings().removeClass('active'); - if($(this).index()==0){ - $('.backup_lists').empty(); - $('.chmodset').show(); - } - }); - - $("input[type=checkbox]").change(function () { - var idName = ['owner', 'group', 'public']; - var onacc = ''; - for (var n = 0; n < idName.length; n++) { - var access = 0; - access += $("#" + idName[n] + "_x").prop('checked') ? 1 : 0; - access += $("#" + idName[n] + "_w").prop('checked') ? 2 : 0; - access += $("#" + idName[n] + "_r").prop('checked') ? 4 : 0; - onacc += access; - } - $("#access").val(onacc); - }); - } - }) - -} -function setpromise(action,fileName,backups,files){ - var is_files = files?files:false; - if(fileName == lan.files.all){ - Batch(3,1) - } else { - if (action == 1) { - var chmod = $("#access").val(), - chown = $("#chown").val(), - all = $("#accept_all").prop("checked") ? 'True' : 'False', - data = 'filename=' + encodeURIComponent(fileName) + '&user=' + chown + '&access=' + chmod + '&all=' + all, - is_file = is_files ? 3 : 1; - if (!backups && all == 'True' && is_file == 3) { - var loadTips = layer.open({ - type: 1, - closeBtn: 2, - title: 'Confirm backup', - area: '430px', - shadeClose: false, - btn: ['Apply&Backup', 'Cancel', 'Apply'], - content: '
            Do you want to apply settings and back up permissions?\ -
            Remarks\ - \ -
            \ -
            ', - success: function () { - $('.layui-layer-btn2').css({ - "float": "left", - "margin-left": "0" - }); - }, - yes: function () { - $('.layer_close').click(function () { - layer.close(loadTips); - }); - $.post('/files?action=back_path_permissions', { - back_sub_dir: (all == 'True') ? 1 : 0, - path: fileName, - remark: $("input.form-control").val() - }, function (edata) { - var wrong = edata.status == false ? 2 : 1; - layer.msg(edata.msg, { - time: 1900, - icon: wrong, - }); - if (wrong == 2) { - return false; - } - Oksend(data); - layer.closeAll(); - }); - }, - btn2: function () { - layer.close(loadTips); - }, - btn3: function () { - var loadT = layer.msg(lan.public.config, { - icon: 16, - time: 0, - shade: [0.3, '#000'] - }); - Oksend(data, loadT); - return; - }, - cancel: function () { - layer.close(loadTips); - } - }); - return; - } else { - var loadT = layer.msg(lan.public.config, { - icon: 16, - time: 0, - shade: [0.3, '#000'] - }); - Oksend(data, loadT); - return; - } - } - } -} -// 获取备份列 -function get_backup_file(obj,callback){ - this.send({ - url: '/files?action=get_path_premissions', - tips: 'Getting file list, please wait...', - data: { - path: obj - }, - success: function (res) { - if (callback) callback(res); - } - }); -} -// 修复权限 -function fix_permissions(obj,callback){ - this.send({ - url: '/files?action=fix_permissions', - tips: 'Getting file list, please wait...', - data: { - path: obj - }, - success: function (res) { - if (callback) callback(res); - layer.closeAll(); - layer.msg(res.msg, { icon: res.status ? 1 : 2 }); - } - }); -} -//本文件备份列表 -function backup_file(fileName) { - get_backup_file(fileName,function (edata) { - var tbody = '',cont=''; - if(edata.length==0){ - tbody='No data' - }else{ - for (var i = 0; i < edata.length; i++) { - var d = new Date(edata[i][3] * 1000), - minut = d.getMinutes(), - hours = d.getHours(); - if (minut <= 9) minut = '0' + minut + ''; - if (hours <= 9) hours = '0' + hours + ''; - var date = (d.getFullYear()) + "/" + - (d.getMonth() + 1) + "/" + - (d.getDate()) + " " + - (hours) + ":" + - (minut); - tbody += '\ - '+edata[i][4]+'\ - '+edata[i][2]+'\ - '+edata[i][1]+'\ - '+date+'\ - Restore | Del\ - '; - } - } - cont = '
            \ -
            \ - \ - Fix all permissions to [ Folder: 755, File: 644 ]\ - \ -
            \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - '+tbody+'\ - \ -
            NamepermissionOwnerBackup Timeoptions
            \ -
            '; - $('.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){ - fix_permissions(fileName); - var path = $("#DirPathPlace input").val(); - GetFiles(path); - }); - }); - }); -} - -function onAccess() { - var access = $("#access").val(); - var idName = ['owner', 'group', 'public']; - for (var n = 0; n < idName.length; n++) { - $("#" + idName[n] + "_x").prop('checked', false); - $("#" + idName[n] + "_w").prop('checked', false); - $("#" + idName[n] + "_r").prop('checked', false); - } - for (var i = 0; i < access.length; i++) { - var onacc = access.substr(i, 1); - if (i > idName.length) continue; - if (onacc > 7) $("#access").val(access.substr(0, access.length - 1)); - switch (onacc) { - case '1': - $("#" + idName[i] + "_x").prop('checked', true); - break; - case '2': - $("#" + idName[i] + "_w").prop('checked', true); - break; - case '3': - $("#" + idName[i] + "_x").prop('checked', true); - $("#" + idName[i] + "_w").prop('checked', true); - break; - case '4': - $("#" + idName[i] + "_r").prop('checked', true); - break; - case '5': - $("#" + idName[i] + "_r").prop('checked', true); - $("#" + idName[i] + "_x").prop('checked', true); - break; - case '6': - $("#" + idName[i] + "_r").prop('checked', true); - $("#" + idName[i] + "_w").prop('checked', true); - break; - case '7': - $("#" + idName[i] + "_r").prop('checked', true); - $("#" + idName[i] + "_w").prop('checked', true); - $("#" + idName[i] + "_x").prop('checked', true); - break; - } - } -} - -function RClick(type, path, name, file_store, file_share,data_composer) { - var displayZip = isZip(type); - var options = { - items: [{ - text: lan.files.file_menu_copy, - onclick: function () { - CopyFile(path) - } - }, - { - text: lan.files.file_menu_mv, - onclick: function () { - CutFile(path) - } - }, - { - text: lan.files.file_menu_rename, - onclick: function () { - ReName(0, name) - } - }, - { - text: lan.files.file_menu_auth, - onclick: function () { - SetChmod(0, path) - } - }, - { - text: lan.files.file_menu_zip, - onclick: function () { - Zip(path) - } - } - ] - }; - - if (type == "dir") { - options.items.push({ - text: lan.files.file_menu_del, - onclick: function () { - DeleteDir(path) - } - }, - // { - // text: lan.files.dir_menu_webshell, - // onclick: function () { - // webshell_dir(path) - // } - // } - ); - } else if (isPhp(type)) { - options.items.push({ - text: lan.files.file_menu_webshell, - onclick: function () { - php_file_webshell(path) - } - }, { - text: lan.files.file_menu_edit, - onclick: function () { - openEditorView(0, path) - } - }, { - text: lan.files.file_menu_down, - onclick: function () { - GetFileBytes(path) - } - }, { - text: lan.files.file_menu_del, - onclick: function () { - DeleteFile(path) + $(".re-con-menu").on('click','p',function(){ + var _type = $(this).data('type'); + $(this).addClass("on").siblings().removeClass("on"); + that.render_recycle_list(_type); + }) } }) - } - else if (isVideo(type)) { - options.items.push({ text: 'Play', onclick: function () { GetPlay(path) } }, { text: lan.files.file_menu_down, onclick: function () { GetFileBytes(path) } }, { text: lan.files.file_menu_del, onclick: function () { DeleteFile(path) } }); - } - else if (isText(type)) { - options.items.push({ - text: lan.files.file_menu_edit, - onclick: function () { - openEditorView(0, path) - } - }, { - text: lan.files.file_menu_down, - onclick: function () { - GetFileBytes(path) - } - }, { - text: lan.files.file_menu_del, - onclick: function () { - DeleteFile(path) - } - }); - } else if (displayZip != -1) { - options.items.push({ - text: lan.files.file_menu_unzip, - onclick: function () { - UnZip(path, displayZip) - } - }, { - text: lan.files.file_menu_down, - onclick: function () { - GetFileBytes(path) - } - }, { - text: lan.files.file_menu_del, - onclick: function () { - DeleteFile(path) - } - }); - } else if (isImage(type)) { - options.items.push({ - text: lan.files.file_menu_img, - onclick: function () { - GetImage(path) - } - }, { - text: lan.files.file_menu_down, - onclick: function () { - GetFileBytes(path) - } - }, { - text: lan.files.file_menu_del, - onclick: function () { - DeleteFile(path) - } - }); - } else { - options.items.push({ - text: lan.files.file_menu_down, - onclick: function () { - GetFileBytes(path) - } - }, { - text: lan.files.file_menu_del, - onclick: function () { - DeleteFile(path) - } - }); - } - // if (type !== 'dir') { - // options.items.push({ - // text: 'Share', - // onclick: function () { - // create_download_url(name, path, file_share) - // } - // }); - // } - // if(type !== 'dir'){ - // options.items.push({ text: 'Share', onclick: function () { create_download_url(name,path,file_share) } }); - // } - - options.items.push({ text: 'Share', onclick: function () { - create_download_url(name,path,file_share) } }); - - if( type === 'dir' && data_composer === '1'){ - options.items.push({ text: 'Composer', onclick: function () { exec_composer(name,path) } }); - } - - options.items.push({ - text: "Favorites", - onclick: function () { - var loading = bt.load(); - bt.send('add_files_store', 'files/add_files_store', { - path: path - }, function (rRet) { - loading.close(); - bt.msg(rRet); - if (rRet.status) { - console.log(file_store.PATH); - GetFiles(file_store.PATH) - } - }); - } - }) - return options; -} - -function update_composer(){ - loadT = bt.load() - $.post('/files?action=update_composer',{},function(v_data){ - loadT.close(); - bt.msg(v_data); - }); -} - -function exec_composer(fileName,path){ - $.post('/files?action=get_composer_version',{},function(v_data){ - if(v_data.status === false){ - bt.msg(v_data); - return; - } - - var php_versions = ''; - for(var i=0;i'+v_data.php_versions[i].name+''; - } - - var layers = layer.open({ - type: 1, - closeBtn: 2, - area: '450px', - title: 'Execute composer in ['+path+'] directory', - btn:['Composer','Cancel'], - content: '' - + '' - + '
            PHP Edition
            ' - +'' - +'
            ' - + '
            Parameter
            ' - +'' - +'
            ' - + '
            Mirror source
            ' - +'' - +'
            ' - + '
            ', - yes:function(indexs,layers){ - layer.confirm('The scope of influence of executing composer depends on the composer.json configuration file in this directory.Continue?', { title: 'Confirm Composer?',btn:['Confirm','Cancel'], closeBtn: 2, icon: 3 }, function (index) { - var pdata = { - php_version:$("select[name='php_version']").val(), - composer_args:$("select[name='composer_args']").val(), - repo:$("select[name='repo']").val(), - path:path + }, + // 回收站渲染列表 + render_recycle_list:function(num){ + var that = this; + this.$http('Get_Recycle_bin',function(rdata){ + var body = ''; + $('#Set_Recycle_bin').attr('checked',rdata.status); + $('#Set_Recycle_bin_db').attr('checked',rdata.status_db); + switch (num) { + case 1: + for (var i = 0; i < rdata.dirs.length; i++) { + var shortwebname = rdata.dirs[i].name.replace(/'/, "\\'"); + var shortpath = rdata.dirs[i].dname; + if (shortwebname.length > 20) shortwebname = shortwebname.substring(0, 20) + "..."; + if (shortpath.length > 20) shortpath = shortpath.substring(0, 20) + "..."; + body += '\ + ' + shortwebname + '\ + ' + shortpath + '\ + '+ ToSize(rdata.dirs[i].size) + '\ + '+ getLocalTime(rdata.dirs[i].time) + '\ + \ + ' + lan.files.recycle_bin_re + '\ + | ' + lan.files.recycle_bin_del + '\ + \ + '; } - $.post('/files?action=exec_composer',pdata,function(rdatas){ - if(!rdatas.status){ - layer.msg(rdatas.msg,{icon:2}); - return false; + for (var i = 0; i < rdata.files.length; i++) { + if (rdata.files[i].name.indexOf('BTDB_') != -1) { + var shortwebname = rdata.files[i].name.replace(/'/, "\\'"); + var shortpath = rdata.files[i].dname; + if (shortwebname.length > 20) shortwebname = shortwebname.substring(0, 20) + "..."; + if (shortpath.length > 20) shortpath = shortpath.substring(0, 20) + "..."; + body += '\ + ' + shortwebname.replace('BTDB_', '') + '\ + mysql://' + shortpath.replace('BTDB_', '') + '\ + -\ + '+ getLocalTime(rdata.files[i].time) + '\ + \ + ' + lan.files.recycle_bin_re + '\ + | ' + lan.files.recycle_bin_del + '\ + \ + ' + + continue; } - layer.closeAll(); - if(rdatas.status === true){ - layer.open({ - area:"600px", - type: 1, - shift: 5, - closeBtn: 2, - title: 'Execute composer in ['+path+'] directory, and close this window after execution', - content:"
            "
            -                            });
            -                            setTimeout(function(){show_composer_log();},200);
            +                        var shortwebname = rdata.files[i].name.replace(/'/, "\\'");
            +                        var shortpath = rdata.files[i].dname;
            +                        if (shortwebname.length > 20) shortwebname = shortwebname.substring(0, 20) + "...";
            +                        if (shortpath.length > 20) shortpath = shortpath.substring(0, 20) + "...";
            +                        body += '\
            +                                    ' + shortwebname + '\
            +                                    ' + shortpath + '\
            +                                    '+ ToSize(rdata.files[i].size) + '\
            +                                    '+ getLocalTime(rdata.files[i].time) + '\
            +                                    \
            +                                        ' + lan.files.recycle_bin_re + '\
            +                                        | ' + lan.files.recycle_bin_del + '\
            +                                    \
            +                                '
            +                    }
            +                    $("#RecycleBody").html(body);
            +                    return;
            +                    break;
            +                case 2:
            +                    for (var i = 0; i < rdata.dirs.length; i++) {
            +                        var shortwebname = rdata.dirs[i].name.replace(/'/, "\\'");
            +                        var shortpath = rdata.dirs[i].dname;
            +                        if (shortwebname.length > 20) shortwebname = shortwebname.substring(0, 20) + "...";
            +                        if (shortpath.length > 20) shortpath = shortpath.substring(0, 20) + "...";
            +                        body += '\
            +                                    ' + shortwebname + '\
            +                                    ' + shortpath + '\
            +                                    '+ ToSize(rdata.dirs[i].size) + '\
            +                                    '+ getLocalTime(rdata.dirs[i].time) + '\
            +                                    \
            +                                        ' + lan.files.recycle_bin_re + '\
            +                                        | ' + lan.files.recycle_bin_del + '\
            +                                    \
            +                                '
            +                    }
            +                    $("#RecycleBody").html(body);
            +                    return;
            +                    break;
            +                case 3:
            +                    for (var i = 0; i < rdata.files.length; i++) {
            +                        if (rdata.files[i].name.indexOf('BTDB_') != -1) continue;
            +                        var shortwebname = rdata.files[i].name.replace(/'/, "\\'");
            +                        var shortpath = rdata.files[i].dname;
            +                        if (shortwebname.length > 20) shortwebname = shortwebname.substring(0, 20) + "...";
            +                        if (shortpath.length > 20) shortpath = shortpath.substring(0, 20) + "...";
            +                        body += '\
            +                                    ' + shortwebname + '\
            +                                    ' + shortpath + '\
            +                                    '+ ToSize(rdata.files[i].size) + '\
            +                                    '+ getLocalTime(rdata.files[i].time) + '\
            +                                    \
            +                                        ' + lan.files.recycle_bin_re + '\
            +                                        | ' + lan.files.recycle_bin_del + '\
            +                                    \
            +                                '
            +                    }
            +                    $("#RecycleBody").html(body);
            +                    return;
            +                    break;
            +                case 4:
            +                    for (var i = 0; i < rdata.files.length; i++) {
            +                        if (ReisImage(getFileName(rdata.files[i].name))) {
            +                            var shortwebname = rdata.files[i].name.replace(/'/, "\\'");
            +                            var shortpath = rdata.files[i].dname;
            +                            if (shortwebname.length > 20) shortwebname = shortwebname.substring(0, 20) + "...";
            +                            if (shortpath.length > 20) shortpath = shortpath.substring(0, 20) + "...";
            +                            body += '\
            +                                    ' + shortwebname + '\
            +                                    ' + shortpath + '\
            +                                    '+ ToSize(rdata.files[i].size) + '\
            +                                    '+ getLocalTime(rdata.files[i].time) + '\
            +                                    \
            +                                        ' + lan.files.recycle_bin_re + '\
            +                                        | ' + lan.files.recycle_bin_del + '\
            +                                    \
            +                                '
                                     }
            -                    });
            -                });
            -            }
            -        });
            -    });
            -}
            -
            -
            -function show_composer_log(){
            -    $.post('/ajax?action=get_lines',{filename:'/tmp/panelExec.pl',num:30},function(v_body){
            -        var log_obj = $("#composer-log")
            -        if(log_obj.length < 1) return;
            -        log_obj.html(v_body.msg);
            -        var div = document.getElementById('composer-log')
            -        div.scrollTop = div.scrollHeight;
            -        setTimeout(function(){show_composer_log()},1000)
            -    });
            -}
            -
            -
            -function create_download_url(fileName, path, fileShare) {
            -    fileShare = parseInt(fileShare);
            -    if(fileShare != 0) {
            -        $.post('/files?action=get_download_url_find', {
            -            id: fileShare
            -        }, function (rdata) {
            -            set_download_url(rdata);
            -        });
            -        return false
            -    }
            -    var layers = layer.open({
            -        type: 1,
            -        shift: 5,
            -        closeBtn: 2,
            -        area: '450px',
            -        title: 'Share details',
            -        btn: ['Create', 'Cancel'],
            -        content: '' +
            -            '
            Sharing name
            ' + - '
            Term of validity
            ' + - '' + - '' + - '' + - '
            ' + - '
            Extraction code
            ' + - '
            ', - yes: function (indexs, layers) { - layer.confirm('Confirm to share this file?', { - title: 'Sharing', - closeBtn: 2, - icon: 3 - }, function (index) { - var ps = $('[name=ps]').val(), - expire = $('[name=expire]').val(), - password = $('[name=password]').val(); - if (ps === '') { - layer.msg('No sharing name', { - icon: 2 - }); - return false; + } + $("#RecycleBody").html(body); + return; + break; + case 5: + for (var i = 0; i < rdata.files.length; i++) { + if (rdata.files[i].name.indexOf('BTDB_') != -1) continue; + if (!(ReisImage(getFileName(rdata.files[i].name)))) { + var shortwebname = rdata.files[i].name.replace(/'/, "\\'"); + var shortpath = rdata.files[i].dname; + if (shortwebname.length > 20) shortwebname = shortwebname.substring(0, 20) + "..."; + if (shortpath.length > 20) shortpath = shortpath.substring(0, 20) + "..."; + body += '\ + ' + shortwebname + '\ + ' + shortpath + '\ + '+ ToSize(rdata.files[i].size) + '\ + '+ getLocalTime(rdata.files[i].time) + '\ + \ + ' + lan.files.recycle_bin_re + '\ + | ' + lan.files.recycle_bin_del + '\ + \ + ' + } + } + $("#RecycleBody").html(body); + return; + case 6: + for (var i = 0; i < rdata.files.length; i++) { + if (rdata.files[i].name.indexOf('BTDB_') != -1) { + var shortwebname = rdata.files[i].name.replace(/'/, "\\'"); + var shortpath = rdata.files[i].dname; + if (shortwebname.length > 20) shortwebname = shortwebname.substring(0, 20) + "..."; + if (shortpath.length > 20) shortpath = shortpath.substring(0, 20) + "..."; + body += '\ + ' + shortwebname.replace('BTDB_', '') + '\ + mysql://' + shortpath.replace('BTDB_', '') + '\ + -\ + '+ getLocalTime(rdata.files[i].time) + '\ + \ + ' + lan.files.recycle_bin_re + '\ + | ' + lan.files.recycle_bin_del + '\ + \ + ' + } + } + $("#RecycleBody").html(body); + return; + break; } - $.post('/files?action=create_download_url', { - filename: path, - ps: ps, - password: password, - expire: expire - }, function (rdatas) { - if (!rdatas.status) { - layer.msg(rdatas.msg, { - icon: 2 - }); - return false; - } - layer.close(index); - layer.close(indexs) - set_download_url(rdatas.msg); - }); - }); - }, - success: function (layers, index) { - $('#random_paw').click(function () { - $(this).prev().val(bt.get_random(6)); - }); + function getFileName(name) { + var text = name.split("."); + var n = text.length - 1; + text = text[n]; + return text; + } + function ReisImage(fileName) { + var exts = ['jpg', 'jpeg', 'png', 'bmp', 'gif', 'tiff', 'ico']; + for (var i = 0; i < exts.length; i++) { + if (fileName == exts[i]) return true + } + return false; + } + + $('#RecycleBody').html(body); + + }) + + }, + // 回收站开关 + Set_Recycle_bin:function(db) { + var loadT = layer.msg(lan.public.the, { icon: 16, time: 0, shade: [0.3, '#000'] }); + var that = this,data = {} + if (db == 1) { + data = { db: db }; } - }); -} - - -function set_download_url(rdata) { - var download_url = window.location.protocol + '//' + window.location.host + '/down/' + rdata.token; - var layers = layer.open({ - type: 1, - shift: 5, - closeBtn: 2, - area: '550px', - title: 'Share details', - content: '
            ' - + '
            Name
            ' - + '' - + '' - + '
            Expiration date
            '+ bt.format_data(rdata.expire)+'
            ' - + '
            ' - + '' - + '' - + '
            ' - + '
            ', - success: function (layers, index) { - var copy_url = new ClipboardJS('.copy_url'); - var 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 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: [0.05, '#000'], - shadeClose: true, - success: function () { - jQuery('#QR_code').qrcode({ - render: "canvas", - text: download_url, - height: 130, - width: 130 - }); - } - }); - }); - $('.close_down').click(function () { - del_download_url(rdata.id, index) - }); - } - }); -} - -function del_download_url(id, indexs) { - layer.confirm('Confirm cancel sharing the file?', { - title: 'Confirm', - closeBtn: 2, - icon: 3 - }, function (index) { - $.post('/files?action=remove_download_url', { - id: id - }, function (res) { - layer.msg(res.msg, { - icon: res.status ? 1 : 2 - }); - layer.close(indexs); - layer.close(index); - if (indexs === false) get_download_url_list({}, true); + $.post('/files?action=Recycle_bin', data, function (rdata) { + layer.close(loadT); + if(rdata.status){ + if(db == undefined) that.is_recycle = $('#Set_Recycle_bin').prop('checked'); + } + layer.msg(rdata.msg, { icon: rdata.status ? 1 : 5 }); }); - }); -} - -function get_download_url_list(data, is_refresh) { - if (data == undefined) data = { - p: 1 - } - $.post('/files?action=get_download_url_list', { - p: data.p - }, function (res) { - var _html = '', - rdata = res.data; - for (var i = 0; i < rdata.length; i++) { - _html += '' + rdata[i].ps + '' + rdata[i].filename + '' + bt.format_data(rdata[i].expire) + 'Detail  |  Close'; - } - if (is_refresh) { - $('.download_url_list').html(_html); - $('.download_url_page').html(res.page); + }, + // 回收站恢复 + ReRecycleBin:function(path, obj) { + layer.confirm(lan.files.recycle_bin_re_msg, { title: lan.files.recycle_bin_re_title, closeBtn: 2, icon: 3 }, function () { + var loadT = layer.msg(lan.files.recycle_bin_re_the, { icon: 16, time: 0, shade: [0.3, '#000'] }); + $.post('/files?action=Re_Recycle_bin', 'path=' + encodeURIComponent(path), function (rdata) { + layer.close(loadT); + layer.msg(rdata.msg, { icon: rdata.status ? 1 : 5 }); + $(obj).parents('tr').remove(); + }); + }); + }, + //回收站删除 + DelRecycleBin:function(path, obj) { + layer.confirm(lan.files.recycle_bin_del_msg, { title: lan.files.recycle_bin_del_title, closeBtn: 2, icon: 3 }, function () { + var loadT = layer.msg(lan.files.recycle_bin_del_the, { icon: 16, time: 0, shade: [0.3, '#000'] }); + $.post('/files?action=Del_Recycle_bin', 'path=' + encodeURIComponent(path), function (rdata) { + layer.close(loadT); + layer.msg(rdata.msg, { icon: rdata.status ? 1 : 5 }); + $(obj).parents('tr').remove(); + }); + }); + }, + //清空回收站 + CloseRecycleBin:function(){ + layer.confirm(lan.files.recycle_bin_close_msg, { title: lan.files.recycle_bin_close, closeBtn: 2, icon: 3 }, function () { + var loadT = layer.msg("
            " + lan.files.recycle_bin_close_the + "
            ", { icon: 16, time: 0, shade: [0.3, '#000'] }); + setTimeout(function () { + getSpeed('.myspeed'); + }, 1000); + $.post('/files?action=Close_Recycle_bin', '', function (rdata) { + layer.close(loadT); + layer.msg(rdata.msg, { icon: rdata.status ? 1 : 5 }); + $("#RecycleBody").html(''); + }); + }); + }, + /** + * @description 打开图片预览 + * @param {Object} data 当前文件的数据对象 + * @return void + */ + open_images_preview:function(data){ + var that = this,mask = $('
            '+ + '
            '+ + ''+ data.filename +''+ + ''+ + ''+ + ''+ + '
            '+ + '
            '+ + '
            '+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + '
            '+ + '
            '+ + ''+ + ''+ + '
            '+ + '
            '), + images_config = {natural_width:0,natural_height:0,init_width:0,init_height:0,preview_width:0,preview_height:0,current_width:0,current_height:0,current_left:0,current_top:0,rotate:0,scale:1,images_mouse:false}; + if($('.preview_images_mask').length > 0){ + $('#preview_images').attr('src','/download?filename=' + data.path); return false; } - var layers = layer.open({ + $('body').css('overflow','hidden').append(mask); + images_config.preview_width = mask[0].clientWidth; + images_config.preview_height = mask[0].clientHeight; + // 图片预览 + $('.preview_body img').load(function(){ + var img = $(this)[0]; + if(!$(this).attr('data-index')) $(this).attr('data-index',data.images_id); + images_config.natural_width = img.naturalWidth; + images_config.natural_height = img.naturalHeight; + auto_images_size(false); + }); + //图片头部拖动 + $('.preview_images_mask .preview_head').on('mousedown',function(e){ + e = e || window.event; //兼容ie浏览器 + var drag = $(this).parent(); + $('body').addClass('select'); //webkit内核和火狐禁止文字被选中 + $(this).onselectstart = $(this).ondrag = function () { //ie浏览器禁止文字选中 + return false; + } + if ($(e.target).hasClass('preview_close')) { //点关闭按钮不能拖拽模态框 + return; + } + var diffX = e.clientX - drag.offset().left; + var diffY = e.clientY - drag.offset().top; + $(document).on('mousemove',function(e){ + e = e || window.event; //兼容ie浏览器 + var left = e.clientX - diffX; + var top = e.clientY - diffY; + if (left < 0) { + left = 0; + } else if (left > window.innerWidth - drag.width()) { + left = window.innerWidth - drag.width(); + } + if (top < 0) { + top = 0; + } else if (top > window.innerHeight - drag.height()) { + top = window.innerHeight - drag.height(); + } + drag.css({ + left:left, + top:top, + margin:0 + }); + }).on('mouseup',function(){ + $(this).unbind('mousemove mouseup'); + }); + }); + //图片拖动 + $('.preview_images_mask #preview_images').on('mousedown',function(e){ + e = e || window.event; + $(this).onselectstart = $(this).ondrag = function(){ + return false; + } + var images = $(this); + var preview = $('.preview_images_mask').offset(); + var diffX = e.clientX - preview.left; + var diffY = e.clientY - preview.top; + $('.preview_images_mask').on('mousemove',function(e){ + e = e || window.event + var offsetX = e.clientX - preview.left - diffX, + offsetY = e.clientY - preview.top - diffY, + rotate = Math.abs(images_config.rotate / 90), + preview_width = (rotate % 2 == 0?images_config.preview_width:images_config.preview_height), + preview_height = (rotate % 2 == 0?images_config.preview_height:images_config.preview_width), + left,top; + if(images_config.current_width > preview_width){ + var max_left = preview_width - images_config.current_width; + left = images_config.current_left + offsetX; + if(left > 0){ + left = 0 + }else if(left < max_left){ + left = max_left + } + images_config.current_left = left; + } + if(images_config.current_height > preview_height){ + var max_top = preview_height - images_config.current_height; + top = images_config.current_top + offsetY; + if(top > 0){ + top = 0 + }else if(top < max_top){ + top = max_top + } + images_config.current_top = top; + } + if(images_config.current_height > preview_height && images_config.current_top <= 0){ + if((images_config.current_height - preview_height) <= images_config.current_top){ + images_config.current_top -= offsetY + } + } + images.css({'left':images_config.current_left,'top':images_config.current_top}); + }).on('mouseup',function(){ + $(this).unbind('mousemove mouseup'); + }).on('dragstart',function(){ + e.preventDefault(); + }); + }).on('dragstart',function(){ + return false; + }); + //关闭预览图片 + $('.preview_close').click(function(e){ + $('.preview_images_mask').remove(); + }); + //图片工具条预览 + $('.preview_toolbar a').click(function(){ + var index = $(this).index(),images = $('#preview_images'); + switch(index){ + case 0: //左旋转,一次旋转90度 + case 1: //右旋转,一次旋转90度 + images_config.rotate = index?(images_config.rotate + 90):(images_config.rotate - 90); + auto_images_size(); + break; + case 2: + case 3: + if(images_config.scale == 3 && index == 2|| images_config.scale == 0.2 && index == 3){ + layer.msg((images_config.scale >= 1?'The image is the maximum size':'The image is the minimum size')); + return false; + } + images_config.scale = (index == 2?Math.round((images_config.scale + 0.4)*10):Math.round((images_config.scale - 0.4)*10))/10; + auto_images_size(); + break; + case 4: + var scale_offset = images_config.rotate % 360; + if(scale_offset >= 180){ + images_config.rotate += (360 - scale_offset); + }else{ + images_config.rotate -= scale_offset; + } + images_config.scale = 1; + auto_images_size(); + break; + } + }); + // 最大最小化图片 + $('.preview_full,.preview_small').click(function(){ + if($(this).hasClass('preview_full')){ + $(this).addClass('hidden').prev().removeClass('hidden'); + images_config.preview_width = that.area[0]; + images_config.preview_height = that.area[1]; + mask.css({width:that.area[0],height:that.area[1],top:0,left:0,margin:0}).data('type','full'); + auto_images_size(); + }else{ + $(this).addClass('hidden').next().removeClass('hidden'); + $('.preview_images_mask').removeAttr('style'); + images_config.preview_width = 750; + images_config.preview_height = 650; + auto_images_size(); + } + }); + // 上一张,下一张 + $('.preview_cut_view a').click(function(){ + var images_src = '',preview_images = $('#preview_images'),images_id = parseInt(preview_images.attr('data-index')); + if(!$(this).index()){ + images_id = images_id === 0?(that.file_images_list.length - 1) : images_id - 1; + images_src = that.file_images_list[images_id]; + }else{ + images_id = (images_id == (that.file_images_list.length - 1))?0:(images_id+1); + images_src = that.file_images_list[images_id]; + } + preview_images.attr('data-index',images_id).attr('src','/download?filename='+images_src); + $('.preview_title').html(that.get_path_filename(images_src)); + }); + // 自动图片大小 + function auto_images_size(transition){ + var rotate = Math.abs(images_config.rotate / 90),preview_width = (rotate % 2 == 0?images_config.preview_width:images_config.preview_height),preview_height = (rotate % 2 == 0?images_config.preview_height:images_config.preview_width),preview_images = $('#preview_images'),css_config = {}; + images_config.init_width = images_config.natural_width; + images_config.init_height = images_config.natural_height; + if(images_config.init_width > preview_width){ + images_config.init_width = preview_width; + images_config.init_height = parseFloat(((preview_width / images_config.natural_width) * images_config.init_height).toFixed(2)); + } + if(images_config.init_height > preview_height){ + images_config.init_width = parseFloat(((preview_height / images_config.natural_height) * images_config.init_width).toFixed(2)); + images_config.init_height= preview_height; + } + images_config.current_width = parseFloat(images_config.init_width * images_config.scale); + images_config.current_height = parseFloat(images_config.init_height * images_config.scale); + images_config.current_left = parseFloat(((images_config.preview_width - images_config.current_width) / 2).toFixed(2)); + images_config.current_top = parseFloat(((images_config.preview_height - images_config.current_height) / 2).toFixed(2)); + css_config = { + 'width':images_config.current_width , + 'height':images_config.current_height, + 'top':images_config.current_top, + 'left':images_config.current_left, + 'display':'inline', + 'transform':'rotate('+ images_config.rotate +'deg)', + 'opacity':1, + 'transition':'all 100ms', + } + if(transition === false) delete css_config.transition; + preview_images.css(css_config); + } + }, + + /** + * @description 打开视频播放 + * @param {Object} data 当前文件的数据对象 + * @return void + */ + open_video_play:function(data){ + var old_filename = data.path, + imgUrl = '/download?filename=' + data.path, + p_tmp = data.path.split('/'), + path = p_tmp.slice(0, p_tmp.length - 1).join('/') + layer.open({ + type: 1, + closeBtn: 2, + title: 'Playing [' + p_tmp[p_tmp.length-1] + ']', + area: ["890px","402px"], + shadeClose: false, + skin:'movie_pay', + content: '
            ', + success: function () { + $.post('/files?action=get_videos', { path: path }, function (rdata) { + var video_list = '',index = 0; + for (var i = 0; i < rdata.length; i++) { + var filename = path + '/' + rdata[i].name; + if(filename === old_filename) index = i; + video_list += ''; + } + video_list += '
            File nameSize
            ' + + rdata[i].name + '' + ToSize(rdata[i].size) + '
            '; + $('.video-list').html(video_list).scrollTop(index * 34); + }); + } + }); + }, + /** + * @description 切换播放 + * @param {String} obj + * @param {String} filename 文件名 + * @return void + */ + play_file:function(obj,filename) { + if($('#btvideo video').attr('data-filename')== filename) return false; + var imgUrl = '/download?filename=' + filename + '&play=true'; + var 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'); + }, + /** + * @description 复制文件和目录 + * @param {Object} data 当前文件的数据对象 + * @return void + */ + 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'); + }, + + /** + * @description 剪切文件和目录 + * @param {Object} data 当前文件的数据对象 + * @return void + */ + 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'); + }, + /** + * @descripttion 粘贴文件和目录 + * @return: 无返回值 + */ + paste_file_or_dir:function(){ + var that = this,_isPaste = bt.get_cookie('record_paste_type'),_paste = bt.get_cookie('record_paste'),_filename = ''; + if(_paste != 'null' && _paste != undefined){_filename = _paste.split('/').pop()} + if(that.file_path.indexOf(_paste) > -1){ + layer.msg('Can not paste ['+_filename+'] here, Because the item cannot be pasted into itself.',{icon:0}) + return false; + } + if(_isPaste != 'null' && _isPaste != undefined){ + switch(_isPaste){ + case 'cut': + case 'copy': + this.check_exists_files_req({dfile:this.file_path,filename:_filename},function(result){ + if(result.length > 0){ + var tbody = ''; + for(var i=0;i'+ToSize(result[i].size)+''+getLocalTime(result[i].mtime)+''; + } + var mbody = '
            \ + '+tbody+'\ +
            File nameSizeLast edit time
            '; + SafeMessage('This files will be overwritten',mbody,function(){ + that.config_paste_to(_paste,_filename); + }); + }else{ + that.config_paste_to(_paste,_filename); + } + }) + break; + case '1': + case '2': + that.batch_file_paste(); + break; + } + } + }, + /** + * @descripttion 粘贴到 + * @param {String} path 复制/剪切路径 + * @param {String} _filename 文件名称 + * @return: 无返回值 + */ + config_paste_to:function(path,_filename){ + var that = this,_type= bt.get_cookie('record_paste_type'); + this.$http(_type == 'copy'?'CopyFile':'MvFile',{sfile:path,dfile:(this.file_path+'/'+_filename)},function(rdata){ + if(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}) + }) + }, + /** + * @description 重命名文件和目录 + * @param {Object} data 当前文件的数据对象 + * @return void + */ + rename_file_or_dir:function(data){ + var that = this; + that.is_editor = true; + $('.file_list_content .file_tr:nth-child('+(data.index+1)+')').addClass('editr_tr').find('.file_title').empty().append($((bt.get_cookie('rank') == 'icon'?'':''))) + if(bt.get_cookie('rank') == 'icon'){ + $('textarea[name=rename_file_input]').css({'height':$('textarea[name=rename_file_input]')[0].scrollHeight}) + } + $((bt.get_cookie('rank') == 'icon'?'textarea':'input')+'[name=rename_file_input]').on('input',function(){ + if(bt.get_cookie('rank') == 'icon'){ + this.style.height = 'auto'; + this.style.height = this.scrollHeight + "px"; + } + if(data.type == 'file'){ + 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){ + if(e.keyCode == 13) $(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)} + if(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 = false; + return false; + } + if(that.match_unqualified_string(_val)) return 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})}); + }); + that.is_editor = false; + }).focus(); + }, + + /** + * @description 设置文件和目录分享 + * @param {Object} data 当前文件的数据对象 + * @returns void + */ + set_file_share:function(data){ + var that = this; + this.loadY = bt.open({ type: 1, shift: 5, closeBtn: 2, - area: ['850px', '580px'], - title: 'Share list', - content: '
            \ - \ - \ - ' + _html + '\ -
            Sharing nameFile addressExpiration dateOperation
            \ -
            ' + res.page + '
            \ -
            ', - success: function (layers, index) { - $('.download_table').on('click', '.info_down', function () { - var indexs = $(this).attr('data-index'); - set_download_url(rdata[indexs]); - }); - $('.download_table').on('click', '.del_down', function () { - var id = $(this).attr('data-id'); - del_download_url(id, false); - }); - $('.download_table .download_url_page').on('click', 'a', function (e) { - var _href = $(this).attr('href'); - var page = _href.replace(/\/files\?action=get_download_url_list\?p=/, '') - get_download_url_list({ - p: page - }, true); + area: '450px', + title: 'Set share '+ data.type_tips +'-['+ data.filename +']', + btn:['Create','Cancel'], + content: '' + + '
            Share name
            ' + + '
            Expiration date
            ' + +'' + +'' + +'' + +'
            ' + + '
            Extraction code
            ' + + '
            ', + yes:function(indexs,layers){ + var ps = $('[name=ps]').val(),expire = $('[name=expire]:checked').val(),password = $('[name=password]').val(); + if(ps === ''){ + layer.msg('No sharing name!',{icon:2}) return false; + } + that.create_download_url({ + filename:data.path, + ps:ps, + password:password, + expire:expire + },function(res){ + if(!res.status){ + layer.msg(res.msg,{icon:res.status?1:2}) + return false; + }else{ + var rdata = res.msg; + that.file_list[data.index] = $.extend(that.file_list[data.index],{down_id:rdata.id,down_info:rdata}); + that.loadY.close(); + that.info_file_share(data); + that.reader_file_list_content(that.file_list); + } + }); + }, + success: function (layers, index) { + $('#random_paw').click(function(){ + $(this).prev().val(bt.get_random(6)); }); } }); - }); -} + }, - -function RClickAll(e) { - var menu = $("#rmenu"); - var windowWidth = $(window).width(), - windowHeight = $(window).height(), - menuWidth = menu.outerWidth(), - menuHeight = menu.outerHeight(), - x = (menuWidth + e.clientX < windowWidth) ? e.clientX : windowWidth - menuWidth, - y = (menuHeight + e.clientY < windowHeight) ? e.clientY : windowHeight - menuHeight; - - menu.css('top', y) - .css('left', x) - .css('position', 'fixed') - .css("z-index", "1") - .show(); -} - -function GetPathSize() { - var path = encodeURIComponent($("#DirPathPlace input").val()); - layer.msg(lan.files.calc_now, { - icon: 16, - time: 0, - shade: [0.3, '#000'] - }) - $.post("/files?action=GetDirSize", "path=" + path, function (rdata) { - layer.closeAll(); - $("#pathSize").text(rdata) - }) -} -$("body").not(".def-log").click(function () { - $("#rmenu").hide() -}); -$("#DirPathPlace input").keyup(function (e) { - if (e.keyCode == 13) { - GetFiles($(this).val()); - } -}); - -function PathPlaceBtn(path) { - var html = ''; - var title = ''; - path = path.replace('//', '/'); - var Dpath = path; - if (path == '/') { - html = '
          • ' + lan.files.path_root + '
          • '; - } else { - Dpath = path.split("/"); - for (var i = 0; i < Dpath.length; i++) { - title += Dpath[i] + '/'; - Dpath[0] = lan.files.path_root; - html += '
          • ' + Dpath[i] + '
          • '; + /** + * @description 分享信息查看 + * @param {Object} data 当前文件的数据对象 + * @returns void + */ + info_file_share:function(data){ + var that = this; + if(typeof data.down_info == "undefined"){ + this.get_download_url_find({id:data.down_id},function(res){ + that.file_list[data.index] = $.extend(that.file_list[data.index],{down_info:res}); + that.file_share_view(that.file_list[data.index],'fonticon'); + }) + return false; } - } - html = '
              ' + html + '
            '; - $("#PathPlaceBtn").html(html); - $("#PathPlaceBtn ul li a").click(function (e) { - var Gopath = $(this).attr("title"); - if (Gopath.length > 1) { - if (Gopath.substr(Gopath.length - 1, Gopath.length) == '/') { - Gopath = Gopath.substr(0, Gopath.length - 1); + this.file_share_view(data,'fonticon'); + }, + /** + * @description 分享信息视图 + * @param {Object} data 当前文件的数据对象 + * @param {String} type 区别通过右键打开或是图标点击 + * @returns void + */ + file_share_view:function(datas,type){ + var data = datas + if(type == 'fonticon'){data = datas.down_info} + var that = this,download_url = location.origin + '/down/'+ data.token; + this.loadY = bt.open({ + type: 1, + shift: 5, + closeBtn: 2, + area: '550px', + title: 'Share details-['+ data.filename +']', + content: '
            ' + + '
            Share name
            ' + + '' + + '' + + '
            Expiration date
            '+((data.expire > (new Date('2099-01-01 00:00:00').getTime())/1000)?'Permanent':bt.format_data(data.expire))+'
            ' + + '
            ' + + '' + + '' + + '
            ' + + '
            ', + success: function (layers,index) { + var copy_url = new ClipboardJS('.copy_url'); + var 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:[0.05, '#000'], + shadeClose:true, + 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(); + if(type == 'fonticon'){ + that.file_list[datas.index].down_id = 0; + that.reader_file_list_content(that.file_list); + } + if(type == 'list'){that.render_share_list();} + layer.msg(res.msg,{icon:res.status?1:2}) + }) + }); } + }); + }, + /** + * @description 删除文件和目录 + * @param {Object} data 当前文件的数据对象 + * @return void + */ + del_file_or_dir:function(data){ + var that = this; + if(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}) + }); + }); + }else{ + bt.show_confirm('Delete '+ data.type_tips +'[ '+ data.filename +' ]','Recycle bin is not currently open, delete '+ (data.type == 'dir'?'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}) + }); + }) } - GetFiles(Gopath); - e.stopPropagation(); - }); - PathLeft(); -} + + }, -function PathLeft() { - var UlWidth = $("#PathPlaceBtn ul").width(); - var SpanPathWidth = $("#PathPlaceBtn").width() - 50; - var Ml = UlWidth - SpanPathWidth; - if (UlWidth > SpanPathWidth) { - $("#PathPlaceBtn ul").css("left", -Ml) - } else { - $("#PathPlaceBtn ul").css("left", 0) - } -} - -var store_type_index = 0 -//删除分类或者文件 -function del_files_store(path, obj) { - var _item = $(obj).parents('tr').data('item') - var action = '', - msg = ''; - var data = {} - action = 'del_files_store'; - data['path'] = _item.path; - msg = "Are you sure to delete the path [ " + _item.path + " ]?" - bt.confirm({ - msg: msg, - title: 'Tips' - }, function () { - var loading = bt.load(); - bt.send(action, 'files/' + action, data, function (rRet) { - loading.close(); - if (rRet.status) { - set_file_store(path) - GetFiles(getCookie('Path')) - } - bt.msg(rRet); - }) - }) -} - -function set_file_store(path) { - - var loading = bt.load(); - bt.send('get_files_store', 'files/get_files_store', {}, function (rRet) { - loading.close(); - if ($('#stroe_tab_list').length <= 0) { - bt.open({ + /** + * @description 取消文件收藏 + * @param {Object} data 当前文件的数据对象 + * @param {Object} el 当前元素对象 + * @returns void + */ + 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){ + if(res.status){ + that.file_list[index].caret = false; + that.reader_file_list_content(that.file_list); + that.load_favorites_index_list(); + } + layer.msg(res.msg,{icon:res.status?1:2}) + }) + }); + }, + + /** + * @description 设置文件权限 - ok + * @param {Object} data 当前文件的数据对象 + * @param {Boolean} isPatch 是否多选 + * @returns void + */ + set_file_authority:function(data,isPatch){ + var that = this; + that.get_file_authority({path:data.path},function(rdata){ + var tex = '
            \ + \ + \ + \ +
            \ + \ +
            '; + that.loadY = layer.open({ type: 1, - skin: 'demo-class', - area: '510px', - title: "Manage favorites", closeBtn: 2, - shift: 5, + title: lan.files.set_auth + '[' + data.filename + ']', + area: '465px', shadeClose: false, - content: "
            ", - success: function () { - $('#btn_data_store_add').click(function () { - bt.send('add_files_store_types', 'files/add_files_store_types', { - file_type: $(".type_name").val() - }, function (rRet) { - loading.close(); - - if (rRet.status) { - set_file_store(path) - GetFiles(path) - } - bt.msg(rRet); + content: '
            \ +
            \ +
            Set permission
            \ +
            Backups list
            \ +
            \ +
            ' + tex + '\ +
            \ + '+ lan.files.file_own + '\ +

            '+ lan.files.file_read + '

            \ +

            '+ lan.files.file_write + '

            \ +

            '+ lan.files.file_exec + '

            \ +
            \ +
            \ + '+ lan.files.file_group + '\ +

            '+ lan.files.file_read + '

            \ +

            '+ lan.files.file_write + '

            \ +

            '+ lan.files.file_exec + '

            \ +
            \ +
            \ + '+ lan.files.file_public + '\ +

            '+ lan.files.file_read + '

            \ +

            '+ lan.files.file_write + '

            \ +

            '+ lan.files.file_exec + '

            \ +
            \ +
            ' + lan.files.file_menu_auth + ',\ + '+ lan.files.file_own + '\ + \ + \ +
            \ +
            \ +
            \ +
            \ + \ + \ +
            \ +
            ', + success: function (index,layers) { + that.edit_access_authority(); + $("#access").keyup(function () { + that.edit_access_authority(); + }); + $("input[type=checkbox]").change(function () { + var idName = ['owner', 'group', 'public']; + var onacc = ''; + for (var n = 0; n < idName.length; n++) { + var access = 0; + access += $("#" + idName[n] + "_x").prop('checked') ? 1 : 0; + access += $("#" + idName[n] + "_w").prop('checked') ? 2 : 0; + access += $("#" + idName[n] + "_r").prop('checked') ? 4 : 0; + onacc += access; + } + $("#access").val(onacc); + }); + //提交 + $('.set_access_authority').click(function(){ + var chmod = $("#access").val(); + var chown = $("#chown").val(); + var all = $("#accept_all").prop("checked") ? 'True' : 'False'; + var _form = {} + _form = { + user:chown, + access:chmod, + all:all + } + if(isPatch){ + _form['type'] = data.type + _form['path'] = data.path + _form['data'] = data.filelist + }else{ + _form['filename'] = data.path + } + that.$http(isPatch?'SetBatchData':'SetFileAccess',_form,function(res){ + if (res.status){ + layer.close(layers); + that.reader_file_list({path:that.file_path,is_operating:false} + )} + layer.msg(res.msg, { icon: res.status ? 1 : 2 }); }) }) - reload_sort_data(path) + $('.layer_close').click(function () { + layer.close(layers); + }); + + that.$http('get_path_premissions',{path: data.filename},function(edata){ + if(edata.length == 0) $('.backuptip').text('No backup'); + }); + $('button.restore').click(function () { + that.backup_files_permission(data.path,1); + }); + $(".tolist").click(function () { + $(".backup-list").click(); + }); + $(".bt_tab_list .bt_tab_index").click(function () { + $(this).addClass('active').siblings().removeClass('active'); + if($(this).index()==0){ + $('.backup_lists').empty(); + $('.chmodset').show(); + }else{ + that.backup_files_list(data.path); + } + }); } }); - } else { - reload_sort_data(path) + }); + }, + /** + * @description 备份权限弹窗 + * @returns void + */ + backup_files_permission:function(file, type){ + //文件夹type为0 + var sub_type = 1; + if (type == 1) { + sub_type = $("#accept_all").prop("checked") ? 1 : 0; } + // if (file == '' || typeof (file) == 'undefined') { + // layer.msg('Please select a directory or file', { + // icon: 2, + // time: 1900 + // }); + // return false; + // } + var that = this; + var layerss = layer.open({ + type: 1, + closeBtn: 2, + title: 'Confirm backup?', + area: '300px', + shadeClose: false, + btn: ['Yes', 'No'], + content: '
            \ +

            Please enter the current backup name

            \ +
            Remarks\ + \ +
            \ +
            ', + yes: function (layerss, index) { + $('.layer_close').click(function () { + layer.close(index); + }); + that.$http('back_path_permissions',{back_sub_dir: sub_type,path: file,remark: $("input.form-control").val()},function(edata){ + layer.close(layerss); + if (!edata.status) { + layer.msg(edata.msg, { + time: 1900, + icon: 2, + }); + return false; + } + if (type == 0) { + var new_back = that.backup_list(); + $(".buplist").html(new_back); + } else if (type == 3) { + var chmod = $("#access").val(); + var chown = $("#chown").val(); + var all = $("#accept_all").prop("checked") ? 'True' : 'False'; + var data = 'filename=' + encodeURIComponent(file) + '&user=' + chown + '&access=' + chmod + '&all=' + all; + Oksend(data); + layer.closeAll(); + } + layer.msg(edata.msg, { + time: 1900, + icon: 1, + }); + }); + }, + btn2: function () { + layer.close(layerss); + }, + cancel: function () { + layer.close(layerss); + } + }); + }, + /** + * @description 全部备份权限列表 + * @returns void + */ + backup_list:function(){ + var all_back = '',that = this; + that.$http('get_all_back',function(edata){ + for (var i = 0; i < edata.length; i++) { + var d = new Date(edata[i][2] * 1000); + var minut = d.getMinutes(); + var hours = d.getHours(); + var second = d.getSeconds(); + if (minut <= 9) minut = '0' + minut + ''; + if (hours <= 9) hours = '0' + hours + ''; + if (second <= 9) second = '0' + second + ''; + var date = (d.getFullYear()) + "/" + + (d.getMonth() + 1) + "/" + + (d.getDate()) + " " + + (hours) + ":" + (minut) + ":" + (second); + all_back += '\ + ' + date + '\ + \ + ' + edata[i][3] + '\ + \ + ' + edata[i][1] + '\ + Del\ + '; + } + $(".allback .buplist").html(all_back); + }); + }, + /** + * @description 全部备份权限弹窗 + * @returns void + */ + manage_backup:function(){ + var that = this; + var layerss = layer.open({ + type: 1, + closeBtn: 2, + title: 'Manage Backups', + area: ['630px', '500px'], + shadeClose: false, + content: '
            \ +
            \ + \ +
            \ + \ + \ +
            \ +
            \ + \ + \ + \ + \ + \ + \ + \ + \ + \ +
            Backup timeBackup pathNameDelect
            \ +
            \ + \ + \ +
            \ +
            \ +
            ', + cancel: function () { + layer.close(layerss); + }, + success: function () { + that.backup_list() + $("#btn-backup").click(function (e) { + var backup_path = $("#server_path").val(); + that.backup_files_permission(backup_path,0); + }); + $(".allback").on('click', '.del_back', function () { + var _id = $(this).parents('tr').attr('data-id'); + that.del_backup(_id); + }); + } + }); + }, + /** + * @description 删除备份 + * @returns void + */ + del_backup:function(id){ + var that = this; + layer.confirm('The backup cannot be restored after deletion.
            Continue to delete?',{title: 'Confirm delete?',btn: ['Yes', 'No'],closeBtn:2},function(index, layero){ + that.$http('del_path_premissions',{id: id},function(edata){ + var file = $(".layui-layer-title:eq(0)").text(); + if(file!=='Manage Backups'){ + file = $(".backup_list").attr('data-path'); + that.backup_files_list(file); + }else{ + $(".allback tbody tr[data-id=" + id + "]").remove(); + } + layer.msg(edata.msg, { icon: edata.status ? 1 : 2 }); + }); + }); + }, + /** + * @description 本文件备份列表 + * @returns void + */ + backup_files_list:function(fileName){ + var that = this; + that.$http('get_path_premissions',{path: fileName},function(edata){ + var tbody = '',cont=''; + if(edata.length==0){ + tbody='No data' + }else{ + for (var i = 0; i < edata.length; i++) { + var d = new Date(edata[i][3] * 1000), + minut = d.getMinutes(), + hours = d.getHours(); + if (minut <= 9) minut = '0' + minut + ''; + if (hours <= 9) hours = '0' + hours + ''; + var date = (d.getFullYear()) + "/" + + (d.getMonth() + 1) + "/" + + (d.getDate()); + tbody += '\ + '+edata[i][4]+'\ + '+edata[i][2]+'\ + '+edata[i][1]+'\ + '+date+'\ + Restore | Del\ + '; + } + } + cont = '
            \ +
            \ + \ + Fix all permissions to [ Folder: 755, File: 644 ]\ + \ +
            \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + '+tbody+'\ + \ +
            NamepermissionOwnerBackup TimeOpt
            \ +
            '; + $('.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:false}); + 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); + }); + }); + }, + /** + * @description 权限备份的还原 + * @returns void + */ + restore_file_permission:function(restore_time,fileName){ + var that = this, sub_type = $("#accept_all").prop("checked") ? 1 : 0; + var layerss = layer.open({ + type: 1, + closeBtn: 2, + title: 'Confirm restore', + area: '330px', + shadeClose: false, + btn: ['Yes', 'No'], + content: '
            \ + Restore would overwrite the current settings, continue?\ +
            ', + yes: function (layerss, index) { + that.$http('restore_path_permissions',{restore_sub_dir: sub_type,date: restore_time,path: fileName},function(edata){ + layer.closeAll(); + layer.msg(edata.msg, { + icon: 1, + time: 1900 + }); + }); + }, + btn2: function () { + layer.close(layerss); + }, + cancel: function () { + layer.close(layerss); + } + }); + }, + /** + * @description 获取实时任务视图 + * @returns void + */ + get_present_task_view:function(){ + this.file_present_task = layer.open({ + type: 1, + title: "实时任务队列", + area: '500px', + closeBtn: 2, + skin:'present_task_list', + shadeClose: false, + shade: false, + offset: 'auto', + content: '
            ' + }) + }, + /** + * @description 渲染实时任务列表数据 + * @returns void + */ + render_present_task_list:function(){ + var that = this; + this.get_task_req({status:-3},function(lists){ + if(lists.length == 0){ + layer.close(that.file_present_task) + that.file_present_task = null; + that.reader_file_list({path:that.file_path,is_operating:false}) + return + } + var task_body = '',is_add = false; + $.each(lists,function(index,item){ + if(item.status == -1){ + if(!that.file_present_task) that.get_present_task_view(); + if(item.type == '1'){ + task_body +='
            \ +
              \ +
            • \ +
              '+lan.layout.download + item.shell + '' + item.log.pre + '%'+lan.public.cancel+'
              \ +
              \ +
              '+ item.log.used + '/' + ToSize(item.log.total) + '' + (item.log.speed == 0 ? lan.layout.connect : item.log.speed) + '/s'+lan.files.expected_to_be+': ' + item.log.time +'
              \ +
            • \ +
            \ +
            ' + }else{ + task_body += '
            ' + item.name + ': ' + item.shell + ''+lan.public.cancel+'
            \ +
            \ + '+ item.log +'\ +
            ' + } + }else{ + if (!is_add) { + task_body += '
            '+lan.layout.wait_task+'
              '; + is_add = true; + } + task_body += '
            • ' + item.name + ': ' + item.shell + 'X
            • '; + } + }) + if(that.file_present_task){ + if(is_add) task_body+= '
            ' + $(".message-list").html(task_body); + } + setTimeout(function () { that.render_present_task_list(); }, 1000); + }) + }, + /** + * @description 取消实时任务列表 + * @returns void + */ + 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); + }); + }, + /** + * @descripttion 设置访问权限 + * @returns void + */ + edit_access_authority:function(){ + var access = $("#access").val(); + var idName = ['owner', 'group', 'public']; + for (var n = 0; n < idName.length; n++) { + $("#" + idName[n] + "_x").prop('checked', false); + $("#" + idName[n] + "_w").prop('checked', false); + $("#" + idName[n] + "_r").prop('checked', false); + } + for (var i = 0; i < access.length; i++) { + var onacc = access.substr(i, 1); + if (i > idName.length) continue; + if (onacc > 7) $("#access").val(access.substr(0, access.length - 1)); + switch (onacc) { + case '1': + $("#" + idName[i] + "_x").prop('checked', true); + break; + case '2': + $("#" + idName[i] + "_w").prop('checked', true); + break; + case '3': + $("#" + idName[i] + "_x").prop('checked', true); + $("#" + idName[i] + "_w").prop('checked', true); + break; + case '4': + $("#" + idName[i] + "_r").prop('checked', true); + break; + case '5': + $("#" + idName[i] + "_r").prop('checked', true); + $("#" + idName[i] + "_x").prop('checked', true); + break; + case '6': + $("#" + idName[i] + "_r").prop('checked', true); + $("#" + idName[i] + "_w").prop('checked', true); + break; + case '7': + $("#" + idName[i] + "_r").prop('checked', true); + $("#" + idName[i] + "_w").prop('checked', true); + $("#" + idName[i] + "_x").prop('checked', true); + break; + } + } + }, + /** + * @description 获取文件权限 - ok + * @param {Object} data 当前文件的数据对象 + * @param {Object} el 当前元素对象 + * @returns void + */ + get_file_authority:function(data,callback){ + this.$http('GetFileAccess',{filename:data.path},function(rdata){if(callback) callback(rdata)}); + }, + /** + * @description 文件夹目录查杀 + * @param {Object} data 当前文件的数据对象 + * @returns void + */ + set_dir_kill:function(data){ + var that = this; + if(data.ext == 'php'){ + that.$http('file_webshell_check',{filename:data.path},function(rdata){ + layer.msg(rdata.msg,{icon:rdata.status?1:2}) + }) + }else{ + 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}) + }) + }) + } + }, + /** + * @description 文件路径合并 + * @param {String} paths 旧路径 + * @param {String} param 新路径 + * @return {String} 新的路径 + */ + path_resolve:function(paths, param){ + var path = '',split = ''; + if(!Array.isArray(param)) param = [param]; + paths.replace(/([\/|\/]*)$/,function($1){ + split = $1; + return 'www'; + }); + $.each(param,function(index,item){ + path += '/' + item; + }); + return (paths+path).replace('//','/'); + }, + + /** + * @descripttion 取扩展名 + * @return: 返回扩展名 + */ + get_ext_name:function(fileName){ + var extArr = fileName.split("."); + var 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"]; + var extLastName = extArr[extArr.length - 1]; + for(var i=0; iDel'; + /** + * @description 获取路径上的文件名称 + * @param {String} path 路径 + * @return {String} 文件名称 + */ + get_path_filename:function(path){ + var paths = path.split('/'); + return paths[paths.length - 1]; + }, + + /** + * @description 返回上一层目录地址 + * @param {String} path 当前路径 + * @returns 返回上一层地址 + */ + retrun_prev_path:function(path){ + var dir_list = path.split('/'); + dir_list.splice(dir_list.length - 1); + if(dir_list == '') dir_list = ['/'] + return dir_list.join('/'); + }, + /** + * @descripttion: 路径过滤 + * @return: 无返回值 + */ + path_check:function(path) { + path = path.replace('//', '/'); + if (path === '/') return path; + path = path.replace(/\/+$/g,''); + return path; + }, + + /** + * @description 获取文件权限信息 + * @param {Object} data 请求传入参数 + * @param {Function} callback 回调参数 + * @returns void + */ + get_file_access:function(data,callback){ + var that = this; + this.layerT = bt.load('Getting file permissions, please wait...'); + bt.send('GetFileAccess','files/GetFileAccess',{path:data.path},function(res){ + that.loadT.close(); + if(callback) callback(); + }); + }, + + /** + * @description 创建外链下载 + * @param {Object} data 请求传入参数 + * @param {Function} callback 回调参数 + * @returns void + */ + create_download_url:function(data,callback){ + var that = this; + this.layerT = bt.load('sharing file, please wait...'); + bt.send('create_download_url','files/create_download_url',{filename:data.filename,ps:data.ps,password:data.password,expire:data.expire}, function (res) { + that.layerT.close(); + if (callback) callback(res); + }); + }, + + /** + * @description 获取外链下载数据 + * @param {Object} data 请求传入参数 + * @param {Function} callback 回调参数 + * @returns void + */ + get_download_url_find:function(data,callback){ + var that = this; + this.layerT = bt.load('Getting sharing file datals, please wait...'); + bt.send('get_download_url_find','files/get_download_url_find',{id:data.id}, function (res) { + that.layerT.close(); + if (callback) callback(res); + }); + }, + + /** + * @description 删除外链下载 + * @param {Object} data 请求传入参数 + * @param {Function} callback 回调参数 + * @returns void + */ + remove_download_url:function(data,callback){ + var that = this; + layer.confirm('Comfirm to stop sharing【'+ data.fileName +'】, continue?',{ title: 'Cancel sharing', closeBtn: 2, icon: 3 }, function () { + this.layerT = bt.load('Canceling sharing files, please wait...'); + bt.send('remove_download_url','files/remove_download_url',{id:data.id},function(res){ + if (callback) callback(res); + }); + }) + + }, + + /** + * @description 获取磁盘列表 + * @param {Function} callback 回调参数 + * @returns void + */ + get_disk_list:function(callback){ + bt_tools.send('system/GetDiskInfo',function (res) { + if (callback) callback(res); + },'Getting disk list, please wait...'); + }, + + // 新建文件(文件和文件夹) + create_file_req: function (data, callback) { + var _req = (data.type === 'folder' ? 'CreateDir' : 'CreateFile') + bt.send(_req, 'files/' + _req, { + path: data.path + }, function (res) { + if (callback) callback(res); + }); + }, + + // 重命名文件(文件或文件夹) + rename_file_req: function (data, callback){ + bt_tools.send('files/MvFile', { + sfile: data.sfile, + dfile: data.dfile, + rename: data.rename || true + }, function (res) { + if (callback) callback(res); + },'Renaming'); + }, + + // 剪切文件请求(文件和文件夹) + shear_file_req: function (data, callback) { + this.rename_file_req({ + sfile: data.sfile, + dfile: data.dfile, + rename: false + }, function (res) { + if (callback) callback(res); + },'Cutting'); + }, + + // 检查文件是否存在(复制文件和文件夹前需要调用) + check_exists_files_req: function (data, callback) { + var layerT = bt.load('Checking files, please wait...'); + bt.send('CheckExistsFiles', 'files/CheckExistsFiles', { + dfile: data.dfile, + filename: data.filename + }, function (res) { + layerT.close(); + if (callback) callback(res); + }); + }, + + // 复制文件(文件和文件夹) + copy_file_req: function (data, callback) { + bt.send('CopyFile', 'files/CopyFile', { + sfile: data.sfile, + dfile: data.dfile + }, function (res) { + if (callback) callback(res); + }); + }, + + // 压缩文件(文件和文件夹) + compress_file_req: function (data, callback) { + bt.send('Zip', 'files/Zip', { + sfile: data.sfile, + dfile: data.dfile, + z_type: data.z_type, + path: data.path + }, function (res) { + if (callback) callback(res); + }); + }, + + // 获取实时任务 + get_task_req: function (data, callback) { + bt.send('get_task_lists', 'task/get_task_lists', { + status: data.status + }, function (res) { + if (callback) callback(res); + }); + }, + + // 获取文件权限 + get_file_access: function () { + bt.send('GetFileAccess', 'files/GetFileAccess', { + filename: data.filename + }, function (res) { + if (callback) callback(res); + }); + }, + + // 设置文件权限 + set_file_access: function () { + bt.send('SetFileAccess', 'files/SetFileAccess', { + filename: data.filename, + user: data.user, + access: data.access, + all: data.all + }, function (res) { + if (callback) callback(res); + }); + }, + + /** + * @description 删除文件(文件和文件夹) + * @param {Object} data 文件目录参数 + * @param {Function} callback 回调函数 + * @return void + */ + del_file_req: function (data, callback) { + var _req = (data.type === 'dir' ? 'DeleteDir' : 'DeleteFile') + var layerT = bt.load('Deleting file, please wait...'); + bt.send(_req, 'files/' + _req,{path: data.path}, function (res) { + layerT.close(); + layer.msg(res.msg,{icon:res.status?1:2}) + if (callback) callback(res); + }); + }, + + /** + * @description 下载文件 + * @param {Object} 文件目录参数 + * @param {Function} callback 回调函数 + * @return void + */ + down_file_req: function (data, callback) { + window.open('/download?filename=' + encodeURIComponent(data.path)); + }, + + /** + * @description 获取文件大小(文件夹) + * @param {*} data 文件目录参数 + * @param {Function} callback 回调函数 + * @return void + */ + get_file_size: function (data, callback){ + bt_tools.send('files/get_path_size',{path:data.path},callback,'Getting directory size, please wait...'); + }, + /** + * @description 获取目录大小 + * @param {*} data 文件目录地址 + * @return void + */ + get_dir_size:function(data,callback){ + bt_tools.send('files/GetDirSize',{path:data.path},function(rdata){ + $("#file_all_size").text(rdata) + if(callback) callback(rdata); + },{tips:'Counting, please wait...',verify:true}); + }, + /** + * @description 获取文件目录 + * @param {*} data 文件目录参数 + * @param {Function} callback 回调函数 + */ + get_dir_list:function(data, callback) { + var that = this,f_sort = bt.get_cookie('files_sort'); + if(f_sort){ + data['sort'] = f_sort; + data['reverse'] = bt.get_cookie('name_reverse'); + } + bt_tools.send('files/GetDir',$.extend({p:1,showRow:(bt.get_storage('local','showRow') || that.file_page_num),path:bt.get_cookie('Path') || data.path},data),callback,{tips:false}); + }, + /** + * @description 文件、文件夹压缩 + * @param {Object} data 文件目录参数 + * @param {Boolean} isbatch 是否批量操作 + */ + compress_file_or_dir:function(data,isbatch){ + var that = this; + $('.selection_right_menu').removeAttr('style'); + this.reader_form_line({ + url:'Zip', + overall: {width:'310px'}, + data:[ + {label:'Compress type', type:'select', name:'z_type', value:data.open, list:[ + ['tar_gz','tar.gz'], + ['zip','zip'], + ['rar','rar'] + ]}, + {label:'Compress path', id:'compress_path', name:'dfile', placeholder:'URL address', value:data.path+'.'+(data.open == 'tar_gz'?'tar.gz':data.open)} + ], + beforeSend:function(updata){ + var ind = data.path.lastIndexOf("\/"),_url = data.path.substring(0,ind+1); // 过滤路径文件名 + return {sfile:data.filename,dfile:updata.dfile,z_type:(updata.z_type == 'tar_gz'?'tar.gz':updata.z_type),path:_url} + } + },function(form,html){ + var loadT = layer.open({ + type:1, + title:'Compress '+ data.type_tips +'[ '+ data.filename +' ]', + area: '520px', + shadeClose: false, + closeBtn:2, + skin:'compress_file_view', + btn:['Compress','Close'], + content: html[0].outerHTML, + success:function(){ + // 切换压缩格式 + $('select[name=z_type]').change(function(){ + var _type = $(this).val(),_inputVel = $('input[name=dfile]').val(),path_list = []; + _type == 'tar_gz'? 'tar.gz' : _type + _inputVel = _inputVel.substring(0,_inputVel.lastIndexOf('\/')) + path_list = _inputVel.split('/'); + $('input[name=dfile]').val(_inputVel+'/'+(isbatch?path_list[path_list.length -1]:data.filename)+'.'+_type) + }) + // 插入选择路径 + $('.compress_file_view .line:nth-child(2)').find('.info-r').append(''); + }, + yes:function(){ + var ress = form.getVal(); + if(ress.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}) + }, 1000); + if(res == null || res == undefined){ + layer.msg(lan.files.zip_ok, { icon: 1 }); } - }, - ], - data: rRet + if(res.status){ + that.render_present_task_list(); + } + layer.close(loadT) + }) + } + }) + }) + }, + /** + * @description 文件、文件夹解压 + * @param {*} data 文件目录参数 + */ + 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: false, + closeBtn:2, + skin:'unpack_file_view', + btn:['Comfirm','Cancel'], + content: html[0].outerHTML, + success:function(){ + if(data.ext == 'gz') _type = 'tar' //解压格式 + if(_type == 'zip') { // 判断是否插入解压密码 + $('.unpack_file_view .line:nth-child(2)').append('
            Password
            ') + } + }, + yes:function(){ + var ress = form.getVal(); + if(ress.z_name == '') return layer.msg('Please enter the file name path',{icon:2}) + if(ress.z_path == '') return layer.msg('Please enter the decompression address',{icon:2}) + form.submitForm(function(res,datas){ + layer.close(loadT) + setTimeout(function(){ + that.reader_file_list({path:datas.path}) + }, 1000); + if(res.status){ + that.render_present_task_list(); + } + layer.msg(res.msg,{icon:res.status?1:2}) + }) + } + }) + }) + }, + + /** + * @description 匹配非法字符 + * @param {Array} item 配置对象 + * @return 返回匹配结果 + */ + match_unqualified_string:function(item){ + var containSpecial = RegExp(/[(\ )(\*)(\|)(\\)(\:)(\")(\/)(\<)(\>)(\?)(\)]+/); + return containSpecial.test(item) + }, + /** + * @description 渲染表单 + * @param {Array} config 配置对象 + * @param {Function} callback 回调函数 + * @return void + */ + reader_form_line:function(config,callback){ + var that = this,random = bt.get_random(10),html = $('
            '),data = config,eventList = [],that = this; + if(!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 ''; + break; + case 'text': + default: + return ''; + break; + } + }(item))); + if(item.eventType || item.event){ + if(!Array.isArray(item.eventType)) item.eventType = [item.eventType]; + $.each(item.eventType,function(index,items){ + eventList.push({el:event_random,type:items || 'click',event:item[items] || null}); + if(config.el){ + var els = $('[data-event="'+ item.el +'"]'); + if(item[items]){ + if(items == 'enter'){ + els.on('keyup',function(e){ + if(e.keyCode == 13) item.event(e) + }) + }else{ + els.on(item || 'click',item.event); + } + }else{ + if(items == 'focus'){ + var vals = els.val(); + if(vals != ''){ + els.val('').focus().val(vals); + } + }else{ + els[items](); + } + + } + } + }); + } + form_line.find('.info-r').append(form_el) + html.append(form_line); + }); + if(config.el) $(config.el).empty().append(html); + if(callback) callback({ + // 获取内容 + getVal:function(){ + return $('#'+random).serializeObject(); + }, + // 设置事件,没有设置el参数,需要 + setEvent:function(){ + $.each(eventList,function(index,item){ + var els = $('[data-event="'+ item.el +'"]'); + if(item.event === null){ + if(item.type == 'focus'){ + var vals = els.val(); + if(vals != ''){ + els.val('').focus().val(vals); + } + }else{ + els[item.type](); + } + }else{ + if(item.type == 'enter'){ + els.on('keyup',function(e){ + if(e.keyCode == 13) item.event(e) + }) + }else{ + els.on(item.type,item.event); + } + } + }); + }, + // 提交表单 + submitForm:function(callback){ + var data = this.getVal(); + if(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(); + if(callback) callback(rdata,data) + }) + } + },html); + }, + + /** + * @description 文件管理请求方法 + * @param {*} data + * @param {*} data + * @param {*} callback + */ + $http:function(data,parem,callback){ + var that = this,loadT = ''; + if(typeof data == "string"){ + if(typeof parem != "object") callback = parem,parem = {}; + if(!Array.isArray(that.method_list[data])) that.method_list[data] = ['files',that.method_list[data]]; + that.$http({method:data,tips:(that.method_list[data][1]?that.method_list[data][1]:false),module:that.method_list[data][0],data:parem,msg:true},callback); + }else { + if(typeof data.tips != 'undefined' && data.tips) loadT = bt.load(data.tips); + bt.send(data.method,(data.module || 'files') +'/' + data.method,data.data || {},function(res){ + if(loadT != '') loadT.close(); + if(typeof res == "string") res = JSON.parse(res); + if(res.status === false && res.msg){ + bt.msg(res); + return false; + } + if(parem) parem(res) }); } - }) + } } +bt_file.init(); -$("#PathPlaceBtn").on("click", function (e) { - if ($("#DirPathPlace").is(":hidden")) { - $("#DirPathPlace").css("display", "inline"); - $("#DirPathPlace input").focus(); - $(this).hide(); - } else { - $("#DirPathPlace").hide(); - $(this).css("display", "inline"); + + + + +Function.prototype.delay = function(that,arry,time){ + if(!Array.isArray(arry)) time = arry,arry = []; + if(typeof time == "undefined") time = 0; + setTimeout(this.apply(that,arry),time); + return this; +} +jQuery.prototype.serializeObject = function () { + var a,o,h,i,e; + a = this.serializeArray(); + o={}; + h=o.hasOwnProperty; + for(i=0;i-1,init:function(){0==$("#mask_layer").length&&(window.UploadFiles=function(){bt_file.file_drop.dialog_view()},$("body").append($('")),this.event_relation(document.querySelector("#container"),document,document.querySelector("#mask_layer")))},event_relation:function(enter,leave,drop){var that=this,obj=Object.keys(arguments);for(var item in arguments)"object"==typeof arguments[item]&&void 0!==arguments[item].nodeType&&(arguments[item]={el:arguments[item],callback:null});leave.el.addEventListener("dragleave",null!=leave.callback?leave.callback:function(e){0==e.x&&0==e.y&&$("#mask_layer").hide(),e.preventDefault()},!1),enter.el.addEventListener("dragenter",null!=enter.callback?enter.callback:function(e){if("string"==e.dataTransfer.items[0].kind)return!1;$("#mask_layer").show(),that.isLayuiDrop=!1,e.preventDefault()},!1),drop.el.addEventListener("dragover",(function(e){e.preventDefault()}),!1),drop.el.addEventListener("drop",null!=enter.callback?drop.callback:that.ev_drop,!1)},ev_drop:function(e){if("string"==e.dataTransfer.items[0].kind)return!1;if(!bt_file.file_drop.is_webkit)return $("#mask_layer").hide(),!1;if(e.preventDefault(),bt_file.file_drop.uploading)return layer.msg("Uploading files, please wait..."),!1;var items=e.dataTransfer.items,time,num=0;if(loadT=layer.msg("Getting upload files details, please wait...",{icon:16,time:0,shade:.3}),bt_file.file_drop.isUpload=!0,items&&items.length&&null!=items[0].webkitGetAsEntry&&"file"!=items[0].kind)return!1;null==bt_file.file_drop.filesList&&(bt_file.file_drop.filesList=[]);for(var i=bt_file.file_drop.filesList.length-1;i>=0;i--)bt_file.file_drop.filesList[i].is_upload&&bt_file.file_drop.filesList.splice(-i,1);function update_sync(s){s.getFilesAndDirectories().then((function(subFilesAndDirs){return iterateFilesAndDirs(subFilesAndDirs,s.path)}))}$("#mask_layer").hide();var iterateFilesAndDirs=function(filesAndDirs,path){if(!bt_file.file_drop.isUpload)return!1;for(var i=0;ibt_file.file_drop.isUploadNumber)return bt_file.file_drop.isUpload=!1,layer.msg(" "+bt_file.file_drop.isUploadNumber+" items cannot upload, please compress first!。",{icon:2,area:"405px"}),bt_file.file_drop.filesList=[],clearTimeout(time),!1;bt_file.file_drop.filesList.push({file:filesAndDirs[i],path:bt.get_file_path(path+"/"+filesAndDirs[i].name).replace("//","/"),name:filesAndDirs[i].name.replace("//","/"),icon:bt_file.get_ext_name(filesAndDirs[i].name),size:bt_file.file_drop.to_size(filesAndDirs[i].size),upload:0,is_upload:!1}),bt_file.file_drop.uploadAllSize+=filesAndDirs[i].size,clearTimeout(time),time=setTimeout((function(){layer.close(loadT),bt_file.file_drop.dialog_view()}),100),num++}};"getFilesAndDirectories"in e.dataTransfer&&e.dataTransfer.getFilesAndDirectories().then((function(filesAndDirs){return iterateFilesAndDirs(filesAndDirs,"/")}))},dialog_view:function(config){var that=this,html="";if(this.f_path=bt_file.file_path,!$(".file_dir_uploads").length>0){null==that.filesList&&(that.filesList=[]);for(var i=0;i'+(item.path+"/"+item.name).replace("//","/")+''+item.size+''+that.is_upload_status(item.upload)+'
            '}var is_show=that.filesList.length>11;layer.open({type:1,closeBtn:1,maxmin:!0,area:["550px","505px"],btn:["Upload","Cancel"],title:"Upload files to【"+bt.get_cookie("Path")+"】--- Support breakpoint renewal",skin:"file_dir_uploads",content:'
            '+(""!=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')+"")+"
            ",success:function(){$("#mask_layer").hide(),$(".file_dir_uploads .layui-layer-max").hide(),$(".upload_btn_groud .upload_file_btn").click((function(){$(".upload_btn_groud .dropdown-menu [data-type=file]").click()})),$(".upload_btn_groud .dropdown-menu a").click((function(){var type=$(this).attr("data-type");$('").change((function(e){for(var files=e.target.files,arry=[],i=0;i
          • File nameFile sizeFile status
            • ').removeClass("active"),Array.isArray(config)){for(var i=0;i'+(item.path+"/"+item.name).replace("//","/")+''+item.size+''+that.is_upload_status(item.upload)+'
              '}$(".dropUpLoadFile").append(html)}else $(".dropUpLoadFile").append('
            • '+(config.path+"/"+config.name).replace("//","/")+''+config.size+''+that.is_upload_status(config.upload)+'
            • ')}},is_upload_status:function(status,val){switch(void 0===val&&(val=""),status){case-1:return'Fail'+(""!=val?","+val:"")+"";case 0:return'Waiting to upload';case 1:return'Uploaded';case 2:return'Uploading '+val+"";case 3:return'Stoped'}},set_upload_view:function(index,config){var item=$(".dropUpLoadFile li:eq("+index+")"),that=this,file_info=$(".file_upload_info");0==$(".file_upload_info .uploadProgress").length&&$(".file_upload_info").html('Total process ,Uploading ,Fail Speed Getting,Expect time Getting'),file_info.show().prev().hide().parent().css("paddingRight",0),this.errorLength>0&&file_info.find(".uploadError").text("("+this.errorLength+"份)").parent().show(),file_info.find(".uploadNumber").html("("+this.uploadLength+"/"+this.filesList.length+")"),file_info.find(".uploadProgress").html((this.uploadedSize/this.uploadAllSize*100).toFixed(2)+"%"),1===config.upload||-1===config.upload?(this.filesList[index].is_upload=!0,this.uploadLength+=1,item.find(".fileLoading").css({width:"100%",opacity:".5",background:-1==config.upload?"#ffadad":"#20a53a21"}),item.find(".filesize").text(config.size),item.find(".fileStatus").html(this.is_upload_status(config.upload,1===config.upload?"(Time:"+this.diff_time(this.startTime,this.endTime)+")":config.errorMsg)),item.find(".fileLoading").fadeOut(500,(function(){$(this).remove();var uploadHeight=$(".dropUpLoadFile");if(0==uploadHeight.length)return!1;uploadHeight[0].scrollHeight>uploadHeight.height()&&uploadHeight.scrollTop(uploadHeight.scrollTop()+40)}))):(item.find(".fileLoading").css("width",config.percent),item.find(".filesize").text(config.upload_size+"/"+config.size),item.find(".fileStatus").html(this.is_upload_status(config.upload,"("+config.percent+")")))},clear_drop_stauts:function(status){var time=new Date,that=this;if(!status)try{var s_peed=bt_file.file_drop.to_size(bt_file.file_drop.uploadedSize/((time.getTime()-bt_file.file_drop.initTimer.getTime())/1e3));$(".file_upload_info").html(""+this.uploadLength+" uploaded,"+(this.errorLength>0?this.errorLength+"failures, ":"")+"time"+this.diff_time(this.initTimer,time)+",speed "+s_peed+"/s").append($('').click((function(){$(".file_upload_info").hide().prev().show()})))}catch(e){}$(".layui-layer-btn0").removeAttr("style data-upload").text(lan.upload.upload),$.extend(bt_file.file_drop,{startTime:0,endTime:0,uploadLength:0,splitSize:2097152,filesList:[],errorLength:0,isUpload:!1,isUploadNumber:800,uploadAllSize:0,uploadedSize:0,topUploadedSize:0,uploadExpectTime:0,initTimer:0,speedInterval:null,timerSpeed:0,uploading:!1}),clearInterval(this.speedInterval)},upload_file:function(fileStart,index){if(null==fileStart&&0==this.uploadSuspend.length&&(fileStart=0,index=0),this.filesList.length===index)return clearInterval(this.speedInterval),this.clear_drop_stauts(),bt_file.reader_file_list({path:bt_file.file_path,is_operating:!1}),!1;var that=this;that.splitEndTime=(new Date).getTime(),that.get_timer_speed(),that.splitStartTime=(new Date).getTime();var item=this.filesList[index],fileEnd="";if(null==item)return!1;fileEnd=Math.min(item.file.size,fileStart+this.splitSize),that.fileSize=fileEnd-fileStart,form=new FormData,0==fileStart&&(that.startTime=new Date,item=$.extend(item,{percent:"0%",upload:2,upload_size:"0B"})),form.append("f_path",this.f_path+item.path),form.append("f_name",item.name),form.append("f_size",item.file.size),form.append("f_start",fileStart),form.append("blob",item.file.slice(fileStart,fileEnd)),that.set_upload_view(index,item),$.ajax({url:"/files?action=upload",type:"POST",data:form,async:!0,processData:!1,contentType:!1,success:function(data){"number"==typeof data?(that.set_upload_view(index,$.extend(item,{percent:(data/item.file.size*100).toFixed(2)+"%",upload:2,upload_size:that.to_size(data)})),that.uploadedSize+=fileEnd!=data?data:parseInt(fileEnd-fileStart),that.upload_file(data,index)):data.status?(that.endTime=new Date,that.uploadedSize+=parseInt(fileEnd-fileStart),that.set_upload_view(index,$.extend(item,{upload:1,upload_size:item.size})),that.upload_file(0,index+=1)):(that.set_upload_view(index,$.extend(item,{upload:-1,errorMsg:data.msg})),that.errorLength++)},error:function(e){if(void 0===that.filesList[index].req_error&&(that.filesList[index].req_error=1),that.filesList[index].req_error>2)return that.set_upload_view(index,$.extend(that.filesList[index],{upload:-1,errorMsg:"error"==e.statusText?lan.public.network_err:e.statusText})),that.errorLength++,that.upload_file(fileStart,index+=1),!1;that.filesList[index].req_error+=1,that.upload_file(fileStart,index)}})},get_timer_speed:function(speed){var done_time=(new Date).getTime();if(done_time-this.speedLastTime>1e3){var that=this,num=0;null==speed&&(speed=200);var s_time=(this.splitEndTime-this.splitStartTime)/1e3;if(this.timerSpeed=(this.fileSize/s_time).toFixed(2),this.updateedSizeLast=this.uploadedSize,this.timerSpeed<2)return;$(".file_upload_info .uploadSpeed").text(this.to_size(isNaN(this.timerSpeed)?0:this.timerSpeed)+"/s");var estimateTime=this.time(parseInt((this.uploadAllSize-this.uploadedSize)/this.timerSpeed*1e3));isNaN(this.timerSpeed)||$(".file_upload_info .uploadEstimate").text(-1==estimateTime.indexOf("NaN")?estimateTime:"0 "+lan.bt.s),this.speedLastTime=done_time}},time:function(date){var hours=Math.floor(date/36e5),minutes=Math.floor(date/6e4),seconds=parseInt(date%6e4/1e3),result=seconds+"sec";return minutes>0&&(result=minutes+"min"+seconds+"sec"),hours>0&&(result=hours+"hour"+Math.floor((date-36e5*hours)/6e4)+"min"),result},diff_time:function(start_date,end_date){var diff=end_date.getTime()-start_date.getTime(),minutes=Math.floor(diff/6e4),leave3,seconds=diff%6e4/1e3,result=seconds.toFixed(minutes>0?0:2)+lan.bt.s;return minutes>0&&(result=minutes+"min"+seconds.toFixed(0)+lan.bt.s),result},to_size:function(a){for(var d=[" B"," KB"," MB"," GB"," TB"," PB"],e=1024,b=0;b
              '+("icon"==bt.get_cookie("rank")?'":'')+"
              "),$(("icon"==bt.get_cookie("rank")?"textarea":"input")+"[name=createArea]").on("input",(function(){"icon"==bt.get_cookie("rank")&&(this.style.height="auto",this.style.height=this.scrollHeight+"px")})).keyup((function(e){13==e.keyCode&&$(this).blur()})).blur((function(e){var _val=$(this).val().replace(/[\r\n]/g,"");if(that.match_unqualified_string(_val))return layer.msg('Name cannot contain /\\:*?"<>| symbol',{icon:2});""==_val&&(_val="newBlankDir"==type?"New directory":"New blank file"),setTimeout((function(){that.create_file_req({type:"newBlankDir"==type?"folder":"file",path:that.file_path+"/"+_val},(function(res){res.status&&that.reader_file_list({path:that.file_path}),layer.msg(res.msg,{icon:res.status?1:2})})),$(".createModel").remove(),that.is_editor=!1}),300),e.preventDefault()})).focus(),e.stopPropagation(),e.preventDefault()})),$(".file_nav_view .favorites_file_path ul").on("click","li",(function(e){var _href=$(this).data("path"),_type=$(this).data("type"),nav_down_list=$(".favorites_file_path .nav_down_list");if("dir"==_type)that.reader_file_list({path:_href,is_operating:!0});else{if(null!=$(this).data("null"))return!1;var _file=$(this).attr("title").split("."),_fileT=_file[_file.length-1],_fileE;switch(that.determine_file_type(_fileT)){case"text":openEditorView(0,_href);break;case"video":that.open_video_play(_href);break;case"images":that.open_images_preview({filename:$(this).attr("title"),path:_href});break;default:that.reader_file_list({path:that.retrun_prev_path(_href),is_operating:!0})}}nav_down_list.css({display:function(){return setTimeout((function(){nav_down_list.removeAttr("style")}),100),"none"}}),e.stopPropagation(),e.preventDefault()})),$(".terminal_view").on("click",(function(){web_shell()})),$(".share_file_list").on("click",(function(){that.open_share_view()})),$(".mount_disk_list").on("click",".nav_btn",(function(){var path=$(this).data("menu");that.reader_file_list({path:path,is_operating:!0})})),$(".mount_disk_list").on("click",".nav_down_list li",(function(){var path=$(this).data("disk"),disk_list=$(".mount_disk_list.thezoom .nav_down_list");disk_list.css({display:function(){return setTimeout((function(){disk_list.removeAttr("style")}),100),"none"}}),that.reader_file_list({path:path,is_operating:!0})})),$(".file_nav_view").on("click",".manage_backup",(function(ev){that.manage_backup(),ev.stopPropagation(),ev.preventDefault()})),$(".file_nav_view").on("click",".recycle_bin",(function(ev){that.recycle_bin_view(),ev.stopPropagation(),ev.preventDefault()})),$(".file_nav_view .multi").on("click",".nav_btn_group",(function(ev){var batch_type=$(this).data("type");void 0!==batch_type&&that.batch_file_manage(batch_type),ev.stopPropagation(),ev.preventDefault()})),$(".file_nav_view .multi").on("click",".nav_btn_group li",(function(ev){var batch_type=$(this).data("type");that.batch_file_manage(batch_type),ev.stopPropagation(),ev.preventDefault()})),$(".file_nav_view").on("click",".file_all_paste",(function(){that.paste_file_or_dir()})),$(".file_list_header").on("click",".file_name,.file_size,.file_mtime,.file_accept,.file_user",(function(e){var _tid=$(this).attr("data-tid"),_reverse=$(this).find(".icon_sort").hasClass("active"),_active=$(this).hasClass("active");return!$(this).find(".icon_sort").hasClass("active")&&$(this).hasClass("active")?$(this).find(".icon_sort").addClass("active"):$(this).find(".icon_sort").removeClass("active"),$(this).addClass("active").siblings().removeClass("active").find(".icon_sort").removeClass("active").empty(),$(this).find(".icon_sort").html(''),_active||(_reverse=!0),bt.set_cookie("files_sort",_tid),bt.set_cookie("name_reverse",_reverse?"True":"False"),that.reader_file_list({reverse:_reverse?"True":"False",sort:_tid}),!1})),$(".file_list_header .file_th").each((function(index,item){var files_sort=bt.get_cookie("files_sort"),name_reverse=bt.get_cookie("name_reverse");$(this).attr("data-tid")===files_sort&&($(this).addClass("active").siblings().removeClass("active").find(".icon_sort").removeClass("active").empty(),$(this).find(".icon_sort").html(''),"False"===name_reverse&&$(this).find(".icon_sort").addClass("active"))})),$(".file_list_header .file_check").on("click",(function(e){var checkbox;switch(parseInt($(this).data("checkbox"))){case 0:$(this).addClass("active").removeClass("active_2").data("checkbox",1),$(".file_list_content .file_tr").addClass("active").removeClass("active_2"),$(".nav_group.multi").removeClass("hide"),$(".file_menu_tips").addClass("hide"),that.file_table_arry=that.file_list.slice();break;case 2:$(this).addClass("active").removeClass("active_2").data("checkbox",1),$(".file_list_content .file_tr").addClass("active"),$(".nav_group.multi").removeClass("hide"),$(".file_menu_tips").addClass("hide"),that.file_table_arry=that.file_list.slice();break;case 1:$(this).removeClass("active active_2").data("checkbox",0),$(".file_list_content .file_tr").removeClass("active"),$(".nav_group.multi").addClass("hide"),$(".file_menu_tips").removeClass("hide"),that.file_table_arry=[]}that.calculate_table_active()})),$(".file_list_content").on("click",".file_checkbox",(function(e){var _tr=$(this).parents(".file_tr"),index=_tr.data("index"),filename=_tr.data("filename");_tr.hasClass("active")?(_tr.removeClass("active"),that.remove_check_file(that.file_table_arry,"filename",filename)):(_tr.addClass("active"),_tr.attr("data-filename",that.file_list[index].filename),that.file_table_arry.push(that.file_list[index])),that.calculate_table_active(),e.stopPropagation()})),$(".file_list_content").scroll((function(e){$(this).scrollTop()==$(this)[0].scrollHeight-$(this)[0].clientHeight?($(this).prev().css("opacity",1),$(this).next().css("opacity",0)):$(this).scrollTop()>0?$(this).prev().css("opacity",1):0==$(this).scrollTop()&&($(this).prev().css("opacity",0),$(this).next().css("opacity",1))})),$(".file_table_view .file_list_content").on("click",".file_tr",(function(e){if($(e.target).hasClass("foo_menu_title")||$(e.target).parents().hasClass("foo_menu_title"))return!0;$(this).addClass("active").siblings().removeClass("active"),that.file_table_arry=[that.file_list[$(this).data("index")]],that.calculate_table_active(),e.stopPropagation(),e.preventDefault()})),$(".file_table_view .file_list_content").on("click",".file_name .iconfont",(function(e){var file_tr,index=$(this).parents(".file_tr").data("index"),data=that.file_list[index];data.index=index,$(this).hasClass("icon-share1")&&that.info_file_share(data),$(this).hasClass("icon-favorites")&&that.cancel_file_favorites(data),e.stopPropagation()})),$(".file_table_view .file_list_content").on("dblclick",".file_tr",(function(e){var index=$(this).data("index"),data=that.file_list[index];if($(e.target).hasClass("file_check")||$(e.target).parents(".foo_menu").length>0||$(e.target).hasClass("set_file_ps")||that.is_editor)return!1;if("dir"==data.type){if("Recycle_bin"==data.filename)return that.recycle_bin_view();that.reader_file_list({path:that.file_path+"/"+data.filename,is_operating:!0})}else switch(data.open_type){case"text":openEditorView(0,data.path);break;case"video":that.open_video_play(data);break;case"images":that.open_images_preview(data);break;case"compress":that.unpack_file_to_path(data)}e.stopPropagation(),e.preventDefault()})),$(".file_table_view .file_list_content").on("click",".file_title i,.file_ico_type .file_icon",(function(e){var file_tr,index=$(this).parents(".file_tr").data("index"),data=that.file_list[index];if("dir"==data.type){if("Recycle_bin"==data.filename)return that.recycle_bin_view();that.reader_file_list({path:that.file_path+"/"+data.filename,is_operating:!0})}else layer.msg("compress"==data.open_type?"Double click to unzip the file":"Double click to edit the file");e.stopPropagation(),e.preventDefault()})),$(".file_list_content").on("contextmenu",(function(ev){return"createArea"==$(ev.target).attr("name")||"rename_file_input"==$(ev.target).attr("name")})),$(".selection_right_menu").on("contextmenu",(function(ev){return!1})),$(".file_list_content").on("mousedown",".file_tr",(function(ev){if(1===ev.which&&($(ev.target).hasClass("foo_menu_title")||$(ev.target).parents().hasClass("foo_menu_title")))that.render_file_groud_menu(ev,this),$(ev.target).parent().addClass("foo_menu_click"),$(this).siblings().find(".foo_menu").removeClass("foo_menu_click"),$(this).addClass("active").siblings().removeClass("active");else{if(3!==ev.which||that.is_editor)return!0;that.file_table_arry.length>1?that.render_files_multi_menu(ev):(that.render_file_groud_menu(ev,this),$(".content_right_menu").removeAttr("style"),$(this).addClass("active").siblings().removeClass("active"))}ev.stopPropagation(),ev.preventDefault()})),$(".filePage").on("change",".showRow",(function(){var val=$(this).val();bt.set_cookie("showRow",val),that.reader_file_list({showRow:val,p:1,is_operating:!1})})),$(".filePage").on("click","div:nth-child(2) a",(function(e){var num=$(this).attr("href").match(/p=([0-9]+)$/)[1];that.reader_file_list({path:that.path,p:num}),e.stopPropagation(),e.preventDefault()})),$(".file_list_content").on("click",".folder_size",(function(e){var data=that.file_list[$(this).parents(".file_tr").data("index")],_this=this;that.get_file_size({path:data.path},(function(res){$(_this).text(bt.format_size(res.size))})),e.stopPropagation(),e.preventDefault()})),$(".filePage").on("click","#file_all_size",(function(e){if("/"===that.file_path)return layer.tips('The current directory is the system root directory (/), the execution of the file size will take up a lot of disk IO, which will cause the server to run slowly.',this,{tips:[1,"red"],time:5e3}),!1;that.get_dir_size({path:that.file_path})})),$(".file_list_content").on("mousedown",(function(ev){if($(ev.target).hasClass("file_checkbox")||$(ev.target).hasClass("file_check")||$(ev.target).hasClass("icon-share1")||$(ev.target).hasClass("icon-favorites")||"i"==ev.target.localName||$(ev.target).parents(".app_menu_group").length>0||$(ev.target).hasClass("createModel")||$(ev.target).hasClass("editr_tr")||"createArea"==$(ev.target).attr("name")||"rename_file_input"==$(ev.target).attr("name")||$(ev.target).hasClass("set_file_ps")||that.is_editor)return!0;if(3==ev.which&&!that.is_editor)return $(".selection_right_menu").removeAttr("style"),that.render_file_all_menu(ev,this),!0;$(".file_list_content").bind("mousewheel",(function(){return!1}));var container=$(this),scroll_h=0,con_t=container.offset().top,con_l=container.offset().left,startPos={top:ev.clientY-$(this).offset().top,left:ev.clientX-$(this).offset().left};$(document).unbind("mousemove").mousemove((function(ev){var endPos={top:ev.clientY-con_t>0&&ev.clientY-con_t1?container.height():0,left:ev.clientX-con_l>0&&ev.clientX-con_l1?container.width():0},fixedPoint={top:endPos.top>startPos.top?startPos.top:endPos.top,left:endPos.left>startPos.left?startPos.left:endPos.left};"list"==bt.get_cookie("rank")&&(fixedPoint.top=fixedPoint.top+40);var w=Math.min(Math.abs(endPos.left-startPos.left),con_l+container.width()-fixedPoint.left),h=Math.min(Math.abs(endPos.top-startPos.top),con_t+container.height()-fixedPoint.top);if(ev.clientY-con_t<0){var beyond_t=Math.abs(ev.clientY-con_t);container.scrollTop(container.scrollTop()-beyond_t),0!=container.scrollTop()&&(scroll_h+=beyond_t),h+=scroll_h}if(ev.clientY-(con_t+container.height())>1){var beyond_b=ev.clientY-(con_t+container.height());container.scrollTop(container.scrollTop()+beyond_b),container[0].scrollHeight-container[0].scrollTop!==container[0].clientHeight&&(scroll_h+=beyond_b),h+=scroll_h,fixedPoint.top=fixedPoint.top-scroll_h}if(startPos.top==endPos.top||startPos.left==endPos.left)return!0;that.enter_files_box().show().css({left:fixedPoint.left+"px",top:fixedPoint.top+"px",width:w+"px",height:h+"px"});var box_offset_top=that.enter_files_box().offset().top,box_offset_left=that.enter_files_box().offset().left,box_offset_w=that.enter_files_box().offset().left+that.enter_files_box().width(),box_offset_h=that.enter_files_box().offset().top+that.enter_files_box().height();$(container).find(".file_tr").each((function(i,item){var offset_top=$(item).offset().top,offset_left=$(item).offset().left,offset_h=$(item).offset().top+$(item).height(),offset_w=$(item).offset().left+$(item).width();"icon"==bt.get_cookie("rank")?offset_w>=box_offset_left&&offset_left<=box_offset_w&&offset_h>=box_offset_top&&offset_top<=box_offset_h?$(item).addClass("active"):$(item).removeClass("active"):offset_w>=box_offset_left&&offset_h>=box_offset_top&&offset_top<=box_offset_h?$(item).addClass("active"):$(item).removeClass("active")}))})),$(document).on("mouseup",(function(){var _move_array=[],box_offset_top=that.enter_files_box().offset().top,box_offset_left=that.enter_files_box().offset().left,box_offset_w=that.enter_files_box().offset().left+that.enter_files_box().width(),box_offset_h=that.enter_files_box().offset().top+that.enter_files_box().height();$(container).find(".file_tr").each((function(i,item){var offset_top=$(item).offset().top,offset_left=$(item).offset().left,offset_h=$(item).offset().top+$(item).height(),offset_w=$(item).offset().left+$(item).width();"icon"==bt.get_cookie("rank")?offset_w>=box_offset_left&&offset_left<=box_offset_w&&offset_h>=box_offset_top&&offset_top<=box_offset_h&&_move_array.push($(item).data("index")):offset_w>=box_offset_left&&offset_h>=box_offset_top&&offset_top<=box_offset_h&&_move_array.push($(item).data("index"))})),that.render_file_selected(_move_array),that.enter_files_box().remove(),$(".file_list_content").unbind("mousewheel")})),ev.stopPropagation(),ev.preventDefault()})),$(".file_list_content").on("blur",".set_file_ps",(function(ev){var tr_index=$(this).parents(".file_tr").data("index"),item=that.file_list[tr_index],nval=$(this).val(),oval=$(this).data("value"),_this=this;if(nval==oval)return!1;bt_tools.send("files/set_file_ps",{filename:item.path,ps_type:0,ps_body:nval},(function(rdata){$(_this).data("value",nval)}),{tips:"Set ps",tips:!0})})),$(".file_list_content").on("keyup",".set_file_ps",(function(ev){13==ev.keyCode&&$(this).blur(),ev.stopPropagation()})),$(".file_list_header").on("mousedown",".file_width_resize",(function(ev){return!1;var th,Minus_v,_header,maxlen})),$(".cut_view_model").on("click",(function(){var type=$(this).data("type");$(".file_table_view").addClass("icon"==type?"icon_view":"list_view").removeClass("icon"!=type?"icon_view":"list_view").scrollLeft(0),bt.set_cookie("rank",type),$(this).addClass("active").siblings().removeClass("active")})),$(".file_list_content").on("click",".set_operation_group a",(function(ev){var data=$(this).parents(".file_tr").data(),type=$(this).data("type"),item=that.file_list[data.index];if("more"==type)return!0;item.open=type,item.index=data.index,item.type_tips="file"==item.type?"File":"Directory",that.file_groud_event(item)}))},enter_files_box:function(){return 0==$("#web_mouseDrag").length&&$("
              ",{id:"web_mouseDrag",style:["position:absolute; top:0; left:0;","border:1px solid #072246; background-color: #cce8ff;","filter:Alpha(Opacity=15); opacity:0.15;","overflow:hidden;display:none;z-index:9;"].join("")}).appendTo(".file_table_view"),$("#web_mouseDrag")},clear_table_active:function(){this.file_table_arry=[],$(".file_list_header .file_check").removeClass("active active_2"),$(".file_list_content .file_tr").removeClass("active app_menu_operation"),$(".file_list_content .file_tr .file_ps .foo_menu").removeClass("foo_menu_click"),$(".app_menu_group").remove()},calculate_table_active:function(){var that=this,header_check=$(".file_list_header .file_check");0==this.file_table_arry.length?header_check.removeClass("active active_2").data("checkbox",0):this.file_table_arry.length==this.file_list.length?header_check.addClass("active").removeClass("active_2").data("checkbox",1):header_check.addClass("active_2").removeClass("active").data("checkbox",2),this.file_table_arry.length>0?($(document).unbind("keydown").on("keydown",(function(e){var keyCode=e.keyCode,tagName=e.target.localName.toLowerCase(),is_mac=window.navigator.userAgent.indexOf("Mac")>-1;if("input"==tagName||"textarea"==tagName)return!0;e.ctrlKey&&67==keyCode&&(1==that.file_table_arry.length?(that.file_groud_event($.extend(that.file_table_arry[0],{open:"copy"})),$(".file_all_paste").removeClass("hide")):that.file_table_arry.length>1&&that.batch_file_manage("copy")),e.ctrlKey&&88==keyCode&&(1==that.file_table_arry.length?(that.file_groud_event($.extend(that.file_table_arry[0],{open:"shear"})),$(".file_all_paste").removeClass("hide")):that.file_table_arry.length>1&&that.batch_file_manage("shear"))})),this.file_table_arry.length>1?($(".nav_group.multi").removeClass("hide"),$(".file_menu_tips").addClass("hide")):($(".nav_group.multi").addClass("hide"),$(".file_menu_tips").removeClass("hide"))):($(".nav_group.multi").addClass("hide"),$(".file_menu_tips.multi").removeClass("hide"),$(document).unbind("keydown")),$(".selection_right_menu,.file_path_input .file_dir_item .nav_down_list").removeAttr("style"),that.set_menu_line_view_resize()},set_dir_view_resize:function(){var file_path_input=$(".file_path_input"),file_dir_view=$(".file_path_input .file_dir_view"),_path_width=file_dir_view.attr("data-width"),file_item_hide=null;if(_path_width?parseInt(_path_width):(_path_width=file_dir_view.width(),file_dir_view.attr("data-width",_path_width)),file_dir_view.width()-_path_width<90){var width=0;$($(".file_path_input .file_dir_view .file_dir_item").toArray().reverse()).each((function(){var item_width=0;$(this).attr("data-width")?item_width=parseInt($(this).attr("data-width")):($(this).attr("data-width",$(this).width()),item_width=$(this).width()),width+=item_width,file_path_input.width()-width<=90?$(this).addClass("hide"):$(this).removeClass("hide")}))}var file_item_hide=file_dir_view.children(".file_dir_item.hide").clone(!0);0==file_dir_view.children(".file_dir_item.hide").length?file_path_input.removeClass("active").find(".file_dir_omit").addClass("hide"):(file_item_hide.each((function(){0==$(this).find(".glyphicon-hdd").length&&$(this).find(".file_dir").before('')})),file_path_input.addClass("active").find(".file_dir_omit").removeClass("hide"),file_path_input.find(".file_dir_omit .nav_down_list").empty().append(file_item_hide),file_path_input.find(".file_dir_omit .nav_down_list .file_dir_item").removeClass("hide"))},set_menu_line_view_resize:function(){var menu_width=$(".file_nav_view").width(),disk_list_width=0,batch_list_width=0,_width=0,disk_list=$(".mount_disk_list"),batch_list=$(".nav_group.multi");disk_list.attr("data-width")||disk_list.attr("data-width",disk_list.innerWidth()),batch_list.attr("data-width")||0==batch_list.innerWidth()||-1==batch_list.innerWidth()||batch_list.attr("data-width",batch_list.innerWidth()),disk_list_width=parseInt(disk_list.attr("data-width")),batch_list_width=parseInt(batch_list.attr("data-width")),$(".file_nav_view>.nav_group").not(".mount_disk_list").each((function(){_width+=$(this).innerWidth()})),menu_width-(_width+=$(".menu-header-foot").innerWidth()).nav_btn_group").each((function(index){index>=$(".batch_group_list>.nav_btn_group").length-(indexs+2)?$(this).hide():$(this).show()})),$(".batch_group_list>.nav_btn_group:last-child").removeClass("hide").show()):($(".batch_group_list>.nav_btn_group").css("display","inline-block"),$(".batch_group_list>.nav_btn_group:last-child").addClass("hide"))},set_file_forward:function(){var that=this,forward_path=$(".forward_path span");1==this.file_operating.length?forward_path.addClass("active"):this.file_pointer==this.file_operating.length-1?(forward_path.eq(0).removeClass("active"),forward_path.eq(1).addClass("active")):0==this.file_pointer?(forward_path.eq(0).addClass("active"),forward_path.eq(1).removeClass("active")):forward_path.removeClass("active")},set_file_view:function(){var file_list_content=$(".file_list_content"),height=this.area[1]-$(".file_table_view")[0].offsetTop-170;$(".file_bodys").height(this.area[1]-100),50*this.file_list.length>height?(file_list_content.attr("data-height",file_list_content.data("height")||file_list_content.height()).css({overflow:"hidden","overflow-y":"auto",height:height+"px"}),$(".file_shadow_bottom").css("opacity",1)):(file_list_content.css({overflow:"hidden","overflow-y":"auto",height:height+"px"}),$(".file_shadow_top,.file_shadow_bottom").css("opacity",0))},open_share_view:function(){var that=this;layer.open({type:1,shift:5,closeBtn:2,area:["850px","580px"],title:"Share list",content:'
              Share nameShare addressExpiration dateOpt
              ',success:function(){that.render_share_list(),$(".download_url_list").on("click",".info_down",(function(){var indexs=$(this).attr("data-index");that.file_share_view(that.file_share_list[indexs],"list")})),$(".download_table .download_url_page").on("click","a",(function(e){var _href=$(this).attr("href").match(/p=([0-9]+)$/)[1];that.render_share_list({p:_href}),e.stopPropagation(),e.preventDefault()}))}})},render_share_list:function(param){var that=this,_list="";void 0===param&&(param={p:1}),bt_tools.send("files/get_download_url_list",param,(function(res){that.file_share_list=res.data,res.data.length>0?$.each(res.data,(function(index,item){_list+=''+item.ps+''+item.filename+""+bt.format_data(item.expire)+'Details | Close'})):_list='No share data',$(".download_url_list").html(_list),$(".download_url_page").html(res.page),$(".download_table").on("click",".del_down",(function(){var id=$(this).attr("data-id"),_ps=$(this).attr("data-ps");that.remove_download_url({id:id,fileName:_ps},(function(res){res.status&&that.render_share_list(param),layer.msg(res.msg,{icon:res.status?1:2})}))}))}),"Share list")},remove_check_file:function(arry,key,value){for(var len=arry.length;len--;)arry[len][key]==value&&arry.splice(len,1)},open_download_view:function(){var that=this;that.reader_form_line({url:"DownloadFile",beforeSend:function(data){return{url:data.url,path:data.path,filename:data.filename}},overall:{width:"310px"},data:[{label:"URL address:",name:"url",placeholder:"URL address",value:"http://",eventType:["input","focus"],input:function(){var value,url_list=$(this).val().split("/");$('[name="filename"]').val(url_list[url_list.length-1])}},{label:"Download to:",name:"path",placeholder:"Download to",value:that.file_path},{label:"File name:",name:"filename",placeholder:"Save file name",value:"",eventType:"enter",enter:function(){$(".download_file_view .layui-layer-btn0").click()}}]},(function(form,html){var loadT=bt.open({type:1,title:"Download file",area:"500px",shadeClose:!1,skin:"download_file_view",content:html[0].outerHTML,btn:["Comfirm","Close"],success:function(){form.setEvent()},yes:function(indexo,layero){var ress=form.getVal();if(!bt.check_url(ress.url))return layer.msg("Please enter valid URL address..",{icon:2}),!1;form.submitForm((function(res){that.render_present_task_list(),layer.msg(res.msg,{icon:res.status?1:2}),loadT.close()}))}})}))},set_style_width:function(type,width){var _content=bt.get_cookie("formHeader")||$("#file_list_info").html(),_html="",_reg=new RegExp("\\.file_"+type+"\\s?\\{width\\s?\\:\\s?(\\w+)\\s\\!important;\\}","g"),_defined_config={name:150,type:80,size:80,mtime:150,accept:80,user:80,ps:150};_html=_content.replace(_reg,(function(match,$1,$2,$3){return".file_"+type+"{width:"+(width<80?_defined_config[type]+"px":width+"px")+" !important;}"})),$("#file_list_info").html(_html)},set_file_table_width:function(){var that=this,file_header_width=$(".file_table_view")[0].offsetWidth,auto_num=0,width=0,auto_all_width=0,css="",_width=0,tr_heigth=45,other="",config={};$.each(this.file_header,(function(key,item){"auto"==item?(auto_num++,config[key]=0):(width+=item,css+="."+key+"{width:"+("file_operation"!=key?item:item-16)+"px !important;}")})),this.is_mobile&&$(".file_operation.file_th").attr("style","margin-right:-10px !important;"),45*this.file_list.length>$(".file_list_content").height()?(config.file_tr=file_header_width-(this.is_mobile?0:this.scroll_width),file_header_width=file_header_width,other+=".file_td.file_operation{width:"+(this.file_header.file_operation-(this.is_mobile?0:this.scroll_width)-10)+"px !important;}",other+=".file_th.file_operation{padding-right:"+(10+(this.is_mobile?0:this.scroll_width))+"px !important}"):(file_header_width=file_header_width,config.file_tr=file_header_width,this.is_mobile&&(other+=".file_td.file_operation{width:"+(this.file_header.file_operation-20)+"px !important;}")),config.file_list_header=file_header_width,_width=(auto_all_width=file_header_width-width)/auto_num,$.each(config,(function(key,item){css+="."+key+"{width:"+(0==item?_width:item)+"px !important;}"})),$("#file_list_info").html(css+other)},render_path_list:function(callback){var that=this,html='
              ',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]+'
              ';$(".path_input").val("").attr("data-path",this.file_path);var file_dir_view=$(".file_path_input .file_dir_view");file_dir_view.html(html),file_dir_view.attr("data-width",file_dir_view.width()),this.set_dir_view_resize.delay(this,100)},render_path_down_list:function(el,path,callback){var that=this,_html="",next_path=$(el).parent().next().find(".file_dir").attr("title");this.get_dir_list({path:path},(function(res){$.each(that.data_reconstruction(res.DIR),(function(index,item){var _path=("/"!=path?path:"")+"/"+item.filename;_html+='
            • '+item.filename+"
            • "})),$(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+='
            • '+item.name+"
            • "})),html+='
            • Management
            • '):html='
            • (Empty)
            • ',$(".favorites_file_path .nav_down_list").html(html)},set_favorites_manage:function(){var that=this;layer.open({type:1,title:"Manage Favorites",area:["850px","580px"],closeBtn:2,shift:5,shadeClose:!1,content:"
              PathOpt
              ",success:function(layers){that.render_favorites_type_list(),setTimeout((function(){$(layers).css("top",($(window).height()-$(layers).height())/2)}),50)},cancel:function(){that.reader_file_list({path:that.file_path})}})},render_favorites_type_list:function(){var _detail="";this.$http("get_files_store",(function(rdata){rdata.length>0?$.each(rdata,(function(ind,item){_detail+=''+item.path+'Del"})):_detail='No favorites',$(".favorites_body").html(_detail),jQuery.prototype.fixedThead?$(".stroe_tab_list .divtable").fixedThead({resize:!1}):$(".stroe_tab_list .divtable").css({overflow:"auto"})}))},load_favorites_index_list:function(){var that=this;this.$http("get_files_store",(function(rdata){that.file_store_list=rdata,that.render_favorites_list()}))},del_favorites:function(path){var that=this;layer.confirm("Comfirm delete path【"+path+"】?",{title:"Delete favorites",closeBtn:2,icon:3},(function(index){that.$http("del_files_store",{path:path},(function(res){res.status&&that.render_favorites_type_list(),layer.msg(res.msg,{icon:res.status?1:2})}))}))},reader_file_list_content:function(data,callback){var _html="",that=this,is_dir_num=0,images_num=0;$.each(data,(function(index,item){var _title=item.filename,only_id=bt.get_random(10),path=(that.file_path+"/"+item.filename).replace("//","/"),is_compress=that.determine_file_type(item.ext,"compress"),is_editor_tips=function(){var _openTitle="open";switch(that.determine_file_type(item.ext)){case"images":_openTitle="Preview";break;case"video":_openTitle="Play";break;default:_openTitle="compress"==that.determine_file_type(item.ext)?"":"Edit"}return"dir"==item.type&&(_openTitle="Open"),_openTitle}(item);that.file_list[index].only_id=only_id,_html+='
              "+item.filename+item.soft_link+""+(item.caret?'':"")+(0!=item.down_id?'':"")+'
              '+("dir"==item.type?"directory":that.ext_type_tips(item.ext))+'
              '+item.user+" / "+item.root_level+'
              '+("dir"==item.type?'Calculate':bt.format_size(item.size))+'
              '+bt.format_data(item.mtime)+'
              '+(item.is_os_ps?item.ps:'')+'
              ',"dir"==item.type&&is_dir_num++,item.path=path,item.open_type=that.determine_file_type(item.ext),"images"==item.open_type&&(item.images_id=images_num,that.file_images_list.push(item.path),images_num++)})),$(".file_list_content").html(_html),callback&&callback({is_dir_num:is_dir_num}),that.clear_table_active()},render_file_disk_list:function(){var that=this,html="",_li="";that.get_disk_list((function(res){$.each(res,(function(index,item){html+='",_li+='
            • '+("/"==item.path?"Root dir":item.path)+" ("+item.size[2]+")
            • "})),$(".mount_disk_list").html('
              '+lan.files.mounted_disk+'
              '+html+"
              "),that.set_menu_line_view_resize()}))},render_file_groud_menu:function(ev,el){var that=this,index=$(el).data("index"),_openTitle="Open",data=this.file_list[index],config_group=[["open",_openTitle],["split",""],["download","Download"],["share","Share file/directory"],["cancel_share","Cancel share"],["favorites","Favorites file/directory"],["cancel_favorites","Cancel favorites"],["split",""],["dir_kill","目录查杀"],["authority","Permission"],["split",""],["copy","Copy"],["shear","Cut"],["rename","Rename"],["del","Del"],["split",""],["compress","Compress"],["unzip","Decompress"]],compression=["zip","rar","gz","war","tgz","bz2"],offsetNum=0;switch(this.determine_file_type(data.ext)){case"images":_openTitle="Preview";break;case"video":_openTitle="Play";break;default:_openTitle="Edit"}config_group[0][1]="dir"==data.type?"Open":_openTitle,"dir"==data.type&&(config_group.splice(2,1),offsetNum++),"compress"==data.open_type&&(config_group.splice(0,2),offsetNum+=2),0!=data.down_id?(config_group.splice(3-offsetNum,1),offsetNum++):(config_group.splice(4-offsetNum,1),config_group[3-offsetNum][1]="dir"==data.type?"Share directory":"Share file",offsetNum++),!1!==data.caret?(config_group.splice(5-offsetNum,1),offsetNum++):(config_group.splice(6-offsetNum,1),config_group[5-offsetNum][1]="dir"==data.type?"Favorites directory":"Favorites file",offsetNum++),config_group.splice(8-offsetNum,1),offsetNum++;var num=0;$.each(compression,(function(index,item){item==data.ext&&num++})),0==num&&(config_group.splice(17-offsetNum,1),offsetNum++),-1!=data.filename.indexOf("/")&&"dir"==data.type||(config_group.splice(18-offsetNum,1),offsetNum++),this.file_selection_operating=config_group,this.reader_menu_list({el:$(".selection_right_menu"),ev:ev,data:data,list:config_group})},render_file_all_menu:function(ev,el){var that=this,config_group=[["refresh","Refresh"],["split",""],["upload","Upload"],["create","New file/directory",[["create_dir","New directory"],["create_files","New file"]]],["web_shell","Terminal"],["split",""],["paste","Paste"]],offsetNum=0,isPaste=bt.get_cookie("record_paste_type");"null"!=isPaste&&null!=isPaste||(config_group.splice(5,2),offsetNum++),this.reader_menu_list({el:$(".selection_right_menu"),ev:ev,data:{},list:config_group})},render_files_multi_menu:function(ev){var that=this,config_group=[["copy","Copy"],["shear","cut"],["authority","Permission"],["compress","Compress"],["del","Delete"]],el=$(".selection_right_menu").find("ul"),el_height=el.height(),el_width=el.width(),left=ev.clientX-(this.area[0]-ev.clientX'):el.append($('
            • '+mitem[1]+"
            • ").append(null).on("click",{type:mitem[0],data:that.file_table_arry},(function(ev){$(".selection_right_menu").removeAttr("style"),that.batch_file_manage(ev.data.type),ev.stopPropagation(),ev.preventDefault()})))})),$(".selection_right_menu").css({left:left,top:ev.clientY-(this.area[1]-ev.clientY'):(Array.isArray(item[2])&&($children=$('
                '),$children_list=$children.find(".set_group"),$.each(item[2],(function(indexs,items){$children_list.append($('
              • '+items[1]+"
              • ").on("click",{type:items[0],data:config.data},(function(ev){that.file_groud_event($.extend(ev.data.data,{open:ev.data.type,index:parseInt($(config.ev.currentTarget).data("index")),element:config.ev.currentTarget,type_tips:"dir"==config.data.type?"directory":"file"})),config.el.removeAttr("style"),ev.stopPropagation(),ev.preventDefault()})))}))),el.append($('
              • '+item[1]+"
              • ").append($children).on("click",{type:item[0],data:config.data},(function(ev){that.file_groud_event($.extend(ev.data.data,{open:ev.data.type,index:parseInt($(config.ev.currentTarget).data("index")),element:config.ev.currentTarget,type_tips:"dir"==config.data.type?"directory":"file"})),"compress"!=item[0]&&"create"!=item[0]&&config.el.removeAttr("style"),ev.stopPropagation(),ev.preventDefault()}))))})),el_height=el.innerHeight(),top=config.ev.clientY-(this.area[1]-config.ev.clientY'+lan.files.recycle_bin_warning+"
                ",(function(){that.$http("SetBatchData",obj,(function(res){res.status&&that.reader_file_list({path:that.file_path}),layer.msg(res.msg,{icon:res.status?1:2})}))}))},batch_file_paste:function(){var that=this,_pCookie=bt.get_cookie("record_paste_type");this.check_exists_files_req({dfile:this.file_path},(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("The following files will be overwritten",'
                '+tbody+"
                File nameSizeLast edit time
                ",(function(){that.$http("BatchPaste",{type:_pCookie,path:that.file_path},(function(rdata){rdata.status&&(bt.set_cookie("record_paste_type",null),that.reader_file_list({path:that.file_path})),layer.msg(rdata.msg,{icon:rdata.status?1:2})}))}))}else that.$http("BatchPaste",{type:_pCookie,path:that.file_path},(function(rdata){rdata.status&&(bt.set_cookie("record_paste_type",null),that.reader_file_list({path:that.file_path})),layer.msg(rdata.msg,{icon:rdata.status?1:2})}))}))},recycle_bin_view:function(){var that=this;layer.open({type:1,shift:5,closeBtn:2,area:["80%","606px"],title:lan.files.recycle_bin_title,content:'
                '+lan.files.recycle_bin_on+'
                '+lan.files.recycle_bin_on_db+'
                '+lan.files.recycle_bin_ps+'

                '+lan.files.recycle_bin_type1+'

                '+lan.files.recycle_bin_type2+'

                '+lan.files.recycle_bin_type3+'

                '+lan.files.recycle_bin_type4+'

                '+lan.files.recycle_bin_type5+'

                '+lan.files.recycle_bin_type6+'

                '+lan.files.recycle_bin_th1+" "+lan.files.recycle_bin_th2+" "+lan.files.recycle_bin_th3+' '+lan.files.recycle_bin_th4+' '+lan.files.recycle_bin_th5+'
                ',success:function(){-1!=window.location.href.indexOf("database")?($(".re-con-menu p:last-child").addClass("on").siblings().removeClass("on"),that.render_recycle_list(6)):that.render_recycle_list(1),$(".re-con-menu").on("click","p",(function(){var _type=$(this).data("type");$(this).addClass("on").siblings().removeClass("on"),that.render_recycle_list(_type)}))}})},render_recycle_list:function(num){var that=this;this.$http("Get_Recycle_bin",(function(rdata){var body="";switch($("#Set_Recycle_bin").attr("checked",rdata.status),$("#Set_Recycle_bin_db").attr("checked",rdata.status_db),num){case 1:for(var i=0;i20&&(shortwebname=shortwebname.substring(0,20)+"..."),shortpath.length>20&&(shortpath=shortpath.substring(0,20)+"..."),body+=' '+shortwebname+' '+shortpath+" "+ToSize(rdata.dirs[i].size)+" "+getLocalTime(rdata.dirs[i].time)+' "+lan.files.recycle_bin_re+' | "+lan.files.recycle_bin_del+" "}for(var i=0;i20&&(shortwebname=shortwebname.substring(0,20)+"..."),shortpath.length>20&&(shortpath=shortpath.substring(0,20)+"..."),body+=' '+shortwebname+' '+shortpath+" "+ToSize(rdata.files[i].size)+" "+getLocalTime(rdata.files[i].time)+' "+lan.files.recycle_bin_re+' | "+lan.files.recycle_bin_del+" "}else{var shortwebname=rdata.files[i].name.replace(/'/,"\\'"),shortpath=rdata.files[i].dname;shortwebname.length>20&&(shortwebname=shortwebname.substring(0,20)+"..."),shortpath.length>20&&(shortpath=shortpath.substring(0,20)+"..."),body+=' '+shortwebname.replace("BTDB_","")+' mysql://'+shortpath.replace("BTDB_","")+" - "+getLocalTime(rdata.files[i].time)+' "+lan.files.recycle_bin_re+' | "+lan.files.recycle_bin_del+" "}return void $("#RecycleBody").html(body);case 2:for(var i=0;i20&&(shortwebname=shortwebname.substring(0,20)+"..."),shortpath.length>20&&(shortpath=shortpath.substring(0,20)+"..."),body+=' '+shortwebname+' '+shortpath+" "+ToSize(rdata.dirs[i].size)+" "+getLocalTime(rdata.dirs[i].time)+' "+lan.files.recycle_bin_re+' | "+lan.files.recycle_bin_del+" "}return void $("#RecycleBody").html(body);case 3:for(var i=0;i20&&(shortwebname=shortwebname.substring(0,20)+"..."),shortpath.length>20&&(shortpath=shortpath.substring(0,20)+"..."),body+=' '+shortwebname+' '+shortpath+" "+ToSize(rdata.files[i].size)+" "+getLocalTime(rdata.files[i].time)+' "+lan.files.recycle_bin_re+' | "+lan.files.recycle_bin_del+" "}return void $("#RecycleBody").html(body);case 4:for(var i=0;i20&&(shortwebname=shortwebname.substring(0,20)+"..."),shortpath.length>20&&(shortpath=shortpath.substring(0,20)+"..."),body+=' '+shortwebname+' '+shortpath+" "+ToSize(rdata.files[i].size)+" "+getLocalTime(rdata.files[i].time)+' "+lan.files.recycle_bin_re+' | "+lan.files.recycle_bin_del+" "}return void $("#RecycleBody").html(body);case 5:for(var i=0;i20&&(shortwebname=shortwebname.substring(0,20)+"..."),shortpath.length>20&&(shortpath=shortpath.substring(0,20)+"..."),body+=' '+shortwebname+' '+shortpath+" "+ToSize(rdata.files[i].size)+" "+getLocalTime(rdata.files[i].time)+' "+lan.files.recycle_bin_re+' | "+lan.files.recycle_bin_del+" "}return void $("#RecycleBody").html(body);case 6:for(var i=0;i20&&(shortwebname=shortwebname.substring(0,20)+"..."),shortpath.length>20&&(shortpath=shortpath.substring(0,20)+"..."),body+=' '+shortwebname.replace("BTDB_","")+' mysql://'+shortpath.replace("BTDB_","")+" - "+getLocalTime(rdata.files[i].time)+' "+lan.files.recycle_bin_re+' | "+lan.files.recycle_bin_del+" "}return void $("#RecycleBody").html(body)}function getFileName(name){var text=name.split("."),n;return text=text[text.length-1]}function ReisImage(fileName){for(var exts=["jpg","jpeg","png","bmp","gif","tiff","ico"],i=0;i"+lan.files.recycle_bin_close_the+"",{icon:16,time:0,shade:[.3,"#000"]});setTimeout((function(){getSpeed(".myspeed")}),1e3),$.post("/files?action=Close_Recycle_bin","",(function(rdata){layer.close(loadT),layer.msg(rdata.msg,{icon:rdata.status?1:5}),$("#RecycleBody").html("")}))}))},open_images_preview:function(data){var that=this,mask=$('
                '+data.filename+'
                '),images_config={natural_width:0,natural_height:0,init_width:0,init_height:0,preview_width:0,preview_height:0,current_width:0,current_height:0,current_left:0,current_top:0,rotate:0,scale:1,images_mouse:!1};if($(".preview_images_mask").length>0)return $("#preview_images").attr("src","/download?filename="+data.path),!1;function auto_images_size(transition){var rotate=Math.abs(images_config.rotate/90),preview_width=rotate%2==0?images_config.preview_width:images_config.preview_height,preview_height=rotate%2==0?images_config.preview_height:images_config.preview_width,preview_images=$("#preview_images"),css_config={};images_config.init_width=images_config.natural_width,images_config.init_height=images_config.natural_height,images_config.init_width>preview_width&&(images_config.init_width=preview_width,images_config.init_height=parseFloat((preview_width/images_config.natural_width*images_config.init_height).toFixed(2))),images_config.init_height>preview_height&&(images_config.init_width=parseFloat((preview_height/images_config.natural_height*images_config.init_width).toFixed(2)),images_config.init_height=preview_height),images_config.current_width=parseFloat(images_config.init_width*images_config.scale),images_config.current_height=parseFloat(images_config.init_height*images_config.scale),images_config.current_left=parseFloat(((images_config.preview_width-images_config.current_width)/2).toFixed(2)),images_config.current_top=parseFloat(((images_config.preview_height-images_config.current_height)/2).toFixed(2)),css_config={width:images_config.current_width,height:images_config.current_height,top:images_config.current_top,left:images_config.current_left,display:"inline",transform:"rotate("+images_config.rotate+"deg)",opacity:1,transition:"all 100ms"},!1===transition&&delete css_config.transition,preview_images.css(css_config)}$("body").css("overflow","hidden").append(mask),images_config.preview_width=mask[0].clientWidth,images_config.preview_height=mask[0].clientHeight,$(".preview_body img").load((function(){var img=$(this)[0];$(this).attr("data-index")||$(this).attr("data-index",data.images_id),images_config.natural_width=img.naturalWidth,images_config.natural_height=img.naturalHeight,auto_images_size(!1)})),$(".preview_images_mask .preview_head").on("mousedown",(function(e){e=e||window.event;var drag=$(this).parent();if($("body").addClass("select"),$(this).onselectstart=$(this).ondrag=function(){return!1},!$(e.target).hasClass("preview_close")){var diffX=e.clientX-drag.offset().left,diffY=e.clientY-drag.offset().top;$(document).on("mousemove",(function(e){var left=(e=e||window.event).clientX-diffX,top=e.clientY-diffY;left<0?left=0:left>window.innerWidth-drag.width()&&(left=window.innerWidth-drag.width()),top<0?top=0:top>window.innerHeight-drag.height()&&(top=window.innerHeight-drag.height()),drag.css({left:left,top:top,margin:0})})).on("mouseup",(function(){$(this).unbind("mousemove mouseup")}))}})),$(".preview_images_mask #preview_images").on("mousedown",(function(e){e=e||window.event,$(this).onselectstart=$(this).ondrag=function(){return!1};var images=$(this),preview=$(".preview_images_mask").offset(),diffX=e.clientX-preview.left,diffY=e.clientY-preview.top;$(".preview_images_mask").on("mousemove",(function(e){var offsetX=(e=e||window.event).clientX-preview.left-diffX,offsetY=e.clientY-preview.top-diffY,rotate=Math.abs(images_config.rotate/90),preview_width=rotate%2==0?images_config.preview_width:images_config.preview_height,preview_height=rotate%2==0?images_config.preview_height:images_config.preview_width,left,top;if(images_config.current_width>preview_width){var max_left=preview_width-images_config.current_width;(left=images_config.current_left+offsetX)>0?left=0:leftpreview_height){var max_top=preview_height-images_config.current_height;(top=images_config.current_top+offsetY)>0?top=0:toppreview_height&&images_config.current_top<=0&&images_config.current_height-preview_height<=images_config.current_top&&(images_config.current_top-=offsetY),images.css({left:images_config.current_left,top:images_config.current_top})})).on("mouseup",(function(){$(this).unbind("mousemove mouseup")})).on("dragstart",(function(){e.preventDefault()}))})).on("dragstart",(function(){return!1})),$(".preview_close").click((function(e){$(".preview_images_mask").remove()})),$(".preview_toolbar a").click((function(){var index=$(this).index(),images=$("#preview_images");switch(index){case 0:case 1:images_config.rotate=index?images_config.rotate+90:images_config.rotate-90,auto_images_size();break;case 2:case 3:if(3==images_config.scale&&2==index||.2==images_config.scale&&3==index)return layer.msg(images_config.scale>=1?"The image is the maximum size":"The image is the minimum size"),!1;images_config.scale=(2==index?Math.round(10*(images_config.scale+.4)):Math.round(10*(images_config.scale-.4)))/10,auto_images_size();break;case 4:var scale_offset=images_config.rotate%360;scale_offset>=180?images_config.rotate+=360-scale_offset:images_config.rotate-=scale_offset,images_config.scale=1,auto_images_size()}})),$(".preview_full,.preview_small").click((function(){$(this).hasClass("preview_full")?($(this).addClass("hidden").prev().removeClass("hidden"),images_config.preview_width=that.area[0],images_config.preview_height=that.area[1],mask.css({width:that.area[0],height:that.area[1],top:0,left:0,margin:0}).data("type","full"),auto_images_size()):($(this).addClass("hidden").next().removeClass("hidden"),$(".preview_images_mask").removeAttr("style"),images_config.preview_width=750,images_config.preview_height=650,auto_images_size())})),$(".preview_cut_view a").click((function(){var images_src="",preview_images=$("#preview_images"),images_id=parseInt(preview_images.attr("data-index"));$(this).index()?(images_id=images_id==that.file_images_list.length-1?0:images_id+1,images_src=that.file_images_list[images_id]):(images_id=0===images_id?that.file_images_list.length-1:images_id-1,images_src=that.file_images_list[images_id]),preview_images.attr("data-index",images_id).attr("src","/download?filename="+images_src),$(".preview_title").html(that.get_path_filename(images_src))}))},open_video_play:function(data){var old_filename=data.path,imgUrl="/download?filename="+data.path,p_tmp=data.path.split("/"),path=p_tmp.slice(0,p_tmp.length-1).join("/");layer.open({type:1,closeBtn:2,title:'Playing ['+p_tmp[p_tmp.length-1]+"]",area:["890px","402px"],shadeClose:!1,skin:"movie_pay",content:'
                ',success:function(){$.post("/files?action=get_videos",{path:path},(function(rdata){for(var video_list='',index=0,i=0;i"}video_list+="
                File nameSize
                '+rdata[i].name+''+ToSize(rdata[i].size)+"
                ",$(".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",'
                '+tbody+"
                File nameSizeLast edit time
                ",(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:'
                Share name
                Expiration date
                Extraction code
                ',yes:function(indexs,layers){var ps=$("[name=ps]").val(),expire=$("[name=expire]:checked").val(),password=$("[name=password]").val();if(""===ps)return layer.msg("No sharing name!",{icon:2}),!1;that.create_download_url({filename:data.path,ps:ps,password:password,expire:expire},(function(res){if(!res.status)return layer.msg(res.msg,{icon:res.status?1:2}),!1;var rdata=res.msg;that.file_list[data.index]=$.extend(that.file_list[data.index],{down_id:rdata.id,down_info:rdata}),that.loadY.close(),that.info_file_share(data),that.reader_file_list_content(that.file_list)}))},success:function(layers,index){$("#random_paw").click((function(){$(this).prev().val(bt.get_random(6))}))}})},info_file_share:function(data){var that=this;if(void 0===data.down_info)return this.get_download_url_find({id:data.down_id},(function(res){that.file_list[data.index]=$.extend(that.file_list[data.index],{down_info:res}),that.file_share_view(that.file_list[data.index],"fonticon")})),!1;this.file_share_view(data,"fonticon")},file_share_view:function(datas,type){var data=datas;"fonticon"==type&&(data=datas.down_info);var that=this,download_url=location.origin+"/down/"+data.token;this.loadY=bt.open({type:1,shift:5,closeBtn:2,area:"550px",title:"Share details-["+data.filename+"]",content:'
                Share name
                Expiration date
                '+(data.expire>new Date("2099-01-01 00:00:00").getTime()/1e3?'Permanent':bt.format_data(data.expire))+'
                ',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_file_authority:function(data,isPatch){var that=this;that.get_file_authority({path:data.path},(function(rdata){var tex='
                ';that.loadY=layer.open({type:1,closeBtn:2,title:lan.files.set_auth+"["+data.filename+"]",area:"465px",shadeClose:!1,content:'
                Set permission
                Backups list
                '+tex+"
                "+lan.files.file_own+'

                '+lan.files.file_read+'

                '+lan.files.file_write+'

                '+lan.files.file_exec+"

                "+lan.files.file_group+'

                '+lan.files.file_read+'

                '+lan.files.file_write+'

                '+lan.files.file_exec+"

                "+lan.files.file_public+'

                '+lan.files.file_read+'

                '+lan.files.file_write+'

                '+lan.files.file_exec+'

                '+lan.files.file_menu_auth+", "+lan.files.file_own+'
                ",success:function(index,layers){that.edit_access_authority(),$("#access").keyup((function(){that.edit_access_authority()})),$("input[type=checkbox]").change((function(){for(var idName=["owner","group","public"],onacc="",n=0;n

                Please enter the current backup name

                Remarks
                ',yes:function(layerss,index){$(".layer_close").click((function(){layer.close(index)})),that.$http("back_path_permissions",{back_sub_dir:sub_type,path:file,remark:$("input.form-control").val()},(function(edata){if(layer.close(layerss),!edata.status)return layer.msg(edata.msg,{time:1900,icon:2}),!1;if(0==type){var new_back=that.backup_list();$(".buplist").html(new_back)}else if(3==type){var chmod=$("#access").val(),chown=$("#chown").val(),all=$("#accept_all").prop("checked")?"True":"False",data="filename="+encodeURIComponent(file)+"&user="+chown+"&access="+chmod+"&all="+all;Oksend(data),layer.closeAll()}layer.msg(edata.msg,{time:1900,icon:1})}))},btn2:function(){layer.close(layerss)},cancel:function(){layer.close(layerss)}})},backup_list:function(){var all_back="",that=this;this.$http("get_all_back",(function(edata){for(var i=0;i '+date+' "+edata[i][3]+' '+edata[i][1]+' Del '}$(".allback .buplist").html(all_back)}))},manage_backup:function(){var that=this,layerss=layer.open({type:1,closeBtn:2,title:"Manage Backups",area:["630px","500px"],shadeClose:!1,content:'
                Backup time Backup path Name Delect
                ',cancel:function(){layer.close(layerss)},success:function(){that.backup_list(),$("#btn-backup").click((function(e){var backup_path=$("#server_path").val();that.backup_files_permission(backup_path,0)})),$(".allback").on("click",".del_back",(function(){var _id=$(this).parents("tr").attr("data-id");that.del_backup(_id)}))}})},del_backup:function(id){var that=this;layer.confirm("The backup cannot be restored after deletion.
                Continue to delete?",{title:"Confirm delete?",btn:["Yes","No"],closeBtn:2},(function(index,layero){that.$http("del_path_premissions",{id:id},(function(edata){var file=$(".layui-layer-title:eq(0)").text();"Manage Backups"!==file?(file=$(".backup_list").attr("data-path"),that.backup_files_list(file)):$(".allback tbody tr[data-id="+id+"]").remove(),layer.msg(edata.msg,{icon:edata.status?1:2})}))}))},backup_files_list:function(fileName){var that=this;that.$http("get_path_premissions",{path:fileName},(function(edata){var tbody="",cont="";if(0==edata.length)tbody='No data';else for(var i=0;i '+edata[i][4]+" "+edata[i][2]+" "+edata[i][1]+" "+date+' Restore | Del '}cont='
                Fix all permissions to [ Folder: 755, File: 644 ]
                '+tbody+"
                Name permission Owner Backup Time Opt
                ",$(".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?
                ',yes:function(layerss,index){that.$http("restore_path_permissions",{restore_sub_dir:sub_type,date:restore_time,path:fileName},(function(edata){layer.closeAll(),layer.msg(edata.msg,{icon:1,time:1900})}))},btn2:function(){layer.close(layerss)},cancel:function(){layer.close(layerss)}})},get_present_task_view:function(){this.file_present_task=layer.open({type:1,title:"实时任务队列",area:"500px",closeBtn:2,skin:"present_task_list",shadeClose:!1,shade:!1,offset:"auto",content:'
                '})},render_present_task_list:function(){var that=this;this.get_task_req({status:-3},(function(lists){if(0==lists.length)return layer.close(that.file_present_task),that.file_present_task=null,void that.reader_file_list({path:that.file_path,is_operating:!1});var task_body="",is_add=!1;$.each(lists,(function(index,item){-1==item.status?(that.file_present_task||that.get_present_task_view(),"1"==item.type?task_body+='
                • '+lan.layout.download+item.shell+''+item.log.pre+'%'+lan.public.cancel+'
                  '+item.log.used+"/"+ToSize(item.log.total)+''+(0==item.log.speed?lan.layout.connect:item.log.speed)+'/s'+lan.files.expected_to_be+": "+item.log.time+"
                ":task_body+='
                '+item.name+": "+item.shell+''+lan.public.cancel+'
                '+item.log+"
                "):(is_add||(task_body+='
                '+lan.layout.wait_task+'
                  ',is_add=!0),task_body+='
                • '+item.name+": "+item.shell+'X
                • ')})),that.file_present_task&&(is_add&&(task_body+="
                "),$(".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 100) _lval = 100; index.set_val(_loadbox, { usage: _lval, items: load_arr }) _loadbox.parents('ul').data('data', net); + var net_key = bt.get_cookie('network_io_key'); + if(net_key){ + console.log(net_key,net.network[net_key]) + net.up = net.network[net_key].up; + net.down = net.network[net_key].down; + net.downTotal = net.network[net_key].downTotal; + net.upTotal = net.network[net_key].upTotal; + net.downPackets = net.network[net_key].downPackets; + net.upPackets = net.network[net_key].upPackets; + net.downAll = net.network[net_key].downTotal; + net.upAll = net.network[net_key].upTotal; + } + var net_option = ''; + $.each(net.network,function(k,v){ + var act = (k == net_key)?'selected':''; + net_option += ''; + }); + $('select[name="network-io"]').html(net_option); //刷新流量 $("#upSpeed").html(net.up + ' KB'); $("#downSpeed").html(net.down + ' KB'); @@ -484,8 +507,8 @@ var index = {
                '+lan.index.last_version_now+'
                \
                '+lan.index.this_version+''+lan.index.bt_linux+ (rdata.msg.is_beta == 1 ? lan.index.test_version+' ' + rdata.msg.beta.version : lan.index.final_version+' ' + rdata.msg.version) + '  '+ lan.index.release_time + (rdata.msg.is_beta == 1 ? rdata.msg.beta.uptime : rdata.msg.uptime) + '
                \
                \ -
                '+ (is_beta != 1 ? lan.index.test_version : lan.index.final_version) + lan.index.last_version_is + (result.msg.is_beta != 1 ? result.msg.beta.version : result.msg.version) + '       '+lan.index.update_time+'  ' + (is_beta != 1 ? result.msg.beta.uptime : result.msg.uptime) + '
                \ - '+ (is_beta !== 1 ? ''+lan.index.update_verison_click+''+lan.index.check_detail+'' : ''+lan.index.change_final_click+''+lan.index.change_final+'') + '\ +
                '+ (is_beta != 1 ? lan.index.test_version : lan.index.final_version) + lan.index.last_version_is + (result.msg.is_beta != 1 ? result.msg.beta.version : result.msg.version) + '      '+lan.index.update_time+'  ' + (is_beta != 1 ? result.msg.beta.uptime : result.msg.uptime) + '
                \ + '+ (is_beta !== 1 ? ''+lan.index.update_verison_click+''+lan.index.check_detail+'' : ''+lan.index.change_final_click+'  '+lan.index.change_final+'') + '\
                \
                \ \ @@ -547,7 +570,7 @@ var index = { layer.closeAll(); bt.system.to_update(function (rdata) { if (rdata.status) { - bt.msg({ msg: lan.index.update_ok, icon: 1 }) + bt.msg({ msg: rdata.msg, icon: 1 }) $("#btversion").html(rdata.version); $("#toUpdate").html(''); bt.system.reload_panel(); @@ -578,7 +601,7 @@ var index = { bt.send('get_beta_logs', 'ajax/get_beta_logs', {}, function (data) { var my_list = ''; new_load.close(); - if(data.status === false){ + if(data.status == false){ layer.msg(data.msg,{icon: 2}); return false; } diff --git a/BTPanel/static/js/jquery.contextify.min.js b/BTPanel/static/js/jquery.contextify.min.js index 7dfd43ad..7cc68d13 100644 --- a/BTPanel/static/js/jquery.contextify.min.js +++ b/BTPanel/static/js/jquery.contextify.min.js @@ -1,9 +1,6 @@ /*! -* jQuery Contextify v1.0.8 (http://contextify.js.org) +* jQuery Contextify v1.0.7 (http://contextify.js.org) * Copyright (c) 2016 Adam Bouqdib * Licensed under GPL-2.0 (http://abemedia.co.uk/license) */ - - -!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery,window)}(function(a,b){function c(b,c){this.element=b,this.options=a.extend({},e,c),this._defaults=e,this._name=d,this.init()}var d="contextify",e={items:[],action:"contextmenu",menuId:"contextify-menu",menuClass:"dropdown-menu",headerClass:"dropdown-header",dividerClass:"divider",before:!1},f=0,g=a(b);c.prototype.init=function(){var b=a.extend({},this.options,a(this.element).data());b.id=f,a(this.element).attr("data-contextify-id",b.id).on("contextmenu",function(c){c.preventDefault(),"function"==typeof b.before&&b.before(this,b);var d=a('
                ";break;case"page":this.config.page=c;var h=bt.get_cookie(this.config.cookiePrefix+"_"+this.config.page.numberParam);this.config.cookiePrefix&&h&&(this.config.page.number=h),l=this.$reader_page(this.config.page,'
                1 '+lan.public_backup.total+"
                ")}if(l){var f=$(a.config.el+" .tootls_"+c.positon[1]);if(f.length){var u=f.find(".pull-"+c.positon[0]);u.append(l)}else{var v='
                '+("left"==c.positon[0]?l:"")+'
                '+("right"==c.positon[0]?l:"")+"
                ";"top"===c.positon[1]?($(a.config.el).append(v),0===$(a.config.el+" .divtable").length&&$(a.config.el).append('
                ')):(0===$(a.config.el+" .divtable").length&&$(a.config.el).append('
                '),$(a.config.el).append(v))}}}this.init||this.$event_bind(s)},$get_data_batch_list:function(e,t){var i=[];return $.each(t||this.data,function(t,a){i.push(a[e])}),i},$reader_page:function(e,t){var i=this,a=$(t),s="",n={};if(a.find("a").addClass("page_link_"+this.random),s+=a.html(),e.numberStatus){var l="page_select_"+this.random;s+='",n[l]={eventType:"change",type:"page_select"}}if(e.jump){var c="page_jump_input-"+this.random,o="page_jump_btn_"+this.random;s+='
                '+lan.public.jump_to_page+'
                ",n[c]={eventType:"keyup",type:"page_jump_input"},n[o]={type:"page_jump_btn"}}return n["page_link_"+this.random]={type:"cut_page_number"},i.config.page.total=parseInt(a.find(".Pcount").html().match(/([0-9]*)/g)[1]),i.$event_bind(n),'
                '+s+"
                "},$dynamic_merge_style:function(e,t){var i="";return $.each(e,function(e,t){switch(e){case"align":i+="text-align:"+t+";";break;case"width":i+="width:"+("string"==typeof t?t:t+"px")+";";break;case"style":i+=t;break;case"minWidth":i+="min-width:"+("string"==typeof t?t:t+"px")+";";break;case"maxWidth":i+="max-width:"+("string"==typeof t?t:t+"px")+";"}}),{index:t,css:i}},$event_bind:function(e){var t=this;$.each(e,function(e,i){if(t.event_list[e]&&t.event_list[e].eventType===i.eventType)return!0;t.event_list[e]=i,$(t.config.el).on(i.eventType||"click","."+e,function(a){var s=$(this).parents("tr").index(),n=$(this).data(),l=[];switch(i.type){case"rows":t.event_rows_model={el:$(this),model:t.config.column[$(this).parents("td").index()],rows:t.data[s],index:s},l=[t.event_rows_model.rows,t.event_rows_model.index,a,e,t];break;case"sort":var c=t.config.column[n.index];$(this).hasClass("sort-active")&&$(".sort_"+t.random+" .sort-active").data({sort:"desc"}),$(".sort_"+t.random).removeClass("sort-active").find(".glyphicon").removeClass("glyphicon-triangle-top").addClass("glyphicon-triangle-bottom"),$(this).addClass("sort-active"),"asc"==n.sort?($(this).data({sort:"desc"}),$(this).find(".glyphicon").removeClass("glyphicon-triangle-top").addClass("glyphicon-triangle-bottom")):($(this).data({sort:"asc"}),$(this).find(".glyphicon").removeClass("glyphicon-triangle-bottom").addClass("glyphicon-triangle-top")),t.config.sort=t.config.sortParam({name:c.fid,sort:n.sort}),t.$refresh_table_list(!0);break;case"checkbox":var o=$(t.config.el+' [data-checkbox="all"]'),r=$(t.config.el+" tbody .checkbox_"+t.random);null==n.checkbox?$(this).hasClass("active")?($(this).removeClass("active"),t.checkbox_list.splice(t.checkbox_list.indexOf(s),1),t.checkbox_list.length>0?o.addClass("selected").removeClass("active"):o.removeClass("selected active")):($(this).addClass("active"),t.checkbox_list.push(s),t.data.length===t.checkbox_list.length?o.addClass("active").removeClass("selected"):t.checkbox_list.length>0&&o.addClass("selected")):t.checkbox_list.length===t.data.length?(t.checkbox_list=[],r.removeClass("active selected").next().prop("checked","checked"),o.removeClass("active")):(r.each(function(e,i){$(this).hasClass("active")||($(this).addClass("active").next().prop("checked","checked"),t.checkbox_list.push(e))}),o.removeClass("selected").addClass("active")),t.$set_batch_view();break;case"button":l.push(a,t);break;case"search_focus":var d=$(t.config.el+" .bt_search_tips");$(t.config.el+" .bt_search_tips").length>0&&d.remove();break;case"search_input":if(13==a.keyCode)return $(t.config.el+" .search_btn_"+t.random).click(),!1;break;case"search_btn":var p=$(t.config.el+" .search_input"),_=$(t.config.el+" .search_input").val();t.config.search.value=_,p.append('
                '+_+'
                '),t.$refresh_table_list(!0);break;case"page_select":var h=parseInt($(this).val());return t.config.page.number=h,t.config.page.page=1,t.$refresh_table_list(!0),!1;case"page_jump_input":return 13==a.keyCode&&($(t.config.el+" .page_jump_btn_"+t.random).click(),$(this).focus()),!1;case"page_jump_btn":var f=parseInt($(t.config.el+" .page_jump_input-"+t.random).val()),u=Math.ceil(t.config.page.total/t.config.page.number);f>u&&(f=t.config.page.page),t.config.page.page=f,t.$refresh_table_list(!0);break;case"cut_page_number":var v=parseInt($(this).attr("href").match(/([0-9]*)$/)[0]);return t.config.page.page=v,t.$refresh_table_list(!0),!1;case"eye_open_password":return $(this).hasClass("glyphicon-eye-open")?($(this).addClass("glyphicon-eye-close").removeClass("glyphicon-eye-open"),$(this).prev().text(t.data[s].password)):($(this).addClass("glyphicon-eye-open").removeClass("glyphicon-eye-close"),$(this).prev().html("**********")),!1;case"copy_password":return bt.pub.copy_pass(t.data[s].password),!1}i.event&&i.event.apply(this,l)})})},$style_bind:function(e,t){var i="",a=this;$.each(e,function(e,t){""!=t.css&&(t.className?i+=t.className+"{"+t.css+"}":i+=a.config.el+" thead th:nth-child("+(t.index+1)+"),"+a.config.el+" tbody tr td:nth-child"+(t.span?" span":"")+"("+(t.index+1)+"){"+t.css+"}")}),0==$("#bt_table_"+a.random).length&&$(a.config.el).append('")},$get_win_area:function(){return[window.innerWidth,window.innerHeight]},$http:function(e){var t={},i=this.config,a=i.page,s=i.search,n=i.sort||{};a&&(t[a.numberParam]=a.number,t[a.pageParam]=a.page,this.config.cookiePrefix&&bt.set_cookie(this.config.cookiePrefix+"_"+a.numberParam,a.number)),s&&(t[s.searchParam]=s.value),this.config.beforeRequest&&(i.param=this.config.beforeRequest(i.param)),bt_tools.send({url:i.url,data:$.extend(i.param,t,n)},function(t){if(i.dataFilter){var a=i.dataFilter(t);e&&e(a.data,a.page)}else e&&e(t.data,t.page)})}},new t(e)},select_file:function(e,t){"string"==typeof e&&(e={path:e,type:2,title:lan.public.select_fileordir,ext:[],limit:""}),"function"==typeof e&&(type=t,t=e,e={path:bt.get_cookie("Path")}),"number"!=typeof type&&(type=0);var i=this,a={type:type,type_tips:0==type?lan.public.dir:1==type?lan.site.file:lan.public.fileordir,select_list:[],select_path:bt.get_cookie("Path")||("Windows"==bt.os?setup_path:"/www/wwwroot"),select_config:{},scroll_width:0,reader_view:function(){var t=this;this.scroll_width=a.getScrollbarWidth(),layer.open({type:1,title:e.title||lan.public.select+t.type_tips,shadeClose:!1,closeBtn:1,area:["650px","550px"],content:'
                '+lan.public.name+''+lan.public.modify_time+''+lan.site.redirect_type+'
                文件修改时间类型
                '+t.type_tips+'名:
                ',success:function(){t.evnet_bind(),t.render_file_list(function(){t.set_path_width()}),$(".select_list_thaed").css("right",t.scroll_width+"px")}})},evnet_bind:function(){var e=this;$("#select_dir_list").on("click","tr",function(){var t=$(this).data("index");$(this).addClass("active").siblings().removeClass("active"),$('[name="select_name"]').val(e.select_list[t].filename)}),$(".select_list_body").on("scroll",function(e){var t=$(this).scrollTop(),i=$(this).scrollLeft();t>0?$(".select_list_shadow").show():$(".select_list_shadow").hide(),i>=0&&$(".select_list_thaed").css("left",4-i+"px"),e.stopPropagation(),e.preventDefault()}),$(".file_path_refresh").on("click",function(){e.render_file_list()}),$(".select_dir_list thead th .icon-drag").on("mousedown",function(t){var i=t.clientX,a=$(this).parent(),s=a.index(),n=a[0].clientWidth;parseInt($(this).parent().attr("data-min"));if(1===t.which){var l=function(t){var a=t.clientX,l=a-i,c=n+l;setTimeout(function(){e.set_select_width(s,"width:"+c+"px")},0)};$(document).on("mousemove",l).one("mouseup",function(){$(this).unbind(l),$(this).unbind(this)})}t.stopPropagation()}),$(".select_dir_list thead th>span").on("click",function(t){var i=$(this).parent(),a=i.data("type"),s=i.hasClass("active"),n=i.hasClass("sort");s?i.addClass("sort").removeClass("active"):n?i.addClass("active").removeClass("sort"):i.addClass("active"),i.siblings().removeClass("active sort"),e.render_file_list({sort:a,reverse:s?1:0}),t.stopPropagation()}),$(".search_path_views input").on("keyup",function(){$(this).val()})},set_path_width:function(e){var t=0,i=$(".file_dir_view")[0].offsetWidth,a=($(".file_dir_view .file_dir_item"),[]);t=0;$(".file_dir_view .file_dir_item").each(function(){a.push($(this)[0].offsetWidth)});for(var s=a.reverse(),n=0;n-1?"本地磁盘("+t.path.match(/[A-Z]+/)[0]+":)":t.path;a+='
                '+i+"
                "}),$.each(o,function(e,t){var i=bt.format_data(t.mtime),a="dir"==t.type?"文件夹":"文件";s+=' '+t.filename+" "+i+" "+("dir"==t.type?"文件夹":"文件")+" "}),$("#select_mount_list").html(a),$("#select_dir_list").html(s),t&&t(e)})},render_path_list:function(e,t){var i='
                ',a="",s=e.split("/").splice(1),n=e.split("/")[0];"Windows"===bt.os?(0==s.length&&(s=[]),s.unshift('本地磁盘('+n+")")):("/"==e&&(s=[]),s.unshift("根目录"));for(var l=0;l '+s[l]+' ';$(".path_input").val("").attr("data-path",e);var c=$("#select_file_directory .file_path_input .file_dir_view");c.html(i),t&&t(e)},set_select_width:function(e,t){var i=".select_dir_list tbody td:nth-child("+(e+1)+")>span,.select_dir_list thead th:nth-child("+(e+1)+")>span",a=$("#th-index-"+e);a.length>0?a.html(i+"{"+t+"}"):$("#select_file_style").append('")},cut_style_object:function(e){var t={};e.split(";");return t},getScrollbarWidth:function(){var e,t,i=document.createElement("div"),a={width:"100px",height:"100px",overflowY:"scroll"};for(e in a)i.style[e]=a[e];return document.body.appendChild(i),t=i.offsetWidth-i.clientWidth,i.remove(),t}};a.reader_view()},form:function(e){function t(e){this.config=e,this.$load()}var i=this;return t.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 e=this;e.el&&this.$reader_content(function(){e.$event_bind()})},$active_focus:function(e,t){var i=this;$(".input_checked_"+i.random).focus(),this.checked_blur=function(a){setTimeout(function(){if(t)return $(".input_checked_"+i.random).focus(),!1;e&&e(a),delete i.checked_blur},200)}},$reader_content:function(e){var t=this,a="",s="",n={};return $.each(t.config.form,function(e,i){a+=t.$reader_content_row(e,i)}),t.element=$('
                '+a+"
                "),s=$('
                '),s.append(t.element),n["input_checked_"+t.random]={focus:{type:"input_checked",onEvent:!1,event:function(e,t){return t.checked=!0,!1}},blur:{type:"input_checked",onEvent:!1,event:function(e,t){t.checked=!1,t.checked_blur&&t.checked_blur(e)}}}, +$.extend(t.event_list,n),e&&e(),s[0].outerHTML},$reader_content_row:function(e,t){var a=this,s=t.help;return'
                "+(t.label?''+t.label+"":"")+'
                "+a.$reader_form_element(t.group,e)+(s?'
                "+s.list.join("
                ")+"
                ":"")+"
                "},$reader_form_element:function(e,t){var a=this,s="",n={};return Array.isArray(e)||(e=[e]),$.each(e,function(e,l){var c=a.$reader_style(l.style)+i.$verify(l.width,"width","style"),o=a.$verify_group(l,["name","value","placeholder","disabled","readonly","autofocus","autocomplete","min","max"]),r=a.$create_event_config(l),d="";switch(s+=l.label?''+l.label+"":"",void 0!==l.name&&(n[l.name]=r),l.type){case"text":case"checkbox":case"password":case"radio":case"number":var p="event_"+l.name+"_"+a.random,_="checkbox"===l.type;"radio"===l.type?$.each(l.label_tips,function(e,t){l.block&&(s+='
                '),s+='',s+='",l.block&&(s+="
                ")}):(l.block&&(s+='
                '),s+='","checkbox"==l.type&&(s+='"),l.block&&(s+="
                "),a.event_list[p]={click:{event:l.event}}),l.icon&&(s+='",n[l.name+"_icon"]={click:{type:"select_path",config:l}});break;case"textarea":if(s+='",$.each(["blur","focus","input"],function(e,t){if(l.tips){var i=null;switch(t){case"blur":i=function(e,t){""===$(this).val()&&$(this).next().show(),layer.close(t.tips.loadT)};break;case"focus":i=function(e,t){$(this).next().hide(),t.tips.loadT=layer.tips(h,$(this),{tips:[1,"#20a53a"],time:0,area:$(this).width()})}}}n[l.name][t]?n[l.name][t].added=i:n[l.name][t]={type:l.type,cust:!1,event:l[t],added:i}}),l.tips){var h="";h=void 0===l.tips.list?l.tips.text:l.tips.list.join("
                "),s+='
                "+h+"
                ",n[l.name+"_tips"]={click:{type:"textarea_tips",config:l}}}break;case"select":s+=a.$reader_select(l,c,o,t),a.event_list.custom_select={click:{type:"custom_select",children:".bt_select_value"}},a.event_list.custom_select_item={click:{type:"custom_select_item",children:"li.item"}};break;case"link":d="event_"+bt.get_random(6),s+='
                "+l.title+"",a.event_list[d]={click:{type:"link_event",event:l.event}};break;case"help":var f="";$.each(l.list,function(e,t){f+="
              • "+t+"
              • "}),s+='
                  "+f+"
                "}a.form_config[l.name]=l}),$.extend(a.event_list,n),s},$create_event_config:function(e){var t={};return void 0===e.name?{}:($.each(this.event_type,function(i,a){e[a]&&(t["event"===a?"click":a]={type:e.type,event:e[a],cust:["select","checkbox","radio"].indexOf(e.type)>-1,config:e})}),t)},$reader_style:function(e){var t="";return"string"==typeof e?e:void 0===e?"":($.each(e,function(e,i){t+=e+":"+i+";"}),t)},$reader_select:function(e,t,a,s){var n=this,l="",c="",o={};if(!Array.isArray(e.list)){var r=e.list;bt_tools.send({url:r.url,data:r.param||{}},function(t){!1!==t.status?(e.list=e.list.dataFilter?e.list.dataFilter(t):t,n.$replace_render_content(s)):bt.msg(t)})}return $.each(e.list,function(t,a){o=a.value===e.value||a.value===n.config.data[e.name]?a:e.list[0],l+='
              • '+a.title+"
              • ",c+='"}),!o.title&&Array.isArray(e.list)&&(o=e.list[0]),'
                '+(o.title||"Getting data")+'
                  '+(l||"")+"
                "+(c||"")+"
                "},$replace_render_content:function(e){var t=this,i=this.config.form[e];$("[data-form="+t.random+"]").find(".line:eq("+e+")").replaceWith(t.$reader_content_row(e,i))},$event_bind:function(e,t){var i=this,a={};i.element=$("object"==typeof e?i.element:"[data-form="+i.random+"]"),void 0===e&&(a=i.event_list),$.each(a,function(e,t){if($.isEmptyObject(t))return!0;$.each(t,function(t,a){var s="";s="boolean"==typeof a.cust?"["+(a.cust?"data-":"")+"name="+e+"]":"."+e,function(e,a){if(!1===e.onEvent){switch(e.type){case"input_checked":$(s).on("event"!=t?t:"click",function(t){e.event.apply(this,[t,i])})}return!0}i.element.on("event"!=t?t:"click",e.children?e.children:s,function(t){var s=i.$get_form_element(),n=i.$get_form_value(),l=i.form_config[a];switch(e.type){case"textarea_tips":$(this).hide().prev().focus();break;case"custom_select":if($(this).parent().hasClass("bt-disabled"))return!1;var c=$(this).next();return c.hasClass("show")?c.removeClass("show"):($(".bt_select_list").removeClass("show"),c.addClass("show")),$(document).click(function(){return i.element.find(".bt_select_list").removeClass("show"),$(this).unbind("click"),!1}),!1;case"custom_select_item":if(l=i.form_config[$(this).parents(".bt_select_updown").attr("data-name")],item_config=l.list[$(this).index()],$(this).hasClass("disabled"))return $(this).parent().removeClass("show"),item_config.tips&&layer.msg(item_config.tips,{icon:2}),!0;$(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")+"_"+i.random)}e.event&&e.event.apply(this,[n,s,i,l,t]),e.added&&e.added.apply(this,[t,l])})}(a,e)})}),t&&t()},$get_form_value:function(){return this.element.serializeObject()},$set_find_value:function(e,t){var i={},a=this;"string"!=typeof e?i=e:i[e]=t,$.each(i,function(e,t){a.form_element[e].val(t)})},$get_form_element:function(e){var t={},i=this;if(!e&&!$.isEmptyObject(i.form_element))return i.form_element;this.element.find(":input").each(function(e){t[$(this).attr("name")]=$(this)}),i.form_element=t},$verify_group:function(e,t){var i="";return $.each(t,function(t,a){if(void 0===e[a])return!0;["disabled","readonly"].indexOf(a)>-1?i+=" "+(e[a]?a+'="'+a+'"':""):i+=" "+a+'="'+e[a]+'"'}),i},$verify_bind_event:function(e,t,i){var a={};return $.each(i,function(i,s){var n=t[s];n&&("object"==typeof a[e]?(Array.isArray(a[e])||(a[e]=[a[e]]),a[e].push({event:n,eventType:s})):a[e]={event:n,eventType:s})}),a},$verify:function(e,t,i){return e?!0===i?e?" "+t:"":"style"===i?t?t+":"+e+";":e:t?" "+t+'="'+e+'"':" "+e:""},$submit:function(e,t){}},new t(e)},tab:function(e){function t(e){this.config=e,this.theme=this.config.theme||{},this.$load()}var i=this;return t.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 e=this,t=(this.config.active,e.config.list);this.$event_bind(),t[e.active].success&&t[e.active].success(),t[e.active].init=!0},$load:function(){},$reader_content:function(){var e=this,t=e.config.list,a="",s="",n=e.theme,l=e.config;return void 0===e.active&&(e.active=0),$.isEmptyObject(l.theme)||(n=this.theme_list[e.active],$.each(l.theme,function(e,t){n[e]&&(n[e]+=" "+t)}),e.theme=n),l.type&&$.isEmptyObject(l.theme)&&(this.theme=this.theme_list[e.active]),$.each(t,function(t,i){var l=e.active===t,c=n.active||"active";a+=''+i.title+"",s+='
                '+(l?i.content:"")+"
                "}),e.element=$('
                '+a+'
                '+s+"
                "),e.element[0].outerHTML},$reader_find:function(){},$event_bind:function(){var e=this,t=e.theme,i=t.active||"active";e.el||(e.element=$("#tab_"+e.random)),e.element.on("click","."+t.nav.replace(/\s+/g,".")+" span",function(){var a=$(this).index(),s=e.config.list[a];$(this).addClass(i).siblings().removeClass(i),$("."+t.body+">div:eq("+a+")").addClass(i).siblings().removeClass(i),e.active=a,s.init||($("."+t.body+">div:eq("+a+")").html(s.content),s.success&&s.success(),s.init=!0)})}},new t(e)},load:function(e){var t=layer.msg(e+",please wait...",{icon:16,time:0,shade:.3});return!0===e&&(t=layer.load()),{close:function(){layer.close(t)}}},open:function(e){var t={},i=null;return t=$.extend({type:1,area:"640px",closeBtn:2,btn:["确认","取消"]},e),i=layer.open(t),{close:function(){layer.close(i)}}},msg:function(e,t){var i=null,a="",s={};return"object"==typeof e&&"boolean"==typeof e.status&&(a=e.msg,s={icon:e.status?1:2}),"string"==typeof e&&(a=e,s={icon:void 0!==t?t:1}),i=layer.msg(a,s),{close:function(){layer.close(i)}}},$verify:function(e,t,i){return e?!0===i?e?" "+t:"":"style"===i?t?t+":"+e+";":e:t?" "+t+'="'+e+'"':" "+e:""},select_path:function(e,t,i,a){"number"!=typeof i&&(i=1),"number"!=typeof a&&(a=!1),bt.set_cookie("Path","/www/server/panel/BTPanel/static");var s=this,n={type:i,type_tips:0==i?"目录":1==i?"文件":"目录或文件",type_limit:0==i?"dir":1==i?"file":"all",select_list:[],select_path:bt.get_cookie("Path")||("Windows"==bt.os?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 t=this;this.scroll_width=n.getScrollbarWidth(),layer.open({type:1,title:e.title||"选择"+t.type_tips,shadeClose:!1,closeBtn:2,area:["650px","555px"],content:'
                名称修改时间类型
                文件修改时间类型
                '+t.type_tips+'名:
                ',success:function(){t.render_file_list(),$(".select_list_thaed").css("right",t.scroll_width+"px")}})},render_file_list:function(e,t){var i="",a="",n=this,l={path:this.select_path,sort:"type",disk:!0};void 0===e&&(e=l),"function"==typeof e&&(t=e,e=l),n.select_config=$.extend(l,e),s.$http("GetDir",n.select_config,function(e){var s=e.DISK,l=$.merge(n.data_reconstruction(e.DIR,"DIR"),n.data_reconstruction(e.FILES));n.select_list=l,n.render_path_list(),$.each(s,function(e,t){var a="/"==t.path?"根目录":t.path.indexOf(":/")>-1?"本地磁盘("+t.path.match(/[A-Z]+/)[0]+":)":t.path;i+='
                '+a+"
                "}),$.each(l,function(e,t){if(0==n.type&&t.type!=n.type_limit)return!0;var i=bt.format_data(t.mtime),s="dir"==t.type?"文件夹":"文件";a+=' '+t.filename+" "+i+" "+("dir"==t.type?"文件夹":"文件")+" "}),$("#select_mount_list").html(i),$("#select_dir_list").html(a),t&&t(e)})},data_reconstruction:function(e,t,i){if(e.length<1)return[];var a=[];return $.each(e,function(e,i){var s=i.split(";"),n="",l=s[0].split("."),c=l[l.length-1];switch(s[0]){case".user.ini":n="PS: PHP用户配置文件(防跨站)!";break;case".htaccess":n="PS: Apache用户配置文件(伪静态)";break;case"swap":n="PS: 宝塔默认设置的SWAP交换分区文件"}-1!=s[0].indexOf("Recycle_bin")&&(n="PS: 回收站目录,勿动!"),-1!=s[0].indexOf(".upload.tmp")&&(n="PS: 宝塔文件上传临时文件,重新上传从断点续传,可删除"),a.push({caret:"1"==s[8],down_id:s[9],ext:"DIR"==t?"":c,filename:s[0],mtime:s[2],ps:n||s[10],size:s[1],type:"DIR"==t?"dir":"file",user:s[3],root_level:s[4]})}),a},render_path_list:function(e){var t=this,i='
                ',a="",s=this.file_path.split("/").splice(1),n=this.file_path.split("/")[0];"Windows"===bt.os?(0==s.length&&(s=[]),s.unshift('本地磁盘('+n+")")):("/"==this.file_path&&(s=[]),s.unshift("根目录"));for(var l=0;l\t\t\t\t\t\t\t\t'+s[l]+'\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t';$(".path_input").val("").attr("data-path",this.file_path);var c=$(".file_path_input .file_dir_view");c.html(i),c.attr("data-width",c.width()),t.set_dir_view_resize()},set_select_width:function(e,t){var i=".select_dir_list tbody td:nth-child("+(e+1)+")>span,.select_dir_list thead th:nth-child("+(e+1)+")>span",a=$("#th-index-"+e);a.length>0?a.html(i+"{"+t+"}"):$("#select_file_style").append('")},cut_style_object:function(e){var t={},i=e.split(";");return console.log(i),t},getScrollbarWidth:function(){var e,t,i=document.createElement("div"),a={width:"100px",height:"100px",overflowY:"scroll"};for(e in a)i.style[e]=a[e];return document.body.appendChild(i),t=i.offsetWidth-i.clientWidth,i.remove(),t},set_dir_view_resize:function(){var e=$(".file_path_input"),t=$(".file_path_input .file_dir_view"),i=t.attr("data-width"),a=null;if(i?parseInt(i):(i=t.width(),t.attr("data-width",i)),t.width()-i<90){var s=0;$($(".file_path_input .file_dir_view .file_dir_item").toArray().reverse()).each(function(){var t=0;$(this).attr("data-width")?t=parseInt($(this).attr("data-width")):($(this).attr("data-width",$(this).width()),t=$(this).width()),s+=t,e.width()-s<=90?$(this).addClass("hide"):$(this).removeClass("hide")})}a=t.children(".file_dir_item.hide").clone(!0);0==t.children(".file_dir_item.hide").length?e.removeClass("active").find(".file_dir_omit").addClass("hide"):(a.each(function(){0==$(this).find(".glyphicon-hdd").length&&$(this).find(".file_dir").before('')}),e.addClass("active").find(".file_dir_omit").removeClass("hide"),e.find(".file_dir_omit .nav_down_list").empty().append(a),e.find(".file_dir_omit .nav_down_list .file_dir_item").removeClass("hide"))},reader_file_list:function(e,t){var i=this;if("function"==typeof e&&(t=e,e={is_operating:!1}),void 0===e&&(e={is_operating:!1}),a)return layer.msg("只能在该目录下操作",{icon:2}),!1;this.loadT=bt.load("正在获取文件列表,请稍候..."),this.file_images_list=[],i.get_dir_list(e,function(e){i.loadT.close(),i.file_list=$.merge(i.data_reconstruction(e.DIR,"DIR"),i.data_reconstruction(e.FILES)),i.file_path=e.PATH,i.is_recycle=e.FILE_RECYCLE,i.file_store_list=e.STORE,bt.set_cookie("Path",e.PATH);var a="",s="",n=e.DISK,l=i.file_list;i.select_list=i.file_list,i.render_path_list(),$.each(n,function(e,t){var i="/"==t.path?"根目录":t.path.indexOf(":/")>-1?"本地磁盘("+t.path.match(/[A-Z]+/)[0]+":)":t.path;a+='
                '+i+"
                "}),$.each(l,function(e,t){if(0==i.type&&t.type!=i.type_limit)return!0;var a=bt.format_data(t.mtime),n="dir"==t.type?"文件夹":"文件";s+=' '+t.filename+" "+a+" "+("dir"==t.type?"文件夹":"文件")+" "}),$("#select_mount_list").html(a),$("#select_dir_list").html(s);var c=e.PATH.lastIndexOf("/");e.PATH.substring(c+1,e.PATH.length);t&&t(rdata)})},reader_file_list_content:function(e,t){var i="",a=this,s=0;$.each(e,function(e,t){var n=t.filename+t.ps;a.file_list[e]=t=a.$file_data_dispose(t),a.file_list[e].only_index=e,t.filename.indexOf("Recycle_bin")&&(_tips="PS: 回收站目录,勿动!"),n.length>20&&(n=n.substring(0,20)+"..."),bt.check_chinese(n)&&n.length>10&&(n=n.substring(0,10)+"..."),i+='
                '+t.filename+t.ps+""+(t.caret?'':"")+(t.down_id?'':"")+'
                '+t.type_tips+'
                '+("dir"==t.type?'点击计算':bt.format_size(t.size))+'
                '+bt.format_data(t.mtime)+"
                ","dir"==t.type&&s++,t.ispreview&&(a.file_images_list.push(t.path),t.images_id,t.images_id=a.file_images_list.length-1)}),$(".file_list_content").html(i),t&&t({is_dir_num:s})},$file_data_dispose:function(e){var t={languages:null,model:null};return $.extend(e,{only_id:bt.get_random(10),type_tips:"dir"===e.type?"文件夹":this.ext_type_tips(e.ext),open_type:this.determine_file_type(e.ext),languages:t.languages,path:e.path||this.path_resolve(this.file_path,e.filename),model:t.model})},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},$get_file_model:function(e){var t=this.vscode_editor.config;for(languages in t.supportedModes)for(var i=t.supportedModes[languages],a=0;a'+("/"==i.path?"根目录":i.path)+" ("+i.size[2]+")"}),$(".mount_disk_list").html(t)})},determine_file_type:function(e,t){var i={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"]},a=!1;if(null!=t)if("text"==t)$.each(i,function(t,i){$.each(i,function(t,i){if(i==e)return a=!0,!1})}),a=!a;else{if(void 0===i[t])return!1;$.each(i[t],function(t,i){if(i==e)return a=!0,!1})}else $.each(i,function(t,i){$.each(i,function(i,s){if(s==e)return a=t,!1})}),"boolean"==typeof a&&(a="text");return a},render_file_groud_menu:function(e,t){var i=this,a=$(t).data("index"),s=i.file_list[a],n=[["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","解压到当前"]]]],l=["zip","rar","gz","war","tgz","bz2"],c=0;"dir"==s.type&&(n.splice(2,1),c++),0!==s.down_id?(n.splice(3-c,1),c++):(n.splice(4-c,1),n[3-c][1]="dir"==s.type?"分享目录":"分享文件",c++),!1!==s.caret?(n.splice(5-c,1),c++):(n.splice(6-c,1),n[5-c][1]="dir"==s.type?"收藏目录":"收藏文件",c++),"php"!=s.ext&&"dir"!=s.type&&(n.splice(8-c,1),c++);var o=0;$.each(l,function(e,t){t==s.ext&&o++}),0==o&&(n.splice(17-c,1),c++),i.reader_menu_list({el:$(".selection_right_menu"),ev:e,data:s,list:n})},render_file_all_menu:function(e,t){var i=this,a=[["refresh","刷新"],["split",""],["upload","上传"],["create","新建文件夹/文件",[["create_dir","新建文件夹"],["create_files","新建文件"]]],["split",""],["paste","粘贴"]];bt.get_storage("session","copy_path")||a.splice(5,1),i.reader_menu_list({el:$(".selection_right_menu"),ev:e,data:{},list:a})},get_dir_list:function(e,t,i){var a=this;"boolean"==typeof t&&(i=t,t=null),s.$http("GetDir",$.extend({disk:!0,path:a.file_path,sort:bt.get_cookie("files_sort")||"type"},e),t,i)},retrun_prev_path:function(e){var t=e.split("/");return t.splice(t.length-1),t.join("/")},reader_menu_list:function(e){var t=this,i=e.el.find("ul"),a=i.height(),s=i.width(),n=e.ev.clientX-(this.area[0]-e.ev.clientX'):(Array.isArray(s[2])&&(n=$('
                  '),l=n.find(".set_group"),$.each(s[2],function(i,a){l.append($('
                • '+a[1]+"
                • ").on("click",{type:a[0],data:e.data},function(i){t.file_groud_event($.extend(i.data.data,{open:i.data.type,index:parseInt($(e.ev.currentTarget).data("index")),element:e.ev.currentTarget,type_tips:s.type?"文件夹":"文件"})),e.el.removeAttr("style"),i.stopPropagation(),i.preventDefault()}))})),i.append($('
                • '+s[1]+"
                • ").append(n).on("click",{type:s[0],data:e.data},function(i){t.file_groud_event($.extend(i.data.data,{open:i.data.type,index:parseInt($(e.ev.currentTarget).data("index")),element:e.ev.currentTarget,type_tips:s.type?"文件夹":"文件"})),e.el.removeAttr("style"),i.stopPropagation(),i.preventDefault()})))}),e.el.css({left:n,top:e.ev.clientY-(this.area[1]-e.ev.clientY0?$(".select_list_shadow").show():$(".select_list_shadow").hide(),i>=0&&$(".select_list_thaed").css("left",4-i+"px"),e.stopPropagation(),e.preventDefault()}),$(".file_path_refresh").on("click",function(){e.render_file_list()}),$(".select_dir_list thead th .icon-drag").on("mousedown",function(t){var i=t.clientX,a=$(this).parent(),s=a.index(),n=a[0].clientWidth;parseInt($(this).parent().attr("data-min"));if(1===t.which){var l=function(t){var a=t.clientX,l=a-i,c=n+l;setTimeout(function(){e.set_select_width(s,"width:"+c+"px")},0)};$(document).on("mousemove",l).one("mouseup",function(){$(this).unbind(l),$(this).unbind(this)})}t.stopPropagation()}),$(".select_dir_list thead th>span").on("click",function(t){var i=$(this).parent(),a=i.data("type"),s=i.hasClass("active"),n=i.hasClass("sort");s?i.addClass("sort").removeClass("active"):n?i.addClass("active").removeClass("sort"):i.addClass("active"),i.siblings().removeClass("active sort"),e.render_file_list({sort:a,reverse:s?1:0}),t.stopPropagation()}),$(".search_path_views input").on("keyup",function(){var e=$(this).val();console.log(e)}),$(".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(t){var i=$('[name="select_name"]').val(),a="";""==i?layer.msg("只能选择"+e.type_tips,{icon:2}):(a=e.file_path+"/"+i,console.log(a))}),$("#select_file_directory .select_file_tootls").on("click",".creat_dir",function(t){var i="   ";0==$("#tbody tr").length?$("#select_dir_list").append(i):$("#select_dir_list tr:first-child").before(i),$(".newFolderName").focus(),$("#nameOk").click(function(){var t=$("#newFolderName").val(),i=$(".file_path_views .path_input").attr("data-path");newTxt=i+"/"+t,s.$http("CreateDir",{path:newTxt},function(t){1==t.status?(e.reader_file_list({path:i,is_operating:!1}),layer.msg(t.msg,{icon:1})):layer.msg(t.msg,{icon:2})})})}),$("#select_mount_list").on("click",".item",function(){e.reader_file_list({path:$(this).attr("data-menu"),is_operating:!0})}),$(window).resize(function(t){$(this)[0].innerHeight!=e.area[1]&&(e.area[1]=$(this)[0].innerHeight,e.set_file_view()), +$(this)[0].innerWidth!=e.area[0]&&(e.area[0]=$(this)[0].innerWidth,e.set_dir_view_resize()),e.vscode_editor.view&&e.vscode_editor.is_full_min>0&&layer.style(e.vscode_editor.view,{top:0,left:0,width:e.area[0],height:e.area[1]}),e.vscode_editor.view&&$.isEmptyObject(e.vscode_editor.list)&&e.vscode.layout()}).keydown(function(t){t=window.event||t;var i=t.keyCode,a=t.target.tagName.toLowerCase();if(8==i&&"input"!==a&&"textarea"!==a)return null==e.vscode_editor.view&&$(".forward_path span:eq(0)").click(),!1}),$(".file_path_input .path_input").on("focus blur keyup",function(t){t=t||window.event;var i=$(this).attr("data-path");switch(t.type){case"focus":$(this).addClass("focus").val(i).prev().hide();break;case"blur":$(this).removeClass("focus").val("").prev().show();break;case"keyup":if(13!=t.keyCode&&"keyup"==t.type)return!1;var a=$(this);$(this).data("path")!=$(this).val()&&e.reader_file_list({path:$(this).val(),is_operating:!0},function(e){!1===e.status?$(a).val(i):($(a).val(e.PATH),$(a).blur().prev().show())})}t.stopPropagation()}),$(".file_path_input .file_dir_view").on("click",".file_dir",function(){e.reader_file_list({path:$(this).attr("title"),is_operating:!0})}),$(".forward_path span").click(function(){var t=$(this).index(),i="";if(!$(this).hasClass("active")){switch(t){case 0:e.file_pointer=e.file_pointer-1,i=e.retrun_prev_path(e.file_path);break;case 1:e.file_pointer=e.file_pointer+1,i=e.file_path+"/"+$(".select_file_group .file_directory").val();break;case 2:e.file_pointer=e.file_pointer-1,i=e.retrun_prev_path(e.file_path)}e.reader_file_list({path:i,is_operating:!1})}}),$(".file_path_input .file_dir_view").on("click",".file_dir_omit",function(e){var t=this,i=$(this).children(".nav_down_list");$(this).addClass("active"),i.addClass("show"),$(document).one("click",function(){$(t).removeClass("active"),i.removeClass("show"),e.stopPropagation()}),e.stopPropagation()}),$("#select_dir_list").on("dblclick","tr",function(t){if($(t.target).hasClass("file_check"))return!1;var i=$(this).attr("data-path"),a=$(this).attr("data-type");"dir"==a&&e.reader_file_list({path:e.file_path+"/"+i}),t.stopPropagation(),t.preventDefault()}),$(".file_path_refresh").click(function(){e.reader_file_list({path:e.file_path})}),$(".file_nav_view .upload_or_download").on("click",function(t){e.open_upload_view(),t.stopPropagation(),t.preventDefault()}),$(".file_nav_view .upload_or_download li").on("click",function(t){var i=$(this).data("type");"uploadFile"===i?e.open_upload_view():e.open_download_view(),t.stopPropagation(),t.preventDefault()}),$(".mount_disk_list").on("click",".nav_btn",function(){var t=$(this).data("menu");e.reader_file_list({path:t})}),$(".file_list_header").on("click",".file_name,.file_size,.file_mtime,.file_accept,.file_user",function(t){var i=$(this).attr("data-tid"),a=$(this).find(".icon_sort").hasClass("active"),s=$(this).hasClass("active");return!$(this).find(".icon_sort").hasClass("active")&&$(this).hasClass("active")?$(this).find(".icon_sort").addClass("active"):$(this).find(".icon_sort").removeClass("active"),$(this).addClass("active").siblings().removeClass("active").find(".icon_sort").removeClass("active").empty(),$(this).find(".icon_sort").html(''),s||(a=!0),bt.set_cookie("files_sort",i),bt.set_cookie("name_reverse",a?1:0),e.reader_file_list(),!1}),$(".file_list_header .file_th").each(function(e,t){var i=bt.get_cookie("files_sort"),a=bt.get_cookie("name_reverse");$(this).attr("data-tid")===i&&($(this).addClass("active").siblings().removeClass("active").find(".icon_sort").removeClass("active").empty(),$(this).find(".icon_sort").html(''),0===a&&$(this).find(".icon_sort").addClass("active"))}),$(".file_list_header .file_check").on("click",function(t){var i=parseInt($(this).data("checkbox"));switch(i){case 0:$(this).addClass("active").removeClass("active_2").data("checkbox",1),$(".file_list_content .file_tr").addClass("active").removeClass("active_2"),e.file_table_arry=e.file_list;break;case 2:$(this).addClass("active").removeClass("active_2").data("checkbox",1),$(".file_list_content .file_tr").addClass("active"),e.file_table_arry=e.file_list;break;case 1:$(this).removeClass("active active_2").data("checkbox",0),$(".file_list_content .file_tr").removeClass("active"),e.file_table_arry=[]}}),$(".file_list_content").on("click",".file_check",function(t){var i=$(this).parents(".file_tr"),a=i.data("index"),s=$(".file_list_header .file_check"),n=i.attr("data-filename");$(".selection_right_menu").removeAttr("style"),i.hasClass("active")?(i.removeClass("active"),e.remove_check_file(e.file_table_arry,"filename",n),e.file_table_arry.length>0?s.addClass("active_2").removeClass("active").data("checkbox",2):0==e.file_table_arry.length&&s.removeClass("active active_2").data("checkbox",0)):(i.addClass("active"),i.attr("data-filename",e.file_list[a].filename),e.file_table_arry.length==e.file_list.length?s.addClass("active").removeClass("active_2").data("checkbox",1):s.addClass("active_2").removeClass("active").data("checkbox",2),e.file_table_arry.push(e.file_list[a])),t.stopPropagation()}),$(".file_list_content").scroll(function(e){$(this).scrollTop()==$(this)[0].scrollHeight-$(this)[0].clientHeight?($(this).prev().css("opacity",1),$(this).next().css("opacity",0)):$(this).scrollTop()>0?$(this).prev().css("opacity",1):0==$(this).scrollTop()&&($(this).prev().css("opacity",0),$(this).next().css("opacity",1))}),$(".file_table_view .file_list_content").on("click",".file_tr",function(e){$(".selection_right_menu").removeAttr("style"),$(this).find(".file_checkbox .file_check").click(),e.stopPropagation(),e.preventDefault()}),$(".file_table_view .file_list_content").on("click",".file_title i",function(t){var i=$(this).parents(".file_tr"),a=i.data("index"),s=e.file_list[a];"dir"==s.type&&e.reader_file_list({path:e.file_path+"/"+s.filename}),t.stopPropagation()}),$(".file_table_view .file_list_content").on("click",".file_name .icon-share1",function(t){var i=$(this).parents(".file_tr"),a=i.data("index"),s=e.file_list[a];e.info_file_share(s,i),t.stopPropagation()}),$(".file_table_view .file_list_content").on("click",".file_name .icon-favorites",function(t){var i=$(this).parents(".file_tr"),a=i.data("index"),s=e.file_list[a];s.typeText=s.type?"文件夹":"文件",e.cancel_file_favorites(s,i),t.stopPropagation()}),$(".file_table_view .file_list_content").on("dblclick",".file_tr",function(t){if($(t.target).hasClass("file_check"))return!1;var i=$(this).data("index"),a=e.file_list[i];"dir"==a.type&&e.reader_file_list({path:e.file_path+"/"+a.filename}),t.stopPropagation(),t.preventDefault()}),$(".file_list_content").on("contextmenu",".file_tr",function(t){var i=this;3==t.which&&(e.render_file_groud_menu(t,this),$(".content_right_menu").removeAttr("style"),$(this).addClass("selected").siblings().removeClass("selected"),$(document).one("click",function(e){$(i).removeClass("selected"),$(".selection_right_menu").removeAttr("style"),e.stopPropagation(),e.preventDefault()})),t.stopPropagation(),t.preventDefault()}),$(".file_list_content").on("contextmenu",function(t){var i=$(".content_right_menu");i.width(),i.height();3==t.which&&($(".selection_right_menu").removeAttr("style"),e.render_file_all_menu(t,this)),t.stopPropagation(),t.preventDefault()}),$(".filePage").on("change",".showRow",function(){var t=$(this).val();bt.set_storage("showRow",t),e.reader_file_list()}),$(".file_list_content").on("click",".folder_size",function(e){var t=i.file_list[$(this).parents(".file_tr").data("index")],i=this;i.get_file_size({path:t.path},function(e){$(i).text(bt.format_size(e.size))}),e.stopPropagation(),e.preventDefault()}),$(".cut_view_model").on("click",function(){var e=$(this).data("type");$(".file_table_view").addClass("icon"==e?"icon_view":"list_view").removeClass("icon"!=e?"icon_view":"list_view"),$(this).addClass("active").siblings().removeClass("active")})},set_file_forward:function(){var e=this,t=$(".forward_path span");console.log(e.file_operation),1==e.file_operating.length?t.addClass("active"):e.file_pointer==e.file_operating.length-1?(t.eq(0).removeClass("active"),t.eq(1).addClass("active")):0==e.file_pointer?(t.eq(0).addClass("active"),t.eq(1).removeClass("active")):t.removeClass("active")},set_file_view:function(){var e=$(".file_list_content"),t=this.area[1]-170;$(".file_bodys").height(this.area[1]-100),50*this.file_list.length>t?(e.attr("data-height",e.data("height")||e.height()).height(t),$(".file_shadow_bottom").css("opacity",1)):(e.height(t),$(".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")}};n.reader_view(),n.event_bind()},send:function(e,t,i,a,s,n){function l(e){try{o="function"==d[e][1]?d[e][0]:null,r="function"==d[e+1][1]?d[e+1][0]:null}catch(e){}}var c={},o=null,r=null,d=[],p="";switch($.each(arguments,function(e,t){d.push([t,typeof t])}),p=d[0],p[1]){case"string":$.each(d,function(e,t){var i=t[0],a=t[1];if(e>1&&("boolean"==a||"string"==a||"object"==a)){var s=p[0].split("/");return c.url="/"+s[0]+"?action="+s[1],c.load=i,"object"==a&&(c.load=i.load,c.tips=i.tips,c.verify=i.verify),!1}c.url=p[0]}),"object"===d[1][1]?(c.data=d[1][0],l(2)):l(1);break;case"object":c.url=p[0].url,c.data=p[0].data||{},$.each(d,function(e,t){var i=t[0],a=t[1];if(e>1&&("boolean"==a||"string"==a||"object"==a))return c.load=t,"object"==a&&(c.load=i.load,c.tips=i.tips),!0}),"object"===d[1][1]?(c.data=d[1][0],l(2)):l(1)}c.load&&(c.load=this.load(c.load)),$.ajax({type:c.type||"POST",url:c.url,data:c.data||{},dataType:c.dataType||"JSON",complete:function(){c.load&&c.load.close()},success:function(e){return c.verify?(o&&o(e),!1):"string"==typeof e?(layer.msg(e,{icon:2,time:0,closeBtn:2}),!1):c.bacth?(o&&o(e),!1):!1===e.status?(bt_tools.msg(e),!1):(c.tips&&bt_tools.msg(e),void(o&&o(e)))},error:function(e){r&&r(e),layer.closeAll("dialog"),layer.closeAll("loading"),layer.msg("Service response error:"+e.status+"
                  error msg:"+e.statusText+"
                  URL:"+c.url+"
                  param:"+JSON.stringify(c.data),{icon:2,time:0,closeBtn:2})}})}};$.fn.serializeObject=function(){var e=Object.prototype.hasOwnProperty;return this.serializeArray().reduce(function(t,i){return e.call(t,i.name)||(t[i.name]=i.value),t},{})}; \ No newline at end of file diff --git a/BTPanel/static/language/English/log.json b/BTPanel/static/language/English/log.json index bb65b1c6..985abe92 100644 --- a/BTPanel/static/language/English/log.json +++ b/BTPanel/static/language/English/log.json @@ -13,6 +13,7 @@ "TYPE_PANEL":"Panel configuration", "TYPE_PHP":"PHP configuration", "TYPE_CRON":"Cron job", + "USER_MANAGE": "User Management", "TYPE_FIREWALL":"Firewall manager", "DOMAIN_ADD_SUCCESS":"Site [{1}] added domain [{2}] successfully!", "DOMAIN_DEL_SUCCESS":"Site [{1}] deleted domain [{2}] successfully!", @@ -150,10 +151,24 @@ "MODIFY_SSH_INFO": "Modify the SSH information of HOST: {1}", "ADD_SSH_INFO": "Add the SSH information of HOST: {1}", "DEL_SSH_INFO": "Delete the SSH information of HOST: {1}", - "TYPE_TERMINAL": "aaPanel terminal", "ADD_COMMAND_COMMAND": "Add common commands [{1}]", "EDIT_COMMAND_COMMAND": "Modify common commands [{1}]", "DEL_COMMAND_COMMAND": "Delete common commands [{1}]", "OPEN_FILE": "Open File", - "TASK_QUEUE": "Task queue" + "TASK_QUEUE": "Task queue", + "SSH_LOGIN": "Successfully logged in to the SSH server [{1}:{2}]", + "EDIT_MENU_SUCCESS": "Successfully modify the panel menu display list", + "TMP_LOGIN": "Generate temporary connection, expiration time: {1}", + "TMP_LOGIN1": "Temporary login URL has been generated", + "TMP_LOGIN2": "Failed to generate temporary login URL", + "TMP_LOGIN3": "Delete temporary login URL", + "LOGOUT_TMP_UESR": "Force logout of temporary users:{1}", + "CREATE_USER": "Create new user {1}", + "DEL_USER": "Delete users[{1}]", + "EDIT_USER": "Edit user{1}", + "ADD_COMPILATION_PARA": "Add custom compilation parameters: {1}:{2}", + "REMOVE_PARA": "Remove custom compilation parameters: {1}:{2}", + "SET_SOFTWARE_COMPILATION": "Setup software: Custom compilation parameters for {1} are configured as: {2}", + "SET_FILE_NOTES": "Set the file name [{1}], notes: {2}", + "CLEAR_FILE_NOTES": "Clear file notes [{1}]" } diff --git a/BTPanel/static/language/English/public.json b/BTPanel/static/language/English/public.json index 985034fc..aa093484 100644 --- a/BTPanel/static/language/English/public.json +++ b/BTPanel/static/language/English/public.json @@ -185,6 +185,7 @@ "DATABASE_NAME_ERR":"Database name is illegal!", "DATABASE_NAME_ERR_T":"Database name cannot contain special characters!", "DATABASE_NAME_EXISTS":"Database exists!", + "DATABASE_USERNAME_EXISTS": "The user name already exists. For security reasons, we do not allow one database user to manage multiple databases", "DATABASE_NAME_LEN":"Database name cannot be more than 16 characters!", "DATABASE_ERR_CONNECT":"ERROR to connect database, pls check database status!", "DATABASE_ERR_PASS":"Mysql root or user password is incorrect, please try to reset!", @@ -474,7 +475,6 @@ "AUTO_INSTALL_ACME_FAIL": "Trying to automatically install ACME failed, please try to install manually by the following command

                  Installation command", "SET_API_FIRST": "Please set this API first", "INSTALL_CLOUDDNS_FIRST": "Please install the [CloudDNS] plugin first.", - "CHOOSE_DOMAIN": "Please choose domain", "CHECK_SSL_ERR": "Wildcard domain cannot use the method of [file verification] to apply for a certificate!", "RESOLVE_DOMAIN_BYF": "Successfully got, please manually resolve the domain name", "GET_FAIL": "Failed to get!", @@ -970,7 +970,6 @@ "SSH_LOGIN_ERR4": "The protocol header response timed out, and the network quality with the target server was too bad: {1}", "SSH_LOGIN_ERR5": "The SSH protocol handshake timed out, and the network quality with the target server is too bad", "SSH_LOGIN_ERR6": "unknown error: {1}", - "SSH_LOGIN": "Successfully logged in to the SSH server [{1}:{2}]", "LOGIN_SUCCESS2": "Login success\n", "CONNECTION_SUCCEEDED": "connection succeeded", "RECONNECT_SSH": "The connection is disconnected, press enter to try to reconnect!", @@ -984,5 +983,241 @@ "UNBOUND_DEVICE": "Unbound device", "KEY_ERR": "Key verification failed", "FORM_DATA_ERR": "No form_data data found", - "WRONG_RESPONSE": "Wrong response: {1}" + "WRONG_RESPONSE": "Wrong response: {1}", + "TYPE_TERMINAL": "aaPanel terminal", + "WRONG_CONN_ADDR": "Wrong connection address", + "RECONN_TIMES": "Reconnection attempts:{1}", + "RECONN_FAILED": "Retry connection failed, {1}", + "CONN_FAIL": "Connection failure: {1}", + "CONN_FAIL1": "Connection failure: {1}:{2}", + "AUTH_PRI_KEY": "Authenticating private key", + "AUTH_PASSWD": "Authenticating password", + "AUTH_FAIL": "Authentication failed {1}", + "SSH_LOGIN_ERR10": "The protocol header response timed out", + "SSH_LOGIN_ERR11": "The SSH protocol handshake timed out", + "SSH_LOGIN_INFO3": "The authentication is successful and the session channel is being constructed", + "SSH_LOGIN_INFO2": "Channel is built", + "SSH_LOGIN_ERR14": "Channel disconnected", + "SSH_LOGIN_INFO": "Session interrupted", + "SSH_LOGIN_ERR15": "Error reading tty buffer data, {1}", + "SSH_LOGIN_INFO1": "The client has actively disconnected", + "SSH_LOGIN_ERR16": "An error occurred while reading data from websocket. Retrying", + "SSH_LOGIN_ERR17": "An error occurred while writing data to the buffer: {1}", + "DB_EXIST1": "The specified database already exists in MySQL, please change the name!", + "LOGOUT_TMP_USER": "Temporary user has been forcibly logged out:{1}", + "TMP_USER_NOT_LOGIN": "The specified user is not currently logged in!", + "PERMISSION_DENIED": "Permission denied!", + "PARAMETER_LEN_ERR": "Wrong parameter length!", + "PARAMETER_FORMAT_ERR": "Wrong parameter format!", + "VCODE_LEN_ERR": "Verification code length error!", + "EXTRA_PARAMETER_ERR": "There can be no extra parameters in the login parameters", + "USER_OR_PASSWD_ERR": "Username or Password incorrect: {1}", + "NGINX_CONF_NOT_EXISTS": "Nginx configuration file does not exist!", + "PARAMETER_WEBNAME_ERR": "The format of the webname parameter is incorrect, it should be a parseable JSON string", + "WEBSITE_TRAFFIC_LIMIT_ERR": "Concurrency restrictions, IP restrictions, traffic restrictions must be greater than 0", + "INDEX_FILE_ERR": "Failed to get, there is no default document in the configuration file", + "STATIC": "Static", + "PHP_SETUP_FAILED": "Setup failed, no enable-php-xx related configuration items were found in the website configuration file!", + "GET_RUN_PATH_FAILED": "Get Site run path false", + "ANTI_THEFT_EMPTY_ERR": "Anti-theft chain domain name cannot be empty!", + "ANTI_THEFT_ERR": "Please turn on anti-theft first!", + "SSL_ORDER_GET_FAILED": "Failed to get, please try again later!", + "SSL_ORDER_HTTPS_ERR": "[Force HTTPS] is enabled on the current website, please turn off this function before applying for an SSL certificate!", + "SSL_ERR_MSG": "Cannot access verification file correctly", + "SSL_ERR_MSG1": "Possible reason:", + "SSL_ERR_MSG2": "1. The resolution is not correct, or the resolution is not effective [Please resolve the domain name correctly, or wait for the resolution to take effect and try again]", + "SSL_ERR_MSG3": "2. Check if there is 301/302 redirection set up [please temporarily turn off the redirection related configuration]", + "SSL_ERR_MSG4": "3. Check whether the website is set to force HTTPS [please turn off the force HTTPS function temporarily]", + "SSL_RENEW_ERR": "There are currently no certificates to renew!", + "WEBSITE_SSL_RENEW_ERR": "There is no certificate that can be renewed on the current website..", + "MYSQL_SSL_ERR": "SSL is not enabled in the database, please open it in the Mysql manager first", + "MYSQL_SSL_OPEN_SUCCESS": "Open successfully, take effect after manually restarting the database", + "MYSQL_CONF_ERR": "Database configuration file failed to get checked, please check if MySQL configuration file exists [/etc/my.cnf]", + "MYSQL_DATA_DIR_ERR": "The database directory does not exist!", + "MYSQL_BINLOG_ERR": "Please uninstall the Mysql master-slave replication plugin before closing the binary log! !", + "MYSQL_PARAMETER_ERR": "innodb_log_buffer_size cannot be less than 8MB", + "NONSUPPORT51": "Nonsupport mysql5.1!", + "START_BACKUP": "Start backup", + "BACKUP_COMPLETED": "Backup completed", + "BACKUP_DIR_NOT_EXIST": "The specified directory {1} does not exist!", + "BACKUP_UPLOADING": "Uploading to {1}, please wait ...", + "BACKUP_UPLOAD_SUCCESS": "Successfully uploaded to {1}", + "BACKUP_UPLOAD_FAILED": "Error: File upload failed, skip this backup!", + "BACKUP_DEL": "User settings do not retain local backups, deleted {1}", + "BACKUP_CLEAN_ERR": "Failed to clean expired backup, error: {1}", + "BACKUP_KEEP": "Keep the latest number of backups: {1} copies", + "BACKUP_CLEAN": "Expired backup files have been cleaned from disk: {1}", + "BACKUP_CLEAN_REMOVE": "Expired backup files have been cleaned from {1}: {2}", + "BACKUP_SITE": "Backup site: {1}", + "WEBSITE_DIR": "Website root directory: {1}", + "BACKUP_DIR": "Backup directory: {1}", + "DIR_SIZE": "Directory size: {1}", + "BACKUP_EXCLUSION": "Exclusion setting: {1}", + "PARTITION_INFO": "Partition {1} available disk space is: {2}, available Inode is: {3}", + "PARTITION_LESS_THEN": "The available disk space of the target partition is less than {1}, and the backup cannot be completed. Please increase the disk capacity or change the default backup directory on the settings page!", + "INODE_LESS_THEN": "The available Inode of the target partition is less than {1}, and the backup cannot be completed. Please increase the disk capacity or change the default backup directory on the settings page!", + "START_COMPRESS": "Start compressing files: {1}", + "COMPRESS_TIME": "Compression completed, took {1} seconds, compressed package size: {2}", + "WEBSITE_BACKUP_TO": "Site backed up to: {1}", + "DIR_BACKUP_TO": "Directory has been backed up to: {1}", + "DB_BACKUP_ERR": "The specified database [ {1} ] has no data!", + "DB_BACKUP": "Backup database:{1}", + "DB_SIZE": "Database size: {1}", + "DB_CHARACTER": "Database character set: {1}", + "EXPORT_DB": "Start exporting database: {1}", + "EXPORT_DB_ERR": "Database export failed!", + "DB_BACKUP_TO": "Database has been backed up to: {1}", + "EMAIL_NOT_EXISTS": "Email does not exist", + "INPUT_EMAIL": "Please input your email", + "EMAIL_ERR": "Please enter your vaild email", + "EMAIL_EXISTS": "Email already exists", + "COMPLETE_INFO": "Please complete the information", + "TEST_MAIL_TITLE": "aaPanel Alert Test Email", + "TEST_MAIL_CONTENT": "aaPanel Alert Test Email", + "TEST_MAIL_SEND_ERR": "Email sending failed, please check if the STMP password is correct or the hosts are correct", + "NO_DATA": "No Data", + "MAILBOX_NOT_EXIST": "The mailbox does not exist, please add it to the mailbox list", + "EMAIL_TITLE_ERR": "Please fill in the email title", + "EMAIL_CONTENT_ERR": "Please enter the email content", + "SMTP_INFO_ERR": "STMP information was not found, please re-add custom mail STMP information in the settings", + "SEND_SUCCESS": "Sent successfully", + "SEND_FAILED": "Failed to send", + "USERNAME_ERR": "User name must be at least 2 characters", + "PASSWORD_ERR": "Password must be at least 8 characters", + "USERNAME_EXIST": "The specified username already exists!", + "USERNAME_NOT_EXIST": "The specified username not exists!", + "CREATE_USER_SUCCESS": "Create new user {1} success!", + "DEL_USER_ERR": "Cannot delete initial default user!", + "DEL_USER_SUCCESS": "Delete user {1} success!", + "DEL_USER_FAILED": "User deletion failed!", + "CREATE_USER_FAILED": "Create new user failed!", + "NO_CHANGE_SUBMITTED": "No changes submitted", + "WRONG_MODE": "Wrong operating mode", + "EMAIL_FORMAT_ERR": "The E-Mail format is illegal", + "GET_PHP_VER_ERR": "Failed to get php version!", + "DEVELOPER_MODE": "{1} Developer mode(DeBug)", + "OFFLINE_MODE": "{1} Offline mode", + "KEY_NOT_EXIST": "The key does not exist. Please turn on and try again.", + "USERNAME_NOT_EXIST1": "The username does not exist. Please turn on and try again.", + "SELECT_MODE": "Please enter the operation mode", + "GENERATE_KEY_ERR": "Failed to generate key or username. Please check if the hard disk space is insufficient or the directory cannot be written.[ {1} ]", + "CLOSE_SUCCESS": "Closed successfully", + "GOOGLE_AUTH_ERR": "Did not open Google authentication", + "TURN_ON_GOOGLE_AUTH": "Google authentication has been turned on", + "QR_CODE_ERR": "No QR code data, please re-open", + "MYSQL_ROOT_PASSWD_EMTPY_ERR": "Root password cannot be empty", + "DB_PASSWD_EMPTY_ERR": "Database [{1}] password cannot be empty", + "NGINX_NOT_INSTALL": "Nginx is not install", + "CREATE_SITE_DIR_ERR": "Failed to create site root directory, {1}", + "CHOOSE_DOMAIN": "Please choose a domain name", + "CHOOSE_PORT": "Please choose a port", + "CERT_ERR": "Certificate error, please paste the correct PEM format certificate!", + "SSL_FILE_V_ERR": "A generic domain name cannot be used to apply for a certificate using [File Validation]!", + "SSL_FILE_V_ERR_PROXY": "Sites that have reverse proxy turned on cannot request SSL!", + "API_ERR": "Please set the API interface parameters of [{1}] first.", + "CLOUD_DNS_ERR": "Please go to the software store to install [Cloud Resolution] and complete the domain name NS binding.", + "REQUEST_MODULE_ERR": "Missing requests component, please try to repair the panel!", + "WEBSITE_CONF_NOT_EXIST": "The specified website profile does not exist", + "RESPONSE_ERR": "Response resources should use URI path or HTTP status code, such as: /test.png or 404", + "PHP_NOT_FOUND": "No compatible PHP version found, please install first", + "COMPLIANT_NAME_ERR": "Non-compliant names can only be numbers, letters, underscores", + "PARA_NOT_EXIST": "The specified custom compilation parameters do not exist!", + "WRONG_PARAMETER": "Wrong parameter", + "UPLOAD_DIR_ERR": "Cannot upload files to the system root directory!", + "RECYCLE_BIN_ERR": "This is the recycle bin directory, please press the [Recycle Bin] button in the upper right corner to open", + "DIR_ERR": "This is not a directory", + "FILE_EXIST_ERR": "The target file name already exists!", + "MEANINGLESS_OPERA": "Meaningless operation", + "FILE_ONLINE_EDIT_ERR": "The file format does not support online editing!", + "FILE_ERR": "This is not a file!", + "FILE_ERR1": "File encoding is not compatible and cannot be read correctly!", + "FILE_ERR2": "Failed to open file, file may be occupied by other processes!", + "PATH_PARA_ERR": "[path] parameter cannot be empty!", + "HISTORY_DIR_ERR": "Cannot modify history copy directly!", + "FILE_ERR3": "Wrong file content, please save again!", + "HISTORY_ERR": "The specified historical copy does not exist!", + "NOT_EDIT": "Not Edit", + "AUTO_SAVE": "Automatically saved successfully!", + "COPY_PRESS_ERR": "The operation failed, please re-copy the copy or cut process", + "OPERA_FAILED": "The operation failed, please re-operate", + "PHP_EXTENSION_UNINSTALL_ERR": "This extension is the default extension of OLS and cannot be uninstalled", + "QUERY_ERR": "Query error, {1}", + "FILE_DIR_NOT_EXIST": "File or directory does not exist!", + "ADD_REPEATEDLY": "Do not add it repeatedly!", + "FAVORITE_NOT_FOUND": "This favorite object could not be found!", + "ADDRESS_NOT_EXIST": "The specified address does not exist!", + "PASSWD_ERR": "The extract password length cannot be less than 4 bits", + "ALREADY_SHARED": "Already shared!", + "COMMAND_SENT": "Command has been sent!", + "NO_COMPOSER_AVAILABLE": "No composer available!", + "PHP_VER_NOT_FOUND": "No available PHP version was found, or the specified PHP version was not installed!", + "COMPOSER_CONF_NOT_FOUND": "The composer.json configuration file was not found in the specified directory!", + "COMPOSER_UPDATE_ERR": "Currently the latest version, no upgrade required!", + "COMPOSER_UPDATE": "Upgrade composer from {1} to {2}", + "SITE_SSL_ERR_3011": "The website has been redirected, please close it before applying!", + "DEL_ERROR1": "There was an error deleting, please try again.", + "DEL_WEBSITE_MULTIPLE": "Delete website [{1}] successfully", + "DEL_DOMAIN_MULTIPLE": "Delete domain [{1}] successfully", + "ENABLE_WEBSITE_MULTIPLE": "Enable website [{1}] successfully", + "DISABLE_WEBSITE_MULTIPLE": "Disable website [{1}] successfully", + "DEL_SUBDIRBIND": "Delete [{}] subdirectory binding successfully", + "SET_ERROR1": "There was an error setting, please try again.", + "SET_PHPV_MULTIPLE": "Set up website [{1}] PHP version successfully", + "SET_EDATE_MULTIPLE": "Set the website [{1}] expiration time successfully", + "CREATE_WEBSITE_ERR": "There was an error creating, please try again.", + "CREATE_WEBSITE_MULTIPLE": "Create the website [ {1} ] successfully", + "DEL_PROXY_MULTIPLE": "Delete [ {1} ] proxy successfully", + "DEL_DIR_AUTH_MULTIPLE": "Delete [ {} ] dir auth successfully", + "DEL_REDIRECT_MULTIPLE": "Delete redirects [{1}] successfully", + "ALARM_TEST": "aaPanel alarm test", + "MAIL_ADD_FAILED": "Add failed, please check if the URL is correct", + "RENEW_FAILED": "The renewal failed and the certificate directory does not exist.", + "RENEW_FAILED1": "Renewal failed, missing account_key.", + "RENEW_SUCCESS1": "[ {1} ] The certificate renewal was successful.", + "APPLY_SSL": "Ready to apply for SSL, domain name {1}", + "APPLY_SSL_DOMAIN_ERR": "The list of applied domain names cannot be empty.", + "MANUALLY_RESOLVE_DOMAIN": "Get successful, please manually resolve the domain name", + "SAVEING_SSL": "|-Saving certificate..", + "SET_AUTORENEW": "|-Setting up auto-renewal configuration..", + "DEPLOY_SSL_TO_SITE": "|-The application is successful and it is being automatically deployed to the website!", + "APPLY_SSL_SUCCESS": "Application successful.", + "INIT_ACME": "|-Initializing ACME protocol...", + "REGISTER_ACCOUNT": "|-Registering account...", + "GET_VERIFICATION_INFO": "|-Getting verification information...", + "RETURN_VERIFICATION_INFO": "|-Return the verification information to the front end, wait for the user to manually resolve the domain name and complete the verification...", + "SUBMIT_V_REQUEST": "|-User submits verification request...", + "CA_V_DOMAIN": "|-Requesting CA to verify domain name [{1}]...", + "GET_CA_V_RES": "|-Get CA verification results [{1}]...", + "ALL_DOMAIN_V_PASS": "|-All domain names are verified and CSR is being sent...", + "GET_CERT_CONTENT": "|-Getting certificate content...", + "CERT_APPLY_ERR": "Certificate acquisition failed, please try again later.", + "CERT_APPLY_ERR1": "|-Error: {1}, exited the application process.", + "DNS_CONNECT_ERR": "|-The DNS verification failed. Please check if the key is correct.", + "EXIT_APPLY_PROCESS": "|-Exited the application process!", + "DNS_CONNECT_ERR1": "The DNS verification failed. Please check if the key is correct.", + "ADD_TXT_RECORD": "|-Adding resolution record, domain name [{1}], record value [{2}]...", + "CHECK_TXT_RECORD": "|-Attempt to verify the resolution result, domain name [{}], record value [{}]...", + "CA_CHECK_RECORD": "|-Request CA to verify domain name [{1}]...", + "CHECK_CA_RES": "|-Check CA verification results [{1}]...", + "APPLY_WITH_DNS_ERR": "|-An error occurred, try again [{1}]", + "FETCH_CERT_CONTENT": "|-Fetching certificate content...", + "CLEAR_RESOLVE_HISTORY": "|-Clearing resolve history [{1}]", + "DNS_APPLY_ERR": "|-Error: {1}, exit the application process.", + "CREATE_V_FILE": "|-Writing verification file [{1}]...", + "CHECK_FILE_CONTENT": "|-Attempt to verify file contents via HTTP [{1}]...", + "CHECK_FILE_CONTENT1": "|-Verified, content [{1}]...", + "APPLY_SSL_ERROR_MSG": "The signing failed, we were unable to verify your domain name:

                  1. Check if the domain name is bound to the corresponding site.

                  2. Check if the domain name is correctly resolved to the server, or the resolution is not fully effective.

                  3. If your site has a reverse proxy set up, or if you are using a CDN, please turn it off first.

                  4. If your site has a 301 redirect, please turn it off first

                  5. If the above checks confirm that there is no problem, please try to change the DNS service provider.

                  '", + "SUCCESS_V": "|-Successful verification, domain name [{1}], record type [{2}], record value [{3}]!", + "NO_ORDER_RENEW": "|-There are currently no certificates to renew.", + "TOTAL_RENEW": "|-{1} Total [{2}] renewal of visa tasks", + "SSL_NOT_EXPIRED_OR_NOT_USE": "|-[{1}] Not expired or the site does not use the Let\\'s Encrypt certificate.", + "WAIT_RENEW1": "|-{1} Waiting for renewal [{2}].", + "RENEW_COMPLETED": "|-After the task is completed, a total of renewals are required.[{1}], renewal success [%s], renewal failed [{2}]. ", + "RENEW_SUCCESS2": "|-Renewal success:{1}", + "RENEW_FAILED2": "|-Renewal failed:", + "DIR_END_WITH": "The end of the website directory cannot be \".\"", + "File_END_WITH": "It is not recommended to use \".\" at the end of the file because there may be security risks", + "DIR_END_WITH1": "It is not recommended to use \".\" at the end of the directory, because there may be safety risks", + "API_DISABLED": "API has been disabled", + "UNBOUND_USER": "Unbound user" } diff --git a/BTPanel/static/language/English/template.json b/BTPanel/static/language/English/template.json index 877b49c0..06e219ff 100644 --- a/BTPanel/static/language/English/template.json +++ b/BTPanel/static/language/English/template.json @@ -31,7 +31,7 @@ "NET3":"Download speed", "NET4":"Total sent", "NET5":"Total received", - "BT_ACCOUNT":"BT account", + "ACCOUNT":"Account", "FREE":"Free", "INVITATION_REWARD":"Invitation reward", "WECHAT":"WeChat", @@ -139,7 +139,7 @@ "CT8":"Server time", "CT9":"Panel user", "CT10":"Panel password", - "CT11":"Bind BT account", + "CT11":"Bind account", "CT12":"Panel template", "CY1":"Take alias for aaPanel", "CY2":"Suggested port: 8888-65535", diff --git a/BTPanel/static/language/Simplified_Chinese/lan.js b/BTPanel/static/language/Simplified_Chinese/lan.js index 2a517fb4..f29077b8 100644 --- a/BTPanel/static/language/Simplified_Chinese/lan.js +++ b/BTPanel/static/language/Simplified_Chinese/lan.js @@ -1144,7 +1144,7 @@ var lan = { "site_menu_1": "Subdirectory binding", "site_menu_2": "Website directory", "site_menu_3": "Traffic control", - "site_menu_4": "URL rewirte", + "site_menu_4": "URL rewrite", "site_menu_5": "Default indexes", "site_menu_6": "Configuration file", "site_menu_7": "SSL", @@ -1191,7 +1191,7 @@ var lan = { "limit_net_14": "Traffic control", "limit_net_15": "Limit the max traffic limit per request (unit: KB)", "subdirectories": "Subdirectories", - "url_rewrite_alter": "Are you sure to create a independent URL rewirte rule for this subdirectory?", + "url_rewrite_alter": "Are you sure to create a independent URL rewrite rule for this subdirectory?", "rule_cov_tool": "Rewrite rule converter", "a_c_n": "Apache to Nginx", "save_as_template": "Save as template", diff --git a/BTPanel/static/laydate/laydate.js b/BTPanel/static/laydate/laydate.js index 99ac8334..63141ae2 100644 --- a/BTPanel/static/laydate/laydate.js +++ b/BTPanel/static/laydate/laydate.js @@ -299,7 +299,7 @@ show: false, showBottom: true, btns: ["clear", "now", "confirm"], - lang: "cn", + lang: "en", theme: "default", position: null, calendar: false, @@ -1424,7 +1424,7 @@ } } else { if(lay(btn).hasClass(DISABLED)) { - return that.hint("不在有效日期或时间范围内") + return that.hint("Not in the valid date or time range!") } } that.done(); diff --git a/BTPanel/templates/default/config.html b/BTPanel/templates/default/config.html index a61a4d3d..de30fe9a 100644 --- a/BTPanel/templates/default/config.html +++ b/BTPanel/templates/default/config.html @@ -103,15 +103,19 @@ {{data['lan']['CY15']}}
                  - {{data['lan']['BASICAUTH']}} - - {{data['lan']['CONFIG']}} + {{data['lan']['BASICAUTH']}} +
                  + + {{data['lan']['CONFIG']}} +
                  {{data['lan']['BASICAUTH_TIPS1']}}
                  - Message channel - - Set + Message channel +
                  + + Set +
                  {{data['lan']['CT3']}} @@ -160,7 +164,28 @@ {{data['lan']['CY10']}}
                  - + +
                  + {{data['lan']['CT11']}} +
                  + + {{data['lan']['CY11']}} +
                  +
                  +
                  + Menu bar hidden +
                  + + Set +
                  +
                  +
                  + Temporary login +
                  + + Modify +
                  +
                  @@ -367,6 +392,20 @@ margin: 0 0 10px 35px; font-size: 22px; } + #panel_menu_tab .table>tbody>tr>td{ + height: auto; + padding: 8px; + } + .create_temp_view{ + padding:15px 20px; + } + .create_temp_view .line .tname{ + text-align: left; + float: inherit; + } + .create_temp_view .info-r { + margin: 0; + } {% endblock %} diff --git a/BTPanel/templates/default/crontab.html b/BTPanel/templates/default/crontab.html index 3f767b02..0e57727d 100644 --- a/BTPanel/templates/default/crontab.html +++ b/BTPanel/templates/default/crontab.html @@ -168,7 +168,7 @@ {{data['lan']['TH3']}} {{data['lan']['TH7']}} {{data['lan']['TH8']}} - {{data['lan']['TH4']}} + Last execution time {{data['lan']['TH5']}} diff --git a/BTPanel/templates/default/database.html b/BTPanel/templates/default/database.html index a2b77497..19f4eda2 100644 --- a/BTPanel/templates/default/database.html +++ b/BTPanel/templates/default/database.html @@ -1,6 +1,15 @@ {% extends "layout.html" %} {% block content %} +
                  @@ -22,7 +31,7 @@ - + diff --git a/BTPanel/templates/default/files.html b/BTPanel/templates/default/files.html index 20401674..dbf18c94 100644 --- a/BTPanel/templates/default/files.html +++ b/BTPanel/templates/default/files.html @@ -1,104 +1,308 @@ {% extends "layout.html" %} {% block content %} + + +
                  -
                  -
                  -
                  -
                  -
                  -
                  - - - - -
                  -
                  -