Beispiel #1
0
 // Teamname
 $dsp->AddDoubleRow(t('Teamame'), $team['name']);
 // Disqualified
 if ($team['disqualified']) {
     $dsp->AddDoubleRow("", "<font color=\"#ff0000\">" . t('Disqualifiziert') . "</font>");
 }
 // Banner
 if ($team['banner']) {
     $dsp->AddSingleRow("<img src=\"ext_inc/team_banners/{$team['banner']}\" alt=\"{$team['banner']}\">");
 }
 // Leader
 include_once "modules/seating/class_seat.php";
 $seat2 = new seat2();
 $dsp->AddDoubleRow(t('Teamleiter'), $dsp->FetchUserIcon($team['userid'], $team['username']) . " (Platz: " . $seat2->SeatNameLink($team['userid'], '', '') . ")");
 // Members
 $dsp->AddDoubleRow(t('Mitglieder'), $tfunc->GetMemberList($_GET["teamid"]));
 // Stats
 $game_anz = 0;
 $won = 0;
 $lost = 0;
 $games = $db->qry("SELECT g1.score AS s1, g2.score AS s2, g1.leaderid\n   FROM %prefix%t2_games AS g1\n   LEFT JOIN %prefix%t2_games AS g2 ON (g1.tournamentid = g2.tournamentid) AND (g1.round = g2.round) AND ((g1.position + 1) = g2.position)\n   WHERE ((g1.score != 0) OR (g2.score != 0))\n   AND ((g1.position / 2) = FLOOR(g1.position / 2))\n   AND ((g1.leaderid = %int%) OR (g2.leaderid = %int%))\n   ", $team['userid'], $team['userid']);
 while ($game = $db->fetch_array($games)) {
     $game_anz++;
     if ($game['leaderid'] == $team['userid']) {
         $game[s1] > $game[s2] ? $won++ : $lost++;
     } else {
         $game[s1] > $game[s2] ? $lost++ : $won++;
     }
 }
 $db->free_result($games);
 $stats2 = t('Spiele gewonnen') . ": {$won}" . HTML_NEWLINE . t('Spiele verloren') . ": {$lost}" . HTML_NEWLINE . t('Spiele insgesamt') . ": {$game_anz}";