Beispiel #1
0
 include_once "modules/seating/class_seat.php";
 $seat2 = new seat2();
 unset($_SESSION['tournament_submit_result_blocker']);
 if ($func->isModActive('server')) {
     //Server auslesen
     $selections = array();
     $selections['0'] = t('Kein Server zugewiesen');
     $res = $db->qry("SELECT * FROM %prefix%server WHERE party_id = %int%", $party->party_id);
     while ($row = $db->fetch_array($res)) {
         $selections[$row['serverid']] = $row['caption'];
     }
     $db->free_result($res);
 }
 $dsp->NewContent(t('Details der Partie %1 vs %2', $team1['name'], $team2['name']), t('Hier siehst du Details zu dieser Partie und kannst das Ergebnis eintragen.'));
 // Write Start and Enddate for each round
 $round_start = $tfunc->GetGameStart($tournament, $team1['round'], $team1['group_nr']);
 $round_end = $tfunc->GetGameEnd($tournament, $team1['round'], $team1['group_nr']);
 $dsp->AddDoubleRow(t('Spielzeit'), $func->unixstamp2date($round_start, "datetime") . " - " . $func->unixstamp2date($round_end, "datetime"));
 $dsp->AddDoubleRow(t('Map'), $map[abs(floor($team1['round'])) % count($map)]);
 if ($func->isModActive('server')) {
     $dsp->AddDoubleRow(t('Server'), '<a href="index.php?mod=server&action=show_details&serverid=' . $team1['server_id'] . '">' . $selections[$team1['server_id']] . '</a>');
 }
 if ($func->isModActive('server') and $auth['type'] >= 2) {
     include_once 'inc/classes/class_masterform.php';
     $mf = new masterform();
     $mf->AddField(t('Server Zuweisen'), 'server_id', IS_SELECTION, $selections, FIELD_OPTIONAL);
     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();