Beispiel #1
0
     if ($mf->SendForm("index.php?mod=tournament2&action=submit_result&step=1&tournamentid=" . $tournamentid . "&gameid1=" . $gameid1 . "&gameid2=" . $gameid2, 't2_games', 'gameid', $gameid1)) {
         $db->qry("UPDATE %prefix%t2_games SET server_id = %int% WHERE gameid = %int%", $_POST['server_id'], $gameid2);
     }
 }
 $dsp->AddHRuleRow();
 $dsp->AddSingleRow("<b>" . t('Ergebnis melden') . "</b>");
 $dsp->SetForm("index.php?mod=tournament2&action=submit_result&step=2&tournamentid={$tournamentid}&gameid1={$gameid1}&gameid2={$gameid2}", '', '', 'multipart/form-data');
 // Write Team 1
 $disqualify_link = "";
 /*  // Disquallifiy droped, due to errors
 			if ($auth["type"] > 1 and $tournament['status'] == "process") {
 				if ($team1['disqualified']) $disqualify_link = "<font color=\"#ff0000\">".t('Disqualifiziert')."</font> ". $dsp->FetchSpanButton(t('Disqualifizieren rückgängig'), "index.php?mod=tournament2&action=disqualify&teamid={$team1['teamid']}&step=10");
 				else $disqualify_link = $dsp->FetchSpanButton(t('Disqualifizieren'), "index.php?mod=tournament2&action=disqualify&teamid={$team1['teamid']}");
 			}
 */
 $dsp->AddFieldSetStart(t('Team') . ' 1' . $tfunc->button_team_details($team1['teamid'], $tournamentid) . " " . $disqualify_link);
 $dsp->AddDoubleRow(t('Teamleiter'), $dsp->FetchUserIcon($team1['userid'], $team1['username']) . " (" . t('Platz') . ": " . $seat2->SeatNameLink($team1['userid'], '', '') . ")");
 $dsp->AddTextFieldRow("score_team1", t('Punktzahl'), (int) $team1["score"], "");
 $dsp->AddFieldSetEnd();
 // Write Team 2
 $disqualify_link = "";
 /*  // Disquallifiy droped, due to errors
 			if ($auth["type"] > 1 and $tournament['status'] == "process") {
 				if ($team2['disqualified']) $disqualify_link = "<font color=\"#ff0000\">".t('Disqualifiziert')."</font> ". $dsp->FetchSpanButton(t('Disqualifizieren rückgängig'), "index.php?mod=tournament2&action=disqualify&teamid={$team2['teamid']}&step=10");
 				else $disqualify_link = $dsp->FetchSpanButton(t('Disqualifizieren'), "index.php?mod=tournament2&action=disqualify&teamid={$team2['teamid']}");
 			}
 */
 $dsp->AddFieldSetStart(t('Team') . ' 2' . $tfunc->button_team_details($team2['teamid'], $tournamentid) . " " . $disqualify_link);
 $dsp->AddDoubleRow(t('Teamleiter'), $dsp->FetchUserIcon($team2['userid'], $team2['username']) . " (" . t('Platz') . ": " . $seat2->SeatNameLink($team2['userid'], '', '') . ")");
 $dsp->AddTextFieldRow("score_team2", t('Punktzahl'), (int) $team2["score"], "");
 $dsp->AddFieldSetEnd();
    $lgz .= $user_data['lgzid'] . ' ';
}
if ($user_data['lgzclanid']) {
    $lgz .= '(' . $user_data['lgzclanid'] . ')';
}
$dsp->AddDoubleRow(t('LGZ-ID') . ' (Clan-ID)', $lgz);
$dsp->AddFieldsetEnd();
include_once "modules/tournament2/class_tournament.php";
$tfunc = new tfunc();
// Own Teams
$dsp->AddFieldsetStart(t('Benutzer hat folgende Teams er&ouml;ffnet'));
$leader_teams = $db->qry("SELECT t.name, t.tournamentid AS tid, team.name AS teamname, team.teamid \n                              FROM %prefix%t2_teams AS team\n                              LEFT JOIN %prefix%tournament_tournaments AS t ON t.tournamentid = team.tournamentid\n                              WHERE team.leaderid = %int% AND t.party_id = %int%", $_GET['userid'], $cfg['signon_partyid']);
if ($db->num_rows($leader_teams) == 0) {
    $dsp->AddSingleRow('<i>-' . t('Keine') . '-</i>');
} else {
    while ($leader_team = $db->fetch_array($leader_teams)) {
        $dsp->AddDoubleRow('<a href="index.php?mod=tournament2&action=details&tournamentid=' . $leader_team['tid'] . '">' . $leader_team['name'] . '</a>', $leader_team['teamname'] . ' ' . $tfunc->button_team_details($leader_team['teamid'], $leader_team['tid']));
    }
}
$dsp->AddFieldsetEnd();
// Teammember
$dsp->AddFieldsetStart(t('Benutzer ist in folgenden Teams Mitglied'));
$member_teams = $db->qry("SELECT t.name, t.tournamentid AS tid, team.name AS teamname, team.teamid \n                              FROM %prefix%t2_teams AS team\n                              LEFT JOIN %prefix%tournament_tournaments AS t ON t.tournamentid = team.tournamentid\n                              LEFT JOIN %prefix%t2_teammembers AS m ON team.teamid = m.teamid\n                              WHERE m.userid = %int% AND t.party_id = %int%", $_GET['userid'], $cfg['signon_partyid']);
if ($db->num_rows($member_teams) == 0) {
    $dsp->AddSingleRow('<i>-' . t('Keine') . '-</i>');
} else {
    while ($member_team = $db->fetch_array($member_teams)) {
        $dsp->AddDoubleRow('<a href="index.php?mod=tournament2&action=details&tournamentid=' . $member_team['tid'] . '">' . $member_team['name'] . '</a>', $member_team['teamname'] . ' ' . $tfunc->button_team_details($member_team['teamid'], $member_team['tid']));
    }
}
$dsp->AddFieldsetEnd();
Beispiel #3
0
     }
     // Finish tournament
     if ($_GET['step'] == 11) {
         $db->qry("UPDATE %prefix%tournament_tournaments SET status='closed' WHERE tournamentid = %int%", $tournamentid);
         $func->confirmation(t('Turnier wurde beendet'), '');
     }
     // Unfinish tournament
     if ($_GET['step'] == 12) {
         $db->qry("UPDATE %prefix%tournament_tournaments SET status='process' WHERE tournamentid = %int%", $tournamentid);
         $func->confirmation(t('Turnier wurde wiedereröffnet'), '');
     }
     // Show players and scores
     $games = $db->qry("SELECT teams.name, teams.teamid, games.leaderid, games.score, games.gameid\n      FROM %prefix%t2_games AS games\n      LEFT JOIN %prefix%t2_teams AS teams ON (games.tournamentid = teams.tournamentid) AND (games.leaderid = teams.leaderid)\n      WHERE games.tournamentid = %int%\n      ORDER BY games.position\n      ", $tournamentid);
     $dsp->SetForm("index.php?mod=tournament2&action=games&step=10&tournamentid={$tournamentid}");
     while ($game = $db->fetch_array($games)) {
         $dsp->AddTextFieldRow('team_score[' . $game['gameid'] . ']', $game['name'] . ' ' . $tfunc->button_team_details($game['teamid'], $tournamentid), $game['score'], $team_score_error[$game['gameid']]);
     }
     $db->free_result($games);
     $dsp->AddFormSubmitRow(t('Speichern'));
     if ($tournament['status'] == 'process') {
         $dsp->AddDoubleRow('', $dsp->FetchSpanButton(t('Beenden'), "index.php?mod=tournament2&action=games&step=11&tournamentid={$tournamentid}"));
     } elseif ($tournament['status'] == 'closed') {
         $dsp->AddDoubleRow('', $dsp->FetchSpanButton(t('Beenden rückgängig'), "index.php?mod=tournament2&action=games&step=12&tournamentid={$tournamentid}"));
     }
     break;
 case "liga":
 case "groups":
     $games = $db->qry("SELECT teams.name, teams.teamid, games.leaderid, games.gameid, games.score, games.group_nr, games.round, games.position, games.leaderid\n      FROM %prefix%t2_games AS games\n      LEFT JOIN %prefix%t2_teams AS teams ON (games.tournamentid = teams.tournamentid) AND (games.leaderid = teams.leaderid)\n      WHERE (games.tournamentid = %int%) AND (games.group_nr > 0)\n      GROUP BY games.gameid\n      ORDER BY games.group_nr, games.round, games.position\n      ", $tournamentid);
     $last_round = -1;
     while ($game = $db->fetch_array($games)) {
         // Write Round Headline
Beispiel #4
0
     $map_str .= t('Runde') . " {$key}: {$val} \n";
 }
 $mapcycle = t('Mapcycle') . HTML_NEWLINE . HTML_NEWLINE;
 if ($auth['type'] > 1) {
     $mapcycle .= '<a href="index.php?mod=tournament2&action=details&tournamentid=' . $_GET['tournamentid'] . '&step=20">' . t('Maps neu mischen') . '</a>';
 }
 $dsp->AddDoubleRow($mapcycle, $func->text2html($map_str));
 $dsp->AddFieldsetEnd();
 $dsp->EndTab();
 $dsp->StartTab(t('Angemeldete Teams'), 'assign');
 $waiting_teams = "";
 $completed_teams = "";
 $teams = $db->qry("SELECT name, teamid, seeding_mark, disqualified FROM %prefix%t2_teams WHERE (tournamentid = %int%)", $_GET['tournamentid']);
 while ($team = $db->fetch_array($teams)) {
     $members = $db->qry_first("SELECT COUNT(*) AS members\n       FROM %prefix%t2_teammembers\n       WHERE (teamid = %int%)\n       GROUP BY teamid\n       ", $team['teamid']);
     $team_out = $team["name"] . $tfunc->button_team_details($team['teamid'], $_GET['tournamentid']);
     if ($tournament['mode'] == "single" or $tournament['mode'] == "double") {
         if ($team["seeding_mark"]) {
             $team_out .= " " . t('Dieses Team wird beim Generieren gesetzt');
         }
         if ($auth["type"] > 1 && $tournament['status'] == "open") {
             if ($team["seeding_mark"]) {
                 $team_out .= " <a href=\"index.php?mod=tournament2&action=details&step=11&tournamentid={$_GET['tournamentid']}&teamid={$team['teamid']}\">" . t('demarkieren') . "</a>";
             } else {
                 $team_out .= " <a href=\"index.php?mod=tournament2&action=details&step=10&tournamentid={$_GET['tournamentid']}&teamid={$team['teamid']}\">" . t('Team setzen') . "</a>";
             }
         }
     }
     /*  // Disquallifiy droped, due to errors
     						if ($auth["type"] > 1 and $tournament['status'] == "process") {
     							if ($team['disqualified']) $team_out .= " <font color=\"#ff0000\">".t('Disqualifiziert')."</font> ". $dsp->FetchSpanButton(t('Disqualifizieren rückgängig'), "index.php?mod=tournament2&action=disqualify&teamid={$team['teamid']}&step=10");
Beispiel #5
0
     break;
 }
 include_once "modules/tournament2/class_tournament.php";
 $tfunc = new tfunc();
 $ranking_data = $tfunc->get_ranking($_GET['tournamentid']);
 $dsp->NewContent(t('Turnier %1 (%2) - Rangliste', $tournament['name'], $modus), t('Hier siehst du das Ergebnis dieses Turniers'));
 $rows = '';
 $anz_elements = count($ranking_data->tid);
 for ($i = 0; $i < $anz_elements; $i++) {
     $akt_pos = $ranking_data->tid[$i];
     $ranking_data->disqualified[$i] ? $mark = "<font color=\"#ff0000\">" : ($mark = "");
     $ranking_data->disqualified[$i] ? $mark2 = "</font>" : ($mark2 = "");
     if ($tournament['mode'] == "liga") {
         $score_out = $ranking_data->score[$i] . " : " . $ranking_data->score_en[$i];
         $smarty->assign('cell1', t('Platz') . " " . $ranking_data->pos[$i]);
         $smarty->assign('cell2', $mark . $ranking_data->name[$i] . $mark2 . $tfunc->button_team_details($akt_pos, $_GET['tournamentid']));
         $smarty->assign('cell3', $ranking_data->win[$i]);
         $smarty->assign('cell4', $ranking_data->score_dif[$i] . " ({$score_out})");
         $smarty->assign('cell5', $ranking_data->games[$i]);
         $rows .= $smarty->fetch('modules/tournament2/templates/ls_row_pent.htm');
     } else {
         $dsp->AddDoubleRow(t('Platz') . " " . $ranking_data->pos[$i], $mark . $ranking_data->name[$i] . $mark2 . $tfunc->button_team_details($akt_pos, $_GET['tournamentid']));
     }
 }
 if ($tournament['mode'] == "liga") {
     $smarty->assign('rows', $rows);
     $dsp->AddSmartyTpl('ls_row_pent_table', 'tournament2');
 }
 if ($func->internal_referer) {
     $dsp->AddBackButton($func->internal_referer, "tournament2/rangliste");
 } else {