From 5217c1fc78b883ed45954a07b43d950053c35a58 Mon Sep 17 00:00:00 2001
From: jose <627622230@qq.com>
Date: Fri, 1 Nov 2019 11:43:34 +0800
Subject: [PATCH] update 6.3.3
---
BTPanel/__init__.py | 206 ++++-----
.../static/codemirror/addon/search/search.js | 2 +-
BTPanel/static/css/site.css | 85 +++-
BTPanel/static/js/config.js | 64 ++-
BTPanel/static/js/crontab.js | 2 +-
BTPanel/static/js/database.js | 7 +-
BTPanel/static/js/files.js | 156 +++----
BTPanel/static/js/index.js | 16 +-
BTPanel/static/js/public.js | 394 ++++++++----------
BTPanel/static/js/public_backup.js | 9 +-
BTPanel/static/js/site.js | 12 +
BTPanel/static/js/soft.js | 15 +-
BTPanel/static/language/English/template.json | 4 +-
BTPanel/templates/default/config.html | 4 +-
BTPanel/templates/default/database.html | 2 +-
BTPanel/templates/default/files.html | 4 +-
BTPanel/templates/default/firewall.html | 3 +-
BTPanel/templates/default/ftp.html | 5 +-
BTPanel/templates/default/index.html | 8 +-
BTPanel/templates/default/layout.html | 43 +-
BTPanel/templates/default/site.html | 4 +-
class/ajax.py | 3 +-
class/common.py | 13 +-
class/config.py | 35 +-
class/crontab.py | 32 +-
class/data.py | 2 +-
class/database.py | 9 +-
class/files.py | 47 ++-
class/jobs.py | 257 ++----------
class/panelAuth.py | 2 +-
class/panelDnsapi.py | 13 +-
class/panelLets.py | 19 +-
class/panelPlugin.py | 60 ++-
class/panelSite.py | 63 +--
class/plugin_deployment.py | 2 +-
class/public.py | 88 +++-
class/site_dir_auth.py | 23 +-
class/ssh_terminal.py | 199 +++++++++
class/system.py | 16 +-
class/userlogin.py | 7 +-
runconfig.py | 26 +-
tools.py | 1 +
42 files changed, 1075 insertions(+), 887 deletions(-)
create mode 100644 class/ssh_terminal.py
diff --git a/BTPanel/__init__.py b/BTPanel/__init__.py
index d25c74ea..6616b8a8 100644
--- a/BTPanel/__init__.py
+++ b/BTPanel/__init__.py
@@ -9,7 +9,7 @@
import sys,json,os,time,logging,re
if sys.version_info[0] != 2:
from imp import reload
-sys.path.insert(0,'class/')
+sys.path.insert(0,'/www/server/panel/class/')
import public
from flask import Flask
app = Flask(__name__,template_folder="templates/" + public.GetConfigValue('template'))
@@ -19,6 +19,7 @@ from flask_session import Session
from werkzeug.contrib.cache import SimpleCache
from werkzeug.wrappers import Response
from flask_socketio import SocketIO,emit,send
+from threading import Lock
dns_client = None
app.config['DEBUG'] = os.path.exists('data/debug.pl')
@@ -37,11 +38,11 @@ cache = SimpleCache()
socketio = SocketIO()
socketio.init_app(app)
-import common,db,jobs,uuid
+import common,db,jobs,uuid,ssh_terminal
jobs.control_init()
app.secret_key = uuid.UUID(int=uuid.getnode()).hex[-12:]
local_ip = None
-
+my_terms = {}
try:
from flask_sqlalchemy import SQLAlchemy
@@ -67,7 +68,10 @@ app.config['SESSION_COOKIE_NAME'] = "BT_PANEL_6"
app.config['PERMANENT_SESSION_LIFETIME'] = 86400
Session(app)
-if s_sqlite: sdb.create_all()
+
+if s_sqlite:
+ sdb.create_all()
+ public.ExecShell("chmod 600 /dev/shm/session.db")
from datetime import datetime
import socket
@@ -89,11 +93,67 @@ def service_status():
return 'True'
+
+@socketio.on('connect')
+def socket_connect(msg=None):
+ if not check_login():
+ emit('server_response',{'data':public.getMsg('111')})
+ return False
+
+@socketio.on('webssh')
+def webssh(msg):
+ if not check_login():
+ session.clear()
+ emit('server_response',"Panel session is lost, please re-login panel!")
+ return None
+ if not 'ssh_obj' in session:
+ session['ssh_obj'] = ssh_terminal.ssh_terminal()
+ session['ssh_obj'].send(msg)
+
+
+@app.route('/term_open',methods=method_all)
+def term_open():
+ comReturn = comm.local()
+ if comReturn: return comReturn
+ args = get_input()
+ if 'get_ssh_info' in args:
+ key = 'ssh_' + args['host']
+ if key in session:
+ return public.getJson(session[key]),json_header
+ return public.returnMsg(False,'Acquisition failed!')
+ session['ssh_info'] = json.loads(args.data)
+ key = 'ssh_' + session['ssh_info']['host']
+ session[key] = session['ssh_info']
+ s_file = '/www/server/panel/config/t_info.json'
+ if 'is_save' in session['ssh_info']:
+ public.writeFile(s_file,public.de_hexb(json.dumps(session['ssh_info'])))
+ public.set_mode(s_file,600)
+ else:
+ if os.path.exists(s_file): os.remove(s_file)
+ return public.returnJson(True,'Successful setup!');
+
+@app.route('/reload_mod',methods=method_all)
+def reload_mod():
+ comReturn = comm.local()
+ if comReturn: return comReturn
+ args = get_input()
+ mod_name = None
+ if 'mod_name' in args:
+ mod_name = args.mod_name
+ result = public.reload_mod(mod_name)
+ if result: return public.returnJson(True,result),json_header
+ return public.returnJson(False,'Reload failure!'),json_header
+
@app.before_request
def request_check():
if not request.path in ['/safe','/hook','/public']:
ip_check = public.check_ip_panel()
if ip_check: return ip_check
+
+ if request.path.find('/static/') != -1 or request.path == '/code':
+ if not 'login' in session and not 'admin_auth' in session:
+ session.clear()
+ return abort(401)
domain_check = public.check_domain_panel()
if domain_check: return domain_check
if public.is_local():
@@ -120,7 +180,9 @@ def request_end(reques = None):
def send_authenticated():
global local_ip
if not local_ip: local_ip = public.GetLocalIp()
- return Response('', 401,{'WWW-Authenticate': 'Basic realm="%s"' % local_ip.strip()})
+ result = Response('', 401,{'WWW-Authenticate': 'Basic realm="%s"' % local_ip.strip()})
+ if not 'login' in session and not 'admin_auth' in session: session.clear()
+ return result
@app.route('/',methods=method_all)
def home():
@@ -462,7 +524,7 @@ def config(pdata = None):
if public.is_local(): data['is_local'] = 'checked'
return render_template( 'config.html',data=data)
import config
- defs = ('get_qrcode_data','check_two_step','set_two_step_auth','get_key','get_php_session_path','set_php_session_path','get_cert_source','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')
+ defs = ('set_coll_open','get_qrcode_data','check_two_step','set_two_step_auth','get_key','get_php_session_path','set_php_session_path','get_cert_source','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 publicObject(config.config(),defs,None,pdata);
@app.route('/ajax',methods=method_all)
@@ -570,6 +632,7 @@ def panel_public():
if not public.path_safe_check("%s/%s" % (get.name,get.fun)): return abort(404)
if get.fun in ['scan_login', 'login_qrcode', 'set_login', 'is_scan_ok', 'blind','static']:
if get.fun == 'static':
+ if not 'filename' in get: return abort(404)
if not public.path_safe_check("%s" % (get.filename)): return abort(404)
s_file = '/www/server/panel/BTPanel/static/' + get.filename
if s_file.find('..') != -1 or s_file.find('./') != -1: return abort(404)
@@ -598,6 +661,7 @@ def panel_public():
comm.checkWebType()
comm.GetOS()
result = plu.a(get)
+ session.clear()
return public.getJson(result),json_header
@app.route('/favicon.ico',methods=method_get)
@@ -661,7 +725,9 @@ def panel_other(name=None,fun = None,stype=None):
comReturn = comm.local()
if comReturn:
if not is_php:
- if not hasattr(plu,'_check'): return public.returnJson(False,'SPECIFY_PLUG_ERR'),json_header
+ if not hasattr(plu,'_check'):
+ session.clear()
+ return public.returnJson(False,'SPECIFY_PLUG_ERR'),json_header
checks = plu._check(args)
r_type = type(checks)
if r_type == Response: return checks
@@ -738,6 +804,7 @@ def panel_hook():
if not os.path.exists('plugin/webhook'): return public.getJson(public.returnMsg(False,'INIT_WEBHOOK_ERR'));
sys.path.append('plugin/webhook');
import webhook_main
+ session.clear()
return public.getJson(webhook_main.webhook_main().RunHook(get));
@app.route('/safe',methods=method_all)
@@ -760,13 +827,16 @@ def panel_safe():
if not hasattr(s,get.data['action']): return public.returnJson(False,'INIT_FUN_NOT_EXISTS');
defs = ('GetServerInfo','add_ssh_limit','remove_ssh_limit','get_ssh_limit','get_login_log','get_panel_limit','add_panel_limit','remove_panel_limit','close_ssh_limit','close_panel_limit','get_system_info','get_service_info','get_ssh_errorlogin')
if not get.data['action'] in defs: return 'False';
- return public.getJson(eval('s.' + get.data['action'] + '(get)'));
+ result = public.getJson(eval('s.' + get.data['action'] + '(get)'));
+ session.clear()
+ return result
@app.route('/install',methods=method_all)
def install():
if public.M('config').where("id=?",('1',)).getField('status') == 1:
if os.path.exists('install.pl'): os.remove('install.pl');
+ session.clear()
return redirect('/login')
ret_login = os.path.join('/',admin_path)
if admin_path == '/' or admin_path == '/bt': ret_login = '/login'
@@ -863,122 +933,6 @@ def panel_cloud():
if download_url.find('http') != 0:download_url = 'http://' + download_url
return redirect(download_url)
-ssh = None
-shell = None
-try:
- import paramiko
- ssh = paramiko.SSHClient()
-except:
- public.ExecShell('pip install paramiko==2.0.2 &')
-
-@socketio.on('connect')
-def socket_connect(msg=None):
- if not check_login():
- emit('server_response',{'data':public.getMsg('111')})
- return False
-
-@socketio.on('webssh')
-def webssh(msg):
- if not check_login(msg['x_http_token']):
- emit('server_response',{'data':public.getMsg('INIT_WEBSSH_LOGOUT')})
- return None
-
- global shell,ssh
- ssh_success = True
- if type(msg['data']) == dict:
- if 'ssh_user' in msg['data']:
- connect_ssh(msg['data']['ssh_user'].strip(),msg['data']['ssh_passwd'].strip())
- if not shell: ssh_success = connect_ssh()
- if not shell:
- emit('server_response',{'data':public.getMsg('INIT_WEBSSH_CONN_ERR')})
- return;
- if shell.exit_status_ready(): ssh_success = connect_ssh()
- if not ssh_success:
- emit('server_response',{'data':public.getMsg('INIT_WEBSSH_CONN_ERR')})
- return;
- shell.send(msg['data'])
- time.sleep(0.005)
- recv = shell.recv(4096)
- emit('server_response',{'data':recv.decode("utf-8")})
-
-def connect_ssh(user=None,passwd=None):
- global shell,ssh
- pkey = '/root/.ssh/id_rsa_bt'
- if not os.path.exists('/root/.ssh/authorized_keys') or not os.path.exists(pkey):
- create_rsa()
- try:
- if not user:
- key=paramiko.RSAKey.from_private_key_file(pkey)
- ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- try:
- if not user:
- ssh.connect('127.0.0.1', public.GetSSHPort(),pkey=key)
- else:
- ssh.connect('127.0.0.1', public.GetSSHPort(),username=user,password=passwd)
- except:
- if public.GetSSHStatus():
- try:
- if not user:
- ssh.connect('localhost', public.GetSSHPort(),pkey=key)
- else:
- ssh.connect('localhost', public.GetSSHPort(),username=user,password=passwd)
- except:
- create_rsa()
- return False;
- import firewalls
- fw = firewalls.firewalls()
- get = common.dict_obj()
- ssh_status = fw.GetSshInfo(get)['status']
- if not ssh_status:
- get.status = '0';
- fw.SetSshStatus(get)
-
- if not user:
- ssh.connect('127.0.0.1', public.GetSSHPort(),pkey=key)
- else:
- ssh.connect('127.0.0.1', public.GetSSHPort(),username=user,password=passwd)
-
- if not ssh_status:
- get.status = '1';
- fw.SetSshStatus(get);
- shell = ssh.invoke_shell(term='xterm', width=100, height=29)
- shell.setblocking(0)
- return True
- except:
- shell = None
- return False
-
-def create_rsa():
- id_ras = '/root/.ssh/id_rsa_bt'
- a_keys = '/root/.ssh/authorized_keys'
- if not os.path.exists(a_keys) or not os.path.exists(id_ras):
- public.ExecShell("rm -f /root/.ssh/id_rsa_bt*")
- public.ExecShell('ssh-keygen -q -t rsa -P "" -f /root/.ssh/id_rsa_bt')
- public.ExecShell('cat /root/.ssh/id_rsa_bt.pub >> /root/.ssh/authorized_keys')
- else:
- id_ras_pub = '/root/.ssh/id_rsa_bt.pub'
- if os.path.exists(id_ras_pub):
- pub_body = public.readFile(id_ras_pub)
- keys_body = public.readFile(a_keys)
- if keys_body.find(pub_body) == -1:
- public.ExecShell('cat /root/.ssh/id_rsa_bt.pub >> /root/.ssh/authorized_keys')
- public.ExecShell('chmod 600 /root/.ssh/authorized_keys')
-
-@socketio.on('connect_event')
-def connected_msg(msg):
- if not check_login():
- emit('server_response',{'data':public.getMsg('INIT_WEBSSH_LOGOUT')})
- return None
- global shell
- if not shell: connect_ssh()
- if shell:
- try:
- recv = shell.recv(8192)
- emit('server_response',{'data':recv.decode("utf-8")})
- except:
- pass
-
-
def check_csrf():
if app.config['DEBUG']: return True
request_token = request.cookies.get('request_token')
@@ -1002,6 +956,10 @@ def publicObject(toObject,defs,action=None,get = None):
if get.path.find('./') != -1: return public.ReturnJson(False,public.GetMsg("UNSAFE_PATH")),json_header
if get.path.find('->') != -1:
get.path = get.path.split('->')[0].strip();
+ if hasattr(get,'sfile'):
+ get.sfile = get.sfile.replace('//','/').replace('\\','/');
+ if hasattr(get,'dfile'):
+ get.dfile = get.dfile.replace('//','/').replace('\\','/');
if hasattr(toObject,'site_path_check'):
if not toObject.site_path_check(get): return public.ReturnJson(False,'Excessive operation!'),json_header
diff --git a/BTPanel/static/codemirror/addon/search/search.js b/BTPanel/static/codemirror/addon/search/search.js
index c6598761..b7d7fe1c 100644
--- a/BTPanel/static/codemirror/addon/search/search.js
+++ b/BTPanel/static/codemirror/addon/search/search.js
@@ -1 +1 @@
-(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"),require("./searchcursor"),require("../dialog/dialog"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror","./searchcursor","../dialog/dialog"],a)}else{a(CodeMirror)}}})(function(n){function k(w,v){if(typeof w=="string"){w=new RegExp(w.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),v?"gi":"g")}else{if(!w.global){w=new RegExp(w.source,w.ignoreCase?"gi":"g")}}return{token:function(y){w.lastIndex=y.pos;var x=w.exec(y.string);if(x&&x.index==y.pos){y.pos+=x[0].length||1;return"searching"}else{if(x){y.pos=x.index}else{y.skipToEnd()}}}}}function j(){this.posFrom=this.posTo=this.lastQuery=this.query=null;this.overlay=null}function s(v){return v.state.search||(v.state.search=new j())}function e(v){return typeof v=="string"&&v==v.toLowerCase()}function b(v,w,x){return v.getSearchCursor(w,x,e(w))}function d(v,y,z,w,x){v.openDialog(y,w,{value:z,selectValueOnOpen:true,closeOnEnter:false,onClose:function(){q(v)},onKeyDown:x})}function p(v,y,w,z,x){if(v.openDialog){v.openDialog(y,x,{value:z,selectValueOnOpen:true})}else{x(prompt(w,z))}}function l(w,y,x,v){if(w.openConfirm){w.openConfirm(y,v)}else{if(confirm(x)){v[0]()}}}function i(v){return v.replace(/\\(.)/g,function(w,x){if(x=="n"){return"\n"}if(x=="r"){return"\r"}return x})}function h(w){var v=w.match(/^\/(.*)\/([a-z]*)$/);if(v){try{w=new RegExp(v[1],v[2].indexOf("i")==-1?"":"i")}catch(x){}}else{w=i(w)}if(typeof w=="string"?w=="":w.test("")){w=/x^/}return w}var u='搜索: (回车继续检索下一个)
X
';function t(v,x,w){x.queryText=w;x.query=h(w);v.removeOverlay(x.overlay,e(x.query));x.overlay=k(x.query,e(x.query));v.addOverlay(x.overlay);if(v.showMatchesOnScrollbar){if(x.annotate){x.annotate.clear();x.annotate=null}x.annotate=v.showMatchesOnScrollbar(x.query,e(x.query))}}function m(v,y,x,z){var C=s(v);if(C.query){return f(v,y)}var B=v.getSelection()||C.lastQuery;if(x&&v.openDialog){var w=null;var A=function(E,D){n.e_stop(D);if(!E){return}if(E!=C.queryText){t(v,C,E);C.posFrom=C.posTo=v.getCursor()}if(w){w.style.opacity=1}f(v,D.shiftKey,function(F,H){var G;if(H.line<3&&document.querySelector&&(G=v.display.wrapper.querySelector(".CodeMirror-dialog"))&&G.getBoundingClientRect().bottom-4>v.cursorCoords(H,"window").top){(w=G).style.opacity=0.4}})};d(v,u,B,A,function(E,G){var D=n.keyName(E);var F=n.keyMap[v.getOption("keyMap")][D];if(!F){F=v.getOption("extraKeys")[D]}if(F=="findNext"||F=="findPrev"||F=="findPersistentNext"||F=="findPersistentPrev"){n.e_stop(E);t(v,s(v),G);v.execCommand(F)}else{if(F=="find"||F=="findPersistent"){n.e_stop(E);A(G,E)}}});if(z&&B){t(v,C,B);f(v,y)}}else{p(v,u,"Search for:",B,function(D){if(D&&!C.query){v.operation(function(){t(v,C,D);C.posFrom=C.posTo=v.getCursor();f(v,y)})}})}}function f(v,w,x){v.operation(function(){var y=s(v);var z=b(v,y.query,w?y.posFrom:y.posTo);if(!z.find(w)){z=b(v,y.query,w?n.Pos(v.lastLine()):n.Pos(v.firstLine(),0));if(!z.find(w)){return}}v.setSelection(z.from(),z.to());v.scrollIntoView({from:z.from(),to:z.to()},20);y.posFrom=z.from();y.posTo=z.to();if(x){x(z.from(),z.to())}})}function q(v){v.operation(function(){var w=s(v);w.lastQuery=w.query;if(!w.query){return}w.query=w.queryText=null;v.removeOverlay(w.overlay);if(w.annotate){w.annotate.clear();w.annotate=null}})}var a=' (Use /re/ syntax for regexp search)';var g='到: ';var o="替换? ";function c(v,w,x){v.operation(function(){for(var z=b(v,w);z.findNext();){if(typeof w!="string"){var y=v.getRange(z.from(),z.to()).match(w);z.replace(x.replace(/\$(\d)/g,function(A,B){return y[B]}))}else{z.replace(x)}}})}function r(v,x){if(v.getOption("readOnly")){return}var y=v.getSelection()||s(v).lastQuery;var w=x?"全部替换:":"替换:";p(v,w+a,w,y,function(z){if(!z){return}z=h(z);p(v,g,"更换:","",function(D){D=i(D);if(x){c(v,z,D)}else{q(v);var C=b(v,z,v.getCursor("from"));var B=function(){var F=C.from(),E;if(!(E=C.findNext())){C=b(v,z);if(!(E=C.findNext())||(F&&C.from().line==F.line&&C.from().ch==F.ch)){return}}v.setSelection(C.from(),C.to());v.scrollIntoView({from:C.from(),to:C.to()});l(v,o,"替换?",[function(){A(E)},B,function(){c(v,z,D)}])};var A=function(E){C.replace(typeof z=="string"?D:D.replace(/\$(\d)/g,function(F,G){return E[G]}));B()};B()}})})}n.commands.find=function(v){q(v);m(v)};n.commands.findPersistent=function(v){q(v);m(v,false,true)};n.commands.findPersistentNext=function(v){m(v,false,true,true)};n.commands.findPersistentPrev=function(v){m(v,true,true,true)};n.commands.findNext=m;n.commands.findPrev=function(v){m(v,true)};n.commands.clearSearch=q;n.commands.replace=r;n.commands.replaceAll=function(v){r(v,true)}});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){var b=a.Pos;function c(k,i,l,g){this.atOccurrence=false;this.doc=k;if(g==null&&typeof i=="string"){g=false}l=l?k.clipPos(l):b(0,0);this.pos={from:l,to:l};if(typeof i!="string"){if(!i.global){i=new RegExp(i.source,i.ignoreCase?"ig":"g")}this.matches=function(p,t){if(p){i.lastIndex=0;var m=k.getLine(t.line).slice(0,t.ch),r=0,o,s;for(;;){i.lastIndex=r;var q=i.exec(m);if(!q){break}o=q;s=o.index;r=o.index+(o[0].length||1);if(r==m.length){break}}var n=(o&&o[0].length)||0;if(!n){if(s==0&&m.length==0){o=undefined}else{if(s!=k.getLine(t.line).length){n++}}}}else{i.lastIndex=t.ch;var m=k.getLine(t.line),o=i.exec(m);var n=(o&&o[0].length)||0;var s=o&&o.index;if(s+n!=m.length&&!n){n=1}}if(o&&n){return{from:b(t.line,s),to:b(t.line,s+n),match:o}}}}else{var e=i;if(g){i=i.toLowerCase()}var f=g?function(m){return m.toLowerCase()}:function(m){return m};var j=i.split("\n");if(j.length==1){if(!i.length){this.matches=function(){}}else{this.matches=function(o,q){if(o){var p=k.getLine(q.line).slice(0,q.ch),m=f(p);var n=m.lastIndexOf(i);if(n>-1){n=d(p,m,n);return{from:b(q.line,n),to:b(q.line,n+e.length)}}}else{var p=k.getLine(q.line).slice(q.ch),m=f(p);var n=m.indexOf(i);if(n>-1){n=d(p,m,n)+q.ch;return{from:b(q.line,n),to:b(q.line,n+e.length)}}}}}}else{var h=e.split("\n");this.matches=function(n,p){var t=j.length-1;if(n){if(p.line-(j.length-1)=1;--m,--o){if(j[m]!=f(k.getLine(o))){return}}var u=k.getLine(o),q=u.length-h[0].length;if(f(u.slice(q))!=j[0]){return}return{from:b(o,q),to:s}}else{if(p.line+(j.length-1)>k.lastLine()){return}var u=k.getLine(p.line),q=u.length-h[0].length;if(f(u.slice(q))!=j[0]){return}var r=b(p.line,q);for(var o=p.line+1,m=1;mh){--f}else{return f}}}}a.defineExtension("getSearchCursor",function(f,g,e){return new c(this.doc,f,g,e)});a.defineDocExtension("getSearchCursor",function(f,g,e){return new c(this,f,g,e)});a.defineExtension("selectMatches",function(g,f){var e=[];var h=this.getSearchCursor(g,this.getCursor("from"),f);while(h.findNext()){if(a.cmpPos(h.to(),this.getCursor("to"))>0){break}e.push({anchor:h.from(),head:h.to()})}if(e.length){this.setSelections(e,0)}})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"),require("../dialog/dialog"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror","../dialog/dialog"],a)}else{a(CodeMirror)}}})(function(a){function b(e,i,g,j,h){if(e.openDialog){e.openDialog(i,h,{value:j,selectValueOnOpen:true})}else{h(prompt(g,j))}}var d='Jump to line: (Use line:column or scroll% syntax)';function c(e,g){var f=Number(g);if(/^[-+]/.test(g)){return e.getCursor().line+f}else{return f-1}}a.commands.jumpToLine=function(e){var f=e.getCursor();b(e,d,"Jump to line:",(f.line+1)+":"+f.ch,function(i){if(!i){return}var h;if(h=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(i)){e.setCursor(c(e,h[1]),Number(h[2]))}else{if(h=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(i)){var g=Math.round(e.lineCount()*Number(h[1])/100);if(/^[-+]/.test(h[1])){g=f.line+g+1}e.setCursor(g-1,f.ch)}else{if(h=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(i)){e.setCursor(c(e,h[1]),f.ch)}}}})};a.keyMap["default"]["Alt-G"]="jumpToLine"});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"),require("./searchcursor"),require("../scroll/annotatescrollbar"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror","./searchcursor","../scroll/annotatescrollbar"],a)}else{a(CodeMirror)}}})(function(b){b.defineExtension("showMatchesOnScrollbar",function(g,f,e){if(typeof e=="string"){e={className:e}}if(!e){e={}}return new c(this,g,f,e)});function c(e,j,i,h){this.cm=e;this.options=h;var f={listenForChanges:false};for(var k in h){f[k]=h[k]}if(!f.className){f.className="CodeMirror-search-match"}this.annotation=e.annotateScrollbar(f);this.query=j;this.caseFold=i;this.gap={from:e.firstLine(),to:e.lastLine()+1};this.matches=[];this.update=null;this.findMatches();this.annotation.update(this.matches);var g=this;e.on("change",this.changeHandler=function(l,m){g.onChange(m)})}var d=1000;c.prototype.findMatches=function(){if(!this.gap){return}for(var g=0;g=this.gap.to){break}if(f.to.line>=this.gap.from){this.matches.splice(g--,1)}}var h=this.cm.getSearchCursor(this.query,b.Pos(this.gap.from,0),this.caseFold);var e=this.options&&this.options.maxMatches||d;while(h.findNext()){var f={from:h.from(),to:h.to()};if(f.from.line>=this.gap.to){break}this.matches.splice(g++,0,f);if(this.matches.length>e){break}}this.gap=null};function a(e,g,f){if(e<=g){return e}return Math.max(g,e+f)}c.prototype.onChange=function(k){var l=k.from.line;var e=b.changeEnd(k).line;var f=e-k.to.line;if(this.gap){this.gap.from=Math.min(a(this.gap.from,l,f),k.from.line);this.gap.to=Math.max(a(this.gap.to,l,f),k.from.line)}else{this.gap={from:k.from.line,to:e+1}}if(f){for(var h=0;h=n.options.minChars){b(m,q,false,n.options.style)}})}function g(m,r,q){var o=m.getRange(r,q);if(o.match(/^\w+$/)!==null){if(r.ch>0){var p={line:r.line,ch:r.ch-1};var n=m.getRange(p,r);if(n.match(/\W/)===null){return false}}if(q.chv.cursorCoords(H,"window").top){(w=G).style.opacity=0.4}})};d(v,u,B,A,function(E,G){var D=n.keyName(E);var F=n.keyMap[v.getOption("keyMap")][D];if(!F){F=v.getOption("extraKeys")[D]}if(F=="findNext"||F=="findPrev"||F=="findPersistentNext"||F=="findPersistentPrev"){n.e_stop(E);t(v,s(v),G);v.execCommand(F)}else{if(F=="find"||F=="findPersistent"){n.e_stop(E);A(G,E)}}});if(z&&B){t(v,C,B);f(v,y)}}else{p(v,u,"Search for:",B,function(D){if(D&&!C.query){v.operation(function(){t(v,C,D);C.posFrom=C.posTo=v.getCursor();f(v,y)})}})}}function f(v,w,x){v.operation(function(){var y=s(v);var z=b(v,y.query,w?y.posFrom:y.posTo);if(!z.find(w)){z=b(v,y.query,w?n.Pos(v.lastLine()):n.Pos(v.firstLine(),0));if(!z.find(w)){return}}v.setSelection(z.from(),z.to());v.scrollIntoView({from:z.from(),to:z.to()},20);y.posFrom=z.from();y.posTo=z.to();if(x){x(z.from(),z.to())}})}function q(v){v.operation(function(){var w=s(v);w.lastQuery=w.query;if(!w.query){return}w.query=w.queryText=null;v.removeOverlay(w.overlay);if(w.annotate){w.annotate.clear();w.annotate=null}})}var a=' (Use /re/ syntax for regexp search)';var g='To: ';var o="replace? ";function c(v,w,x){v.operation(function(){for(var z=b(v,w);z.findNext();){if(typeof w!="string"){var y=v.getRange(z.from(),z.to()).match(w);z.replace(x.replace(/\$(\d)/g,function(A,B){return y[B]}))}else{z.replace(x)}}})}function r(v,x){if(v.getOption("readOnly")){return}var y=v.getSelection()||s(v).lastQuery;var w=x?"Replace all:":"replace:";p(v,w+a,w,y,function(z){if(!z){return}z=h(z);p(v,g,"Change:","",function(D){D=i(D);if(x){c(v,z,D)}else{q(v);var C=b(v,z,v.getCursor("from"));var B=function(){var F=C.from(),E;if(!(E=C.findNext())){C=b(v,z);if(!(E=C.findNext())||(F&&C.from().line==F.line&&C.from().ch==F.ch)){return}}v.setSelection(C.from(),C.to());v.scrollIntoView({from:C.from(),to:C.to()});l(v,o,"replace?",[function(){A(E)},B,function(){c(v,z,D)}])};var A=function(E){C.replace(typeof z=="string"?D:D.replace(/\$(\d)/g,function(F,G){return E[G]}));B()};B()}})})}n.commands.find=function(v){q(v);m(v)};n.commands.findPersistent=function(v){q(v);m(v,false,true)};n.commands.findPersistentNext=function(v){m(v,false,true,true)};n.commands.findPersistentPrev=function(v){m(v,true,true,true)};n.commands.findNext=m;n.commands.findPrev=function(v){m(v,true)};n.commands.clearSearch=q;n.commands.replace=r;n.commands.replaceAll=function(v){r(v,true)}});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){var b=a.Pos;function c(k,i,l,g){this.atOccurrence=false;this.doc=k;if(g==null&&typeof i=="string"){g=false}l=l?k.clipPos(l):b(0,0);this.pos={from:l,to:l};if(typeof i!="string"){if(!i.global){i=new RegExp(i.source,i.ignoreCase?"ig":"g")}this.matches=function(p,t){if(p){i.lastIndex=0;var m=k.getLine(t.line).slice(0,t.ch),r=0,o,s;for(;;){i.lastIndex=r;var q=i.exec(m);if(!q){break}o=q;s=o.index;r=o.index+(o[0].length||1);if(r==m.length){break}}var n=(o&&o[0].length)||0;if(!n){if(s==0&&m.length==0){o=undefined}else{if(s!=k.getLine(t.line).length){n++}}}}else{i.lastIndex=t.ch;var m=k.getLine(t.line),o=i.exec(m);var n=(o&&o[0].length)||0;var s=o&&o.index;if(s+n!=m.length&&!n){n=1}}if(o&&n){return{from:b(t.line,s),to:b(t.line,s+n),match:o}}}}else{var e=i;if(g){i=i.toLowerCase()}var f=g?function(m){return m.toLowerCase()}:function(m){return m};var j=i.split("\n");if(j.length==1){if(!i.length){this.matches=function(){}}else{this.matches=function(o,q){if(o){var p=k.getLine(q.line).slice(0,q.ch),m=f(p);var n=m.lastIndexOf(i);if(n>-1){n=d(p,m,n);return{from:b(q.line,n),to:b(q.line,n+e.length)}}}else{var p=k.getLine(q.line).slice(q.ch),m=f(p);var n=m.indexOf(i);if(n>-1){n=d(p,m,n)+q.ch;return{from:b(q.line,n),to:b(q.line,n+e.length)}}}}}}else{var h=e.split("\n");this.matches=function(n,p){var t=j.length-1;if(n){if(p.line-(j.length-1)=1;--m,--o){if(j[m]!=f(k.getLine(o))){return}}var u=k.getLine(o),q=u.length-h[0].length;if(f(u.slice(q))!=j[0]){return}return{from:b(o,q),to:s}}else{if(p.line+(j.length-1)>k.lastLine()){return}var u=k.getLine(p.line),q=u.length-h[0].length;if(f(u.slice(q))!=j[0]){return}var r=b(p.line,q);for(var o=p.line+1,m=1;mh){--f}else{return f}}}}a.defineExtension("getSearchCursor",function(f,g,e){return new c(this.doc,f,g,e)});a.defineDocExtension("getSearchCursor",function(f,g,e){return new c(this,f,g,e)});a.defineExtension("selectMatches",function(g,f){var e=[];var h=this.getSearchCursor(g,this.getCursor("from"),f);while(h.findNext()){if(a.cmpPos(h.to(),this.getCursor("to"))>0){break}e.push({anchor:h.from(),head:h.to()})}if(e.length){this.setSelections(e,0)}})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"),require("../dialog/dialog"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror","../dialog/dialog"],a)}else{a(CodeMirror)}}})(function(a){function b(e,i,g,j,h){if(e.openDialog){e.openDialog(i,h,{value:j,selectValueOnOpen:true})}else{h(prompt(g,j))}}var d='Jump to line: (Use line:column or scroll% syntax)';function c(e,g){var f=Number(g);if(/^[-+]/.test(g)){return e.getCursor().line+f}else{return f-1}}a.commands.jumpToLine=function(e){var f=e.getCursor();b(e,d,"Jump to line:",(f.line+1)+":"+f.ch,function(i){if(!i){return}var h;if(h=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(i)){e.setCursor(c(e,h[1]),Number(h[2]))}else{if(h=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(i)){var g=Math.round(e.lineCount()*Number(h[1])/100);if(/^[-+]/.test(h[1])){g=f.line+g+1}e.setCursor(g-1,f.ch)}else{if(h=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(i)){e.setCursor(c(e,h[1]),f.ch)}}}})};a.keyMap["default"]["Alt-G"]="jumpToLine"});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"),require("./searchcursor"),require("../scroll/annotatescrollbar"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror","./searchcursor","../scroll/annotatescrollbar"],a)}else{a(CodeMirror)}}})(function(b){b.defineExtension("showMatchesOnScrollbar",function(g,f,e){if(typeof e=="string"){e={className:e}}if(!e){e={}}return new c(this,g,f,e)});function c(e,j,i,h){this.cm=e;this.options=h;var f={listenForChanges:false};for(var k in h){f[k]=h[k]}if(!f.className){f.className="CodeMirror-search-match"}this.annotation=e.annotateScrollbar(f);this.query=j;this.caseFold=i;this.gap={from:e.firstLine(),to:e.lastLine()+1};this.matches=[];this.update=null;this.findMatches();this.annotation.update(this.matches);var g=this;e.on("change",this.changeHandler=function(l,m){g.onChange(m)})}var d=1000;c.prototype.findMatches=function(){if(!this.gap){return}for(var g=0;g=this.gap.to){break}if(f.to.line>=this.gap.from){this.matches.splice(g--,1)}}var h=this.cm.getSearchCursor(this.query,b.Pos(this.gap.from,0),this.caseFold);var e=this.options&&this.options.maxMatches||d;while(h.findNext()){var f={from:h.from(),to:h.to()};if(f.from.line>=this.gap.to){break}this.matches.splice(g++,0,f);if(this.matches.length>e){break}}this.gap=null};function a(e,g,f){if(e<=g){return e}return Math.max(g,e+f)}c.prototype.onChange=function(k){var l=k.from.line;var e=b.changeEnd(k).line;var f=e-k.to.line;if(this.gap){this.gap.from=Math.min(a(this.gap.from,l,f),k.from.line);this.gap.to=Math.max(a(this.gap.to,l,f),k.from.line)}else{this.gap={from:k.from.line,to:e+1}}if(f){for(var h=0;h=n.options.minChars){b(m,q,false,n.options.style)}})}function g(m,r,q){var o=m.getRange(r,q);if(o.match(/^\w+$/)!==null){if(r.ch>0){var p={line:r.line,ch:r.ch-1};var n=m.getRange(p,r);if(n.match(/\W/)===null){return false}}if(q.chtd{
+ padding: 5px 10px !important;
+ line-height: 1.42857143;
+ height: auto;
+}
.newFolderName {
border: #ccc 1px solid;
@@ -2851,9 +2868,15 @@ html .menu .menu_exit:hover {
}
.table>tbody>tr>td {
- vertical-align: middle
+ vertical-align: middle;
+ padding: 5px 10px;
+ height: 40px;
+ font-size: 12.5px;
+ box-sizing: border-box;
+}
+.table>tbody{
+ border-bottom: 1px solid #ddd;
}
-
.showpicdiv {
max-height: 500px;
overflow: hidden;
@@ -3852,7 +3875,9 @@ html .menu .menu_exit:hover {
left: 0;
z-index: 999;
}
-
+.file-box .divtable .table{
+ border: 1px solid #ddd;
+}
.re-head {
border-bottom: 1px solid #ccc;
float: left;
@@ -4137,6 +4162,7 @@ html .menu .menu_exit:hover {
}
.btpro{
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADsAAAAUCAMAAAAEAbViAAAAA3NCSVQICAjb4U/gAAABXFBMVEX///+7jAC7jAC7jAC7jAC7jAC7jAC7jAC7jAC7jAC7jAC7jAC7jAC7jAC7jAD////+/fv+/fr8+vX8+vP69uv38eD28N3179v07NXz69Lz6tHz6c/x6Mzv48Pu48Hr3rX74jnq27D54Djp2av43zfo16fo2Kj33TX33Tbm1aLl1Z/12Tbl057z1zLk0Znj0Jfx1DDizpPu0DPv0S7fyIbqzCroyC/cxH3oySjawXXZv3DkwyTYvWzivyzXu2jWumXevCDUtVzctinathzSslXSs1bRsVHRsVLWsBjVrSbNqkPTrBXLqD3PpCLJozTOphHIozLIojDIoS/HoCzKoQ7GninGnyrFnifJnB/FnCTFnSbEmiDEmyLFmQnCmBvBlxjBlhbBlRXAlRPCkhy/kxDAkwW+kQq9kAi9jwa9jwK9jQC8jgS8jQO8ihm7jAC2gRWweBKpbw+jZgydXgnhk9RtAAAAdHRSTlMAESIzRFVmd4iZqrvM3e7//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wol0KMAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAWdEVYdENyZWF0aW9uIFRpbWUAMDUvMzEvMTikOWwBAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAAg5JREFUOI2dlGlz0zAQhhUHJ45jST2gXKUVR4BijmKKCwX1CKcKLoVQcCmFYgcSjqiy8/9nWCtOJvlEwusZe3Q80rurlRFCyLDsSi7bMtAkKlSlU602W61o+3VDvrnOxlTGliUxkdFcfRjN0aWm3ByXBdgglaqN7N2pmb2t6edba0e3xmctBxWxjecoPfPh2afTtPGkN+J6/2SLxC6ajrQvLC4uPJXvLs6/aC7rkZD35/Awb8RMMc5FGAc9FktMiJS42W5HX+SP6Nv+n13GlFJdlWmEVfCkYcD9fF9MTNO0iHX15o3aRnTncq0W7WcDQvQmeEHO1rlm1ZBnw6lAvrBJQY+3s9fOPSbCMA21BEvdHnvssa7qCm3Hz3N1gpQRsu1ZSk8drFC60nrAmM/DmGv5LAg06yVM75mF0fFyFpWkiUrEoHTx6wKt/d7U/R2hUZjkppoFBxCrYCrkfd9ZcVSkUcAlOrW+Q8+3X13S/SIzHHeFXiZjlctYwiFevwNrDdgCdsD09OzbtZmPh9d6/QFQbiJGzsgFksM5Zcv0WVSUlumcPHdwdv3Xcp5DF5KVowMWvioW7nHKh1gIuYznlxq35aOhshFJCBvEaqC4ztKkntQ9FQ+xEDK5u3r08+Vo0dVHm3Ayvu9nhr1htuDIvc/y/RU2ifqX2MBSHo59g0ZZZJLv9/8ThXyZE/1tQH8B/ly2lqVFKXEAAAAASUVORK5CYII=");
+ background-size: 50px;
background-repeat:no-repeat;
padding:2px 0 2px 64px;
margin-right:5px;
@@ -4413,12 +4439,14 @@ html .menu .menu_exit:hover {
.bind-weixin{
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAA3NCSVQICAjb4U/gAAAAKlBMVEX19fXr6+vg4ODW1tbMzMzCwsK4uLitra2jo6OZmZmPj4+FhYV6enr////oR1GpAAAADnRSTlP/////////////////AEXA3MgAAAAJcEhZcwAADpwAAA6cAQeUU90AAAAWdEVYdENyZWF0aW9uIFRpbWUAMDgvMTYvMTgi+WYYAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAAK9JREFUCJljuHuXyS1I4C4IMNy9MiNYpF0XzL5Qznv37uUpYPbVWBDF4Qtii9+N8b2y5WIRiB1810L3UuHdEBC7FqTkYlhnqyyUbcJ798rSuwxBQOYVkE5OX6Deu3dVedMulF1oYLgCNDPpbujd1LtJDEDqbhDYCc4Md9WUBIrB7ESGu15pLiUg5oUAhrvKd+9etQWy2WUZwEJAPUCbwey7zCHu04ug7LsMDExL7gIAh3d+c1Jd4JYAAAAASUVORK5CYII=");
background-repeat: no-repeat;
+ background-size: 16px;
padding-left:26px;
margin-right:30px;
}
.bind-user{
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASBAMAAACk4JNkAAAAA3NCSVQICAjb4U/gAAAAMFBMVEX19fXr6+vg4ODW1tbMzMzCwsK4uLitra2jo6OZmZmPj4+FhYV6enpwcHBmZmb///+wFcT2AAAAEHRSTlP///////////////////8A4CNdGQAAAAlwSFlzAAAOnAAADpwBB5RT3QAAABZ0RVh0Q3JlYXRpb24gVGltZQAwOC8xNi8xOCL5ZhgAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAh0lEQVQImWP4//+/2KxiIMnw//+X2+1rCsCsuP7/n26CWB+PA6X04oGsbweBrJ/rgawf64GsbxtQWBDZ+TAdNv5gUxL+s74EmfJpz6mOtWdAYnYTNFZP/vb0P8OHU///f/j/P0+f4duF/yDwaz4Ddz2Y9ekQg448mPV/G4M3hPG/g8ESygoHALeIhpF8DGw6AAAAAElFTkSuQmCC");
background-repeat: no-repeat;
+ background-size: 14px;
padding-left:24px;
margin-right:16px;
}
@@ -4428,35 +4456,48 @@ html .menu .menu_exit:hover {
padding-left:13px;
margin-right:20px;
}
+
+.bt-724 {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAQCAMAAACvHOZVAAAAA3NCSVQICAjb4U/gAAAAOVBMVEXeQRTxrJnkZUD76OLqiWzzuKfgTSP53NT////30MXvoIriWTHmcU/99PHslHvofV71xLbjXznpgGGbp65eAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAFnRFWHRDcmVhdGlvbiBUaW1lADA3LzEwLzE5ht15uwAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAACrSURBVCiRrZBLAsMgCETJRxwUTdP7H7b4SUnW7SxU4gMnQ/QP5TSlrVqDyGufV4usbVNMJSv2cVw6UIHexdoUUdjOBVHXAPBs1e9TB9AGctqybf3G6OKEVcmd7R2PCOJEwuaAFoi5RGQnbMRln3iB3dmcksmJ2m0OINpPMeWCTcR8y/hsTzpQ9B4BRmbAQWd6dzbyPYKqVzJEZ1vqo9N9VAk9BPMnU4/Uf9cHAxAHhkB15V0AAAAASUVORK5CYII=");
+ background-repeat: no-repeat;
+ padding-left: 35px;
+ margin-right: 20px;
+}
/*系统图标*/
.ico-linux{
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAATBAMAAACEi/vCAAAAA3NCSVQICAjb4U/gAAAAMFBMVEX///9mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmambAcKAAAAEHRSTlMAESIzRFVmd4iZqrvM3e7/dpUBFQAAAAlwSFlzAAAOwwAADsMBx2+oZAAAABZ0RVh0Q3JlYXRpb24gVGltZQAwOC8xNi8xOCL5ZhgAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAmUlEQVQImWNgYGCQ/GvAAAHz/1+CMBjPvvoOYTFVLXkNZZ2u+isAZjE/4vyvAGaxlgbnJ4BZHAoM3A/BLA8GBpafYNYiIL4PMpt1A5DYPwFIcDWArDkAJPgWAInzF4BE9jMGBvb/QM2SBfEGDFy7UhkY3Bk4CxisGdgCGMwYGI97vGKwSmAQC1G8e+aN2WagDuP0IEGbawIMAPDJKG706GgtAAAAAElFTkSuQmCC");
+ background-size: 12px;
background-repeat:no-repeat;
padding-left: 20px;
}
.ico-windows{
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAA3NCSVQICAjb4U/gAAAALVBMVEX///+ZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZny8jBSAAAAD3RSTlMAESIzRFVmd4iZqrvM7v/Y8bBbAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAFnRFWHRDcmVhdGlvbiBUaW1lADA4LzE2LzE4IvlmGAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAABGSURBVAiZY2AAAkbTqrMMDEJuHvfevXvHcPbdu+53IMY7Ihi7d+9O7QACBiB2BTOAol0wNbgY59696wQzGFQqw8GWwpwBAGURWs03JAEWAAAAAElFTkSuQmCC");
background-repeat:no-repeat;
+ background-size: 12px;
background-position: 0 2px;
padding-left: 20px;
}
.ico-centos{
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAPCAMAAADjyg5GAAAAA3NCSVQICAjb4U/gAAAASFBMVEX///9mZmZmZmZiYmJaWlpYWFhmZmZiYmJgYGBmZmZgYGBmZmZiYmJmZmZiYmJmZmZiYmJmZmZmZmZmZmZmZmZmZmZmZmZmZmbwNFvuAAAAGHRSTlMAESIiIiIzMzNERFVVZmZ3d4iZqrvM3f93YyfbAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAFnRFWHRDcmVhdGlvbiBUaW1lADA4LzE3LzE4mkUBfQAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAB6SURBVAiZVY5ZEsIwDEMdUpYQghIv9f1vWpNCp/hH1oz1LKI5if5G5ezuzLff7ibO7KK+H2LaBp1WDMLcYDNf3A31CXMvRCy995rSK0SExhjAkh/XEK5E2YOCN5r75RNGUJgtZJLXoMQjw/ot2LR3baJHSbN8Ll3LrhtQxAfrvVHLpQAAAABJRU5ErkJggg==");
+ background-size: 12px;
background-repeat:no-repeat;
padding-left: 20px;
}
.ico-ubuntu{
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAMAAAAolt3jAAAAA3NCSVQICAjb4U/gAAAAOVBMVEX///9mZmZhYWFmZmZiYmJmZmZiYmJmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZVQ1Z+AAAAE3RSTlMAEREiIjMzRFVmd4iZqrvM3e7/67N/KAAAAAlwSFlzAAAOwwAADsMBx2+oZAAAABZ0RVh0Q3JlYXRpb24gVGltZQAwOC8xNy8xOJpFAX0AAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAbElEQVQImU2OWQ6AMAhEcW3Z2jL3P6xWjHE+CMPwCESfDOXtFmutAp6OtwC0jUwZVlWHaaaBniyYVq6B/Rn3G3aEjDxRuPwtN6NFzkB97IAlE3ddHTimPUKkd3TlhLb5huvLzAWWE2j0k0elCynoBUe/zXGJAAAAAElFTkSuQmCC");
+ background-size: 12px;
background-repeat:no-repeat;
padding-left: 20px;
}
.ico-debian{
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAA3NCSVQICAjb4U/gAAAAPFBMVEX///9paWlmZmZgYGBdXV1mZmZgYGBmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmYdQ+x6AAAAFHRSTlMAERERESIiM0RVZneImaq7zN3u/ynguF0AAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAWdEVYdENyZWF0aW9uIFRpbWUAMDgvMTcvMTiaRQF9AAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAAHJJREFUCJlVjlESwjAIRLFFIRhCaO5/VyHijN2vt+zCABBq87IhT/hK1+zdfOl2Y71r2rPp1UKfAOdFgaTtAWIRWgacMUUquSi7TR6U2LflFuW0nOVjYB7JQBqwHklOe49f9dOAf+HvjRIZ3L3ePTIWfQAgiAODqr7Z+QAAAABJRU5ErkJggg==");
+ background-size: 12px;
background-repeat:no-repeat;
padding-left: 20px;
}
.ico-fedora{
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAMAAAAolt3jAAAAA3NCSVQICAjb4U/gAAAAPFBMVEX///9VVVVLS0tmZmZaWlpmZmZiYmJmZmZiYmJmZmZiYmJiYmJmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmYd2jWRAAAAFHRSTlMAEREiIjMzRERVVWaImaq7zN3u/2KENScAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAWdEVYdENyZWF0aW9uIFRpbWUAMDgvMTcvMTiaRQF9AAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAAGJJREFUCJlFj1kSwCAIQ9N9Lxjuf9faUKf5IPNQiAJAZ4yg9ZCWkMj5pxWwGCqK5skLg8AphMv2dIJC0106nNmu5VLA1bBmfqclF7fZO9HTYqzO4tMuOt5XGLA1enMzQ194ADH/CrSqGfFbAAAAAElFTkSuQmCC");
+ background-size: 12px;
background-repeat:no-repeat;
padding-left: 20px;
}
@@ -4916,11 +4957,11 @@ select[disabled]{
.search_box{
position: absolute;
right: 65px;
- top: 12px;
+ top: 16px;
+ height: 16px;
}
.search_box input{
- position: relative;
- top: 2.5px;
+ vertical-align: sub;
}
.search_box label{
color: #666;
@@ -5070,10 +5111,11 @@ select[disabled]{
background: -webkit-linear-gradient(top,rgba(255, 255, 255, 0),rgba(220, 220, 220, .8));
}
.newTableShadow{
- width: 100%;
- height: 8px;
- position: relative;
- background: -webkit-linear-gradient(top,rgba(220, 220, 220, .8),rgba(255, 255, 255, 0));
+ /*display: none;*/
+ /*width: 100%;*/
+ /* height: 8px;*/
+ /* position: relative;*/
+ /* background: -webkit-linear-gradient(top,rgba(220, 220, 220, .8),rgba(255, 255, 255, 0));*/
}
.disable {
@@ -5422,10 +5464,9 @@ select[disabled]{
text-overflow: ellipsis;
line-height: 40px;
height: 40px;
- margin: 0 10px 0 0;
+ margin: 0 15px 0 0;
}
.ace_conter_menu .item .icon_file {
- color: #ff9800;
font-weight: 500;
margin-left: 10px;
}
diff --git a/BTPanel/static/js/config.js b/BTPanel/static/js/config.js
index a261d354..073b7906 100644
--- a/BTPanel/static/js/config.js
+++ b/BTPanel/static/js/config.js
@@ -164,20 +164,18 @@ $('.open_two_verify_view').click(function(){
$('#panel_verification').prop('checked',res.status);
});
})()
-function get_qrcode_data(callback){
- $.post('/config?action=get_qrcode_data',function(res){
- if(callback) callback(res);
- });
-}
+
function check_two_step(callback){
$.post('/config?action=check_two_step',function(res){
if(callback) callback(res);
});
}
-
-
-
+function get_qrcode_data(callback){
+ $.post('/config?action=get_qrcode_data',function(res){
+ if(callback) callback(res);
+ });
+}
function get_two_verify(callback){
$.post('/config?action=get_key',function(res){
if(callback) callback(res);
@@ -764,31 +762,53 @@ function GetPanelApi() {
})
});
}
+function showPawApi(){
+ layer.msg('The panel API key only supports one-time display, please keep it safe.
To display the panel API key, click the reset button to regain the new API key.
Note: After the key is reset, the associated key product will be invalid. Please re-add the new key to the product.',{icon:0,time:0,shadeClose:true,shade:0.1});
+}
-function SetPanelApi(t_type) {
+function SetPanelApi(t_type,index) {
var pdata = {}
pdata['t_type'] = t_type
if (t_type == 3) {
pdata['limit_addr'] = $("textarea[name='api_limit_addr']").val()
}
- var loadT = layer.msg(lan.config.is_submitting, { icon: 16, time: 0, shade: [0.3, '#000'] });
- $.post('/config?action=set_token', pdata, function (rdata) {
- if (t_type == 1) {
- if (rdata.status) {
- $("input[name='panel_token_value']").val(rdata.msg);
- layer.msg(lan.config.create_int_key_success, { icon: 1, time: 0, shade: 0.3, shadeClose:true });
- return;
- }
- }
-
- layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 });
+ if(t_type == 1){
+ var bdinding = layer.confirm('Are you sure you want to reset your current key?
After the key is reset, the associated key product will be invalid. Please re-add the new key to the product.',{
+ btn:['Confirm','Cancel'],
+ icon:3,
+ closeBtn: 2,
+ title:'Reset key'
+ },function(){
+ var loadT = layer.msg(lan.config.is_submitting, { icon: 16, time: 0, shade: [0.3, '#000'] });
+ set_token_req(pdata,function(rdata){
+ if (rdata.status) {
+ $("input[name='panel_token_value']").val(rdata.msg);
+ layer.msg(lan.config.create_int_key_success, { icon: 1, time: 0, shade: 0.3, shadeClose:true,closeBtn:2});
+ }else{
+ layer.msg(rdata.msg, { icon: 2});
+ }
+ return false;
+ });
+ });
+ return false
+ }
+ set_token_req(pdata,function(rdata){
+ layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 });
if (rdata.msg == lan.config.open_successfully) {
- GetPanelApi();
+ if(t_type == 2 && index != '0') GetPanelApi();
}
- })
+ });
}
+function set_token_req(pdata,callback){
+ $.post('/config?action=set_token', pdata, function (rdata) {
+ if(callback) callback(rdata);
+ });
+}
+
+
+
function SetIPv6() {
var loadT = layer.msg(lan.config.setting_up, { icon: 16, time: 0, shade: [0.3, '#000'] });
$.post('/config?action=set_ipv6_status', {}, function (rdata) {
diff --git a/BTPanel/static/js/crontab.js b/BTPanel/static/js/crontab.js
index 9b450fd1..be587558 100644
--- a/BTPanel/static/js/crontab.js
+++ b/BTPanel/static/js/crontab.js
@@ -819,7 +819,7 @@ function toBackup(type){
\
'+lan.crontab.save_num+'\
';
- if (sType == 'sites') {
+ if (sType == 'sites' && sMsg !== lan.crontab.backup_log) {
sBody += '\
'+lan.crontab.exclusion_rule+'
\
\
diff --git a/BTPanel/static/js/database.js b/BTPanel/static/js/database.js
index c0c17810..39acc29f 100644
--- a/BTPanel/static/js/database.js
+++ b/BTPanel/static/js/database.js
@@ -2,6 +2,7 @@
var database = {
get_list: function (page, search) {
if (page == undefined) page = 1;
+ if (!search) search = $("#SearchValue").val();
bt.database.get_list(page, search, function (rdata) {
$('#databasePage').html(rdata.page);
var _tab = bt.render({
@@ -369,7 +370,7 @@ var database = {
},
input_database: function (name) {
var path = bt.get_cookie('backup_path') + "/database";
- bt.files.get_files(path, '', function (rdata) {
+ bt.send('get_files', 'files/GetDir', 'reverse=True&sort=mtime&tojs=GetFiles&p=1&showRow=100&path=' + path, function (rdata) {
var data = [];
for (var i = 0; i < rdata.FILES.length; i++) {
if (rdata.FILES[i] == null) continue;
@@ -410,8 +411,8 @@ var database = {
}
},
{
- field: 'opt', title: lan.database.operation, align: 'right', templet: function (item) {
- return '
'+lan.database.input+' ';;
+ field: 'opt', title: 'Operating', align: 'right', templet: function (item) {
+ return '
'+lan.database.input+' |
Del';
}
},
],
diff --git a/BTPanel/static/js/files.js b/BTPanel/static/js/files.js
index d9279181..b3d89509 100644
--- a/BTPanel/static/js/files.js
+++ b/BTPanel/static/js/files.js
@@ -534,15 +534,15 @@ function GetFiles(Path,sort) {
\
'+Body+'\
';
- $("#fileCon").removeClass("fileList").html(tablehtml);
- $("#tipTools").width($("#fileCon").width());
- }
- else{
- $("#fileCon").addClass("fileList").html(Body);
- $("#tipTools").width($("#fileCon").width());
- }
- $("#DirPathPlace input").val(rdata.PATH);
- var BarTools = '\
+ $("#fileCon").removeClass("fileList").html(tablehtml);
+ $("#tipTools").width($("#fileCon")[0].clientWidth - 20);
+ }
+ else {
+ $("#fileCon").addClass("fileList").html(Body);
+ $("#tipTools").width($("#fileCon")[0].clientWidth - 20);
+ }
+ $("#DirPathPlace input").val(rdata.PATH);
+ var BarTools = '
\
\
@@ -600,9 +600,9 @@ function GetFiles(Path,sort) {
}
$("#Batch").html(BatchTools);
$("#setBox").prop("checked", false);
-
+
$("#BarTools").html(BarTools);
-
+
$("input[name=id]").click(function(){
if($(this).prop("checked")) {
$(this).prop("checked", true);
@@ -631,7 +631,7 @@ function GetFiles(Path,sort) {
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");
@@ -690,13 +690,13 @@ function auto_table_width(){
});
if(oldTable_heigth > oldTable){
$('.oldTableShadow,.newTableShadow').show();
- $('.oldTable').css('marginTop','-8px')
+ $('.oldTable').css('marginTop','0')
}else{
$('.oldTableShadow,.newTableShadow').hide();
$('.oldTable').css('marginTop','0')
}
$('.oldTable').height(oldTable);
- $('.oldTable table').css({'marginTop':'-39px'})
+ $('.oldTable table').css({ 'marginTop': '-36px' })
}
@@ -757,22 +757,22 @@ function showSeclect(){
$("#Batch").html(BatchTools);
}
}
-$("#tipTools").width($(".file-box").width());
-$("#PathPlaceBtn").width($(".file-box").width()-700);
-$("#DirPathPlace input").width($(".file-box").width()-700);
-if($(window).width()<1160){
- $("#PathPlaceBtn").width(290);
+$("#tipTools").width($(".file-box")[0].clientWidth);
+$("#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").width()-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();
+window.onresize = function () {
+ $("#tipTools").width($(".file-box")[0].clientWidth);
+ $("#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();
@@ -781,9 +781,9 @@ function Batch(type,access){
var data='path='+path+'&type='+type;
var name = 'data';
var datas = []
-
+
var oldType = getCookie('BatchPaste');
-
+
for(var i=0;i"+lan.public.the+"
",{icon:16,time:0,shade: [0.3, '#000']});
setTimeout(function(){getSpeed('.myspeed');},1000);
$.post('/files?action=SetBatchData',data,function(rdata){
@@ -835,14 +836,14 @@ 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[i].filename+' | '+ToSize(result[i].size)+' | '+getLocalTime(result[i].mtime)+' | ';
}
- var mbody = '| '+lan.files.file_name+' | '+lan.files.file_size+' | '+lan.files.last_edit_time+' | \
+ var mbody = '| '+lan.files.file_name+' | '+lan.files.file_size+' | '+lan.files.last_edit_time+' | \
'+tbody+'\
';
SafeMessage(lan.files.will_cover_this_file,mbody,function(){
@@ -854,7 +855,7 @@ function BatchPaste(){
}
});
}
-
+
function BatchPasteTo(data,path){
myloadT = layer.msg(""+lan.public.the+"
",{icon:16,time:0,shade: [0.3, '#000']});
setTimeout(function(){getSpeed('.myspeed');},1000);
@@ -866,7 +867,7 @@ function BatchPasteTo(data,path){
});
}
function GetExtName(fileName){
- var extArr = fileName.split(".");
+ 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\
\
@@ -1114,7 +1115,7 @@ function ExecShell(action){
else{
layer.msg(rdata.msg,{icon:rdata.status?1:2});
}
-
+
});
return;
}
@@ -1122,7 +1123,7 @@ function ExecShell(action){
type: 1,
shift: 5,
closeBtn: 2,
- area: ['70%','600px'],
+ area: ['70%','600px'],
title: lan.files.shell_title,
content: '