Incorporate changes made for old version 5.2.4.3

This commit is contained in:
2026-02-10 15:02:40 -05:00
parent 6b720a6163
commit 4341c87daa
14 changed files with 228 additions and 229 deletions

View File

@@ -58,20 +58,19 @@ framework("begin","$logname Search","Search",$print);
// ******** begin database manipulation ********
// get the date range of lognotes
$todaysdate = mysqli_fetch_row(mysqli_query($db,"select current_date"))[0];
$logdateqry=mysqli_query($db,"select min(date), max(date) from lognotes");
$logdateresults=mysqli_fetch_row($logdateqry);
$logmindate=$logdateresults[0];
if ($logmindate == "") $logmindate = $todaysdate;
if ($logmindate == "") $logmindate = $today;
$logmaxdate=$logdateresults[1];
if ($logmaxdate == "") $logmaxdate = $todaysdate;
if ($logmaxdate == "") $logmaxdate = $today;
// get the date range of maintenance forms
$mfdateqry=mysqli_query($db,"select min(mfdate), max(mfdate) from maintforms");
$mfdateresults=mysqli_fetch_row($mfdateqry);
$mfmindate=$mfdateresults[0];
if ($mfmindate == "") $mfmindate = $todaysdate;
if ($mfmindate == "") $mfmindate = $today;
$mfmaxdate=$mfdateresults[1];
if ($mfmaxdate == "") $mfmaxdate = $todaysdate;
if ($mfmaxdate == "") $mfmaxdate = $today;
// determine entire date range
$mindate=min($logmindate, $mfmindate);
$maxdate=max($logmaxdate, $mfmaxdate);