mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-09-13 03:44:27 +08:00
21 lines
425 B
HTML
21 lines
425 B
HTML
<script type="text/javascript">
|
|
//<![CDATA[
|
|
function server_update_config(cfgid, data, redirect_url) {
|
|
XHR.get('<%=self.api.url("server_update_config")%>', {
|
|
id: cfgid,
|
|
data: JSON.stringify(data)
|
|
},
|
|
function(x, data) {
|
|
if (x && x.status == 200 && data.code == 1) {
|
|
if (redirect_url) {
|
|
window.location.href = redirect_url;
|
|
}
|
|
}
|
|
else {
|
|
alert("<%:Error%>");
|
|
}
|
|
});
|
|
}
|
|
//]]>
|
|
</script>
|