mirror of https://github.com/midoks/mdserver-web
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.3 KiB
47 lines
1.3 KiB
7 years ago
|
|
||
|
|
||
|
//设置自动更新
|
||
|
function SetPanelAutoUpload(){
|
||
|
loadT = layer.msg(lan.public.config,{icon:16,time:0});
|
||
|
$.post('/config?action=AutoUpdatePanel','',function(rdata){
|
||
|
layer.close(loadT);
|
||
|
layer.msg(rdata.msg,{icon:rdata.status?1:2});
|
||
|
});
|
||
|
}
|
||
|
|
||
|
|
||
|
$(".set-submit").click(function(){
|
||
|
var data = $("#set-Config").serialize();
|
||
|
layer.msg(lan.config.config_save,{icon:16,time:0,shade: [0.3, '#000']});
|
||
|
$.post('/config?action=setPanel',data,function(rdata){
|
||
|
layer.closeAll();
|
||
|
layer.msg(rdata.msg,{icon:rdata.status?1:2});
|
||
|
if(rdata.status){
|
||
|
setTimeout(function(){
|
||
|
window.location.href = ((window.location.protocol.indexOf('https') != -1)?'https://':'http://') + rdata.host + window.location.pathname;
|
||
|
},1500);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
});
|
||
|
|
||
|
|
||
|
function syncDate(){
|
||
|
var loadT = layer.msg(lan.config.config_sync,{icon:16,time:0,shade: [0.3, '#000']});
|
||
|
$.post('/config?action=syncDate','',function(rdata){
|
||
|
layer.close(loadT);
|
||
|
layer.msg(rdata.msg,{icon:1});
|
||
|
setTimeout(function(){
|
||
|
window.location.reload();
|
||
|
},1500);
|
||
|
});
|
||
|
}
|
||
|
|
||
|
//PHP守护程序
|
||
|
function Set502(){
|
||
|
var loadT = layer.msg(lan.public.the,{icon:16,time:0,shade: [0.3, '#000']});
|
||
|
$.post('/config?action=Set502','',function(rdata){
|
||
|
layer.close(loadT);
|
||
|
layer.msg(rdata.msg,{icon:rdata.status?1:2});
|
||
|
});
|
||
|
}
|