<?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";
$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 = "";