$site_name


"; } $totalcount_data = getDetectionCountAll(); if($totalcount_data['success'] == False){ echo $totalcount_data['message']; header("refresh: 0;"); } $totalcount = $totalcount_data['data']; $todaycount_data = getDetectionCountToday(); if($todaycount_data['success'] == False){ echo $todaycount_data['message']; header("refresh: 0;"); } $todaycount = $todaycount_data['data']; $hourcount_data = getDetectionCountLastHour(); if($hourcount_data['success'] == False){ echo $hourcount_data['message']; header("refresh: 0;"); } $hourcount = $hourcount_data['data']; $mostrecent_data = getMostRecentDetection(); if($mostrecent_data['success'] == False){ echo $mostrecent_data['message']; header("refresh: 0;"); } $mostrecent = $mostrecent_data['data']; $todayspeciestally_data = getSpeciesTalley(); if($todayspeciestally_data['success'] == False){ echo $todayspeciestally_data['message']; header("refresh: 0;"); } $todayspeciestally = $todayspeciestally_data['data']; $totalspeciestally_data = getAllSpeciesTalley(); if($totalspeciestally_data['success'] == False){ echo $totalspeciestally_data['message']; header("refresh: 0;"); } $totalspeciestally = $totalspeciestally_data['data']; if(isset($_GET['comname'])) { $birdName = $_GET['comname']; $birdName = str_replace("_", " ", $birdName); echo getBirdDetectionStats($birdName)['data']; die(); } // from https://stackoverflow.com/questions/2690504/php-producing-relative-date-time-from-timestamps function relativeTime($ts) { if(!ctype_digit($ts)) $ts = strtotime($ts); $diff = time() - $ts; if($diff == 0) return 'now'; elseif($diff > 0) { $day_diff = floor($diff / 86400); if($day_diff == 0) { if($diff < 60) return 'just now'; if($diff < 120) return '1 minute ago'; if($diff < 3600) return floor($diff / 60) . ' minutes ago'; if($diff < 7200) return '1 hour ago'; if($diff < 86400) return floor($diff / 3600) . ' hours ago'; } if($day_diff == 1) return 'Yesterday'; if($day_diff < 7) return $day_diff . ' days ago'; if($day_diff < 31) return ceil($day_diff / 7) . ' weeks ago'; if($day_diff < 60) return 'last month'; return date('F Y', $ts); } else { $diff = abs($diff); $day_diff = floor($diff / 86400); if($day_diff == 0) { if($diff < 120) return 'in a minute'; if($diff < 3600) return 'in ' . floor($diff / 60) . ' minutes'; if($diff < 7200) return 'in an hour'; if($diff < 86400) return 'in ' . floor($diff / 3600) . ' hours'; } if($day_diff == 1) return 'Tomorrow'; if($day_diff < 4) return date('l', $ts); if($day_diff < 7 + (7 - date('w'))) return 'next week'; if(ceil($day_diff / 7) < 4) return 'in ' . ceil($day_diff / 7) . ' weeks'; if(date('n', $ts) == date('n') + 1) return 'next month'; return date('F Y', $ts); } } if(isset($_GET['ajax_detections']) && $_GET['ajax_detections'] == "true" ) { $result0 = getTodaysDetections($_GET['display_limit'], $_GET['searchterm'], $_GET['hard_limit']); if($result0['success'] == False){ echo $result0['message']; header("refresh: 0;"); } $result0 = $result0['data']; ?> $flickr_Image_data['Com_Name_clean'], 1 => $flickr_Image_data['photos'][0]['image_url'], 2 => $flickr_Image_data['photos'][0]['photo_title'], 3 => $flickr_Image_data['photos'][0]['modal_text'], 4 => $flickr_Image_data['photos'][0]['author_link'], 5 => $flickr_Image_data['photos'][0]['license_url'] ]; } //Fill in the missing variables as they're not created at each loop anymore, getFlickrImage generates this data now as per what the orignal loop did $filename = $flickr_Image_data['filename_path']; $filename_formatted = $flickr_Image_data['filename_formatted']; $sciname = $flickr_Image_data['Sci_Name_clean']; $comname =$flickr_Image_data['Com_Name_clean']; ?>
0) { ?>


Confidence:


0) { ?>
Confidence:
No Detections For Today."; } // don't show the button if there's no more detections to be displayed, we're at the end of the list if($iterations >= 40 && isset($_GET['display_limit']) && is_numeric($_GET['display_limit'])) { ?>
Total Today Last Hour Unique Species Total Unique Species Today
BirdNET-Pi DB

Number of Detections

Total Today Last Hour Unique Species Total Unique Species Today

Today's Detections

Loading...