rm rewrite check
parent
544035b07a
commit
d99ee1dadc
|
@ -202,13 +202,11 @@ function install()
|
||||||
$title = 'Error';
|
$title = 'Error';
|
||||||
return message($html, $title, 201);
|
return message($html, $title, 201);
|
||||||
}*/
|
}*/
|
||||||
$html .= '<button id="checkrewritebtn" onclick="checkrewrite();">'.getconstStr('MakesuerRewriteOn').'</button>
|
$html .= '
|
||||||
<div id="formdiv" style="display: none">
|
|
||||||
<form action="?install2" method="post" onsubmit="return notnull(this);">
|
<form action="?install2" method="post" onsubmit="return notnull(this);">
|
||||||
<input name="admin" type="password" placeholder="' . getconstStr('EnvironmentsDescription')['admin'] . '" size="' . strlen(getconstStr('EnvironmentsDescription')['admin']) . '"><br>
|
<input name="admin" type="password" placeholder="' . getconstStr('EnvironmentsDescription')['admin'] . '" size="' . strlen(getconstStr('EnvironmentsDescription')['admin']) . '"><br>
|
||||||
<input id="submitbtn" type="submit" value="'.getconstStr('Submit').'" disabled>
|
<input id="submitbtn" type="submit" value="'.getconstStr('Submit').'">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
<script>
|
<script>
|
||||||
var nowtime= new Date();
|
var nowtime= new Date();
|
||||||
var timezone = 0-nowtime.getTimezoneOffset()/60;
|
var timezone = 0-nowtime.getTimezoneOffset()/60;
|
||||||
|
@ -224,29 +222,6 @@ function install()
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
function checkrewrite()
|
|
||||||
{
|
|
||||||
url=location.protocol + "//" + location.host;
|
|
||||||
//if (location.port!="") url += ":" + location.port;
|
|
||||||
url += location.pathname;
|
|
||||||
if (url.substr(-1)!="/") url += "/";
|
|
||||||
url += "app.json";
|
|
||||||
url += "?" + Date.now();
|
|
||||||
var xhr4 = new XMLHttpRequest();
|
|
||||||
xhr4.open("GET", url);
|
|
||||||
xhr4.setRequestHeader("x-requested-with","XMLHttpRequest");
|
|
||||||
xhr4.send(null);
|
|
||||||
xhr4.onload = function(e){
|
|
||||||
console.log(xhr4.responseText+","+xhr4.status);
|
|
||||||
if (xhr4.status==201) {
|
|
||||||
document.getElementById("checkrewritebtn").style.display = "none";
|
|
||||||
document.getElementById("submitbtn").disabled = false;
|
|
||||||
document.getElementById("formdiv").style.display = "";
|
|
||||||
} else {
|
|
||||||
alert("' . getconstStr('MakesuerRewriteOn') . '?\nfalse\n\nUrl: " + url + "\nExpect http code 201, but received " + xhr4.status);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>';
|
</script>';
|
||||||
$title = getconstStr('SetAdminPassword');
|
$title = getconstStr('SetAdminPassword');
|
||||||
return message($html, $title, 201);
|
return message($html, $title, 201);
|
||||||
|
|
Loading…
Reference in New Issue