add restore to views and system_controls
This commit is contained in:
+7
-2
@@ -13,6 +13,8 @@ $config = get_config();
|
||||
$color_scheme = get_color_scheme();
|
||||
set_timezone();
|
||||
|
||||
$restore = "cat $home/BirdSongs/restore.log";
|
||||
|
||||
if(is_authenticated() && (!isset($_SESSION['behind']) || !isset($_SESSION['behind_time']) || time() > $_SESSION['behind_time'] + 86400)) {
|
||||
shell_exec("sudo -u".$user." git -C ".$home."/BirdNET-Pi fetch > /dev/null 2>/dev/null &");
|
||||
$str = trim(shell_exec("sudo -u".$user." git -C ".$home."/BirdNET-Pi status"));
|
||||
@@ -71,7 +73,9 @@ elseif ($config["LONGITUDE"] == "0.000") {
|
||||
<button type="button" href="javascript:void(0);" class="icon" onclick="myFunction()"><img src="images/menu.png"></button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript" src="static/plupload.full.min.js"></script>
|
||||
<!--<script type="text/javascript" src="static/moxie.js"></script>
|
||||
<script type="text/javascript" src="static/plupload.dev.js"></script>-->
|
||||
<script>
|
||||
window.onload = function() {
|
||||
var elements = document.querySelectorAll("button[name=view]");
|
||||
@@ -283,7 +287,8 @@ if(isset($_GET['view'])){
|
||||
'sudo reboot',
|
||||
'update_birdnet.sh',
|
||||
'sudo shutdown now',
|
||||
'sudo clear_all_data.sh');
|
||||
'sudo clear_all_data.sh',
|
||||
"$restore");
|
||||
$command = $_GET['submit'];
|
||||
if(in_array($command,$allowedCommands)){
|
||||
if(isset($command)){
|
||||
|
||||
Reference in New Issue
Block a user