diff --git a/webserver/timer.php b/webserver/timer.php
index 303a1a21..9ce48e0f 100644
--- a/webserver/timer.php
+++ b/webserver/timer.php
@@ -10,180 +10,180 @@ $map = isset($_GET["map"]);
function removeworkshop($mapname)
{
- if(strpos($mapname, "workshop/") !== false)
- {
- $pieces = explode("/", $mapname);
+ if(strpos($mapname, "workshop/") !== false)
+ {
+ $pieces = explode("/", $mapname);
- return $pieces[2];
- }
+ return $pieces[2];
+ }
- return $mapname;
+ return $mapname;
}
$style = 0;
if(isset($_GET["style"]))
{
- $style = $_GET["style"];
+ $style = $_GET["style"];
}
?>
-
+
-
+ .time
+ {
+ color: red;
+ }
+
- " . HOMEPAGE_TITLE . "");
- }
+ " . HOMEPAGE_TITLE . "");
+ }
- else
- {
- echo("[" . ($style == 0? "NM":"SW") . " Records] " . removeworkshop($_GET["map"]) . "");
- } ?>
+ else
+ {
+ echo("[" . ($style == 0? "NM":"SW") . " Records] " . removeworkshop($_GET["map"]) . "");
+ } ?>
- Home
+ Home
-
+
+
- prepare("SELECT p.id, p.map, u.auth, u.name, p.time, p.jumps FROM playertimes p JOIN users u ON p.auth = u.auth WHERE map = ? AND style = ? ORDER BY time ASC LIMIT " . RECORD_LIMIT . ";"))
- {
- $stmt->bind_param("ss", $_GET["map"], $_GET["style"]);
- $stmt->execute();
+ if($stmt = $connection->prepare("SELECT p.id, p.map, u.auth, u.name, p.time, p.jumps FROM playertimes p JOIN users u ON p.auth = u.auth WHERE map = ? AND style = ? ORDER BY time ASC LIMIT " . RECORD_LIMIT . ";"))
+ {
+ $stmt->bind_param("ss", $_GET["map"], $_GET["style"]);
+ $stmt->execute();
- $stmt->store_result();
+ $stmt->store_result();
- $rows = $stmt->num_rows;
+ $rows = $stmt->num_rows;
- $stmt->bind_result($id, $map, $auth, $name, $time, $jumps);
+ $stmt->bind_result($id, $map, $auth, $name, $time, $jumps);
- echo "Number of records: " . number_format($rows) . ".
";
+ echo "Number of records: " . number_format($rows) . ".
";
- if($rows > 0)
- {
- $first = true;
+ if($rows > 0)
+ {
+ $first = true;
- $rank = 1;
+ $rank = 1;
- while($row = $stmt->fetch())
- {
- if($first)
- {
- echo("[" . ($style == 0? "Forwards":"Sideways") . " Records] " . removeworkshop($_GET["map"]) . "
");
+ while($row = $stmt->fetch())
+ {
+ if($first)
+ {
+ echo("[" . ($style == 0? "Forwards":"Sideways") . " Records] " . removeworkshop($_GET["map"]) . "
");
- ?>
-
- | Rank |
- Record ID |
- SteamID3 |
- Player |
- Time |
- Jumps |
+ ?>
+
+ | Rank |
+ Record ID |
+ SteamID3 |
+ Player |
+ Time |
+ Jumps |
-
+
- | # |
- |
- Format(SteamID::FORMAT_STEAMID64) . "/\">" . $auth . ""); ?> |
- |
-
+ |
| # |
+ |
+ Format(SteamID::FORMAT_STEAMID64) . "/\">" . $auth . ""); ?> |
+ |
+
- |
- |
+
+ |
- ");
- }
- }
+ echo("
");
+ }
+ }
- else
- {
- echo "No results. Press Home to get the map list.
";
- }
+ else
+ {
+ echo "No results. Press Home to get the map list.
";
+ }
- if($stmt != FALSE)
- {
- $stmt->close();
- }
- }
+ if($stmt != FALSE)
+ {
+ $stmt->close();
+ }
+ }
- else
- {
- $result = mysqli_query($connection, "SELECT DISTINCT map FROM mapzones ORDER BY map ASC;");
+ else
+ {
+ $result = mysqli_query($connection, "SELECT DISTINCT map FROM mapzones ORDER BY map ASC;");
- if($result->num_rows > 0)
- {
- echo 'Click a map name in order to auto-fill the form.
';
+ if($result->num_rows > 0)
+ {
+ echo 'Click a map name in order to auto-fill the form.
';
- while($row = $result->fetch_assoc())
- {
- echo "" . removeworkshop($row["map"]) . "";
- }
- }
+ while($row = $result->fetch_assoc())
+ {
+ echo "" . removeworkshop($row["map"]) . "";
+ }
+ }
- else
- {
- echo "No results";
- }
- }
- ?>
+ else
+ {
+ echo "No results";
+ }
+ }
+ ?>
close(); ?>