= 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(<< Schnellzugriff:\n";
foreach($groups as $group) {
echo "";
echo htmlescape($group['name']) . " •\n";
}
echo "Gesamt ";
if (IsAdmin)
echo "Details\n";
$toWhat = $gid ? "zur Gruppenübersicht" : "zu den Top 10";
echo "Zurück $toWhat\n";
echo "
\n";
}
function PutMatchFrequencies($q, $match, $gid=0, $prefix="") {
if (Histogram($q, "${match['goalsA']}:${match['goalsB']}", "", $prefix)) {
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 "Rang Nutzer Punkte \n";
echo " \n";
}
}
echo "$rank. \n";
if ($links) {
$mail = IsAdmin ? " title=\"" . htmlescape($row['email']) . "\"" : "";
echo " " . htmlescape($row['name']) . " \n";
} else
echo " " . htmlescape($row['name']) . " \n";
echo " $score \n";
echo "
\n";
$gid = intval($group['id']);
echo "";
echo "Rangliste für die Gruppe " . htmlescape($group['name']) . "
\n";
StartQuery(<<