Created development branch for release 1.5.0

This commit is contained in:
2026-02-24 21:18:25 -05:00
parent 7b134c1010
commit 0f84d3bcbc
24 changed files with 1152 additions and 595 deletions

View File

@@ -2,7 +2,7 @@
/*
writeups.php
OpenDRS Online Discrepancy Reporting System
Copyright (C) 2026 Rod Wright
Copyright (C) 2025 Rod Wright
SPDX-License-Identifier: GPL-2.0
*/
@@ -130,7 +130,7 @@ function viewtable($start_date,$end_date,$print,$drs_db,$viewtype="summary",$rol
}
$writeup=mysqli_query($drs_db,"select * from writeups where report_date between \"$start_date\" and \"$end_date\" order by report_date desc,report_time desc");
if (mysqli_num_rows($writeup)) {
$as_of=date("H:i l");
$now=date("H:i l");
if ($viewtype == "summary") {
if ($role) {
$selcol="<th style=\"width:1%;\">Sel</th>";
@@ -138,7 +138,7 @@ function viewtable($start_date,$end_date,$print,$drs_db,$viewtype="summary",$rol
$selcol="";
}
echo "
<font color=\"red\">As of $as_of</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font size=\"-1\">Newest at top</font><br>
<font color=\"red\">As of $now</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font size=\"-1\">Newest at top</font><br>
<table border=\"1\" cellpadding=\"5\" style=\"width:100%;\">
<tr>
$selcol
@@ -231,7 +231,7 @@ function viewtable($start_date,$end_date,$print,$drs_db,$viewtype="summary",$rol
echo "</table>\n";
} elseif ($viewtype == "detail") {
echo "
<font color=\"red\">As of $as_of</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font size=\"-1\">Newest at top</font><br><br>
<font color=\"red\">As of $now</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font size=\"-1\">Newest at top</font><br><br>
<table border=\"0\"><tr><td>
";
while ($tablerow = mysqli_fetch_assoc($writeup)) {
@@ -272,6 +272,7 @@ function viewtable($start_date,$end_date,$print,$drs_db,$viewtype="summary",$rol
}
// use default date values if not supplied
$today = date("Y-m-d");
if (!isset($start_date)) $start_date=$today;
if (!isset($end_date)) $end_date=$today;
if (isset($showtoday)) {