Merge branch 'main' of github.com:mcguirepr89/BirdNET-Pi
This commit is contained in:
+30
-30
@@ -26,12 +26,12 @@ if (!isset($_SERVER['PHP_AUTH_USER'])) {
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_POST['submit'])) {
|
||||
if(isset($_GET['submit'])) {
|
||||
$contents = file_get_contents('/etc/birdnet/birdnet.conf');
|
||||
$contents2 = file_get_contents('./scripts/thisrun.txt');
|
||||
|
||||
if(isset($_POST["caddy_pwd"])) {
|
||||
$caddy_pwd = $_POST["caddy_pwd"];
|
||||
if(isset($_GET["caddy_pwd"])) {
|
||||
$caddy_pwd = $_GET["caddy_pwd"];
|
||||
if(strcmp($caddy_pwd,$config['CADDY_PWD']) !== 0) {
|
||||
$contents = preg_replace("/CADDY_PWD=.*/", "CADDY_PWD=$caddy_pwd", $contents);
|
||||
$contents2 = preg_replace("/CADDY_PWD=.*/", "CADDY_PWD=$caddy_pwd", $contents2);
|
||||
@@ -43,16 +43,16 @@ if(isset($_POST['submit'])) {
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_POST["ice_pwd"])) {
|
||||
$ice_pwd = $_POST["ice_pwd"];
|
||||
if(isset($_GET["ice_pwd"])) {
|
||||
$ice_pwd = $_GET["ice_pwd"];
|
||||
if(strcmp($ice_pwd,$config['ICE_PWD']) !== 0) {
|
||||
$contents = preg_replace("/ICE_PWD=.*/", "ICE_PWD=$ice_pwd", $contents);
|
||||
$contents2 = preg_replace("/ICE_PWD=.*/", "ICE_PWD=$ice_pwd", $contents2);
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_POST["birdnetpi_url"])) {
|
||||
$birdnetpi_url = $_POST["birdnetpi_url"];
|
||||
if(isset($_GET["birdnetpi_url"])) {
|
||||
$birdnetpi_url = $_GET["birdnetpi_url"];
|
||||
if(strcmp($birdnetpi_url,$config['BIRDNETPI_URL']) !== 0) {
|
||||
$contents = preg_replace("/BIRDNETPI_URL=.*/", "BIRDNETPI_URL=$birdnetpi_url", $contents);
|
||||
$contents2 = preg_replace("/BIRDNETPI_URL=.*/", "BIRDNETPI_URL=$birdnetpi_url", $contents2);
|
||||
@@ -64,40 +64,40 @@ if(isset($_POST['submit'])) {
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_POST["overlap"])) {
|
||||
$overlap = $_POST["overlap"];
|
||||
if(isset($_GET["overlap"])) {
|
||||
$overlap = $_GET["overlap"];
|
||||
if(strcmp($overlap,$config['OVERLAP']) !== 0) {
|
||||
$contents = preg_replace("/OVERLAP=.*/", "OVERLAP=$overlap", $contents);
|
||||
$contents2 = preg_replace("/OVERLAP=.*/", "OVERLAP=$overlap", $contents2);
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_POST["confidence"])) {
|
||||
$confidence = $_POST["confidence"];
|
||||
if(isset($_GET["confidence"])) {
|
||||
$confidence = $_GET["confidence"];
|
||||
if(strcmp($confidence,$config['CONFIDENCE']) !== 0) {
|
||||
$contents = preg_replace("/CONFIDENCE=.*/", "CONFIDENCE=$confidence", $contents);
|
||||
$contents2 = preg_replace("/CONFIDENCE=.*/", "CONFIDENCE=$confidence", $contents2);
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_POST["sensitivity"])) {
|
||||
$sensitivity = $_POST["sensitivity"];
|
||||
if(isset($_GET["sensitivity"])) {
|
||||
$sensitivity = $_GET["sensitivity"];
|
||||
if(strcmp($sensitivity,$config['SENSITIVITY']) !== 0) {
|
||||
$contents = preg_replace("/SENSITIVITY=.*/", "SENSITIVITY=$sensitivity", $contents);
|
||||
$contents2 = preg_replace("/SENSITIVITY=.*/", "SENSITIVITY=$sensitivity", $contents2);
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_POST["full_disk"])) {
|
||||
$full_disk = $_POST["full_disk"];
|
||||
if(isset($_GET["full_disk"])) {
|
||||
$full_disk = $_GET["full_disk"];
|
||||
if(strcmp($full_disk,$config['FULL_DISK']) !== 0) {
|
||||
$contents = preg_replace("/FULL_DISK=.*/", "FULL_DISK=$full_disk", $contents);
|
||||
$contents2 = preg_replace("/FULL_DISK=.*/", "FULL_DISK=$full_disk", $contents2);
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_POST["privacy_mode"])) {
|
||||
$privacy_mode = $_POST["privacy_mode"];
|
||||
if(isset($_GET["privacy_mode"])) {
|
||||
$privacy_mode = $_GET["privacy_mode"];
|
||||
if(strcmp($config['PRIVACY_MODE'], "1") == 0 ) {
|
||||
$pmode = "on";
|
||||
}elseif(strcmp($config['PRIVACY_MODE'], "") == 0) {
|
||||
@@ -120,40 +120,40 @@ if(isset($_POST['submit'])) {
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_POST["rec_card"])) {
|
||||
$rec_card = $_POST["rec_card"];
|
||||
if(isset($_GET["rec_card"])) {
|
||||
$rec_card = $_GET["rec_card"];
|
||||
if(strcmp($rec_card,$config['REC_CARD']) !== 0) {
|
||||
$contents = preg_replace("/REC_CARD=.*/", "REC_CARD=$rec_card", $contents);
|
||||
$contents2 = preg_replace("/REC_CARD=.*/", "REC_CARD=$rec_card", $contents2);
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_POST["channels"])) {
|
||||
$channels = $_POST["channels"];
|
||||
if(isset($_GET["channels"])) {
|
||||
$channels = $_GET["channels"];
|
||||
if(strcmp($channels,$config['CHANNELS']) !== 0) {
|
||||
$contents = preg_replace("/CHANNELS=.*/", "CHANNELS=$channels", $contents);
|
||||
$contents2 = preg_replace("/CHANNELS=.*/", "CHANNELS=$channels", $contents2);
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_POST["recording_length"])) {
|
||||
$recording_length = $_POST["recording_length"];
|
||||
if(isset($_GET["recording_length"])) {
|
||||
$recording_length = $_GET["recording_length"];
|
||||
if(strcmp($recording_length,$config['RECORDING_LENGTH']) !== 0) {
|
||||
$contents = preg_replace("/RECORDING_LENGTH=.*/", "RECORDING_LENGTH=$recording_length", $contents);
|
||||
$contents2 = preg_replace("/RECORDING_LENGTH=.*/", "RECORDING_LENGTH=$recording_length", $contents2);
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_POST["extraction_length"])) {
|
||||
$extraction_length = $_POST["extraction_length"];
|
||||
if(isset($_GET["extraction_length"])) {
|
||||
$extraction_length = $_GET["extraction_length"];
|
||||
if(strcmp($extraction_length,$config['EXTRACTION_LENGTH']) !== 0) {
|
||||
$contents = preg_replace("/EXTRACTION_LENGTH=.*/", "EXTRACTION_LENGTH=$extraction_length", $contents);
|
||||
$contents2 = preg_replace("/EXTRACTION_LENGTH=.*/", "EXTRACTION_LENGTH=$extraction_length", $contents2);
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_POST["audiofmt"])) {
|
||||
$audiofmt = $_POST["audiofmt"];
|
||||
if(isset($_GET["audiofmt"])) {
|
||||
$audiofmt = $_GET["audiofmt"];
|
||||
if(strcmp($audiofmt,$config['AUDIOFMT']) !== 0) {
|
||||
$contents = preg_replace("/AUDIOFMT=.*/", "AUDIOFMT=$audiofmt", $contents);
|
||||
$contents2 = preg_replace("/AUDIOFMT=.*/", "AUDIOFMT=$audiofmt", $contents2);
|
||||
@@ -181,7 +181,7 @@ if (file_exists('./scripts/thisrun.txt')) {
|
||||
}
|
||||
?>
|
||||
<h2>Advanced Settings</h2>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<label>Privacy Mode: </label>
|
||||
<label for="on">
|
||||
<input name="privacy_mode" type="radio" id="on" value="on" <?php if (strcmp($newconfig['PRIVACY_MODE'], "1") == 0) { echo "checked"; }?>>On</label>
|
||||
@@ -242,7 +242,7 @@ foreach($formats as $format){
|
||||
<input type="hidden" name="view" value="Advanced">
|
||||
<button type="submit" name="submit" value="advanced">
|
||||
<?php
|
||||
if(isset($_POST['submit'])){
|
||||
if(isset($_GET['submit'])){
|
||||
echo "Success!";
|
||||
} else {
|
||||
echo "Update Settings";
|
||||
@@ -251,7 +251,7 @@ if(isset($_POST['submit'])){
|
||||
</button>
|
||||
<br>
|
||||
</form>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<button type="submit" name="view" value="Settings">Basic Settings</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
+10
-10
@@ -3,12 +3,12 @@ error_reporting(E_ALL);
|
||||
ini_set('display_errors',1);
|
||||
|
||||
# Basic Settings
|
||||
if(isset($_POST["latitude"])){
|
||||
$latitude = $_POST["latitude"];
|
||||
$longitude = $_POST["longitude"];
|
||||
$birdweather_id = $_POST["birdweather_id"];
|
||||
$pushed_app_key = $_POST["pushed_app_key"];
|
||||
$pushed_app_secret = $_POST["pushed_app_secret"];
|
||||
if(isset($_GET["latitude"])){
|
||||
$latitude = $_GET["latitude"];
|
||||
$longitude = $_GET["longitude"];
|
||||
$birdweather_id = $_GET["birdweather_id"];
|
||||
$pushed_app_key = $_GET["pushed_app_key"];
|
||||
$pushed_app_secret = $_GET["pushed_app_secret"];
|
||||
|
||||
$contents = file_get_contents("/etc/birdnet/birdnet.conf");
|
||||
$contents = preg_replace("/LATITUDE=.*/", "LATITUDE=$latitude", $contents);
|
||||
@@ -29,7 +29,7 @@ $fh2 = fopen("./scripts/thisrun.txt", "w");
|
||||
fwrite($fh, $contents);
|
||||
fwrite($fh2, $contents2);
|
||||
|
||||
$language = $_POST["language"];
|
||||
$language = $_GET["language"];
|
||||
if ($language != "none"){
|
||||
$user = shell_exec("awk -F: '/1000/{print $1}' /etc/passwd");
|
||||
$home = shell_exec("awk -F: '/1000/{print $6}' /etc/passwd");
|
||||
@@ -48,7 +48,7 @@ if ($language != "none"){
|
||||
<div class="settings">
|
||||
<iframe src="https://github.com/sponsors/mcguirepr89/button" title="Sponsor mcguirepr89" style="height:35px;width:116px;border:0;"></iframe>
|
||||
<h2>Basic Settings</h2>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<?php
|
||||
if (file_exists('./scripts/thisrun.txt')) {
|
||||
$config = parse_ini_file('./scripts/thisrun.txt');
|
||||
@@ -123,7 +123,7 @@ if (!isset($_SERVER['PHP_AUTH_USER'])) {
|
||||
<input type="hidden" name="submit" value="settings">
|
||||
<button type="submit" name="view" value="Settings">
|
||||
<?php
|
||||
if(isset($_POST['status'])){
|
||||
if(isset($_GET['status'])){
|
||||
echo "Success!";
|
||||
} else {
|
||||
echo "Update Settings";
|
||||
@@ -131,7 +131,7 @@ if(isset($_POST['status'])){
|
||||
?>
|
||||
</button>
|
||||
</form>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<button type="submit" name="view" value="Advanced">Advanced Settings</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<body>
|
||||
<div class="customlabels column1">
|
||||
<form action="" method="POST" id="add">
|
||||
<form action="" method="GET" id="add">
|
||||
<h3>All Species Labels</h3>
|
||||
<select name="species[]" id="species" multiple size="auto">
|
||||
<option>Choose a species below to add to the Excluded Species List</option>
|
||||
@@ -35,7 +35,7 @@
|
||||
</div>
|
||||
|
||||
<div class="customlabels column3">
|
||||
<form action="" method="POST" id="del">
|
||||
<form action="" method="GET" id="del">
|
||||
<h3>Excluded Species List</h3>
|
||||
<select name="species[]" id="value2" multiple size="auto">
|
||||
<?php
|
||||
|
||||
+3
-3
@@ -3,8 +3,8 @@ ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
if(isset($_POST['date'])){
|
||||
$theDate = $_POST['date'];
|
||||
if(isset($_GET['date'])){
|
||||
$theDate = $_GET['date'];
|
||||
} else {
|
||||
$theDate = date('Y-m-d');
|
||||
}
|
||||
@@ -27,7 +27,7 @@ $totalcount = $result1->fetchArray(SQLITE3_ASSOC);
|
||||
</head>
|
||||
<body>
|
||||
<div class="history centered">
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<input type="date" name="date" value="<?php echo $theDate;?>">
|
||||
<button type="submit" name="view" value="Daily Charts">Submit Date</button>
|
||||
</form>
|
||||
|
||||
@@ -17,7 +17,7 @@ $eachlines = file($filename, FILE_IGNORE_NEW_LINES);
|
||||
<body style="height: 90%;">
|
||||
<p>Warning!<br>If this list contains ANY species, the system will ONLY recognize those species. Keep this list EMPTY unless you are ONLY interested in detecting specific species.</p>
|
||||
<div class="customlabels2 column1">
|
||||
<form action="" method="POST" id="add">
|
||||
<form action="" method="GET" id="add">
|
||||
<h2>All Species Labels</h2>
|
||||
<select name="species[]" id="species" multiple size="30">
|
||||
<option selected value="base">Please Select</option>
|
||||
@@ -42,7 +42,7 @@ $eachlines = file($filename, FILE_IGNORE_NEW_LINES);
|
||||
</div>
|
||||
|
||||
<div class="customlabels2 column3">
|
||||
<form action="" method="POST" id="del">
|
||||
<form action="" method="GET" id="del">
|
||||
<h2>Custom Species List</h2>
|
||||
<select name="species[]" id="value2" multiple size="30">
|
||||
<option selected value="base">Please Select</option>
|
||||
|
||||
@@ -81,7 +81,7 @@ body::-webkit-scrollbar {
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Today</th>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<td><button type="submit" name="view" value="Today's Detections"><?php echo $todaycount['COUNT(*)'];?></button></td>
|
||||
</form>
|
||||
</tr>
|
||||
@@ -91,13 +91,13 @@ body::-webkit-scrollbar {
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Species Detected Today</th>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<td><input type="hidden" name="view" value="Recordings"><button type="submit" name="date" value="<?php echo date('Y-m-d');?>"><?php echo $speciestally['COUNT(DISTINCT(Com_Name))'];?></button></td>
|
||||
</form>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Total Number of Species</th>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<td><button type="submit" name="view" value="Species Stats"><?php echo $totalspeciestally['COUNT(DISTINCT(Com_Name))'];?></button></td>
|
||||
</form>
|
||||
</tr>
|
||||
@@ -117,7 +117,7 @@ if (file_exists('./Charts/'.$chart)) {
|
||||
<h3>Most Recent Detection: <span style="font-weight: normal;"><?php echo $mostrecent['Date']." ".$mostrecent['Time'];?></span></h3>
|
||||
<tr>
|
||||
<td>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<input type="hidden" name="view" value="Species Stats">
|
||||
<button type="submit" name="species" value="<?php echo $mostrecent['Com_Name'];?>"><?php echo $mostrecent['Com_Name'];?>: </button>
|
||||
<a href="https://wikipedia.org/wiki/<?php echo $sciname;?>" target="_blank"/><i><?php echo $mostrecent['Sci_Name'];?></i></a>
|
||||
|
||||
+10
-10
@@ -10,7 +10,7 @@ if($db == False){
|
||||
}
|
||||
|
||||
#By Date
|
||||
if(isset($_POST['bydate'])){
|
||||
if(isset($_GET['bydate'])){
|
||||
$statement = $db->prepare('SELECT DISTINCT(Date) FROM detections GROUP BY Date');
|
||||
if($statement == False){
|
||||
echo "Database is busy";
|
||||
@@ -20,8 +20,8 @@ if(isset($_POST['bydate'])){
|
||||
$view = "bydate";
|
||||
|
||||
#Specific Date
|
||||
} elseif(isset($_POST['date'])) {
|
||||
$date = $_POST['date'];
|
||||
} elseif(isset($_GET['date'])) {
|
||||
$date = $_GET['date'];
|
||||
session_start();
|
||||
$_SESSION['date'] = $date;
|
||||
$statement = $db->prepare("SELECT DISTINCT(Com_Name) FROM detections WHERE Date == \"$date\" ORDER BY Com_Name");
|
||||
@@ -33,7 +33,7 @@ if(isset($_POST['bydate'])){
|
||||
$view = "date";
|
||||
|
||||
#By Species
|
||||
} elseif(isset($_POST['byspecies'])) {
|
||||
} elseif(isset($_GET['byspecies'])) {
|
||||
$statement = $db->prepare('SELECT DISTINCT(Com_Name) FROM detections ORDER BY Com_Name');
|
||||
session_start();
|
||||
if($statement == False){
|
||||
@@ -44,8 +44,8 @@ if(isset($_POST['bydate'])){
|
||||
$view = "byspecies";
|
||||
|
||||
#Specific Species
|
||||
} elseif(isset($_POST['species'])) {
|
||||
$species = $_POST['species'];
|
||||
} elseif(isset($_GET['species'])) {
|
||||
$species = $_GET['species'];
|
||||
session_start();
|
||||
$_SESSION['species'] = $species;
|
||||
$statement = $db->prepare("SELECT * FROM detections WHERE Com_Name == \"$species\" ORDER BY Com_Name");
|
||||
@@ -75,12 +75,12 @@ if(isset($_POST['bydate'])){
|
||||
|
||||
<?php
|
||||
#If no specific species
|
||||
if(!isset($_POST['species'])){
|
||||
if(!isset($_GET['species'])){
|
||||
?>
|
||||
<div class="play">
|
||||
<table>
|
||||
<tr>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<input type="hidden" name="view" value="Recordings">
|
||||
<?php
|
||||
#By Date
|
||||
@@ -117,8 +117,8 @@ if(!isset($_POST['species'])){
|
||||
}
|
||||
|
||||
#Specific Species
|
||||
if(isset($_POST['species'])){
|
||||
$name = $_POST['species'];
|
||||
if(isset($_GET['species'])){
|
||||
$name = $_GET['species'];
|
||||
if(isset($_SESSION['date'])) {
|
||||
$date = $_SESSION['date'];
|
||||
$statement2 = $db->prepare("SELECT * FROM detections where Com_Name == \"$name\" AND Date == \"$date\" ORDER BY Time DESC");
|
||||
|
||||
@@ -3,87 +3,87 @@
|
||||
<br>
|
||||
<br>
|
||||
<div class="servicecontrols">
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<h3>Live Audio Stream</h3>
|
||||
<button type="submit" name="submit" value="sudo systemctl stop livestream.service && sudo /etc/init.d/icecast2 stop">Stop</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl restart livestream.service && sudo /etc/init.d/icecast2 restart">Restart </button>
|
||||
<button type="submit" name="submit" value="sudo systemctl disable --now livestream.service && sudo systemctl disable icecast2 && sudo /etc/init.d/icecast2 stop">Disable</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl enable icecast2 && sudo /etc/init.d/icecast2 start && sudo systemctl enable --now livestream.service">Enable</button>
|
||||
</form>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<h3>Web Terminal</h3>
|
||||
<button type="submit" name="submit" value="sudo systemctl stop web_terminal.service">Stop</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl restart web_terminal.service">Restart </button>
|
||||
<button type="submit" name="submit" value="sudo systemctl disable --now web_terminal.service">Disable</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl enable --now web_terminal.service">Enable</button>
|
||||
</form>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<h3>BirdNET Log</h3>
|
||||
<button type="submit" name="submit" value="sudo systemctl stop birdnet_log.service">Stop</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl restart birdnet_log.service">Restart </button>
|
||||
<button type="submit" name="submit" value="sudo systemctl disable --now birdnet_log.service">Disable</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl enable --now birdnet_log.service">Enable</button>
|
||||
</form>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<h3>Extraction Service</h3>
|
||||
<button type="submit" name="submit" value="sudo systemctl stop extraction.service">Stop</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl restart extraction.service">Restart </button>
|
||||
<button type="submit" name="submit" value="sudo systemctl disable --now extraction.service">Disable</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl enable --now extraction.service">Enable</button>
|
||||
</form>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<h3>BirdNET Analysis Server</h3>
|
||||
<button type="submit" name="submit" value="sudo systemctl stop birdnet_server.service">Stop</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl restart birdnet_server.service">Restart</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl disable --now birdnet_server.service">Disable</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl enable --now birdnet_server.service">Enable</button>
|
||||
</form>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<h3>BirdNET Analysis Client</h3>
|
||||
<button type="submit" name="submit" value="sudo systemctl stop birdnet_analysis.service">Stop</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl restart birdnet_analysis.service">Restart</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl disable --now birdnet_analysis.service">Disable</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl enable --now birdnet_analysis.service">Enable</button>
|
||||
</form>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<h3>Streamlit Statistics</h3>
|
||||
<button type="submit" name="submit" value="sudo systemctl stop birdnet_stats.service">Stop</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl restart birdnet_stats.service">Restart</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl disable --now birdnet_stats.service">Disable</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl enable --now birdnet_stats.service">Enable</button>
|
||||
</form>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<h3>Recording Service</h3>
|
||||
<button type="submit" name="submit" value="sudo systemctl stop birdnet_recording.service">Stop</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl restart birdnet_recording.service">Restart</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl disable --now birdnet_recording.service">Disable</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl enable --now birdnet_recording.service">Enable</button>
|
||||
</form>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<h3>Chart Viewer</h3>
|
||||
<button type="submit" name="submit" value="sudo systemctl stop chart_viewer.service">Stop</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl restart chart_viewer.service">Restart</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl disable --now chart_viewer.service">Disable</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl enable --now chart_viewer.service">Enable</button>
|
||||
</form>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<h3>Spectrogram Viewer</h3>
|
||||
<button type="submit" name="submit" value="sudo systemctl stop spectrogram_viewer.service">Stop</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl restart spectrogram_viewer.service">Restart</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl disable --now spectrogram_viewer.service">Disable</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl enable --now spectrogram_viewer.service">Enable</button>
|
||||
</form>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<h3>Pushed Notifications</h3>
|
||||
<button type="submit" name="submit" value="sudo systemctl stop pushed_notifications.service">Stop</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl restart pushed_notifications.service">Restart</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl disable --now pushed_notifications.service">Disable</button>
|
||||
<button type="submit" name="submit" value="sudo systemctl enable --now pushed_notifications.service">Enable</button>
|
||||
</form>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<button type="submit" name="submit" value="stop_core_services.sh">Stop Core Services</button>
|
||||
</form>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<button type="submit" name="submit" value="restart_services.sh" onclick="return confirm('This will take about 90 seconds.')">Restart All Services</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
+7
-7
@@ -24,8 +24,8 @@ $result2 = $statement2->execute();
|
||||
|
||||
|
||||
|
||||
if(isset($_POST['species'])){
|
||||
$selection = $_POST['species'];
|
||||
if(isset($_GET['species'])){
|
||||
$selection = $_GET['species'];
|
||||
$statement3 = $db->prepare("SELECT Com_Name, Sci_Name, COUNT(*), MAX(Confidence), File_Name, Date, Time from detections WHERE Com_Name = \"$selection\"");
|
||||
if($statement3 == False) {
|
||||
echo "Database busy";
|
||||
@@ -57,7 +57,7 @@ $comname = preg_replace('/\'/', '', $comname);
|
||||
$filename = "/By_Date/".$results['Date']."/".$comname."/".$results['File_Name'];
|
||||
?>
|
||||
<tr>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<td><input type="hidden" name="view" value="Species Stats">
|
||||
<button type="submit" name="species" value="<?php echo $results['Com_Name'];?>"><?php echo $results['Com_Name'];?></button>
|
||||
</td>
|
||||
@@ -69,12 +69,12 @@ $filename = "/By_Date/".$results['Date']."/".$comname."/".$results['File_Name'];
|
||||
</table>
|
||||
</div>
|
||||
<div class="column center">
|
||||
<?php if(!isset($_POST['species'])){
|
||||
<?php if(!isset($_GET['species'])){
|
||||
?><p class="centered">Choose a species to load images from Wikimedia Commons.</p>
|
||||
<?php
|
||||
};?>
|
||||
<?php if(isset($_POST['species'])){
|
||||
$species = $_POST['species'];
|
||||
<?php if(isset($_GET['species'])){
|
||||
$species = $_GET['species'];
|
||||
|
||||
while($results=$result3->fetchArray(SQLITE3_ASSOC)){
|
||||
$count = $results['COUNT(*)'];
|
||||
@@ -123,7 +123,7 @@ $comname = preg_replace('/\'/', '', $comname);
|
||||
$filename = "/By_Date/".$results['Date']."/".$comname."/".$results['File_Name'];
|
||||
?>
|
||||
<tr>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<td><input type="hidden" name="view" value="Species Stats">
|
||||
<button type="submit" name="species" value="<?php echo $results['Com_Name'];?>"><?php echo $results['Com_Name'];?></button><br><b>Occurrences:</b> <?php echo $results['COUNT(*)'];?><br>
|
||||
<b>Max Confidence:</b> <?php echo $results['MAX(Confidence)'];?><br>
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
<br>
|
||||
<br>
|
||||
<div class="systemcontrols">
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<button type="submit" name="submit" value="sudo reboot" onclick="return confirm('Are you sure you want to reboot?')">Reboot</button>
|
||||
</form>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<button type="submit" name="submit" value="update_birdnet.sh" onclick="return confirm('Are you sure you want to update?')">Update</button>
|
||||
</form>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<button type="submit" name="submit" value="sudo shutdown now" onclick="return confirm('Are you sure you want to shutdown?')">Shutdown</button>
|
||||
</form>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<button type="submit" name="submit" value="sudo clear_all_data.sh" onclick="return confirm('Clear ALL Data? Note that this cannot be undone and will take up to 90 seconds.')">Clear ALL data</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -3,9 +3,9 @@ ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
if(isset($_POST['display_limit'])) {
|
||||
if(is_numeric($_POST['display_limit'])) {
|
||||
$display_limit = $_POST['display_limit'] + 40;
|
||||
if(isset($_GET['display_limit'])) {
|
||||
if(is_numeric($_GET['display_limit'])) {
|
||||
$display_limit = $_GET['display_limit'] + 40;
|
||||
}
|
||||
} else {
|
||||
$display_limit = 40;
|
||||
@@ -95,14 +95,14 @@ $totalspeciestally = $result6->fetchArray(SQLITE3_ASSOC);
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $totalcount['COUNT(*)'];?></td>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<td><input type="hidden" name="view" value="Recordings"><button type="submit" name="date" value="<?php echo date('Y-m-d');?>"><?php echo $todaycount['COUNT(*)'];?></button></td>
|
||||
</form>
|
||||
<td><?php echo $hourcount['COUNT(*)'];?></td>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<td><button type="submit" name="view" value="Species Stats"><?php echo $totalspeciestally['COUNT(DISTINCT(Com_Name))'];?></button></td>
|
||||
</form>
|
||||
<form action="" method="POST">
|
||||
<form action="" method="GET">
|
||||
<td><input type="hidden" name="view" value="Recordings"><button type="submit" name="date" value="<?php echo date('Y-m-d');?>"><?php echo $todayspeciestally['COUNT(DISTINCT(Com_Name))'];?></button></td>
|
||||
</form>
|
||||
</tr>
|
||||
@@ -137,7 +137,7 @@ $sciname = preg_replace('/ /', '_', $todaytable['Sci_Name']);
|
||||
// don't show the button if there's no more detections to be displayed, we're at the end of the list
|
||||
if($iterations == $display_limit) { ?>
|
||||
<center>
|
||||
<form action="#<?php echo $display_limit; ?>" method="POST">
|
||||
<form action="#<?php echo $display_limit; ?>" method="GET">
|
||||
<input type="input" name="display_limit" value="<?php echo $display_limit; ?>" hidden>
|
||||
<button style="font-size:x-large;background:#dbffeb;padding:10px" type="submit" name="view" value="Today's Detections">Load 40 More...</button>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user