I like this so far
This commit is contained in:
@@ -199,12 +199,9 @@ foreach($formats as $format){
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<h3>Passwords</h3>
|
||||
<h3>BirdNET-Pi Password</h3>
|
||||
<label for="caddy_pwd">Webpage: </label>
|
||||
<input name="caddy_pwd" type="text" value="<?php print($newconfig['CADDY_PWD']);?>" /><br>
|
||||
<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>
|
||||
<input name="ice_pwd" type="text" value="<?php print($newconfig['ICE_PWD']);?>" required/><br>
|
||||
<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>
|
||||
<label for="birdnetpi_url">BirdNET-Pi URL: </label>
|
||||
|
||||
@@ -64,7 +64,7 @@ for h in "${SCAN_DIRS[@]}";do
|
||||
| awk -F\; '{print $5}')""
|
||||
|
||||
#CONFIDENCE_SCORE="${CONFIDENCE:0:2}%"
|
||||
CONFIDENCE_SCORE="$(printf %.0f $(echo "scale=2; ${CONFIDENCE} * 100" | bc))"
|
||||
CONFIDENCE_SCORE="$(printf %.0f "$(echo "scale=2; ${CONFIDENCE} * 100" | bc)")"
|
||||
NEWFILE="${COMMON_NAME// /_}-${CONFIDENCE_SCORE}-${OLDFILE//.wav/.${AUDIOFMT}}"
|
||||
echo "NEWFILE=$NEWFILE"
|
||||
NEWSPECIES_BYDATE="${EXTRACTED}/By_Date/${DATE}/${COMMON_NAME// /_}"
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ $totalcount = $result1->fetchArray(SQLITE3_ASSOC);
|
||||
<body>
|
||||
<form action="" method="POST">
|
||||
<input type="date" name="date" value="<?php echo $theDate;?>">
|
||||
<button type="submit" name="view" value="History">Submit Date</button>
|
||||
<button type="submit" name="view" value="Daily Charts">Submit Date</button>
|
||||
</form>
|
||||
<div>
|
||||
<table>
|
||||
|
||||
@@ -108,18 +108,18 @@ $speciestally = $result5->fetchArray(SQLITE3_ASSOC);
|
||||
<button type="submit" name="species" value="<?php echo $mostrecent['Com_Name'];?>"><?php echo $mostrecent['Com_Name'];?></button>
|
||||
</td>
|
||||
</form>
|
||||
<td><audio controls><source src="<?php echo $filename;?>"></audio></td>
|
||||
<td class="spectrogram" ><video controls poster="<?php echo $filename.".png";?>"><source src="<?php echo $filename;?>"></video></td>
|
||||
<td><?php echo $mostrecent['Confidence'];?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
if (file_exists('/home/pi/BirdSongs/Extracted/Charts/'.$chart)) {
|
||||
echo "<img src=\"/Charts/$chart?nocache=time()\">";
|
||||
echo "<img class=\"centered\" src=\"/Charts/$chart?nocache=time()\">";
|
||||
} else {
|
||||
echo "<p>No Detections For Today</p>";
|
||||
}
|
||||
?>
|
||||
<h2>Currently Analyzing</h2>
|
||||
<img src='/spectrogram.png?nocache=<?php echo time();?>' >
|
||||
<h3>Currently Analyzing</h3>
|
||||
<img class="centered" style="width:100%;" src='/spectrogram.png?nocache=<?php echo time();?>' >
|
||||
</html>
|
||||
|
||||
+2
-2
@@ -93,7 +93,7 @@ while($results=$result->fetchArray(SQLITE3_ASSOC))
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Most confident recording: </th>
|
||||
<td><audio controls><source src=\"$filename\"></audio></td>
|
||||
<td class=\"spectrogram\"><video controls poster=\"$filename.png\"><source src=\"$filename\"></video></td>
|
||||
</tr></table>";
|
||||
};};?>
|
||||
</td>
|
||||
@@ -129,7 +129,7 @@ while($results=$result->fetchArray(SQLITE3_ASSOC))
|
||||
$confidence = $results['Confidence'];
|
||||
echo "<tr>
|
||||
<td>$date $time</td>
|
||||
<td><audio controls><source src=\"$filename\"></audio></td>
|
||||
<td class=\"spectrogram\"><video controls poster=\"$filename.png\"><source src=\"$filename\"></video></td>
|
||||
<td><a href=\"https://wikipedia.org/wiki/$sciname\" target=\"top\">$sci_name</a></td>
|
||||
<form action=\"\" method=\"POST\">
|
||||
<td><input type=\"hidden\" name=\"view\" value=\"Species Stats\"><button type=\"submit\" name=\"species\" value=\"$name\">$name</button>
|
||||
|
||||
@@ -6,6 +6,6 @@ if (file_exists('/home/pi/BirdNET-Pi/thisrun.txt')) {
|
||||
}
|
||||
$refresh = $config['RECORDING_LENGTH'];
|
||||
$time = time();
|
||||
echo "<img src=\"/spectrogram.png?nocache=$time\">";
|
||||
echo "<img style=\"width:100%;height:100%\" src=\"/spectrogram.png?nocache=$time\">";
|
||||
header("Refresh: $refresh;");
|
||||
?>
|
||||
|
||||
+5
-7
@@ -41,7 +41,7 @@ if(isset($_POST['species'])){
|
||||
<div class="row">
|
||||
<div class="column first">
|
||||
<?php if(!isset($_POST['species'])){
|
||||
echo "<p>Choose a species below to show statistics.</p>";
|
||||
echo "<p style=\"text-align:center\">Choose a species below to load images from Wikimedia Commons.</p>";
|
||||
};?>
|
||||
<table>
|
||||
<tr>
|
||||
@@ -65,7 +65,7 @@ $filename = "/By_Date/".$results['Date']."/".$comname."/".$results['File_Name'];
|
||||
</form>
|
||||
<td><?php echo $results['COUNT(*)'];?></td>
|
||||
<td><?php echo $results['MAX(Confidence)'];?></td>
|
||||
<td><audio controls><source src="<?php echo $filename;?>"></audio></td>
|
||||
<td class="spectrogram"><video controls poster="<?php echo $filename.".png";?>"><source src="<?php echo $filename;?>" type="audio/mp3"></video></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
@@ -104,11 +104,11 @@ while($results=$result3->fetchArray(SQLITE3_ASSOC)){
|
||||
<td><a href=\"https://wikipedia.org/wiki/$dbsciname\" target=\"top\"/>$sciname</a></td>
|
||||
<td>$count</td>
|
||||
<td>$maxconf</td>
|
||||
<td>$date $time<br><audio controls><source src=\"$filename\"></audio></td>
|
||||
<td class=\"spectrogram\">$date $time<br><video controls poster=\"$filename.png\"><source src=\"$filename\"></video></td>
|
||||
<td><a href=\"https://allaboutbirds.org/guide/$comname\" target=\"top\"/>All About Birds</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>Loading Images from https://commons.wikimedia.org/w/index.php?search=$linkname&title=Special:MediaSearch&go=Go&type=image</p>", '6096');
|
||||
<p>Loading Images from <a href=\"https://commons.wikimedia.org/w/index.php?search=$linkname&title=Special:MediaSearch&go=Go&type=image\" target=\"_blank\">Wikimedia Commons</a></p>", '6096');
|
||||
|
||||
ob_flush();
|
||||
flush();
|
||||
@@ -118,9 +118,7 @@ while($results=$result3->fetchArray(SQLITE3_ASSOC)){
|
||||
foreach ($matches as $val) {
|
||||
$pos = strpos($val[2],"/");
|
||||
$link = substr($val[2],1,-1);
|
||||
if($pos == 1)
|
||||
echo "http://domain.com" . $link;
|
||||
elseif(strpos($link, "upload") == true)
|
||||
if($pos !== 1 && strpos($link, "upload") == true && strpos($link, "CentralAutoLogin") == false)
|
||||
echo "<img src=\"$link\">";
|
||||
}
|
||||
}}
|
||||
|
||||
+1
-1
@@ -109,7 +109,7 @@ $sciname = preg_replace('/ /', '_', $todaytable['Sci_Name']);
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $todaytable['Time'];?></td>
|
||||
<td><audio controls><source src="<?php echo $filename;?>"></audio></td>
|
||||
<td class="spectrogram"><video controls poster="<?php echo $filename.".png";?>"><source src="<?php echo $filename;?>"></video></td>
|
||||
<td><a class="a2" href="https://wikipedia.org/wiki/<?php echo $sciname;?>" target="top"><?php echo $todaytable['Sci_Name'];?></a></td>
|
||||
<td><a class="a2" href="https://allaboutbirds.org/guide/<?php echo $comname;?>" target="top"><?php echo $todaytable['Com_Name'];?></a></td>
|
||||
<td><?php echo $todaytable['Confidence'];?></td>
|
||||
|
||||
Reference in New Issue
Block a user