|
|
|
|
|
|
|
|
|
|
|
$(".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 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});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
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});
|
|
|
|
});
|
|
|
|
}
|