saving changes

This commit is contained in:
mcguirepr89
2022-02-24 13:27:08 -05:00
parent cf0a3436f7
commit 10090f9411
11 changed files with 87 additions and 96 deletions
-14
View File
@@ -26,25 +26,11 @@ $fh = fopen("/home/pi/BirdNET-Pi/birdnet.conf", "w");
$fh2 = fopen("/home/pi/BirdNET-Pi/thisrun.txt", "w");
fwrite($fh, $contents);
fwrite($fh2, $contents2);
session_start();
$_SESSION['success'] = 1;
if(isset($_POST["normal"])){
header('Location:config.php');
}else{
header('Location:../../');
}
$language = $_POST["language"];
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_output = `$command`;
session_start();
$_SESSION['success'] = 1;
if(isset($_POST["normal"])){
header('Location:config.php');
}else{
header('Location:../../');
}
}
?>