configs are updating
This commit is contained in:
+6
-16
@@ -166,9 +166,7 @@ if (file_exists('/home/pi/BirdNET-Pi/thisrun.txt')) {
|
|||||||
?>
|
?>
|
||||||
<h2>Advanced Settings</h2>
|
<h2>Advanced Settings</h2>
|
||||||
<body>
|
<body>
|
||||||
<div class="row">
|
<form action="" method="POST">
|
||||||
<div class="column first">
|
|
||||||
<form action="advanced.php" method="POST">
|
|
||||||
<h3>Defaults</h3>
|
<h3>Defaults</h3>
|
||||||
<label>Full Disk Behavior: </label>
|
<label>Full Disk Behavior: </label>
|
||||||
<label for="purge">
|
<label for="purge">
|
||||||
@@ -212,8 +210,6 @@ foreach($formats as $format){
|
|||||||
<p>This password protects the Live Audio Stream, the Processed extractions, phpSysInfo, your Tools, and WebTerminal. When you update this value, the web server will reload, so wait about 30 seconds and then reload the page.</p>
|
<p>This password protects the Live Audio Stream, the Processed extractions, phpSysInfo, your Tools, and WebTerminal. When you update this value, the web server will reload, so wait about 30 seconds and then reload the page.</p>
|
||||||
<label for="ice_pwd">Live Audio Stream: </label>
|
<label for="ice_pwd">Live Audio Stream: </label>
|
||||||
<input name="ice_pwd" type="text" value="<?php print($newconfig['ICE_PWD']);?>" required/><br>
|
<input name="ice_pwd" type="text" value="<?php print($newconfig['ICE_PWD']);?>" required/><br>
|
||||||
</div>
|
|
||||||
<div class="column second">
|
|
||||||
<h3>Custom URLs</h3>
|
<h3>Custom URLs</h3>
|
||||||
<p>When you update any of the URL settings below, the web server will reload, so be sure to wait at least 30 seconds and then reload the page.</p>
|
<p>When you update any of the URL settings below, the web server will reload, so be sure to wait at least 30 seconds and then reload the page.</p>
|
||||||
<label for="birdnetpi_url">BirdNET-Pi URL: </label>
|
<label for="birdnetpi_url">BirdNET-Pi URL: </label>
|
||||||
@@ -236,24 +232,18 @@ foreach($formats as $format){
|
|||||||
<input name="sensitivity" type="number" min="0.5" max="1.5" step="0.01" value="<?php print($newconfig['SENSITIVITY']);?>" required/><br>
|
<input name="sensitivity" type="number" min="0.5" max="1.5" step="0.01" value="<?php print($newconfig['SENSITIVITY']);?>" required/><br>
|
||||||
<p>Min=0.5, Max=1.5</p>
|
<p>Min=0.5, Max=1.5</p>
|
||||||
<br><br>
|
<br><br>
|
||||||
<button type="submit" name="submit" class="block"><?php
|
<button type="submit" name="submit" value="advanced">
|
||||||
|
<?php
|
||||||
if(isset($_SESSION['success'])){
|
if(isset($_SESSION['success'])){
|
||||||
echo "Success!";
|
echo "Success!";
|
||||||
unset($_SESSION['success']);
|
unset($_SESSION['success']);
|
||||||
} else {
|
} else {
|
||||||
echo "Update Settings";
|
echo "Update Settings";
|
||||||
}
|
}
|
||||||
?></button>
|
?> </button>
|
||||||
<br>
|
<br>
|
||||||
</form>
|
</form>
|
||||||
<form action="config.php">
|
<form action="" method="POST">
|
||||||
<button type="submit" class="block">Basic Settings</button>
|
<button type="submit" name="view" value="Settings">Basic Settings</button>
|
||||||
</form>
|
</form>
|
||||||
<br>
|
|
||||||
<form action="index.html">
|
|
||||||
<button type="submit" class="block">Tools</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
+6
-4
@@ -66,13 +66,16 @@ if (file_exists('/home/pi/BirdNET-Pi/thisrun.txt')) {
|
|||||||
<option value="labels_uk.txt">Ukrainian</option>
|
<option value="labels_uk.txt">Ukrainian</option>
|
||||||
</select>
|
</select>
|
||||||
<br><br>
|
<br><br>
|
||||||
<button type="submit" name="view" value="Settings"><?php
|
<input type="hidden" name="submit" value="settings">
|
||||||
if(isset($_POST['status'])){
|
<button type="submit" name="view" value="Settings">
|
||||||
|
<?php
|
||||||
|
if(isset($_POST['submit'])){
|
||||||
echo "Success!";
|
echo "Success!";
|
||||||
} else {
|
} else {
|
||||||
echo "Update Settings";
|
echo "Update Settings";
|
||||||
}
|
}
|
||||||
?></button>
|
?>
|
||||||
|
</button>
|
||||||
</form>
|
</form>
|
||||||
<form action="" method="POST">
|
<form action="" method="POST">
|
||||||
<button type="submit" name="view" value="Advanced">Advanced Settings</button>
|
<button type="submit" name="view" value="Advanced">Advanced Settings</button>
|
||||||
@@ -80,4 +83,3 @@ if(isset($_POST['status'])){
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
ini_set('display_errors',1);
|
ini_set('display_errors',1);
|
||||||
|
|
||||||
|
if(isset($_POST["latitude"])){
|
||||||
$latitude = $_POST["latitude"];
|
$latitude = $_POST["latitude"];
|
||||||
$longitude = $_POST["longitude"];
|
$longitude = $_POST["longitude"];
|
||||||
$birdweather_id = $_POST["birdweather_id"];
|
$birdweather_id = $_POST["birdweather_id"];
|
||||||
@@ -32,5 +33,6 @@ if ($language != "none"){
|
|||||||
$command = "sudo -upi mv /home/pi/BirdNET-Pi/model/labels.txt /home/pi/BirdNET-Pi/model/labels.txt.old && sudo -upi unzip /home/pi/BirdNET-Pi/model/labels_l18n.zip $language -d /home/pi/BirdNET-Pi/model && sudo -upi mv /home/pi/BirdNET-Pi/model/$language /home/pi/BirdNET-Pi/model/labels.txt";
|
$command = "sudo -upi mv /home/pi/BirdNET-Pi/model/labels.txt /home/pi/BirdNET-Pi/model/labels.txt.old && sudo -upi unzip /home/pi/BirdNET-Pi/model/labels_l18n.zip $language -d /home/pi/BirdNET-Pi/model && sudo -upi mv /home/pi/BirdNET-Pi/model/$language /home/pi/BirdNET-Pi/model/labels.txt";
|
||||||
$command_output = `$command`;
|
$command_output = `$command`;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user