Skip to content

Commit

Permalink
Update overview.php
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbelgium authored Nov 22, 2024
1 parent 8c3552d commit b475255
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/overview.php
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ function setModalText(iter, title, text, authorlink, photolink, licenseurl) {
<?php
$statement = $db->prepare("
SELECT d_today.Com_Name, d_today.Sci_Name, d_today.Date, d_today.Time, d_today.Confidence, d_today.File_Name, MAX(d_today.Confidence) as MaxConfidence,
COUNT(d_today.Com_Name) as OccurrenceCount,
(SELECT MAX(Date) FROM detections d_prev WHERE d_prev.Com_Name = d_today.Com_Name AND d_prev.Date < DATE('now', 'localtime')) as LastSeenDate
FROM detections d_today
WHERE d_today.Date = DATE('now', 'localtime')
Expand Down Expand Up @@ -408,6 +409,9 @@ function display_species($species_list, $title, $show_last_seen=false) {
} else {
$last_seen_text = $todaytable['Time'];
}

// Get the occurrence count for this species
$occurrence_count = $todaytable['OccurrenceCount'];
?>
<tr class="relative" id="<?php echo $iterations; ?>">
<td><?php echo $last_seen_text; ?><br></td>
Expand All @@ -427,7 +431,7 @@ function display_species($species_list, $title, $show_last_seen=false) {
<a target="_blank" href="index.php?filename=<?php echo $todaytable['File_Name']; ?>"><img style="height: 1em;cursor:pointer;float:unset;display:inline" class="copyimage-mobile" title="Open in new tab" width="16" src="images/copy.png"></a>
</i><br></form></div>
</td>
<td><b>Confidence:</b> <?php echo round($todaytable['Confidence'] * 100 ) . '%'; ?><br></td>
<td><b>Confidence:</b> <?php echo round($todaytable['Confidence'] * 100 ) . '%'; ?><br><?php echo "{$todaytable['Time']} ({$occurrence_count}x)"; ?><br></td>
</tr>
<?php endforeach; ?>
</table>
Expand Down

0 comments on commit b475255

Please sign in to comment.