pull/109/head
midoks 6 years ago
parent 68dbe5a5de
commit df84e3f86c
  1. 4
      class/core/common.py
  2. 37
      plugins/php/index.py
  3. 83
      plugins/php/js/php.js
  4. 487
      plugins/php/versions/phplib.conf
  5. 2
      plugins/webssh/info.json
  6. 44
      route/static/app/public.js
  7. 5
      route/templates/default/layout.html

@ -51,3 +51,7 @@ def initInitD():
if not os.path.exists(initd_bin): if not os.path.exists(initd_bin):
shutil.copyfile(script_bin, initd_bin) shutil.copyfile(script_bin, initd_bin)
public.execShell('chmod +x ' + initd_bin) public.execShell('chmod +x ' + initd_bin)
def initUserInfo():
return ''

@ -496,25 +496,34 @@ def getPhpinfo(version):
def getLibConf(version): def getLibConf(version):
fname = public.getServerDir() + '/php/' + version + '/etc/php.ini' fname = public.getServerDir() + '/php/' + version + '/etc/php.ini'
if not os.path.exists(filename): if not os.path.exists(fname):
return public.returnJson(False, '指定PHP版本不存在!') return public.returnJson(False, '指定PHP版本不存在!')
data = {} phpini = public.readFile(fname)
rep = "disable_functions\s*=\s{0,1}(.*)\n"
tmp = re.search(rep, phpini).groups()
data['disable_functions'] = tmp[0]
rep = "upload_max_filesize\s*=\s*([0-9]+)(M|m|K|k)" libpath = getPluginDir() + '/versions/phplib.conf'
tmp = re.search(rep, phpini).groups() phplib = json.loads(public.readFile(libpath))
data['max'] = tmp[0]
rep = ur"\n;*\s*cgi\.fix_pathinfo\s*=\s*([0-9]+)\s*\n" libs = []
tmp = re.search(rep, phpini).groups() tasks = public.M('tasks').where(
if tmp[0] == '0': "status!=?", ('1',)).field('status,name').select()
data['pathinfo'] = False for lib in phplib:
lib['task'] = '1'
for task in tasks:
tmp = public.getStrBetween('[', ']', task['name'])
if not tmp:
continue
tmp1 = tmp.split('-')
if tmp1[0].lower() == lib['name'].lower():
lib['task'] = task['status']
lib['phpversions'] = []
lib['phpversions'].append(tmp1[1])
if phpini.find(lib['check']) == -1:
lib['status'] = False
else: else:
data['pathinfo'] = True lib['status'] = True
return public.getJson(data) libs.append(lib)
return public.returnJson(True, 'OK!', libs)
if __name__ == "__main__": if __name__ == "__main__":

@ -1,4 +1,4 @@
function phpPost(method,version, args,callback){ function phpPost(method, version, args,callback){
var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 }); var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 });
var req_data = {}; var req_data = {};
@ -382,27 +382,76 @@ function getPHPInfo(version) {
function phpLibConfig(version){ function phpLibConfig(version){
} phpPost('get_lib_conf', version, '', function(data){
console.log(data);
var rdata = $.parseJSON(data.data);
console.log(rdata.data);
var libs = rdata.data;
//设置PATHINFO var body = ""
function setPathInfo(version, type) { var opt = ""
var loadT = layer.msg(lan.public.the, { icon: 16, time: 0, shade: [0.3, '#000'] }); for (var i = 0; i < libs.length; i++) {
$.post('/config?action=setPathInfo', 'version=' + version + '&type=' + type, function(rdata) { if (libs[i].versions.indexOf(version) == -1) continue;
var pathinfo = (type == 'on') ? true : false; if (libs[i]['task'] == '-1' && libs[i].phpversions.indexOf(version) != -1) {
var pathinfoOpt = '<a style="color:red;" href="javascript:SetPathInfo(\'' + version + '\',\'off\');">' + lan.public.off + '</a>' opt = '<a style="color:green;" href="javascript:messageBox();">' + lan.soft.the_install + '</a>'
if (!pathinfo) { } else if (libs[i]['task'] == '0' && libs[i].phpversions.indexOf(version) != -1) {
pathinfoOpt = '<a class="link" href="javascript:SetPathInfo(\'' + version + '\',\'on\');">' + lan.public.on + '</a>' opt = '<a style="color:#C0C0C0;" href="javascript:messageBox();">' + lan.soft.sleep_install + '</a>'
} else if (libs[i].status) {
opt = '<a style="color:red;" href="javascript:UninstallPHPLib(\'' + version + '\',\'' + libs[i].name + '\',\'' + libs[i].title + '\',' + '' + ');">' + lan.soft.uninstall + '</a>'
} else {
opt = '<a class="btlink" href="javascript:InstallPHPLib(\'' + version + '\',\'' + libs[i].name + '\',\'' + libs[i].title + '\',' + '' + ');">' + lan.soft.install + '</a>'
}
body += '<tr>' +
'<td>' + libs[i].name + '</td>' +
'<td>' + libs[i].type + '</td>' +
'<td>' + libs[i].msg + '</td>' +
'<td><span class="ico-' + (libs[i].status ? 'start' : 'stop') + ' glyphicon glyphicon-' + (libs[i].status ? 'ok' : 'remove') + '"></span></td>' +
'<td style="text-align: right;">' + opt + '</td>' +
'</tr>';
} }
var pathinfo1 = '<td>PATH_INFO</td><td>' + lan.soft.php_menu_ext + '</td><td>' + lan.soft.mvc_ps + '</td><td><span class="ico-' + (pathinfo ? 'start' : 'stop') + ' glyphicon glyphicon-' + (pathinfo ? 'ok' : 'remove') + '"></span></td><td style="text-align: right;" width="50">' + pathinfoOpt + '</td>';
$("#pathInfo").html(pathinfo1);
$(".bt-w-menu .bgw").attr('onclick', "SetPHPConfig('" + version + "'," + pathinfo + ",1)"); var con = '<div class="divtable" id="phpextdiv" style="margin-right:10px;height: 420px; overflow: auto; margin-right: 0px;">' +
$(".bt-w-menu .bgw a").attr('href', "javascript:SetPHPConfig('" + version + "'," + pathinfo + ",1);"); '<table class="table table-hover" width="100%" cellspacing="0" cellpadding="0" border="0">' +
layer.msg(rdata.msg, { icon: 1 }); '<thead>' +
'<tr>' +
'<th>' + lan.soft.php_ext_name + '</th>' +
'<th width="64">' + lan.soft.php_ext_type + '</th>' +
'<th>' + lan.soft.php_ext_ps + '</th>' +
'<th width="40">' + lan.soft.php_ext_status + '</th>' +
'<th style="text-align: right;" width="50">' + lan.public.action + '</th>' +
'</tr>' +
'</thead>' +
'<tbody>' + body + '</tbody>' +
'</table>' +
'</div>' +
'<ul class="help-info-text c7 pull-left"><li>请按实际需求安装扩展,不要安装不必要的PHP扩展,这会影响PHP执行效率,甚至出现异常</li><li>Redis扩展只允许在1个PHP版本中使用,安装到其它PHP版本请在[软件管理]重装Redis</li><li>opcache/xcache/apc等脚本缓存扩展,请只安装其中1个,否则可能导致您的站点程序异常</li></ul>';
$('.soft-man-con').html(con);
}); });
} }
//设置PATHINFO
// function setPathInfo(version, type) {
// var loadT = layer.msg(lan.public.the, { icon: 16, time: 0, shade: [0.3, '#000'] });
// $.post('/config?action=setPathInfo', 'version=' + version + '&type=' + type, function(rdata) {
// var pathinfo = (type == 'on') ? true : false;
// var pathinfoOpt = '<a style="color:red;" href="javascript:SetPathInfo(\'' + version + '\',\'off\');">' + lan.public.off + '</a>'
// if (!pathinfo) {
// pathinfoOpt = '<a class="link" href="javascript:SetPathInfo(\'' + version + '\',\'on\');">' + lan.public.on + '</a>'
// }
// var pathinfo1 = '<td>PATH_INFO</td><td>' + lan.soft.php_menu_ext + '</td><td>' + lan.soft.mvc_ps + '</td><td><span class="ico-' + (pathinfo ? 'start' : 'stop') + ' glyphicon glyphicon-' + (pathinfo ? 'ok' : 'remove') + '"></span></td><td style="text-align: right;" width="50">' + pathinfoOpt + '</td>';
// $("#pathInfo").html(pathinfo1);
// $(".bt-w-menu .bgw").attr('onclick', "SetPHPConfig('" + version + "'," + pathinfo + ",1)");
// $(".bt-w-menu .bgw a").attr('href', "javascript:SetPHPConfig('" + version + "'," + pathinfo + ",1);");
// layer.msg(rdata.msg, { icon: 1 });
// });
// }
//PHP扩展配置 //PHP扩展配置
function setPHPConfig(version, pathinfo, go) { function setPHPConfig(version, pathinfo, go) {
$.get('/ajax?action=GetPHPConfig&version=' + version, function(rdata) { $.get('/ajax?action=GetPHPConfig&version=' + version, function(rdata) {
@ -411,9 +460,9 @@ function setPHPConfig(version, pathinfo, go) {
for (var i = 0; i < rdata.libs.length; i++) { for (var i = 0; i < rdata.libs.length; i++) {
if (rdata.libs[i].versions.indexOf(version) == -1) continue; if (rdata.libs[i].versions.indexOf(version) == -1) continue;
if (rdata.libs[i]['task'] == '-1' && rdata.libs[i].phpversions.indexOf(version) != -1) { if (rdata.libs[i]['task'] == '-1' && rdata.libs[i].phpversions.indexOf(version) != -1) {
opt = '<a style="color:green;" href="javascript:messagebox();">' + lan.soft.the_install + '</a>' opt = '<a style="color:green;" href="javascript:messageBox();">' + lan.soft.the_install + '</a>'
} else if (rdata.libs[i]['task'] == '0' && rdata.libs[i].phpversions.indexOf(version) != -1) { } else if (rdata.libs[i]['task'] == '0' && rdata.libs[i].phpversions.indexOf(version) != -1) {
opt = '<a style="color:#C0C0C0;" href="javascript:messagebox();">' + lan.soft.sleep_install + '</a>' opt = '<a style="color:#C0C0C0;" href="javascript:messageBox();">' + lan.soft.sleep_install + '</a>'
} else if (rdata.libs[i].status) { } else if (rdata.libs[i].status) {
opt = '<a style="color:red;" href="javascript:UninstallPHPLib(\'' + version + '\',\'' + rdata.libs[i].name + '\',\'' + rdata.libs[i].title + '\',' + pathinfo + ');">' + lan.soft.uninstall + '</a>' opt = '<a style="color:red;" href="javascript:UninstallPHPLib(\'' + version + '\',\'' + rdata.libs[i].name + '\',\'' + rdata.libs[i].title + '\',' + pathinfo + ');">' + lan.soft.uninstall + '</a>'
} else { } else {

@ -0,0 +1,487 @@
[
{
"name": "ZendGuardLoader",
"versions": [
"53",
"54",
"55",
"56"
],
"type": "脚本解密",
"msg": "用于解密ZendGuard加密脚本!",
"shell": "zend_guard_loader.sh",
"check": "ZendGuardLoader.so"
},
{
"name": "ZendOptimizer",
"versions": [
"52"
],
"type": "脚本解密",
"msg": "用于解密ZendOptimizer加密脚本!",
"shell": "zend_optimizer.sh",
"check": "ZendOptimizer.so"
},
{
"name": "ionCube",
"versions": [
"52",
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "脚本解密",
"msg": "用于解密ionCube Encoder加密脚本!",
"shell": "ioncube.sh",
"check": "ioncube_loader_lin"
},
{
"name": "fileinfo",
"versions": [
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "通用扩展",
"msg": "用于获取文件MIME,编码等信息!",
"shell": "fileinfo.sh",
"check": "fileinfo.so"
},
{
"name": "opcache",
"versions": [
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "缓存器",
"msg": "用于加速PHP脚本!",
"shell": "opcache.sh",
"check": "opcache.so"
},
{
"name": "xcache",
"versions": [
"52",
"53",
"54",
"55",
"56"
],
"type": "缓存器",
"msg": "支持脚本缓存和变量缓存!",
"shell": "xcache.sh",
"check": "xcache.so"
},
{
"name": "memcache",
"versions": [
"52",
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "缓存器",
"msg": "强大的内容缓存器,不支持集群",
"shell": "memcache.sh",
"check": "memcache.so"
},
{
"name": "memcached",
"versions": [
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "缓存器",
"msg": "强大的内容缓存器,支持集群",
"shell": "memcached.sh",
"check": "memcached.so"
},
{
"name": "redis",
"versions": [
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "缓存器",
"msg": "更强大的内容缓存器,支持集群",
"shell": "redis.sh",
"check": "redis.so"
},
{
"name": "apc",
"versions": [
"53",
"54"
],
"type": "缓存器",
"msg": "脚本缓存器",
"shell": "apc.sh",
"check": "apc.so"
},
{
"name": "imagemagick",
"versions": [
"54",
"55",
"56",
"70",
"71"
],
"type": "通用扩展",
"msg": "比GD更强大的图形库",
"shell": "imagemagick.sh",
"check": "imagick.so"
},
{
"name": "xdebug",
"versions": [
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "调试器",
"msg": "不多说,不了解的不要安装",
"shell": "xdebug.sh",
"check": "xdebug.so"
},
{
"name": "imap",
"versions": [
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "邮件服务",
"msg": "邮件服务器必备",
"shell": "imap.sh",
"check": "imap.so"
},
{
"name": "exif",
"versions": [
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "通用扩展",
"msg": "用于读取图片EXIF信息",
"shell": "exif.sh",
"check": "exif.so"
},
{
"name": "intl",
"versions": [
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "通用扩展",
"msg": "提供国际化支持",
"shell": "intl.sh",
"check": "intl.so"
},
{
"name": "xsl",
"versions": [
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "通用扩展",
"msg": "xsl解析扩展",
"shell": "xsl.sh",
"check": "xsl.so"
},
{
"name": "Swoole",
"versions": [
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "通用扩展",
"msg": "异步、并行、高性能网络通信引擎",
"shell": "swoole.sh",
"check": "swoole.so"
},
{
"name": "eAccelerator",
"versions": [
"52",
"53",
"54"
],
"type": "缓存器",
"msg": "内容缓存器",
"shell": "eaccelerator.sh",
"check": "eaccelerator.so"
},
{
"name": "yaf",
"versions": [
"54",
"55",
"56",
"70",
"71"
],
"type": "框架",
"msg": "Yaf是一个C语言编写的PHP框架",
"shell": "yaf.sh",
"check": "yaf.so"
},
{
"name": "mongo",
"versions": [
"53",
"54",
"55",
"56"
],
"type": "通用扩展",
"msg": "Mongodb数据库连接驱动",
"shell": "mongo.sh",
"check": "mongo.so"
},
{
"name": "yac",
"versions": [
"70",
"71"
],
"type": "缓存器",
"msg": "高性能无锁共享内存Cache",
"shell": "yac.sh",
"check": "yac.so"
},
{
"name": "sg11",
"versions": [
"52",
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "脚本加密",
"msg": "php代码混淆加密",
"shell": "sg11.sh",
"check": "ixed.lin"
},
{
"name": "readline",
"versions": [
"52",
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "通用扩展",
"msg": "php官方扩展",
"shell": "readline.sh",
"check": "readline.so"
},
{
"name": "snmp",
"versions": [
"52",
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "通用扩展",
"msg": "php官方扩展",
"shell": "snmp.sh",
"check": "snmp.so"
},
{
"name": "recode",
"versions": [
"52",
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "通用扩展",
"msg": "php官方扩展",
"shell": "recode.sh",
"check": "recode.so"
},
{
"name": "enchant",
"versions": [
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "通用扩展",
"msg": "php官方扩展",
"shell": "enchant.sh",
"check": "enchant.so"
},
{
"name": "pspell",
"versions": [
"52",
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "通用扩展",
"msg": "php官方扩展",
"shell": "pspell.sh",
"check": "pspell.so"
},
{
"name": "bz2",
"versions": [
"52",
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "通用扩展",
"msg": "php官方扩展",
"shell": "bz2.sh",
"check": "bz2.so"
},
{
"name": "sysvshm",
"versions": [
"52",
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "通用扩展",
"msg": "php官方扩展",
"shell": "sysvshm.sh",
"check": "sysvshm.so"
},
{
"name": "calendar",
"versions": [
"52",
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "通用扩展",
"msg": "php官方扩展",
"shell": "calendar.sh",
"check": "calendar.so"
},
{
"name": "gmp",
"versions": [
"52",
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "通用扩展",
"msg": "php官方扩展",
"shell": "gmp.sh",
"check": "gmp.so"
},
{
"name": "wddx",
"versions": [
"52",
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "通用扩展",
"msg": "php官方扩展",
"shell": "wddx.sh",
"check": "wddx.so"
},
{
"name": "sysvmsg",
"versions": [
"52",
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "通用扩展",
"msg": "php官方扩展",
"shell": "sysvmsg.sh",
"check": "sysvmsg.so"
}
]

@ -1,6 +1,6 @@
{ {
"id":3, "id":3,
"title":"宝塔SSH终端", "title":"SSH终端",
"tip":"lib", "tip":"lib",
"name":"webssh", "name":"webssh",
"type":"扩展", "type":"扩展",

@ -35,11 +35,11 @@ function randomStrPwd(b) {
function getRandomString(len) { function getRandomString(len) {
len = len || 32; len = len || 32;
var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'; // 默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1 var chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'; // 默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1
var maxPos = $chars.length; var maxPos = chars.length;
var pwd = ''; var pwd = '';
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
pwd += $chars.charAt(Math.floor(Math.random() * maxPos)); pwd += chars.charAt(Math.floor(Math.random() * maxPos));
} }
return pwd; return pwd;
} }
@ -683,7 +683,7 @@ var downLoad = null;
var speed = null; var speed = null;
function task() { function task() {
messagebox(); messageBox();
} }
function ActionTask() { function ActionTask() {
@ -858,14 +858,13 @@ function listOrder(skey,type,obj){
} }
//添加面板快捷登录 //添加面板快捷登录
function bindBTPanel(a,type,ip,btid,url,user,pw){ function bindPanel(a,type,ip,btid,url,user,pw){
var titleName = lan.bt.panel_add; var titleName = '关联面板';
if(type == "b"){ if(type == "b"){
btn = "<button type='button' class='btn btn-success btn-sm' onclick=\"bindBTPanel(1,'b')\">"+lan.public.add+"</button>"; btn = "<button type='button' class='btn btn-success btn-sm' onclick=\"bindPanel(1,'b')\">"+lan.public.add+"</button>";
} } else {
else{ titleName = '修改关联' + ip;
titleName = lan.bt.panel_edit+ip; btn = "<button type='button' class='btn btn-default btn-sm' onclick=\"bindPaneldel('"+btid+"')\">"+lan.public.del+"</button><button type='button' class='btn btn-success btn-sm' onclick=\"bindBTPanel(1,'c','"+ip+"','"+btid+"')\" style='margin-left:7px'>"+lan.public.edit+"</button>";
btn = "<button type='button' class='btn btn-default btn-sm' onclick=\"bindBTPaneldel('"+btid+"')\">"+lan.public.del+"</button><button type='button' class='btn btn-success btn-sm' onclick=\"bindBTPanel(1,'c','"+ip+"','"+btid+"')\" style='margin-left:7px'>"+lan.public.edit+"</button>";
} }
if(url == undefined) url="http://"; if(url == undefined) url="http://";
if(user == undefined) user=""; if(user == undefined) user="";
@ -922,7 +921,8 @@ function bindBTPanel(a,type,ip,btid,url,user,pw){
<div class='info-r'><input class='bt-input-text' type='text' name='bttitle' id='bttitle' value='"+ip+"' placeholder='"+lan.bt.panel_ps+"' style='width:100%'/></div>\ <div class='info-r'><input class='bt-input-text' type='text' name='bttitle' id='bttitle' value='"+ip+"' placeholder='"+lan.bt.panel_ps+"' style='width:100%'/></div>\
</div>\ </div>\
<div class='line'><ul class='help-info-text c7'><li>"+lan.bt.panel_ps_1+"</li><li>"+lan.bt.panel_ps_2+"</li><li>"+lan.bt.panel_ps_3+"</li></ul></div>\ <div class='line'><ul class='help-info-text c7'><li>"+lan.bt.panel_ps_1+"</li><li>"+lan.bt.panel_ps_2+"</li><li>"+lan.bt.panel_ps_3+"</li></ul></div>\
<div class='bt-form-submit-btn'><button type='button' class='btn btn-danger btn-sm' onclick=\"layer.closeAll()\">"+lan.public.close+"</button> "+btn+"</div></div>" <div class='bt-form-submit-btn'><button type='button' class='btn btn-danger btn-sm' onclick=\"layer.closeAll()\">"+lan.public.close+"</button> "+btn+"</div>\
</div>"
}); });
$("#btaddress").on("input",function(){ $("#btaddress").on("input",function(){
var str =$(this).val(); var str =$(this).val();
@ -937,7 +937,7 @@ function bindBTPanel(a,type,ip,btid,url,user,pw){
}); });
} }
//删除快捷登录 //删除快捷登录
function bindBTPaneldel(id){ function bindPaneldel(id){
$.post("/config?action=DelPanelInfo","id="+id,function(rdata){ $.post("/config?action=DelPanelInfo","id="+id,function(rdata){
layer.closeAll(); layer.closeAll();
layer.msg(rdata.msg,{icon:rdata.status?1:2}); layer.msg(rdata.msg,{icon:rdata.status?1:2});
@ -967,7 +967,7 @@ function getSpeed(sele){
}); });
} }
//消息盒子 //消息盒子
function messagebox() { function messageBox() {
layer.open({ layer.open({
type: 1, type: 1,
title: lan.bt.task_title, title: lan.bt.task_title,
@ -1029,19 +1029,17 @@ function remind(a){
$(".msg_count").text(g.data.length); $(".msg_count").text(g.data.length);
$(".taskcon").html(con); $(".taskcon").html(con);
$("#taskPage").html(g.page); $("#taskPage").html(g.page);
$("#Rs-checkAll").click(function(){ $("#Rs-checkAll").click(function(){
if($(this).prop("checked")){ if($(this).prop("checked")){
$("#remind").find("input").prop("checked",true) $("#remind").find("input").prop("checked",true)
} } else {
else{
$("#remind").find("input").prop("checked",false) $("#remind").find("input").prop("checked",false)
} }
}); });
},'json'); },'json');
} }
function getReloads() { function getReloads() {
var a = 0; var a = 0;
var mm = $(".bt-w-menu .bgw").html() var mm = $(".bt-w-menu .bgw").html()
@ -1051,7 +1049,7 @@ function getReloads() {
speed = null; speed = null;
return return
} }
if(speed) return; if(speed) {return;}
speed = setInterval(function() { speed = setInterval(function() {
var mm = $(".bt-w-menu .bgw").html() var mm = $(".bt-w-menu .bgw").html()
if(mm == undefined || mm.indexOf(lan.bt.task_list) == -1) { if(mm == undefined || mm.indexOf(lan.bt.task_list) == -1) {
@ -1061,10 +1059,10 @@ function getReloads() {
return return
} }
a++; a++;
$.post("/task/get_task_speed", "", function(h) { $.post('/task/get_task_speed', '', function(h) {
if(h.task == undefined) { if(h.task == undefined) {
$(".cmdlist").html(lan.bt.task_not_list); $(".cmdlist").html(lan.bt.task_not_list);
return return;
} }
var b = ""; var b = "";
var d = ""; var d = "";
@ -1181,7 +1179,7 @@ function scroll_handle(e){
$(function(){ $(function(){
setInterval(function(){ setInterval(function(){
check_login(); check_login();
},60000); },6000);
}); });
function asyncLoadImage(obj, url){ function asyncLoadImage(obj, url){
@ -1189,7 +1187,6 @@ function asyncLoadImage(obj, url){
if (typeof(url) == 'undefined'){ if (typeof(url) == 'undefined'){
return; return;
} }
loadImage(obj, url, showImage);
function loadImage(obj,url,callback){ function loadImage(obj,url,callback){
var img = new Image(); var img = new Image();
@ -1207,6 +1204,7 @@ function asyncLoadImage(obj, url){
function showImage(obj){ function showImage(obj){
obj.src = this.src; obj.src = this.src;
} }
loadImage(obj, url, showImage);
} }
function loadImage(){ function loadImage(){

@ -35,7 +35,7 @@
<li><a class="menu_exit" href="javascript:;" id="dologin">退出</a></li> <li><a class="menu_exit" href="javascript:;" id="dologin">退出</a></li>
</ul> </ul>
<div id="newbtpc"></div> <div id="newbtpc"></div>
<div class="btpc-plus" onclick="bindBTPanel(0,'b')">+</div> <div class="btpc-plus" onclick="bindPanel(0,'b')">+</div>
</div> </div>
</div> </div>
<button style="display: none;" id="bt_copys" class="bt_copy" data-clipboard-text=""></button> <button style="display: none;" id="bt_copys" class="bt_copy" data-clipboard-text=""></button>
@ -45,7 +45,7 @@
<script src="/static/js/jquery.fly.min.js?v={{config.version}}"></script> <script src="/static/js/jquery.fly.min.js?v={{config.version}}"></script>
<script src="/static/js/clipboard.min.js?v={{config.version}}"></script> <script src="/static/js/clipboard.min.js?v={{config.version}}"></script>
<script src="/static/app/public.js?v={{config.version}}"></script> <script src="/static/app/public.js?v={{config.version}}"></script>
<script type="text/javascript" src="/static/js/echarts.min.js?v={{config.version}}"></script> <script src="/static/js/echarts.min.js?v={{config.version}}"></script>
<script type="text/javascript" src="/static/js/jquery.dragsort-0.5.2.min.js?v={{config.version}}"></script> <script type="text/javascript" src="/static/js/jquery.dragsort-0.5.2.min.js?v={{config.version}}"></script>
{% block content %}{% endblock %} {% block content %}{% endblock %}
<div class="footer bgw">mdserver-web &copy;2018-∞ 面板 (<a style="color:#20a53a;" target="_blank" href="//github.com/midoks/mdserver-web">源码</a>)<a style="margin-left:20px;color:#20a53a;" href="//github.com/midoks/mdserver-web/wiki/mdserver-web" target="_blank">wiki</a> <div class="footer bgw">mdserver-web &copy;2018-∞ 面板 (<a style="color:#20a53a;" target="_blank" href="//github.com/midoks/mdserver-web">源码</a>)<a style="margin-left:20px;color:#20a53a;" href="//github.com/midoks/mdserver-web/wiki/mdserver-web" target="_blank">wiki</a>
@ -53,6 +53,7 @@
</div> </div>
</div> </div>
</body> </body>
<script src="/static/codemirror/lib/codemirror.js?v={{config.version}}"></script> <script src="/static/codemirror/lib/codemirror.js?v={{config.version}}"></script>
<script src="/static/codemirror/addon/edit/editAll.js?v={{config.version}}"></script> <script src="/static/codemirror/addon/edit/editAll.js?v={{config.version}}"></script>
<script src="/static/codemirror/mode/modeAll.js?v={{config.version}}"></script> <script src="/static/codemirror/mode/modeAll.js?v={{config.version}}"></script>

Loading…
Cancel
Save