###LABEL###';
if(!is_numeric($page) || $page < 1){
$page = 0;
} else if($page > $maxpages){
$page = $maxpages;
}
?>
'."\n";
echo '
'."\n";
echo ' Halle der Helden aus Runde '.($maxpages - $page).' | '."\n";
echo '
'."\n";
$name_translation = array(
'klein' => 'Anfängerturnier',
'gross' => 'Weltturnier',
'grossst' => 'Weltturnier Non-Fusion',
'wochen' => 'Wochenturnier',
'wochenst' => 'Wochenturnier Non-Fusion'
);
$eventhighscore = array();
$events = array();
// Now generate the strings
while($row = mysqli_fetch_assoc($qry)){
$art = $row['art'];
if ($name_translation[$art] !== NULL) {
$art = $name_translation[$art];
}
$events[$art] += 1;
$eventhighscore[$art] .= ''."\n";
$eventhighscore[$art] .= ' '.$row['datum'].' | '."\n";
if(!is_null($row['charid'])){
$eventhighscore[$art] .= ' '.displayCharLink($row['charid'], $row['charname']).' | '."\n";
} else {
$eventhighscore[$art] .= ' '.$row['charname'].' | '."\n";
}
if(!is_null($row['userid'])){
$eventhighscore[$art] .= ' '.displayUserLink($row['userid'], $row['username']).' | '."\n";
} else{
$eventhighscore[$art] .= ' '.$row['username'].' | '."\n";
}
if(!is_null($row['tournament_id'])) {
$eventhighscore[$art] .= ' Turnier anzeigen | '."\n";
}
$eventhighscore[$art] .= '
'."\n";
}
asort($events);
foreach ($events as $key => $value) {
echo ''."\n";
echo ' '.$key.' | '."\n";
echo '
'."\n";
echo ''."\n";
echo ' Datum | '."\n";
echo ' Sieger | '."\n";
echo ' Trainer | '."\n";
echo '
'."\n";
echo $eventhighscore[$key];
}
echo ''."\n";
echo ' '."\n";
echo ' '."\n";
echo displayPagelinks($page, $maxpages, $url);
echo ' '."\n";
echo ' | '."\n";
echo '
'."\n";
echo ''."\n";