= DATE_SUB('$Now', INTERVAL 18 HOUR)) AND (time <= DATE_ADD('$Now', INTERVAL 24 HOUR)) ORDER BY time ASC EOF ); if (IsAdmin) $groups = Query("SELECT id, name FROM wm_groups"); else $groups = Query(<<Punktzahlen\n"; echo "

Schnellzugriff:\n"; foreach($groups as $group) { echo ""; echo htmlescape($group['name']) . " •\n"; } echo "Gesamt

\n"; if (IsAdmin) echo "

Zurück zum Admin-Menü

\n"; function PutScoreboard($links=TRUE, $max=1000) { global $uid, $admprefix; echo "\n"; echo "\n"; $i = 0; $rank = 0; $lastrkey = -1; $seen_self = FALSE; while (($row = NextRow()) && (($i < $max) || (!$seen_self))) { $id = intval($row['id']); $score = $row['score']; $exact = $row['exact']; $any = $row['any']; $rkey = $score * 10000 + $exact * 100 + $any; $i++; if ($rkey != $lastrkey) { $rank = $i; $lastrkey = $rkey; } if ($id == $uid) { $mark = " class=\"me\""; $seen_self = TRUE; } else $mark = ""; if ($mark || ($i <= $max)) { echo "\n"; echo " \n"; if ($links) { $mail = IsAdmin ? " title=\"" . htmlescape($row['email']) . "\"" : ""; echo " \n"; } else echo " \n"; echo " \n"; echo "\n"; } } echo "
RangNutzerPunkte
$rank." . htmlescape($row['name']) . "" . htmlescape($row['name']) . "$score
\n"; } function PutMatchFrequencies($q, $match, $gid=0, $prefix="") { if (Histogram($q, "${match['goalsA']}:${match['goalsB']}", "", $prefix)) { echo "

"; if (IsAdmin) echo "Details\n"; $toWhat = $gid ? "zur Gruppenübersicht" : "zu den Top 10"; echo "Zurück $toWhat

\n"; } } # group scoreboards foreach ($groups as $group) { echo "
\n"; $gid = intval($group['id']); echo "

"; echo "Rangliste für die Gruppe " . htmlescape($group['name']) . "

\n"; StartQuery(<<Zurück nach oben

\n"; # running match stats echo "
\n"; foreach ($running as $match) { $mid = intval($match['id']); echo "

"; echo "Tipps für das Spiel {$teams[$match['teamA']]['name']} – {$teams[$match['teamB']]['name']}

\n"; $intable = FALSE; StartQuery(<<\n"; echo "SpielerTip\n"; $intable = TRUE; } if ($row['uid'] == $uid) echo "\n"; else echo "\n"; echo " {$row['name']}\n"; echo " {$row['goalsA']}:{$row['goalsB']}\n"; echo "\n"; } if ($intable) echo "\n"; CloseQuery(); PutMatchFrequencies(<<\n"; } echo "
\n"; } # generic scoreboard echo "
\n"; echo "

Top 10 insgesamt

\n"; StartQuery("SELECT id, name, email, score, exact, any FROM wm_users WHERE ISNULL(akey) ORDER BY score DESC, exact DESC, any DESC, id ASC"); PutScoreboard(IsAdmin, IsAdmin ? 1000 : 10); CloseQuery(); echo "

Zurück nach oben

\n"; echo "
\n"; foreach($running as $match) { $mid = intval($match['id']); echo "
"; PutMatchFrequencies(<<Verteilung der Tipps für das Spiel {$teams[$match['teamA']]['name']} – {$teams[$match['teamB']]['name']}\n"); echo "
\n"; } echo "
\n"; if (IsAdmin) echo "

Zurück zum Admin-Menü

\n"; EndPage(); CloseDB(); ?>