Update update_inprogress.php
This commit is contained in:
@@ -1,11 +1,40 @@
|
|||||||
<?php
|
<?php
|
||||||
$timer=60;
|
$timer=60;
|
||||||
header( "refresh:$timer;url=/viewdb.php" );
|
header( "refresh:$timer;url=/viewdb.php" );
|
||||||
$handle = popen("tail -f /tmp/phpupdate.log", 'r');
|
?>
|
||||||
while(!feof($handle)) {
|
<html lang="en">
|
||||||
$buffer = fgets($handle);
|
<meta charset="UTF-8">
|
||||||
echo "$buffer<br/>\n";
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
ob_flush();
|
<head></head>
|
||||||
flush();
|
<body style="background-color: rgb(119, 196, 135)">
|
||||||
|
<script>
|
||||||
|
|
||||||
|
function countDown(secs,elem) {
|
||||||
|
|
||||||
|
var element = document.getElementById(elem);
|
||||||
|
|
||||||
|
element.innerHTML = "Update in progress. Please allow another "+secs+" seconds for it to complete.";
|
||||||
|
|
||||||
|
if(secs < 1) {
|
||||||
|
|
||||||
|
clearTimeout(timer);
|
||||||
|
|
||||||
|
element.innerHTML = '<h4>Let\'s see</h4>';
|
||||||
|
|
||||||
|
element.innerHTML += '<a href="http://birdnetpi.local"></a>';
|
||||||
|
|
||||||
}
|
}
|
||||||
pclose($handle);
|
|
||||||
|
secs--;
|
||||||
|
|
||||||
|
var timer = setTimeout('countDown('+secs+',"'+elem+'")',1000);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div id="status"style="font-size:30px;"></div>
|
||||||
|
|
||||||
|
<script>countDown(<?php echo $timer;?>,"status");</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user