Пример #1
0
        $colums = array_filter(array_keys($a[0]), "remove");
        $t = '<div overflow:auto;"><table style="width:100%;" border="0" cellspacing="0" cellpadding="2">';
        $t .= '<tr><th class="mastersearch2_result_row_key" style="border-bottom: 1px solid #000000;">' . implode('</th><th class="mastersearch2_result_row_key" style="border-bottom: 1px solid #000000;">', $colums) . '</th></tr>';
        foreach ($a as $row) {
            $cellstyle = $row['cellstyle'];
            unset($row['cellstyle']);
            $t .= '<tr><td style="border-bottom: 1px solid #000000;' . $cellstyle . '">' . implode('</td><td style="border-bottom: 1px solid #000000;' . $cellstyle . '">', $row) . '</td></tr>';
        }
        $t .= '</table></div>';
    } 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']));
Пример #2
0
}
$games = $db->qry_first("SELECT COUNT(*) AS anz FROM %prefix%t2_games WHERE (tournamentid = %int%) AND (round=0) GROUP BY round", $tournamentid);
$team_anz = $games["anz"];
$team1 = $db->qry_first("SELECT games.group_nr, games.round, games.position, games.score, games.comment, games.server_id, teams.name, teams.teamid, teams.disqualified, user.userid, user.username\n  FROM %prefix%t2_games AS games\n  LEFT JOIN %prefix%t2_teams AS teams ON games.leaderid = teams.leaderid\n  LEFT JOIN %prefix%user AS user ON user.userid = teams.leaderid\n  WHERE (teams.tournamentid = %int%) AND (games.gameid = %int%)\n  ", $tournamentid, $gameid1);
$team2 = $db->qry_first("SELECT games.round, games.position, games.score, games.comment, games.server_id, teams.name, teams.teamid, teams.disqualified, user.userid, user.username\n  FROM %prefix%t2_games AS games\n  LEFT JOIN %prefix%t2_teams AS teams ON games.leaderid = teams.leaderid\n  LEFT JOIN %prefix%user AS user ON user.userid = teams.leaderid\n  WHERE (teams.tournamentid = %int%) AND (games.gameid = %int%)\n  ", $tournamentid, $gameid2);
########## Einschränkungen prüfen
if ($tournament["name"] == "") {
    $func->error(t('Du musst zuerst ein Turnier auswählen!'), "index.php?mod=tournament2&action=details&tournamentid={$tournamentid}");
} elseif (abs($team1['position'] - $team2['position']) != 1) {
    $func->error(t('Diese Spielkonstellation existiert nicht!' . $team1['position'] . $team2['position']));
    ########## Keine Einschränkungen gefunden
} else {
    switch ($_GET["step"]) {
        default:
            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']);
Пример #3
0
<?php

include_once "modules/seating/class_seat.php";
$seat2 = new seat2();
if ($_GET['action'] == 'add' and $_GET['step'] < 2) {
    $_GET['step'] = 2;
}
// Error-Switch
$error = array();
switch ($_GET['step']) {
    case 3:
        // Error Columns
        if ($_POST['cols'] == "") {
            $error['cols'] = t('Bitte gib die horizontale Länge ein');
        } elseif ($_POST['cols'] <= 0) {
            $error['cols'] = t('Bitte gib eine Zahl, die größer als 0 ist ein');
        } elseif ($_POST['cols'] >= 60) {
            $error['cols'] = t('Bitte gib eine kleinere Zahl als 60 ein');
        } else {
            $row = $db->qry_first("SELECT count(*) AS number FROM %prefix%seat_seats\n    WHERE blockid = %int% AND status = 2 AND col >= %int%", $_GET['blockid'], $_POST['cols']);
            if ($row["number"] != 0) {
                $error['cols'] = t('Bitte gib eine größere Zahl ein, da sonst Sitzplätze gelöscht werden. Um Trotzdem einen kleineren Sitzblock zu erzeugen, entferne bitte die betroffenen Benutzer.');
            }
        }
        // Error Rows
        if ($_POST['rows'] == "") {
            $error['rows'] = t('Bitte gib die vertikale Länge ein');
        } elseif ($_POST['rows'] <= 0) {
            $error['rows'] = t('Bitte gib eine Zahl, die größer als 0 ist ein');
        } elseif ($_POST['rows'] >= 100) {
            $error['rows'] = t('Bitte gib eine kleinere Zahl als 100 ein');
Пример #4
0
<?php

include_once "modules/seating/class_seat.php";
$seat2 = new seat2();
switch ($_GET['step']) {
    default:
        #include_once('modules/seating/search.inc.php');
        $row = $db->qry_first('SELECT blockid FROM %prefix%seat_block
      WHERE party_id = %int%', $party->party_id);
        $_GET['blockid'] = $row['blockid'];
        // Show seatplan
    // Show seatplan
    case 2:
        $dsp->NewContent(t('Sitzplatz - Informationen'), t('Fahre mit der Maus über einen Sitzplatz, um weitere Informationen zu erhalten.'));
        $current_url = 'index.php?mod=seating';
        include_once 'modules/seating/search_basic_blockselect.inc.php';
        $dsp->AddSingleRow($seat2->DrawPlan($_GET['blockid'], 0));
        $dsp->AddBackButton('index.php?mod=seating', 'seating/show');
        $dsp->AddContent();
        break;
        // Reserve free seat
    // Reserve free seat
    case 10:
        $user_data = $db->qry_first("SELECT paid FROM %prefix%party_user\n      WHERE user_id = %int% AND party_id = %int%", $auth['userid'], $party->party_id);
        $seat_user = $db->qry_first("SELECT status FROM %prefix%seat_seats\n      WHERE blockid = %int% AND row = %string% AND col = %string%", $_GET['blockid'], $_GET['row'], $_GET['col']);
        // Check paid
        if (!$user_data['paid'] and $cfg['seating_paid_only'] and !$cfg['seating_not_paid_mark']) {
            $func->information(t('Du musst zuerst für diese Party bezahlen, bevor du dir einen Sitzplatz reservieren darfst.'), "index.php?mod=seating&action=show&step=2&blockid={$_GET['blockid']}");
        } elseif ($seat_user['status'] == 2) {
            $func->error(t('Dieser Sitzplatz ist bereits vergeben'), "index.php?mod=seating&action=show&step=2&blockid={$_GET['blockid']}");
        } elseif ($seat_user['status'] == 0 or $seat_user['status'] > 9) {
Пример #5
0
             }
         }
     }
     $dsp->SetForm("index.php?mod=foodcenter&action=print&design=base\" target=\"_blank\"", "print");
     $dsp->AddDropDownFieldRow("file", t('Bitte Template auswählen:'), $file_array, "");
     $MainContent .= "<input type=\"hidden\" name=\"search_input[0]\" value=\"{$_POST['search_input'][0]}\">\n";
     $MainContent .= "<input type=\"hidden\" name=\"search_dd_input[0]\" value=\"{$_POST['search_dd_input'][0]}\">\n";
     $MainContent .= "<input type=\"hidden\" name=\"search_dd_input[1]\" value=\"{$_POST['search_dd_input'][1]}\">\n";
     $MainContent .= "<input type=\"hidden\" name=\"search_dd_input[2]\" value=\"{$_POST['search_dd_input'][2]}\">\n";
     $dsp->AddFormSubmitRow(t('Drucken'));
     $dsp->AddContent();
     break;
 case 2:
     if ($_POST['action']) {
         include_once "modules/seating/class_seat.php";
         $seat2 = new seat2();
         $time = time();
         $totprice = 0;
         foreach ($_POST["action"] as $item => $val) {
             if ($_GET["status"] == 6 | $_GET["status"] == 7) {
                 $db->qry("UPDATE %prefix%food_ordering SET status = %string%, lastchange = %string%, supplytime = %string%  WHERE id = %string%", $_GET["status"], $time, $time, $item);
                 //sitzplan popup einbinden
                 //change by jan für sitzplatz popup $item = id in food_ordering table
                 //unit food_option (größe)
                 $abfrage = $db->qry_first("SELECT %prefix%food_ordering.userid AS userid,%prefix%food_ordering.pice AS pice,unit, %prefix%food_product.caption AS caption, username, name, firstname\n\t\t\t\tFROM %prefix%food_ordering,%prefix%food_option, %prefix%food_product, %prefix%user\n\t\t\t\tWHERE %prefix%food_ordering.id = " . $item . " \n\t\t\t\tAND lastchange=" . $time . " \n\t\t\t\tAND supplytime=" . $time . " \n\t\t\t\tAND %prefix%food_product.id = %prefix%food_option.parentid \n\t\t\t\tAND %prefix%food_ordering.productid = %prefix%food_product.id\n\t\t\t\tAND %prefix%user.userid = %prefix%food_ordering.userid");
                 //$dsp->AddDoubleRow('Ergebnis', $seat2->SeatOfUser($abfrage['userid'], 0, 2));
                 $dsp->AddDoubleRow('Was -> Wohin', $abfrage['pice'] . ' x ' . $abfrage['caption'] . ' (' . $abfrage['unit'] . ') -> ' . $abfrage['username'] . ' (' . $abfrage['firstname'] . ' ' . $abfrage['name'] . ') ' . $seat2->SeatOfUser($abfrage['userid'], 0, 2));
                 //change ende
             } elseif ($_GET["status"] == 8) {
                 $totprice = 0;
                 $prodrow = $db->qry_first("SELECT * FROM %prefix%food_ordering WHERE id = %string%", $item);
Пример #6
0
         $link = 'index.php?mod=guestlist&step=21&userid=' . $_GET['userid'];
     }
     if ($user_party['checkout']) {
         $party_row .= ' ' . $dsp->AddIcon('out', $link, t('Ausgecheckt')) . '[' . $func->unixstamp2date($user_party['checkout'], 'datetime') . ']';
     } else {
         $party_row .= ' ' . $dsp->AddIcon('not_out', $link, t('Nicht ausgecheckt'));
     }
     if (IsAuthorizedAdmin() and $user_party['checkin'] > 0 and $user_party['checkout'] > 0) {
         $party_row .= $dsp->AddIcon('delete', 'index.php?mod=guestlist&step=22&userid=' . $_GET['userid'], 'Reset Checkin');
     }
     $dsp->AddDoubleRow("Party '<i>" . $_SESSION['party_info']['name'] . "</i>'", $party_row);
 }
 // Seating
 if ($func->isModActive('seating')) {
     include_once "modules/seating/class_seat.php";
     $seat2 = new seat2();
     $user_data_seating = $seat2->SeatOfUserArray($_GET['userid']);
     if ($user_data_seating['block'] == '') {
         $seat = t('Kein Sitzplatz ausgewählt / zugeteilt.');
     } else {
         $seat = $seat2->SeatOfUser($_GET['userid'], 0, 2);
         if (IsAuthorizedAdmin()) {
             $seat .= ' ' . $dsp->AddIcon('delete', "index.php?mod=seating&action=seatadmin&step=20&blockid={$user_data_seating['block']}&row={$user_data_seating['row']}&col={$user_data_seating['col']}&userid={$user_data['userid']}", t('Löschen'));
         }
     }
     if (IsAuthorizedAdmin()) {
         $seat .= ' ' . $dsp->AddIcon('edit', 'index.php?mod=seating&action=seatadmin&step=2&userid=' . $_GET['userid'], t('Editieren'));
     }
     if ($cfg['sys_internet'] == 0 and $user_data_seating['ip']) {
         $seat .= ' IP:' . $user_data_seating['ip'];
     }
Пример #7
0
<?php

include_once "modules/seating/class_seat.php";
$seat2 = new seat2();
$timestamp = time();
if (!$party->party_id) {
    $func->information(t('Es gibt keine aktive Party. Bitte setze im Partymanager eine Party aktiv'));
} else {
    // Main-Switch
    switch ($_GET["step"]) {
        // Auswahl: Angemeldet? ja/Nein
        case '':
        case 1:
            unset($_SESSION['quick_signon']);
            $dsp->AddFieldsetStart('Direkt zu folgendem Benutzer springen');
            if ($cfg['sys_barcode_on']) {
                $dsp->AddBarcodeForm("<strong>" . t('Strichcode') . "</strong>", "", "index.php?mod=usrmgr&action=entrance&step=3&userid=");
            }
            $dsp->SetForm('index.php?mod=usrmgr&action=entrance&step=3', 'CheckinAssistantUseridForm');
            $dsp->AddTextFieldRow('userid', t('UserID'), '', '');
            $dsp->AddFormSubmitRow(t('Weiter'));
            $dsp->AddFieldsetEnd();
            $questionarr[1] = t('Bereits <b>angemeldeten Gast einchecken</b>');
            $questionarr[2] = t('Bereits <b>zu einer vergangenen Party angemeldeten Gast einchecken</b>');
            $questionarr[3] = t('Neuer Gast. Einen <b>Account erstellen</b><br /><i>Es wird nur eine E-Mail-Adresse angelegt und ein Passwort automatisch generiert. Alle weiteren Daten gibt der Benutzer beim ersten Einloggen selbst ein.</i>');
            $questionarr[4] = t('Neuer Gast. Einen <b>erweiterten Account erstellen</b><br /><i>Hier liegst du direkt am Einlass alle Benutzerdaten fest.</i>');
            $linkarr[1] = "index.php?mod=usrmgr&action=entrance&step=2&signon=1";
            $linkarr[2] = "index.php?mod=usrmgr&action=entrance&step=2&signon=0";
            $linkarr[3] = "index.php?mod=usrmgr&action=entrance&step=3&quick_signon=1";
            $linkarr[4] = "index.php?mod=usrmgr&action=entrance&step=3&quick_signon=0";
            $func->multiquestion($questionarr, $linkarr, "");
Пример #8
0
<?php

include_once "modules/seating/class_seat.php";
$seat2 = new seat2();
// Errors
if ($_GET['step'] > 1 and !$_GET['userid']) {
    $func->error(t('Es wurde kein Benutzer ausgewählt'), "index.php?mod=seating&action=seatadmin");
}
if ($_GET['step'] > 2 and !$_GET['blockid']) {
    $func->error(t('Es wurde kein Sitzblock ausgewählt'), "index.php?mod=seating&action=seatadmin&step=2&userid={$_GET['userid']}");
}
// Exec step10-query
if ($_GET['step'] == 10 and $_GET['quest']) {
    // Assign seat
    $seat2->AssignSeat($_GET['userid'], $_GET['blockid'], $_GET['row'], $_GET['col']);
    // If old owner should get a new seat, jump to step 2 an procede with this user
    if ($_GET['quest'] == 2) {
        $_GET['step'] = 2;
        $_GET['userid'] = $_GET['next_userid'];
    }
    $back_link = '';
    if ($_GET['quest'] == 1) {
        $back_link = 'index.php?mod=seating&action=seatadmin';
    }
    $func->confirmation(t('Der Sitzplatz wurde erfolgreich für %1 reserviert', $new_user['username']), $back_link);
}
// Select seat and user infos
if ($_GET['blockid'] and isset($_GET['row']) and isset($_GET['col'])) {
    $seat = $db->qry_first("SELECT s.userid, s.status, u.username, u.firstname, u.name FROM %prefix%seat_seats AS s\n  LEFT JOIN %prefix%user AS u ON s.userid = u.userid\n  WHERE blockid = %int% AND row = %string% AND col = %string%", $_GET['blockid'], $_GET['row'], $_GET['col']);
}
if ($_GET['userid']) {
Пример #9
0
 function ExportCSVCard($sep)
 {
     global $db, $config, $func, $party;
     include_once "modules/seating/class_seat.php";
     $seat2 = new seat2();
     $user_export = $config['lansuite']['version'] . " CSV Export\r\nParty: " . $config['lanparty']['name'] . "\r\nExportdate: " . $func->unixstamp2date(time(), 'daydatetime') . "\r\n\r\n";
     $user_export .= "username;name;firstname;clan;seatblock;col;row;seat;ip\n";
     $query = $db->qry("SELECT s.* FROM %prefix%seat_seats AS s\n      LEFT JOIN %prefix%seat_block AS b ON s.blockid = b.blockid\n      WHERE b.party_id = %int% AND s.status = 2\n      ORDER BY s.blockid", $party->party_id);
     while ($row_seat = $db->fetch_array($query)) {
         $userid = $row_seat["userid"];
         $row = $db->qry_first("SELECT u.*, c.name AS clan, c.url AS clanurl, p.paid, p.checkin, p.checkout, p.signondate, p.seatcontrol\n        FROM %prefix%user AS u\n        LEFT JOIN %prefix%party_user AS p ON p.user_id = u.userid\n  \t\t\tLEFT JOIN %prefix%clan AS c ON u.clanid = c.clanid\n        WHERE u.userid=%int%\n        ", $userid);
         $username = str_replace("&gt;", "", $row["username"]);
         $username = str_replace("&lt;", "", $username);
         $username = str_replace("&gt", "", $username);
         $username = str_replace("&lt", "", $username);
         $username = trim($username);
         $user_export .= $username . $sep;
         $user_export .= $row["name"] . $sep;
         $user_export .= $row["firstname"] . $sep;
         $user_export .= $row["clan"] . $sep;
         $blockid = $row_seat["blockid"];
         $row_block = $db->qry_first("SELECT orientation, name FROM %prefix%seat_block WHERE blockid=%int%", $blockid);
         $seatindex = $seat2->CoordinateToName($row_seat["col"] + 1, $row_seat["row"], $row_block["orientation"]);
         $user_export .= $row_block["name"] . $sep;
         $user_export .= $row_seat["col"] . $sep;
         $user_export .= $row_seat["row"] . $sep;
         $user_export .= $seatindex . $sep;
         $user_export .= $row_seat["ip"];
         $user_export .= "\r\n";
     }
     // end while
     return $user_export;
 }
Пример #10
0
<?php

include_once "modules/seating/class_seat.php";
$seat2 = new seat2();
$id = $_GET['id'];
$function = $_GET['function'];
$userarray = $_GET['userarray'];
$legend = $_GET['l'];
$dsp->NewContent("");
$dsp->AddSingleRow($seat2->DrawPlan($id, 0, '', $userarray[0]));
$dsp->AddContent();