This commit is contained in:
47
index.html
47
index.html
@@ -29,7 +29,7 @@
|
|||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<div id="redis"></div>
|
<div id="redis"></div>
|
||||||
<div id="previous">Scanning for previous install. Please wait...</div>
|
<div id="previous"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Optional JavaScript -->
|
<!-- Optional JavaScript -->
|
||||||
@@ -38,32 +38,49 @@
|
|||||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.14.6/dist/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
|
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.14.6/dist/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.2.1/dist/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.2.1/dist/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
function start_init() {
|
||||||
|
var url = 'scan.php?op=init';
|
||||||
|
$.get(url, function(data){
|
||||||
|
if (data=='OK') {
|
||||||
|
$("#previous").html('Scanning for previous install. Please wait...');
|
||||||
|
check_init();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$("#previous").html('Scanning for previous install has aborted...');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//$("#previous").html('Scanning for previous install. Please wait...');
|
function check_init() {
|
||||||
|
var url = 'scan.php?op=check_init';
|
||||||
|
$.get(url, function(data){
|
||||||
|
if (data=='NEW') {
|
||||||
|
$("#previous").html('No previous install has found...');
|
||||||
|
setTimeout(redirectToInstall, 3000);
|
||||||
|
}
|
||||||
|
else if (data=='EXISTS') {
|
||||||
|
$("#previous").html('Previous install has found...');
|
||||||
|
setTimeout(redirectToManage, 3000);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setTimeout(check_init, 1000);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
|
||||||
var url = 'scan.php?op=redis';
|
var url = 'scan.php?op=redis';
|
||||||
$.get(url, function(data){
|
$.get(url, function(data){
|
||||||
if (data=='OK') {
|
if (data=='OK') {
|
||||||
$("#redis").html('Redis server - OK');
|
$("#redis").html('Redis server - OK');
|
||||||
|
start_init();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$("#redis").html('Redis server is not available...');
|
$("#redis").html('Redis server is not available...');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var url = 'scan.php?op=init';
|
|
||||||
$.get(url, function(data){
|
|
||||||
if (data=='OK') {
|
|
||||||
$("#previous").html('Previous install has found...');
|
|
||||||
setTimeout(redirectToManage, 3000);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$("#previous").html('No previous install has found...');
|
|
||||||
setTimeout(redirectToInstall, 3000);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//setTimeout(redirectToManage, 10000);
|
//setTimeout(redirectToManage, 10000);
|
||||||
|
|
||||||
$(".progress").each(function() {
|
$(".progress").each(function() {
|
||||||
|
6
scan.php
6
scan.php
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
include "functions.php";
|
include "functions.php";
|
||||||
|
sleep(1);
|
||||||
switch ($_GET["op"]) {
|
switch ($_GET["op"]) {
|
||||||
case "redis":
|
case "redis":
|
||||||
try {
|
try {
|
||||||
@@ -19,8 +19,10 @@ switch ($_GET["op"]) {
|
|||||||
|
|
||||||
$op = "init:".date("YmdHis");
|
$op = "init:".date("YmdHis");
|
||||||
redis_set($op,$json);
|
redis_set($op,$json);
|
||||||
|
echo "OK"; // TODO?
|
||||||
break;
|
break;
|
||||||
case "init_check":
|
case "check_init":
|
||||||
|
echo "NEW";exit;// TEMP-TEST
|
||||||
$data = check_redis("web_out");
|
$data = check_redis("web_out");
|
||||||
if ($data["STATUS"]==2) echo "NEW";
|
if ($data["STATUS"]==2) echo "NEW";
|
||||||
elseif ($data["STATUS"]==1) echo "EXISTS";
|
elseif ($data["STATUS"]==1) echo "EXISTS";
|
||||||
|
Reference in New Issue
Block a user