$siRaining = "-"; $siWetOnTrack = "-"; $siTrackLength = "-"; } if ($siInGameStart >= 0 && $siSessionStart != "0") { $inGameTime = $siInGameStart + $siSessionTime / 60; if ($inGameTime >= 1439) { $inGameTime -= 1439; } $spanInGameTime = "<span class='gray'> (" . formatInGameTime($inGameTime) . ")</span>"; } else { $spanInGameTime = ""; } $MonitorData .= "<div class='container-fluid'><header class='row'>" . "<div class='col-xs-12 col-sm-4' id='legend-wrap2'><h1>" . $siteName . "</h1></div></header>" . "<div class='row'>" . "<div class='col-xs-6 col-sm-3'><h2>" . $siTrackName . "</h2></div>" . "<div class='col-xs-6 col-sm-2'><h3>" . $siTrackLength . "m</h3></div></div>"; $MonitorData .= "<div class='row'>" . "<div class='col-xs-1'><h3>Forecast</h3></div>" . "<div class='col-xs-4 col-sm-2'>" . $langAmbientTemp . ": " . $siAmbientTemp . "°C<br/>" . $langTrackTemp . ": " . $siTrackTemp . "°C</div>" . "<div class='col-xs-4 col-sm-2'>" . $langClouds . ": " . $siDarkClouds . "%<br/>" . $langRain . ": " . $siRaining . "%</div>" . "<div class='col-xs-4 col-sm-2'>" . $langWetOnTrack . ": " . $siWetOnTrack . "%<br/>" . $langWind . ": - °</div>" . "<div class='col-xs-12'> </div>" . "</div>\n"; $MonitorData .= "<div class='row'> " . "<div class='col-sm-1 current'>" . $langTime . "<span class='current'>" . formatSessionTime($siSessionTime) . "</span></div>" . "<div class='col-xs-6 col-sm-2 col-sm-offset-2'><h2>" . $siSessionName . "</h2></div>" . "<div class='col-sm-2'>" . $sectorState1 . $sectorState2 . $sectorState3 . "</div>" . "<div class='col-xs-12 col-sm-2 '><h2>" . setSessionState($siSessionState) . "</h2></div>" . "<div class='col-sm-1 col-sm-offset-2 current'>" . $langTimeLeft . " <span class='current'>" . $siSessionTimeLeft . "</span></div>" . "<div class='col-xs-12'> </div>" . "</div>\n"; } // $MonitorData .= "</fieldset>\n"; $checkedICB = ""; if (isset($_POST["showICB"]) && $_POST["showICB"] == "1") { $checkedICB = "checked='checked'"; } $checkedVPOT = ""; if (isset($_POST["showVPOT"]) && $_POST["showVPOT"] == "1") { $checkedVPOT = "checked='checked'"; } $checkedSecNum = ""; if (isset($_POST["showSecNum"]) && $_POST["showSecNum"] == "1") { $checkedSecNum = "checked='checked'"; } $checkedStops = "";
<?php $pageName = "statusdata.php"; include "inc.config.php"; error_reporting($reportLevel); include "inc.common.php"; include "inc.mysqli.conn.php"; include "inc.requests.php"; echo "<table class='status'>\n"; echo "<tr><td class='center' colspan='2'>" . $siteName . "</td></tr>\n"; $ServerStats = sqlGetServerStats($mySQLiConn); if ($ServerStats["ServerState"] == 0) { echo "<tr><td class='center' colspan='2'><img src='./img/Offline.png' alt='OFFLINE'></td></tr>\n"; } else { echo "<tr><td class='center' colspan='2'><img src='./img/Online.png' alt='ONLINE'></td></tr>\n"; } $SessionStatus = ""; if ($ServerStats["MaxLaps"] < 2147483647) { $SessionStatus = " (" . $ServerStats["CurLaps"] . "/" . $ServerStats["MaxLaps"] . " Laps)"; } echo "<tr><td class='right'>Venue</td><td>" . $ServerStats["TrackName"] . "</td></tr>\n"; echo "<tr><td class='right'>Start</td><td>" . formatStartTime($ServerStats["SessionStart"]) . "</td></tr>\n"; echo "<tr><td class='right'>Session</td><td>" . setSessionName($ServerStats["SessionID"], $ServerStats["GameID"]) . " (" . setSessionState($ServerStats["SessionState"]) . ")</td></tr>\n"; echo "<tr><td class='right'>Status</td><td>" . formatSessionTime($ServerStats["SessionEnd"] - $ServerStats["SessionTime"]) . $SessionStatus . "</td></tr>\n"; echo "<tr><td class='right'>Vehicles</td><td>" . $ServerStats["NumVehicles"] . "</td></tr>\n"; echo "<tr><td class='right'>Ambient</td><td>" . sprintf("%.1f", $ServerStats["AmbientTemp"]) . " °C</td></tr>\n"; echo "<tr><td class='right'>Track</td><td>" . sprintf("%.1f", $ServerStats["TrackTemp"]) . " °C</td></tr>\n"; echo "<tr><td class='right'>Date</td><td>" . date("d.m.Y (H:i:s) T") . "</td></tr>\n"; echo "<tr><td class='right'>Live View</td><td><a href='" . $siteURL . "/monitor.php' target='_blank'>Monitor</a> © <a href='http://vortex-motorsports.de/' target='_blank'>VorteX-Motorsports</a></td></tr>\n"; echo "</table>\n";
$cpClass1 = 1; $cpClass2 = 1; $cpClass3 = 1; $cpClass4 = 1; $bestLap = 0; $gapBest = 0; if (!$mySQLiConn->connect_error) { $selectSessionInfos = "SELECT SQL_CACHE * FROM `sessioninfos` WHERE `ID` = '1' LIMIT 1"; if ($resultSessionInfos = $mySQLiConn->query($selectSessionInfos)) { if ($resultSessionInfos->num_rows == 1) { while ($rowSessionInfos = $resultSessionInfos->fetch_assoc()) { $siGameID = $rowSessionInfos["GameID"]; $siSessionStart = $rowSessionInfos["SessionStart"]; $siTrackName = $mySQLiConn->real_escape_string($rowSessionInfos["TrackName"]); $siSessionName = setSessionName($rowSessionInfos["SessionID"], $siGameID); $siSessionState = setSessionState($rowSessionInfos["SessionState"], $siGameID); } } $resultSessionInfos->free(); } else { writeErrorLog($pageName, "selectSessionInfos", "SQL ERROR: (" . $mySQLiConn->error . ") QUERY: (" . $selectSessionInfos . ")"); } if ($siSessionStart == "0") { $MarqueeData = '<table><tr><td class="NoData">No Session Data</td></tr></table>'; } else { $selectSlots = "SELECT SQL_CACHE * FROM `slots` ORDER BY `Place` ASC"; if ($resultSlots = $mySQLiConn->query($selectSlots)) { if ($resultSlots->num_rows > 0) { while ($rowSlots = $resultSlots->fetch_assoc()) { $slotPos = $rowSlots["Place"]; $slotDriverName = $mySQLiConn->real_escape_string($rowSlots["DriverName"]);