From b2c80f0db76327b42eacb97b26cfdb80bd9ce6dd Mon Sep 17 00:00:00 2001 From: ehpersonal38 <103586016+ehpersonal38@users.noreply.github.com> Date: Sun, 17 Apr 2022 14:41:58 -0400 Subject: [PATCH 1/2] Adding links to recordings This should add a link to all the recordings, so you can copy and share with a friend, or save somewhere. There's better ways some of this can be done, but it works for now. (please test this! not sure if I copied all the right files to git) --- homepage/index.php | 8 +++++++ homepage/style.css | 11 +++++++++ scripts/overview.php | 6 ++--- scripts/play.php | 42 +++++++++++++++++++++++++++++++++-- scripts/stats.php | 24 ++++++++++---------- scripts/todays_detections.php | 7 +++--- 6 files changed, 78 insertions(+), 20 deletions(-) diff --git a/homepage/index.php b/homepage/index.php index c989aa9..93dd966 100644 --- a/homepage/index.php +++ b/homepage/index.php @@ -54,6 +54,14 @@ if(isset($_GET['stream'])){
| + |
| $name | diff --git a/scripts/stats.php b/scripts/stats.php index deb6161..9a0724c 100644 --- a/scripts/stats.php +++ b/scripts/stats.php @@ -5,20 +5,20 @@ error_reporting(E_ALL); $db = new SQLite3('./scripts/birds.db', SQLITE3_OPEN_CREATE | SQLITE3_OPEN_READWRITE); if($db == False) { - echo "Database busy"; - header("refresh: 0;"); + echo "Database busy"; + header("refresh: 0;"); } $statement = $db->prepare('SELECT Date, Time, File_Name, Com_Name, COUNT(*), MAX(Confidence) FROM detections GROUP BY Com_Name ORDER BY COUNT(*) DESC'); if($statement == False) { - echo "Database busy"; - header("refresh: 0;"); + echo "Database busy"; + header("refresh: 0;"); } $result = $statement->execute(); $statement2 = $db->prepare('SELECT Date, Time, File_Name, Com_Name, COUNT(*), MAX(Confidence) FROM detections GROUP BY Com_Name ORDER BY Com_Name'); if($statement == False) { - echo "Database busy"; - header("refresh: 0;"); + echo "Database busy"; + header("refresh: 0;"); } $result2 = $statement2->execute(); @@ -28,8 +28,8 @@ 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"; - header("refresh: 0;"); + echo "Database busy"; + header("refresh: 0;"); } $result3 = $statement3->execute(); } @@ -89,8 +89,8 @@ while($results=$result3->fetchArray(SQLITE3_ASSOC)){ $linkname = preg_replace('/_/', '+', $dbsciname); $filename = "/By_Date/".$date."/".$comname."/".$results['File_Name']; echo str_pad("
|---|
| $sciname +
|