From 3a2973d56776bbf985acf07ec3b803228f287cc4 Mon Sep 17 00:00:00 2001 From: Administrator <287962566@qq.com> Date: Tue, 20 Oct 2020 11:18:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=96=87=E4=BB=B6=E5=88=86?= =?UTF-8?q?=E4=BA=AB=E9=A1=B5=E9=9D=A2UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BTPanel/static/css/site.css | 20 +- BTPanel/templates/default/down.html | 1396 +++++++++++++++++++++++---- class/panelSite.py | 41 +- task.py | 2 +- 4 files changed, 1269 insertions(+), 190 deletions(-) diff --git a/BTPanel/static/css/site.css b/BTPanel/static/css/site.css index 3cba96cd..62cb5585 100644 --- a/BTPanel/static/css/site.css +++ b/BTPanel/static/css/site.css @@ -8991,11 +8991,10 @@ background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODIiIGhlaWdodD0iODIiIHh line-height: 50px; } +/* end */ -.box-group .bt_checkbox_groups { - vertical-align: sub; -} -.bt_checkbox_groups { +/* 商业证书 */ +.dynamic_head_box .bt_checkbox_groups { display: inline-block; height: 16px; width: 16px; @@ -9006,9 +9005,11 @@ background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODIiIGhlaWdodD0iODIiIHh text-align: center; line-height: 20px; margin: 0; + transition: all 200ms; vertical-align: top; } -.bt_checkbox_groups.active { + +.dynamic_head_box .bt_checkbox_groups.active { border: none; position: relative; top: 1px; @@ -9018,10 +9019,11 @@ background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODIiIGhlaWdodD0iODIiIHh font-weight: 400; line-height: 1; -webkit-font-smoothing: antialiased; - background: #20a53a; + background: #5FB878; color: #fff; } -.bt_checkbox_groups.active:after { + +.dynamic_head_box .bt_checkbox_groups.active:after { content: "\e013"; font-size: 12px; transform: scale(.85); @@ -9030,4 +9032,8 @@ background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODIiIGhlaWdodD0iODIiIHh top: 2px; } +.dynamic_head_box .box-group .bt_checkbox_groups { + vertical-align: sub; +} + /* end */ \ No newline at end of file diff --git a/BTPanel/templates/default/down.html b/BTPanel/templates/default/down.html index a316ba40..8314080b 100644 --- a/BTPanel/templates/default/down.html +++ b/BTPanel/templates/default/down.html @@ -1,33 +1,1095 @@ + - + 提取文件 - {{data.filename}} - + - + +
@@ -39,57 +1101,64 @@
请输入提取密码:
- +
{% else %} - - - -
- -
- + + + +
+ +
+
- - + + - {% for d in data['DIR'] %} + {% for d in data['DIR'] %} {% set d = d.split(';') %} - + - + - {% endfor %} - {% for d in data['FILES'] %} + {% endfor %} + {% for d in data['FILES'] %} {% set d = d.split(';') %} - - + + - {% endfor %} + {% endfor %}
文件名称大小操作大小操作
{{d[0]}} +
+
{{d[0]}}
+
{{to_size(d[1])}}打开打开 +
{{d[0]}}{{to_size(d[1])}} +
+
{{d[0]}}
+
{{to_size(d[1])}} {% if d[0].split('.')[-1].lower() in ['avi','mp4','mkv','mpeg','webm','3gp'] %} - 播放 | + 播放 | {% elif d[0].split('.')[-1].lower() in ['jpg', 'jpeg', 'png', 'bmp', 'gif', 'tiff', 'ico'] %} - 预览 | + 预览 | {% endif %} - 下载 + 下载
-
-
+ +
{% endif %} + \ No newline at end of file diff --git a/class/panelSite.py b/class/panelSite.py index 8835de33..094485ea 100644 --- a/class/panelSite.py +++ b/class/panelSite.py @@ -2727,26 +2727,29 @@ def SetDirUserINI(self,get): def _set_ols_open_basedir(self,get): # 设置ols - sitename = public.M('sites').where("id=?", (get.id,)).getField('name') - # sitename = path.split('/')[-1] - f = "/www/server/panel/vhost/openlitespeed/detail/{}.conf".format(sitename) - c = public.readFile(f) - if not c: return False - if f: - rep = '\nphp_admin_value\s*open_basedir.*' - result = re.search(rep, c) - s = 'on' - if not result: - s = 'off' - rep = '\n#php_admin_value\s*open_basedir.*' + try: + sitename = public.M('sites').where("id=?", (get.id,)).getField('name') + # sitename = path.split('/')[-1] + f = "/www/server/panel/vhost/openlitespeed/detail/{}.conf".format(sitename) + c = public.readFile(f) + if not c: return False + if f: + rep = '\nphp_admin_value\s*open_basedir.*' result = re.search(rep, c) - result = result.group() - if s == 'on': - c = re.sub(rep, '\n#' + result[1:], c) - else: - result = result.replace('#', '') - c = re.sub(rep, result, c) - public.writeFile(f, c) + s = 'on' + if not result: + s = 'off' + rep = '\n#php_admin_value\s*open_basedir.*' + result = re.search(rep, c) + result = result.group() + if s == 'on': + c = re.sub(rep, '\n#' + result[1:], c) + else: + result = result.replace('#', '') + c = re.sub(rep, result, c) + public.writeFile(f, c) + except: + pass # 读配置 def __read_config(self, path): diff --git a/task.py b/task.py index 2b05e383..ebffa16b 100644 --- a/task.py +++ b/task.py @@ -5,7 +5,7 @@ # +------------------------------------------------------------------- # | Copyright (c) 2015-2016 宝塔软件(http://bt.cn) All rights reserved. # +------------------------------------------------------------------- -# | Author: 黄文良 <2879625666@qq.com> +# | Author: hwliang # +------------------------------------------------------------------- #------------------------------