function ShowCorrections($badgeid) { $loc = "attendance_user.php->ShowRawScans()"; $corrections = GetSqlTable("Corrections"); RptLine(''); RptLine('Corrections applied:'); foreach ($corrections as $c) { if ($c["BadgeID"] == '*' || strtolower($badgeid) == strtolower($c["BadgeID"])) { echo '<div style="display: block; hieght: 20px; ">'; echo '<div style="float: left; width: 100px;">'; echo $c["Action"]; echo '</div>'; echo '<div style="float: left; width: 150px;">'; echo $c["ScanTime"]; echo '</div>'; echo '<div style="float: left; width: 350px; margin-left: 10px; ">'; echo $c["Reason"]; echo '</div>'; echo '</div>'; echo '<div style="clear: both;"></div>' . "\n"; } } }
function EventCounts($lastday = "") { $tstop = time(); if (!empty($lastday)) { $tstop = strtotime($lastday); } $events = GetSqlTable("EventTimes", "ORDER BY StartTime"); $nreg = 0; $nopt = 0; $nmad = 0; foreach ($events as $e) { $t0 = strtotime($e["StartTime"]); if ($t0 > $tstop) { break; } if (strtolower($e["Type"]) == "regular") { $nreg++; } if (strtolower($e["Type"]) == "optional") { $nopt++; } if (strtolower($e["Type"]) == "manditory") { $nmad++; } } return array($nmad, $nreg, $nopt); }