Skip to content

Commit

Permalink
7.2.12
Browse files Browse the repository at this point in the history
  • Loading branch information
showpy committed Mar 12, 2020
1 parent 0620a9f commit f2650e7
Show file tree
Hide file tree
Showing 63 changed files with 1,164 additions and 577 deletions.
49 changes: 13 additions & 36 deletions BTPanel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ def reload_mod():

@app.before_request
def request_check():
if not public.path_safe_check(request.path): return abort(404)
if request.path in ['/service_status']: return

if not request.path in ['/safe','/hook','/public','/mail_sys','/down']:
Expand Down Expand Up @@ -324,6 +325,14 @@ def login():
if result: return result
data = {}
data['lan'] = public.GetLan('login')
data['hosts'] = '[]'
hosts_file = 'plugin/static_cdn/hosts.json'
if os.path.exists(hosts_file):
data['hosts'] = public.get_cdn_hosts()
if type(data['hosts']) == dict:
data['hosts'] = '[]'
else:
data['hosts'] = json.dumps(data['hosts'])
return render_template(
'login.html',
data=data
Expand Down Expand Up @@ -396,10 +405,10 @@ def FtpPort():

@app.route('/database',methods=method_all)
def database(pdata = None):
import ajax
comReturn = comm.local()
if comReturn: return comReturn
if request.method == method_get[0] and not pdata:
import ajax
pmd = get_phpmyadmin_dir()
session['phpmyadminDir'] = False
if pmd:
Expand Down Expand Up @@ -759,8 +768,6 @@ def plugin(pdata = None):
'getPluginStatus','setPluginStatus','a','getCloudPlugin','getConfigHtml','savePluginSort','del_make_args','set_make_args')
return publicObject(pluginObject,defs,None,pdata)



@app.route('/public',methods=method_all)
def panel_public():
get = get_input()
Expand Down Expand Up @@ -816,6 +823,8 @@ def send_favicon():
@app.route('/<name>/<fun>',methods=method_all)
@app.route('/<name>/<fun>/<path:stype>',methods=method_all)
def panel_other(name=None,fun = None,stype=None):
comReturn = comm.local()
if comReturn: return comReturn
is_accept = False
if not fun: fun = 'index.html'
if not stype:
Expand All @@ -824,11 +833,7 @@ def panel_other(name=None,fun = None,stype=None):
if len(tmp) == 1: tmp.append('')
stype = tmp[1]

if not name in ['mail_sys'] or not fun in ['send_mail_http']:
comReturn = comm.local()
if comReturn: return comReturn
else:
is_accept = True

if not name: name = 'coll'
if not public.path_safe_check("%s/%s/%s" % (name,fun,stype)): return abort(404)
if name.find('./') != -1 or not re.match("^[\w-]+$",name): return abort(404)
Expand Down Expand Up @@ -938,34 +943,6 @@ def panel_hook():
session.clear()
return public.getJson(webhook_main.webhook_main().RunHook(get))

@app.route('/safe',methods=method_all)
def panel_safe():
get = get_input()
pluginPath = 'plugin/safelogin'
if hasattr(get,'check'):
if os.path.exists(pluginPath + '/safelogin_main.py'): return 'True'
return 'False'
get.data = check_token(get.data)
if not get.data: return public.returnJson(False,'INIT_CHECK_ERR')
comm.setSession()
comm.init()
comm.checkWebType()
comm.GetOS()
sys.path.append(pluginPath)
import safelogin_main
reload(safelogin_main)
s = safelogin_main.safelogin_main()
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'
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:
Expand Down
22 changes: 21 additions & 1 deletion BTPanel/static/css/login.css

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions BTPanel/static/css/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -2012,8 +2012,8 @@ html .menu .menu_exit:hover {

.fangshi label {
font-weight: normal;
margin-right: 44px;
float: right
margin-right: 30px;
margin-left: 10px;
}

.fangshi label input {
Expand Down Expand Up @@ -6573,4 +6573,8 @@ background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODIiIGhlaWdodD0iODIiIHh
position: absolute;
top: -1px;
left: -1px;
}

#logsBody th {
min-width: 55px;
}
Binary file added BTPanel/static/img/dep_ico/jizhicms.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BTPanel/static/img/dep_ico/otcms.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BTPanel/static/img/dep_ico/phpok.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BTPanel/static/img/dep_ico/qr_pay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BTPanel/static/img/dep_ico/short_url.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BTPanel/static/img/dep_ico/xlovewall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BTPanel/static/img/dep_ico/yun_shop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BTPanel/static/img/ico/ico-san_security.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BTPanel/static/img/soft_ico/ico-bt_boce.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BTPanel/static/img/soft_ico/ico-bt_vsftpd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BTPanel/static/img/soft_ico/ico-customtime.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BTPanel/static/img/soft_ico/ico-jumpserver.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BTPanel/static/img/soft_ico/ico-logserver.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BTPanel/static/img/soft_ico/ico-new_gitlab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BTPanel/static/img/soft_ico/ico-site_cache.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BTPanel/static/img/soft_ico/ico-socks5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BTPanel/static/img/soft_ico/ico-static_cdn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BTPanel/static/img/soft_ico/ico-supervisor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 62 additions & 4 deletions BTPanel/static/js/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,8 @@ function sender_info_edit(){
layer.close(loadT);
var qq_mail = rdata.user_mail.info.msg.qq_mail == undefined ? '' : rdata.user_mail.info.msg.qq_mail,
qq_stmp_pwd = rdata.user_mail.info.msg.qq_stmp_pwd == undefined? '' : rdata.user_mail.info.msg.qq_stmp_pwd,
hosts = rdata.user_mail.info.msg.hosts == undefined? '' : rdata.user_mail.info.msg.hosts;
hosts = rdata.user_mail.info.msg.hosts == undefined? '' : rdata.user_mail.info.msg.hosts,
port = rdata.user_mail.info.msg.port == undefined? '' : rdata.user_mail.info.msg.port
layer.open({
type: 1,
area: "460px",
Expand All @@ -1112,22 +1113,65 @@ function sender_info_edit(){
<input name="channel_email_server" class="bt-input-text mr5" type="text" style="width: 300px" value="'+hosts+'">\
</div>\
</div>\
<div class="line">\
<span class="tname">端口</span>\
<div class="info-r">\
<select class="bt-input-text mr5" id="port_select" style="width:'+(select_port(port)?'300px':'100px')+'"></select>\
<input name="channel_email_port" class="bt-input-text mr5" type="Number" style="display:'+(select_port(port)? 'none':'inline-block')+'; width: 190px" value="'+port+'">\
</div>\
</div>\
<ul class="help-info-text c7">\
<li>推荐使用465端口,协议为SSL/TLS</li>\
<li>25端口为SMTP协议,587端口为STARTTLS协议</li>\
</ul>\
<div class="bt-form-submit-btn">\
<button type="button" class="btn btn-danger btn-sm smtp_closeBtn">关闭</button>\
<button class="btn btn-success btn-sm SetChannelEmail">保存</button></div>\
</div>',
success:function(layers,index){
var _option = '';
if(select_port(port)){
if(port == '465' || port == ''){
_option = '<option value="465" selected="selected">465</option><option value="25">25</option><option value="587">587</option><option value="other">自定义</option>'
}else if(port == '25'){
_option = '<option value="465">465</option><option value="25" selected="selected">25</option><option value="587">587</option><option value="other">自定义</option>'
}else{
_option = '<option value="465">465</option><option value="25">25</option><option value="587" selected="selected">587</option><option value="other">自定义</option>'
}
}else{
_option = '<option value="465">465</option><option value="25">25</option><option value="587" >587</option><option value="other" selected="selected">自定义</option>'
}
console.log(port)
$("#port_select").html(_option)
$("#port_select").change(function(e){
if(e.target.value == 'other'){
$("#port_select").css("width","100px");
$('input[name=channel_email_port]').css("display","inline-block");
}else{
$("#port_select").css("width","300px");
$('input[name=channel_email_port]').css("display","none");
}
})
$(".SetChannelEmail").click(function(){
var _email = $('input[name=channel_email_value]').val();
var _passW = $('input[name=channel_email_password]').val();
var _server = $('input[name=channel_email_server]').val();
var _server = $('input[name=channel_email_server]').val(),_port
if($('#port_select').val() == 'other'){
_port = $('input[name=channel_email_port]').val();
}else{
_port = $('#port_select').val()
}
if(_email == ''){
return layer.msg('邮箱地址不能为空!',{icon:2});
}else if(_passW == ''){
return layer.msg('STMP密码不能为空!',{icon:2});
}else if(_server == ''){return layer.msg('STMP服务器地址不能为空!',{icon:2})}
}else if(_server == ''){
return layer.msg('STMP服务器地址不能为空!',{icon:2})
}else if(_port == ''){
return layer.msg('请输入有效的端口号',{icon:2})
}
var loadT = layer.msg('正在生成邮箱通道中,请稍候...', { icon: 16, time: 0, shade: [0.3, '#000'] });
$.post('/config?action=user_mail_send',{email:_email,stmp_pwd:_passW,hosts:_server},function(rdata){
$.post('/config?action=user_mail_send',{email:_email,stmp_pwd:_passW,hosts:_server,port:_port},function(rdata){
layer.close(loadT);
layer.msg(rdata.msg,{icon:rdata.status?1:2})
if(rdata.status){
Expand All @@ -1143,6 +1187,20 @@ function sender_info_edit(){
})
})
}
function select_port(port){
switch(port){
case '25':
return true;
case '465':
return true;
case '587':
return true;
case '':
return true;
default:
return false
}
}
function get_channel_settings(callback){
var loadT = layer.msg('正在获取配置,请稍候...', { icon: 16, time: 0, shade: [0.3, '#000'] });
$.post('/config?action=get_settings',function(rdata){
Expand Down
44 changes: 23 additions & 21 deletions BTPanel/static/js/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -443,10 +443,7 @@ function GetFiles(Path, sort) {
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 displayZip = isZip(fmp[0]),bodyZip = '',download = '',image_view = '',file_webshell = '';
var cnametext = fmp[0] + fmp[5];
fmp[0] = fmp[0].replace(/'/, "\\'");
if (cnametext.length > 48) {
Expand All @@ -463,14 +460,15 @@ function GetFiles(Path, sort) {
if (displayZip != -1) {
bodyZip = "<a class='btlink' href='javascript:;' onclick=\"UnZip('" + rdata.PATH + "/" + fmp[0] + "'," + displayZip + ")\">" + lan.files.file_menu_unzip + "</a> | ";
}
console.log(isText(fmp[0]))
if (isText(fmp[0])) {
bodyZip = "<a class='btlink' href='javascript:;' onclick=\"openEditorView(0,'" + rdata.PATH + "/" + fmp[0] + "')\">" + lan.files.file_menu_edit + "</a> | ";
}
if (isImage(fmp[0])) {
download = "<a class='btlink' href='javascript:;' onclick=\"GetImage('" + rdata.PATH + "/" + fmp[0] + "')\">" + lan.files.file_menu_img + "</a> | ";
} else {
download = "<a class='btlink' href='javascript:;' onclick=\"GetFileBytes('" + rdata.PATH + "/" + fmp[0] + "'," + fmp[1] + ")\">" + lan.files.file_menu_down + "</a> | ";
image_view = "<a class='btlink' href='javascript:;' onclick=\"GetImage('" + rdata.PATH + "/" + fmp[0] + "')\">" + lan.files.file_menu_img + "</a> | ";
}
download = "<a class='btlink' href='javascript:;' onclick=\"GetFileBytes('" + rdata.PATH + "/" + fmp[0] + "'," + fmp[1] + ")\">" + lan.files.file_menu_down + "</a> | ";


totalSize += parseInt(fmp[1]);
if (getCookie("rank") == "a") {
Expand Down Expand Up @@ -506,7 +504,7 @@ function GetFiles(Path, sort) {
<a class='btlink' href='javascript:;' onclick=\"ReName(0,'" + fmp[0] + "')\">" + lan.files.file_menu_rename + "</a> | \
<a class='btlink' href=\"javascript:SetChmod(0,'" + rdata.PATH + "/" + fmp[0] + "');\">" + lan.files.file_menu_auth + "</a> | \
<a class='btlink' href=\"javascript:Zip('" + rdata.PATH + "/" + fmp[0] + "');\">" + lan.files.file_menu_zip + "</a> | \
"+ bodyZip + download + "\
"+ bodyZip + image_view + download + "\
<a class='btlink' href='javascript:;' onclick=\"DeleteFile('" + rdata.PATH + "/" + fmp[0] + "')\">" + lan.files.file_menu_del + "</a>\
</span></td></tr>";
}
Expand Down Expand Up @@ -1421,7 +1419,7 @@ function isZip(fileName) {
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'];
var exts = ['rar', 'war', 'zip', 'tar.gz', 'gz', 'iso', 'xsl', 'doc', 'xdoc', 'jpeg', 'jpg', 'png', 'gif', 'bmp', 'tiff', 'exe', 'so', '7z', 'bz', 'bz2','ico'];
return isExts(fileName, exts) ? false : true;
}
function isImage(fileName) {
Expand Down Expand Up @@ -1721,13 +1719,13 @@ function create_download_url(fileName,path,fileShare) {
+ '<div class="line"><span class="tname">有效期</span><div class="info-r">'
+'<label class="checkbox_grourd"><input type="radio" name="expire" value="24" checked><span>&nbsp;1天</span></label>'
+'<label class="checkbox_grourd"><input type="radio" name="expire" value="168"><span>&nbsp;7天</span></label>'
+'<label class="checkbox_grourd"><input type="radio" name="expire" value="99999999"><span>&nbsp;永久</span></label>'
+'<label class="checkbox_grourd"><input type="radio" name="expire" value="1130800"><span>&nbsp;永久</span></label>'
+'</div></div>'
+ '<div class="line"><span class="tname">提取码</span><div class="info-r"><input name="password" class="bt-input-text mr5" placeholder="为空则不设置提取码" type="text" style="width:170px" value=""><button type="button" id="random_paw" class="btn btn-success btn-sm btn-title">随机</button></div></div>'
+ '</from>',
yes:function(indexs,layers){
layer.confirm('是否分享该文件,是否继续?', { title: '确认分享', closeBtn: 2, icon: 3 }, function (index) {
var ps = $('[name=ps]').val(),expire = $('[name=expire]').val(),password = $('[name=password]').val();
var ps = $('[name=ps]').val(),expire = $('[name=expire]:checked').val(),password = $('[name=password]').val();
if(ps === ''){
layer.msg('分享名称不能为空',{icon:2});
return false;
Expand Down Expand Up @@ -1769,7 +1767,7 @@ function set_download_url(rdata){
+ '<div class="line"><span class="tname">分享名称</span><div class="info-r"><input readonly class="bt-input-text mr5" type="text" style="width:365px" value="'+ rdata.ps +'"></div></div>'
+ '<div class="line external_link"><span class="tname">分享外链</span><div class="info-r"><input readonly class="bt-input-text mr5" type="text" style="width:280px" value="'+ download_url +'"><button type="button" id="copy_url" data-clipboard-text="'+ download_url +'" class="btn btn-success btn-sm btn-title copy_url" style="margin-right:5px" data-clipboard-target="#copy_url"><img style="width:16px" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABIUlEQVQ4T6XTsSuFURjH8d+3/AFm0x0MyqBEUQaUIqUU3YwWyqgMptud/BlMSt1SBiklg0K3bhmUQTFZDZTxpyOvznt7z3sG7/T2vOf5vM85z3nQPx+KfNuHkhoZ7xXYjNfEwIukXUnvNcg2sJECnoHhugpsnwBN21PAXVgbV/AEjNhuVSFA23YHWLNt4Cc3Bh6BUdtLcbzAgHPbp8BqCngAxjJbOANWUkAPGA8fE8icpD1gOQV0gclMBRfAYgq4BaZtz/YhA5IGgY7tS2AhBdwAM7b3JX1I+iz1G45sXwHzKeAa6P97qZgcEA6v/ZsR3v9aHCmt0P9UBVuShjKz8CYpXPkDYKJ0kaKhWpe0UwOFxDATx5VACFZ0Ivbuga8i8A3NFqQRZ5pz7wAAAABJRU5ErkJggg=="></button><button type="button" class="btn btn-success QR_code btn-sm btn-title"><img style="width:16px" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABUklEQVQ4T6WSIU9DQRCEvwlYLIoEgwEECs3rDyCpobbtL6AKRyggMQ9TJBjUMzgMCeUnIEAREoICFAoEZMk2dy/Xo4KGNZu7nZ2bnT3xz1DsN7MFYCnhe5V0n/Kb2QowL2kY70cEoXAHVEnDG/ABXAJXmVDHVZKqSFAA58AqsAY8AW3A68/AQ7hbBG6BbeDGlaQEh8AucA3suzDgC5gFXHID2At5YxJBNwA6ocFBM8B3OL8DTaCcpMDN2QojxHHdk9Qrx9SeAyf1CMFIJ3DjYqxLOgo192gs4ibSNfrMOaj2yBvMrCnpImYHR4C/vizpIPkX/mpbUtfMepJKMxtKKsyslNTLCZxkBzgFjoE5oCVp08yKvyhwgkGyRl9nX1LDzDz3kzxS8kuBpFYygq8xJ4gjjBMEpz+BF+AxcXLg39XMOpLOciW1gtz9ac71GqdpSrE/8U20EQ3XLHEAAAAASUVORK5CYII="></button></div></div>'
+ '<div class="line external_link" style="'+ (rdata.password == ""?"display:none;":"display:block") +'"><span class="tname">提取码</span><div class="info-r"><input readonly class="bt-input-text mr5" type="text" style="width:243px" value="'+ rdata.password +'"><button type="button" data-clipboard-text="链接:'+ download_url +' 提取码:'+ rdata.password +'" class="btn btn-success copy_paw btn-sm btn-title">复制链接及提取码</button></div></div>'
+ '<div class="line"><span class="tname">过期时间</span><div class="info-r"><span style="line-height:32px; display: block;font-size:14px">'+ bt.format_data(rdata.expire)+'</span></div></div>'
+ '<div class="line"><span class="tname">过期时间</span><div class="info-r"><span style="line-height:32px; display: block;font-size:14px">'+((rdata.expire > (new Date('2099-01-01 00:00:00').getTime())/1000)?'<span calss="btlink">永久有效</span>':bt.format_data(rdata.expire))+'</span></div></div>'
+ '<div class="bt-form-submit-btn">'
+ '<button type="button" class="btn btn-danger btn-sm btn-title layer_close">' + lan.public.close + '</button>'
+ '<button type="button" id="down_del" class="btn btn-danger btn-sm btn-title close_down" style="color:#fff;background-color:#c9302c;border-color:#ac2925;" onclick="">关闭分享外链</button>'
Expand Down Expand Up @@ -1808,22 +1806,24 @@ function set_download_url(rdata){
});
});
$('.close_down').click(function(){
del_download_url(rdata.id,false,index)
del_download_url(rdata.id,false,index,rdata.ps)
});
}
});
}
function del_download_url(id,is_list,index){
layer.confirm('是否取消分享该文件【】,是否继续?', { title: '取消分享', closeBtn: 2, icon: 3 }, function (index) {
function del_download_url(id,is_list,index,filename){
layer.confirm('是否取消分享该文件【'+ filename +'】,是否继续?', { title: '取消分享', closeBtn: 2, icon: 3 }, function (indexs) {
$.post('/files?action=remove_download_url',{id:id},function(res){
layer.msg(res.msg,{icon:res.status?1:2});
if(index) layer.close(index);
if(is_list === false) get_download_url_list({},true);
layer.close(indexs)
if(is_list === false) get_download_url_list({},true,function(){
layer.msg(res.msg,{icon:res.status?1:2});
});
});
});
}

function get_download_url_list(data,is_refresh){
function get_download_url_list(data,is_refresh,callback){
if(data == undefined) data = {p:1}
var loadT = layer.msg('正在加载分享列表,请稍后...', {
icon: 16,
Expand All @@ -1834,11 +1834,13 @@ function get_download_url_list(data,is_refresh){
layer.close(loadT);
var _html = '',rdata = res.data;
for(var i=0;i<rdata.length;i++){
_html += '<tr><td>'+ rdata[i].ps +'</td><td>'+ rdata[i].filename +'</td><td>'+ bt.format_data(rdata[i].expire) +'</td><td style="text-align:right;"><a href="javascript:;" class="btlink info_down" data-index="'+i +'" data-id="'+ rdata[i].id +'">详情</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="javascript:;" class="btlink del_down" data-id="'+ rdata[i].id +'" data-index="'+i +'">关闭</a></td></tr>';
_html += '<tr><td>'+ rdata[i].ps +'</td><td>'+ rdata[i].filename +'</td><td>'+ bt.format_data(rdata[i].expire) +'</td><td style="text-align:right;"><a href="javascript:;" class="btlink info_down" data-index="'+i +'" data-id="'+ rdata[i].id +'">详情</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="javascript:;" class="btlink del_down" data-id="'+ rdata[i].id +'" data-index="'+i +'" data-ps="'+ rdata[i].ps +'">关闭</a></td></tr>';
}
if(callback) callback();
if(is_refresh){
$('.download_url_list').html(_html);
$('.download_url_page').html(res.page);

return false;
}
var layers = layer.open({
Expand All @@ -1860,8 +1862,8 @@ function get_download_url_list(data,is_refresh){
set_download_url(rdata[indexs]);
});
$('.download_table').on('click','.del_down',function(){
var id = $(this).attr('data-id');
del_download_url(id,false);
var id = $(this).attr('data-id'),_ps = $(this).attr('data-ps');
del_download_url(id,false,false,_ps);
});
$('.download_table .download_url_page').on('click','a',function(e){
var _href = $(this).attr('href');
Expand Down
Loading

0 comments on commit f2650e7

Please sign in to comment.