diff --git a/scripts/play.css b/scripts/play.css new file mode 100644 index 0000000..7e8560e --- /dev/null +++ b/scripts/play.css @@ -0,0 +1,91 @@ +/* style sheet */ +* { + font-family: 'Arial', 'Gill Sans', 'Gill Sans MT', + ' Calibri', 'Trebuchet MS', 'sans-serif'; + box-sizing: border-box; +} + +a { + text-decoration:none; +} + +body { + background-color: rgb(119, 196, 135); +} + +.column { + display:block; + float:top; + width:33%; + margin-left:0; + margin-right:auto; +} + +table { + background-color: rgb(219, 255, 235); + margin: 0 auto; + font-size: large; + border-collapse: collapse; + border-spacing: 0; + width: 100%; + border: 1px solid black; +} + +h1 { + text-align: center; + color: black; + font-size: xx-large; +} + +h2 { + margin-left: -150px; + text-align: center; + color: black; + font-size: large; +} + +h3 { + text-align: center; + color: black; + font-size: large; +} + +td { + background-color: rgb(219, 255, 235); + font-weight: lighter; + border: 1px solid black; + padding: 10px; + text-align: center; +} + +th { + background-color: rgb(219, 255, 235); + font-weight: bold; + border: 1px solid black; + padding: 10px; + text-align: center; +} + +button { + background-color: transparent; + font-size: large; + border:none; + cursor:pointer; +} + +@media screen and (max-width: 1000px) { + h2 { + margin-left: 0; + text-align: center; + color: black; + font-size: large; + } + + .column { + width: 80%; + } + +} +body::-webkit-scrollbar { + display:none +} diff --git a/scripts/play.php b/scripts/play.php new file mode 100644 index 0000000..33b5552 --- /dev/null +++ b/scripts/play.php @@ -0,0 +1,87 @@ +prepare('SELECT DISTINCT(Com_Name) from detections ORDER BY Com_Name'); +if($statement == False){ + echo "Database is busy"; + header("refresh: 0;"); +} +$result = $statement->execute(); + +?> + + + + + + + + + +fetchArray(SQLITE3_ASSOC)) +{ + $comname = preg_replace('/ /', '_', $results['Com_Name']); + $comlink = "/By_Date/".date('Y-m-d')."/".$comname; +?> +
+ + + + + + +
+ +
+
+ +prepare("SELECT * FROM detections where Com_Name == \"$name\" ORDER BY Date DESC, Time DESC"); + if($statement2 == False){ + echo "Database is busy"; + header("refresh: 0;"); + } + $result2 = $statement2->execute(); + echo " + + + + + + + "; + while($results=$result2->fetchArray(SQLITE3_ASSOC)) + { + $comname = preg_replace('/ /', '_', $results['Com_Name']); + $date = $results['Date']; + $comlink = "/By_Date/".$date."/".$comname."/".$results['File_Name']; + $sciname = preg_replace('/ /', '_', $results['Sci_Name']); + $sci_name = $results['Sci_Name']; + $time = $results['Time']; + $confidence = $results['Confidence']; + echo " + + + + + + + "; + + }echo "
DateTimeScientific NameCommon NameConfidence
$date$time$sci_name
+ $confidence
";}?> + + diff --git a/scripts/stats.php b/scripts/stats.php index 1c684c8..19aa494 100644 --- a/scripts/stats.php +++ b/scripts/stats.php @@ -150,7 +150,9 @@ select {
-

Summary

+Choose a species below to show statistics.

"; +};?> @@ -175,31 +177,13 @@ $sciname = preg_replace('/ /', '_', $results['Sci_Name']); ?>
Common Name
-
-
-

Species Stats

- - -
$species + $str = "
+

$species

+

Species Stats

- @@ -220,7 +204,6 @@ while($results=$result3->fetchArray(SQLITE3_ASSOC)){ $imagelink = shell_exec("/home/pi/BirdNET-Pi/scripts/get_image.sh $dbsciname"); $imagecitation = shell_exec("/home/pi/BirdNET-Pi/scripts/get_citation.sh $dbsciname"); $str= " -
Common Name Scientific Name Occurrences Highest Confidence Score
$name $sciname $count $maxconf