if ($rowSlots["CurS1"] > 0 && $lastLap < 0) { $lastLap = "<span class='green'>" . $lastLap . "</span>"; } if ($rowSlots["CurS2"] > 0 && $lastLap > 0) { $lastLap = "<span class='red'>+" . $lastLap . "</span>"; } if ($rowSlots["CurS2"] > 0 && $lastLap < 0) { $lastLap = "<span class='green'>" . $lastLap . "</span>"; } // -- format best lap $bestLap = formatLapTime($rowSlots["BestLap"]); if ($rowSlots["BestLap"] <= 0) { $bestLap = "-"; } if ($rowSlots["BestLap"] > 0 && $rowSlots["BestLap"] <= $siTopLap) { $bestLap = "<span class='toptime'>" . formatLapTime($rowSlots["BestLap"]) . "</span>"; } if ($rowSlots["BestLap"] > 0 && $rowSlots["CurS1"] < 0 && $rowSlots["CurS2"] < 0 && $rowSlots["LastLap"] > 0 && $rowSlots["InPits"] == 0 && $rowSlots["FinishStatus"] == 0) { $bestLap = $rowSlots["LastLap"] - $siTopLap; if ($bestLap == 0) { $bestLap = number_format($bestLap, 3); } if ($bestLap > 0) { $bestLap = "<span class='red'>+" . number_format($bestLap, 3) . "</span>"; } if ($bestLap < 0) { $bestLap = "<span class='green'>" . number_format($bestLap, 3) . "</span>"; } } // -- format Status: pit lane $Status = "<span class='indicator indicator-running'>R</span>";
case $class4RealName: $ClassImg = '<img src="' . $class4MarqueeImg . '" alt="' . $class4DisplayName . '">'; $ClassPos = ' (<span class="Class4">' . $cpClass4 . '.</span>)'; $cpClass4 += 1; break; } $Gap = ' (<span class="Lead">Lead:</span> \\+' . $slotGapTime . ')'; if ($slotGapTime == 0) { $Gap = ' (<span class="Lead">Lead:</span> \\+' . $slotGapLaps . ' L)'; } $Interval = ' (<span class="Next">Next:</span> \\+' . $slotIntTime . ')'; if ($slotIntTime == 0) { $Interval = ' (<span class="Next">Next:</span> \\+' . $slotIntLaps . ' L)'; } if ($siSessionName != "Race") { $Gap = ' (<span class="Best">Best:</span> ' . formatLapTime($slotBestLap) . ')'; if ($slotBestLap > 0) { $gapBest = number_format($slotBestLap - $bestLap, 3); } else { $Gap = ' (<span class="Best">Best:</span> No Time)'; $gapBest = '0.000'; } $Interval = ' (<span class="Gap">Gap:</span> \\+' . $gapBest . ')'; } $inPits = ''; if ($slotInPits == 1) { $inPits = ' (<span class="InPits">PIT</span>)'; } $finishStatus = ''; if ($slotFinishStatus == 2) { $finishStatus = ' (<span class="DNF">DNF</span>)';
$LapTime = "<span style='color:" . $class4Color . ";'>" . formatLapTime($Row["LapTime"]) . "</span>"; break; default: $VehicleClass = "<span class='classUC'>" . $Row["VehicleClass"] . "</span>"; $LapTime = "<span class='classUC'>" . formatLapTime($Row["LapTime"]) . "</span>"; break; } $InPits = "-"; if ($Row["InPits"] == 1) { $InPits = "<span class='blue'>PIT</span>"; } $trClass = "'bg0'"; if ($i % 2 == 0) { $trClass = "'bg1'"; } echo "<tr class=" . $trClass . "><td class='center'>" . $Row["LapNo"] . "</td>" . "<td>" . $Row["DriverName"] . "</td>" . "<td class='center'>" . $VehicleClass . "</td>" . "<td>" . $Row["Vehicle"] . "</td>" . "<td class='righttime'>" . formatLapTime($Row["Sec1"]) . "</td>" . "<td class='righttime'>" . formatLapTime($Row["Sec2"]) . "</td>" . "<td class='righttime'>" . formatLapTime($Row["Sec3"]) . "</td>" . "<td class='righttime'>" . $LapTime . "</td>" . "<td class='center'>" . $InPits . "</td>" . "<td>" . $Row["LastUpdate"] . "</td>" . "</tr>\n"; $i++; } echo "</table>\n"; echo "</fieldset>\n"; } else { echo "<div class='break12'></div>\n"; echo "<div class='red'>No records found.</div>\n"; } $ResultLaps->free(); } $mySQLiConn->close(); } else { echo $mySQLiConnError; } include "inc.copyright.php";
if ($Row["TimedLaps"] < $admitLaps) { $trClass = "'bg2'"; } } if (isset($admitTime) && $admitTime > 0) { if (isset($admitTimePerClass) && $admitTimePerClass == 1) { if ($Row["LapTime"] > $ClassBestLap * $admitTime) { $trClass = "'bg3'"; } } else { if ($Row["LapTime"] > $AbsBestLap * $admitTime) { $trClass = "'bg3'"; } } } echo "<tr class=" . $trClass . ">" . $tdTrackName . "<td class='center'>" . $HotlapRank . "</td>" . "<td>" . $Row["DriverName"] . "</td>" . "<td class='center'>" . $ClassName . "</td>" . "<td>" . $Row["Vehicle"] . "</td>" . "<td class='center'>" . $Row["TimedLaps"] . "</td>" . "<td class='righttime'>" . formatLapTime($Row["Sec1"]) . "</td>" . "<td class='righttime'>" . formatLapTime($Row["Sec2"]) . "</td>" . "<td class='righttime'>" . formatLapTime($Row["Sec3"]) . "</td>" . "<td class='righttime'>" . $LapTime . "</td>" . "<td class='right'>" . $GapToBestLap . "</td>" . "<td class='right'>" . $GapToNextLap . "</td>" . "<td class='center'>" . $SessionName . "</td>" . "<td>" . $Row["LastUpdate"] . "</td>" . "</tr>\n"; $HotlapRank++; $PrevTrackName = $Row["TrackName"]; $PrevLapTime = $Row["LapTime"]; } echo "</table>\n"; echo "</fieldset>\n"; echo "<input type='hidden' name='PreviousTrackName' value='" . $PrevTrackNameSelected . "' >\n"; echo "</form>\n"; } else { echo "<div class='break12'></div>\n"; echo "<div class='red'>No records found.</div>\n"; } $ResultHotlaps->free(); } $mySQLiConn->close();