Updated to use fix_date and fix_time functions

This commit is contained in:
2026-02-19 21:21:50 -05:00
parent 513017d3cb
commit d41519ba91
2 changed files with 16 additions and 4 deletions

View File

@@ -135,6 +135,9 @@ if ($mfadd) {
if ($mfsubmit) {
// add the entry if submit is pressed
if ($mfmalfunction && ($uid || ($partnum && $sernum))) {
// sanitize and fix blank date and time
$mfdate = fix_date($mfdate);
$mftime = fix_time($mftime);
// determine whether supplied date is future or past
$datediff = mysqli_fetch_row(mysqli_query($db, "select datediff(\"$mfdate\",CURRENT_DATE)"));
// if future, set time to 00:00:01, if past, set to 23:59:59
@@ -236,6 +239,9 @@ if ($mfdelete && $mfauthorized) {
if ($actionadd) {
if ($actionaddsubmit) {
if ($action) {
// sanitize and fix blank date and time
$actiondate = fix_date($actiondate);
$actiontime = fix_time($actiontime);
// determine whether supplied date is future or past
$datediff = mysqli_fetch_row(mysqli_query($db, "select datediff(\"$actiondate\",CURRENT_DATE)"));
// if future, set time to 00:00:01, if past, set to 23:59:59
@@ -260,6 +266,9 @@ if ($actionadd) {
if ($actionedit) {
if ($actioneditsubmit && $actionauthorized) {
// update the action
// sanitize and fix blank date and time
$actiondate = fix_date($actiondate);
$actiontime = fix_time($actiontime);
// remove cruft from action text
$action = htmlentities($action);
$action = addslashes($action);