$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(); // Write Comment
} else { $t = ''; } return $t; } include_once "modules/seating/class_seat.php"; $seat2 = new seat2(); $tgames = $db->qry("SELECT games1.gameid AS gid1, games2.gameid AS gid2, teams1.name AS name1, \n teams2.name AS name2, teams1.leaderid AS leaderid1, teams2.leaderid AS leaderid2, t.name AS tuname, \n t.mode AS modus , t.tournamentid AS tid,\n IF (games1.lastchange>games2.lastchange,games1.lastchange,games2.lastchange) AS lastactivity,\n games1.round, t.game_duration, t.break_duration,\n IF (games1.round=0,(t.game_duration*60),((t.game_duration+t.break_duration)*60)) AS overtime, (UNIX_TIMESTAMP(CURRENT_TIMESTAMP())-UNIX_TIMESTAMP(IF(games1.lastchange>games2.lastchange,games1.lastchange,games2.lastchange))) AS overtime2\nFROM %prefix%t2_games AS games1 \nINNER JOIN %prefix%t2_games AS games2 ON (games1.tournamentid = games2.tournamentid) AND (games1.round = games2.round) \nLEFT JOIN %prefix%tournament_tournaments AS t ON (t.tournamentid = games1.tournamentid) \nLEFT JOIN %prefix%t2_teams AS teams1 ON (games1.leaderid = teams1.leaderid) AND (t.tournamentid = teams1.tournamentid) \nLEFT JOIN %prefix%t2_teams AS teams2 ON (games2.leaderid = teams2.leaderid) AND (t.tournamentid = teams2.tournamentid) \nLEFT JOIN %prefix%t2_teammembers AS memb1 ON (teams1.teamid = memb1.teamid) LEFT JOIN %prefix%t2_teammembers AS \nmemb2 ON (teams2.teamid = memb2.teamid) \nWHERE ((games1.position / 2) = FLOOR(games1.position / 2)) \n AND (games1.score = 0) \n AND (games1.leaderid != 0) \n AND ((games1.position + 1) = games2.position) \n AND (games2.score = 0) \n AND (games2.leaderid !=0) \n AND (teams1.disqualified = '0') \n AND (teams2.disqualified = '0') \n AND (t.party_id = %int%) \n AND (t.status = 'process') \n AND NOT (mode = 'all')\n GROUP BY games1.gameid, games2.gameid \n ORDER BY lastactivity ASC \n", $party->party_id); while ($tgamesrow = $db->fetch_array($tgames, 1, MYSQLI_ASSOC)) { //d($tgamesrow); //$outputrow['Begegnung'] = "<b>".$tgamesrow['name1']."</b> vs <b>".$tgamesrow['name2']."</b>"; if (!($tgamesrow['modus'] == "single" and $tgamesrow['round'] < 0) and !($tgamesrow['modus'] == "all")) { // Workaround wegen Looserbraketeinträgen bei SingleElimination $outall[] = $tgamesrow; //$outputrow['Spieler 1'] = $tgamesrow['name1']; $outputrow['Spieler/Team 1'] = $dsp->FetchUserIcon($tgamesrow['leaderid1'], "<b>" . $tgamesrow['name1'] . "</b>") . " </br>" . $seat2->SeatNameLink($tgamesrow['leaderid1'], '', '') . ""; //$outputrow['Spieler 2'] = $tgamesrow['name2']; $outputrow['Spieler/Team 2'] = $dsp->FetchUserIcon($tgamesrow['leaderid2'], "<b>" . $tgamesrow['name2'] . "</b>") . " </br>" . $seat2->SeatNameLink($tgamesrow['leaderid2'], '', '') . ""; $outputrow['Turnier'] = "<a href=\"?mod=tournament2&action=details&tournamentid=" . $tgamesrow['tid'] . "\"><b>" . $tgamesrow['tuname'] . "</b></a>"; //$outputrow['Startzeit'] = $tgamesrow['lastactivity']; $tage = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"); $outputrow['Startzeit'] = $tage[date('w', strtotime($tgamesrow['lastactivity']))] . " " . date('H:i', strtotime($tgamesrow['lastactivity'])); $outputrow['Spielzeit+</br>Pause'] = $tgamesrow[game_duration] . "+" . $tgamesrow[break_duration] . "min"; $delay = ($tgamesrow['overtime2'] - $tgamesrow['overtime']) / 60; if ($delay >= 120) { $outputrow['cellstyle'] = "background-color:#FF1000;"; $outputrow['Überfällig'] = floor($delay / 60) . "Std " . floor($delay % 60) . "Min"; } elseif ($delay >= 0 and $delay < 120) { $outputrow['cellstyle'] = "background-color:#BD7C85;"; $outputrow['Überfällig'] = floor($delay / 60) . "Std " . floor($delay % 60) . "Min"; } else {
user_id = %int%, party_id = %int%, price_id = %int%, checkin = NOW(), paid = 2, paiddate = NOW(), seatcontrol = 0, signondate = NOW()', $_GET['userid'], $party->party_id, $row['evening_price_id']); } } break; } switch ($_GET["step"]) { // Platzpfand prüfen case 4: // Passwort ausgeben // Passwort ausgeben case 5: // Neuen Sitzplatz auswählen? // Neuen Sitzplatz auswählen? case 6: $func->question(t('Willst du diesem Benutzer einen Sitzplatz zuweisen?<br />Er sitzt aktuell auf:<br />%1', $seat2->SeatNameLink($_GET["userid"])), "index.php?mod=usrmgr&action=entrance&step=7&umode=" . $_GET["umode"] . "&userid=" . $_GET["userid"], "index.php?mod=usrmgr&action=entrance&step=11&umode=" . $_GET["umode"] . "&userid=" . $_GET["userid"]); break; // Sitzblock auswählen // Sitzblock auswählen case 7: if ($_GET['next_userid']) { $seat2->AssignSeat($_GET['userid'], $_GET['blockid'], $_GET['row'], $_GET['col']); $func->confirmation("Der Sitzplatz wurde erfolgreich reserviert. Fahre nun mit dem alten Besitzer dieses Sitzplatzes fort", ''); $_GET['userid'] = $_GET['next_userid']; } $current_url = "index.php?mod=usrmgr&action=entrance&step=7&umode={$_GET["umode"]}&userid={$_GET["userid"]}"; $target_url = "index.php?mod=usrmgr&action=entrance&step=8&umode={$_GET["umode"]}&userid={$_GET["userid"]}&blockid="; include_once 'modules/seating/search_basic_blockselect.inc.php'; break; // Sitzplatz auswählen // Sitzplatz auswählen