diff --git a/homepage/index.php b/homepage/index.php index 211bef1..0cfd58b 100644 --- a/homepage/index.php +++ b/homepage/index.php @@ -48,8 +48,8 @@ if(isset($_GET['stream'])){ if(isset($_GET['filename'])) { $filename = $_GET['filename']; echo " -"; +"; } else { echo " -"; +"; } diff --git a/homepage/views.php b/homepage/views.php index 81d744d..c1d9211 100644 --- a/homepage/views.php +++ b/homepage/views.php @@ -120,13 +120,13 @@ if(isset($_GET['view'])){ include('scripts/service_controls.php'); } if($_GET['view'] == "Spectrogram"){include('spectrogram.php');} - if($_GET['view'] == "View Log"){echo "";} + if($_GET['view'] == "View Log"){echo "";} if($_GET['view'] == "Overview"){include('overview.php');} if($_GET['view'] == "Todays Detections"){include('todays_detections.php');} if($_GET['view'] == "Kiosk"){$kiosk = true;include('todays_detections.php');} if($_GET['view'] == "Species Stats"){include('stats.php');} if($_GET['view'] == "Weekly Report"){include('weekly_report.php');} - if($_GET['view'] == "Streamlit"){echo "";} + if($_GET['view'] == "Streamlit"){echo "";} if($_GET['view'] == "Daily Charts"){include('history.php');} if($_GET['view'] == "Tools"){ ensure_authenticated(); @@ -240,7 +240,7 @@ if(isset($_GET['view'])){ } if($_GET['view'] == "Webterm"){ ensure_authenticated('You cannot access the web terminal'); - echo ""; + echo ""; } } elseif(isset($_GET['submit'])) { ensure_authenticated(); diff --git a/scripts/overview.php b/scripts/overview.php index 1ce8896..017787f 100644 --- a/scripts/overview.php +++ b/scripts/overview.php @@ -68,10 +68,10 @@ if(isset($_GET['ajax_detections']) && $_GET['ajax_detections'] == "true" && isse $comname = preg_replace('/ /', '_', $mostrecent['Com_Name']); $sciname = preg_replace('/ /', '_', $mostrecent['Sci_Name']); $comname = preg_replace('/\'/', '', $comname); - $filename = "/By_Date/".$mostrecent['Date']."/".$comname."/".$mostrecent['File_Name']; + $filename = "By_Date/".$mostrecent['Date']."/".$comname."/".$mostrecent['File_Name']; // check to make sure the image actually exists, sometimes it takes a minute to be created\ - if(file_exists($home."/BirdSongs/Extracted".$filename.".png")){ + if(file_exists($home."/BirdSongs/Extracted/".$filename.".png")){ if($_GET['previous_detection_identifier'] == $filename) { die(); } if($_GET['only_name'] == "true") { echo $comname.",".$filename;die(); } @@ -272,7 +272,7 @@ if($dividedrefresh < 1) { } $time = time(); if (file_exists('./Charts/'.$chart)) { - echo ""; + echo ""; } ?> @@ -286,7 +286,7 @@ if (file_exists('./Charts/'.$chart)) { "; +echo ""; ?> @@ -328,7 +328,7 @@ function refreshTopTen() { const xhttp = new XMLHttpRequest(); xhttp.onload = function() { if(this.responseText.length > 0 && !this.responseText.includes("Database is busy") && !this.responseText.includes("No Detections") || previous_detection_identifier == undefined) { - document.getElementById("chart").src = "/Charts/"+this.responseText+"?nocache="+Date.now(); + document.getElementById("chart").src = "Charts/"+this.responseText+"?nocache="+Date.now(); } } xhttp.open("GET", "overview.php?fetch_chart_string=true", true); @@ -378,7 +378,7 @@ function refreshCustomImage(){ } function startAutoRefresh() { i_fn1 = window.setInterval(function(){ - document.getElementById("spectrogramimage").src = "/spectrogram.png?nocache="+Date.now(); + document.getElementById("spectrogramimage").src = "spectrogram.png?nocache="+Date.now(); }, *1000); i_fn2 = window.setInterval(refreshDetection, *1000); if (customImage) i_fn3 = window.setInterval(refreshCustomImage, 1000); diff --git a/scripts/spectrogram.php b/scripts/spectrogram.php index 19a1e9d..611e8f6 100644 --- a/scripts/spectrogram.php +++ b/scripts/spectrogram.php @@ -139,7 +139,7 @@ window.onload = function(){ ?> // every $refresh seconds, this loop will run and refresh the spectrogram image window.setInterval(function(){ - document.getElementById("spectrogramimage").src = "/spectrogram.png?nocache="+Date.now(); + document.getElementById("spectrogramimage").src = "spectrogram.png?nocache="+Date.now(); }, *1000); } else { document.getElementById("spectrogramimage").remove(); @@ -274,7 +274,7 @@ function toggleFreqshift(state) { // Create the XMLHttpRequest object. const xhr = new XMLHttpRequest(); // Initialize the request - xhr.open("GET", './views.php?activate_freqshift_in_livestream=' + state + '&view=Advanced&submit=advanced'); + xhr.open("GET", 'views.php?activate_freqshift_in_livestream=' + state + '&view=Advanced&submit=advanced'); // Send the request xhr.send(); // Fired once the request completes successfully @@ -289,7 +289,7 @@ function toggleFreqshift(state) { setTimeout(function () { console.log("Restarting connection with livestream"); audio_player.pause(); - audio_player.setAttribute('src', '/stream'); + audio_player.setAttribute('src', 'stream'); audio_player.load(); audio_player.play(); @@ -405,7 +405,7 @@ h1 { } - +
- +

Loading...

@@ -495,7 +495,7 @@ if (typeof (rtsp_stream_select) !== 'undefined' && rtsp_stream_select !== null) // Create the XMLHttpRequest object. const xhr = new XMLHttpRequest(); // Initialize the request - xhr.open("GET", './views.php?rtsp_stream_to_livestream=' + this.value + '&view=Advanced&submit=advanced'); + xhr.open("GET", 'views.php?rtsp_stream_to_livestream=' + this.value + '&view=Advanced&submit=advanced'); // Send the request xhr.send(); // Fired once the request completes successfully @@ -508,7 +508,7 @@ if (typeof (rtsp_stream_select) !== 'undefined' && rtsp_stream_select !== null) //Wait 5 seconds before restarting the stream setTimeout(function () { audio_player.pause(); - audio_player.setAttribute('src', '/stream'); + audio_player.setAttribute('src', 'stream'); audio_player.load(); audio_player.play();