' . ebImageTextButton('eventchallengessave', 'disk.png', EB_EVENTM_L123) . ' </div> </td></tr></table> </form> </div> '; // tab-page "Event Challenges" if ($event->getField('FixturesEnable') == TRUE) { // tab-page "Brackets" $text .= '<div id="tabs-8">'; list($bracket_html) = $event->brackets(false, 0, 'round-robin'); $text .= $bracket_html; $text .= '</div>'; // tab-page "Brackets" } break; case 'Tournament': //*************************************************************************************** // tab-page "Brackets" $text .= '<div id="tabs-6">'; list($bracket_html) = $event->brackets(false, 0, 'elimination'); $text .= $bracket_html; $text .= '</div>'; // tab-page "Brackets" break; } $text .= '</div>'; $ns->tablerender($event->getField('Name') . " ({$egame} - " . $event->eventTypeToString() . ") - " . EB_EVENTM_L1, $text); require_once FOOTERF; exit;
/** * displayEvents - Displays the events database table in * a nicely formatted html table. */ function displayPastEvents() { global $sql; global $text; global $time; $pages = new Paginator(); $array = array('latest' => array(EB_EVENTS_L4, 'EventID'), 'name' => array(EB_EVENTS_L5, TBL_EVENTS . '.Name'), 'game' => array(EB_EVENTS_L6, TBL_GAMES . '.Name'), 'type' => array(EB_EVENTS_L7, TBL_EVENTS . '.Type'), 'start' => array(EB_EVENTS_L8, TBL_EVENTS . '.StartDateTime')); if (!isset($_GET['gameid'])) { $_GET['gameid'] = "All"; } $gameid = eb_sanitize($_GET['gameid']); if (!isset($_GET['matchtype'])) { $_GET['matchtype'] = "All"; } $matchtype = eb_sanitize($_GET['matchtype']); if (!isset($_GET['orderby'])) { $_GET['orderby'] = 'game'; } $orderby = eb_sanitize($_GET['orderby']); $sort = "ASC"; if (isset($_GET["sort"]) && !empty($_GET["sort"])) { $sort = $_GET["sort"] == "ASC" ? "DESC" : "ASC"; } $game_string = $gameid == "All" ? "" : " AND (" . TBL_EVENTS . ".Game = '{$gameid}')"; $matchtype_string = $matchtype == "All" ? "" : " AND (" . TBL_GAMES . ".MatchTypes LIKE '%{$matchtype}%')"; // Drop down list to select Games to display $q_Games = "SELECT DISTINCT " . TBL_GAMES . ".*" . " FROM " . TBL_GAMES . ", " . TBL_EVENTS . " WHERE (" . TBL_EVENTS . ".Game = " . TBL_GAMES . ".GameID)" . $matchtype_string . " ORDER BY Name"; $result_Games = $sql->db_Query($q_Games); $numGames = mysql_numrows($result_Games); // Drop down list to select Match type to display $q_mt = "SELECT " . TBL_GAMES . ".*" . " FROM " . TBL_GAMES . ", " . TBL_EVENTS . " WHERE (" . TBL_EVENTS . ".Game = " . TBL_GAMES . ".GameID)" . $game_string; $result_mt = $sql->db_Query($q_mt); $num_mt = mysql_numrows($result_mt); $gmatchtypes = ''; for ($i = 0; $i < $num_mt; $i++) { $gmatchtypes .= ',' . mysql_result($result_mt, $i, TBL_GAMES . ".MatchTypes"); } $text .= '<form id="submitform" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="get">'; $text .= '<div>'; $text .= '<table class="table_left">'; $text .= '<tr>'; // Games drop down $text .= '<td>' . EB_EVENTS_L9 . '<br />'; $text .= '<select class="tbox" name="gameid" onchange="this.form.submit()">'; $text .= '<option value="All" ' . ($gameid == "All" ? 'selected="selected"' : '') . '>' . EB_EVENTS_L10 . '</option>'; for ($i = 0; $i < $numGames; $i++) { $gName = mysql_result($result_Games, $i, TBL_GAMES . ".Name"); $gid = mysql_result($result_Games, $i, TBL_GAMES . ".GameID"); $text .= '<option value="' . $gid . '" ' . ($gameid == $gid ? 'selected="selected"' : '') . '>' . htmlspecialchars($gName) . '</option>'; } $text .= '</select>'; $text .= '</td>'; // Match Types drop down $text .= '<td>' . EB_EVENTS_L32 . '<br />'; $text .= '<select class="tbox" name="matchtype" onchange="this.form.submit()">'; $text .= '<option value="All" ' . ($matchtype == "All" ? 'selected="selected"' : '') . '>' . EB_EVENTS_L10 . '</option>'; $gmatchtypes = explode(",", $gmatchtypes); $gmatchtypes = array_unique($gmatchtypes); sort($gmatchtypes); foreach ($gmatchtypes as $gmatchtype) { if ($gmatchtype != '') { $text .= '<option value="' . $gmatchtype . '" ' . ($gmatchtype == $matchtype ? 'selected="selected"' : '') . '>' . htmlspecialchars($gmatchtype) . '</option>'; } } $text .= '</select>'; $text .= '</td>'; $text .= '</tr>'; $text .= '</table>'; $game_string = $gameid == "All" ? "" : " AND (" . TBL_EVENTS . ".Game = '{$gameid}')"; $matchtype_string = $matchtype == "All" ? "" : " AND (" . TBL_EVENTS . ".MatchType = '{$matchtype}')"; $q = "SELECT count(*) " . " FROM " . TBL_EVENTS . " WHERE (" . TBL_EVENTS . ".Status = 'finished')" . $game_string . $matchtype_string; $result = $sql->db_Query($q); $totalItems = mysql_result($result, 0); $pages->items_total = $totalItems; $pages->mid_range = eb_PAGINATION_MIDRANGE; $pages->paginate(); $orderby_array = $array["{$orderby}"]; $q = "SELECT " . TBL_EVENTS . ".*, " . TBL_GAMES . ".*" . " FROM " . TBL_EVENTS . ", " . TBL_GAMES . " WHERE (" . TBL_EVENTS . ".Status = 'finished')" . " AND (" . TBL_EVENTS . ".Game = " . TBL_GAMES . ".GameID)" . $game_string . $matchtype_string . " ORDER BY {$orderby_array['1']} {$sort}, EventID DESC" . " {$pages->limit}"; $result = $sql->db_Query($q); $numEvents = mysql_numrows($result); if (!$result || $numEvents < 0) { /* Error occurred, return given name by default */ $text .= EB_EVENTS_L11 . '</div>'; $text .= '</form><br/>'; } else { if ($numEvents == 0) { $text .= EB_EVENTS_L12 . '</div>'; $text .= '</form><br/>'; } else { // Paginate & Sorting $items = ''; foreach ($array as $opt => $opt_array) { $items .= $opt == $orderby ? '<option selected="selected" value="' . $opt . '">' . $opt_array[0] . '</option>' : '<option value="' . $opt . '">' . $opt_array[0] . '</option>'; } // Paginate $text .= '<span class="paginate" style="float:left;">' . $pages->display_pages() . '</span>'; $text .= '<span style="float:right">'; // Sort By $text .= EB_PGN_L6; $text .= '<select class="tbox" name="orderby" onchange="this.form.submit()">'; $text .= $items; $text .= '</select>'; // Up/Down arrow $text .= '<input type="hidden" id="sort" name="sort" value=""/>'; if ($sort == "ASC") { $text .= '<a href="javascript:buttonval(\'ASC\');" title="Ascending"><img src="' . e_PLUGIN . 'ebattles/images/sort_asc.gif" alt="Asc" style="vertical-align:middle; border:0"/></a>'; } else { $text .= '<a href="javascript:buttonval(\'DESC\');" title="Descending"><img src="' . e_PLUGIN . 'ebattles/images/sort_desc.gif" alt="Desc" style="vertical-align:middle; border:0"/></a>'; } $text .= ' '; // Go To Page $text .= $pages->display_jump_menu(); $text .= ' '; // Items per page $text .= $pages->display_items_per_page(); $text .= '</span>'; $text .= '</div>'; $text .= '</form><br/><br/>'; /* Display table contents */ $text .= '<table class="eb_table" style="width:95%"><tbody>'; $text .= '<tr> <th class="eb_th2">' . EB_EVENTS_L13 . '</th> <th colspan="2" class="eb_th2">' . EB_EVENTS_L14 . '</th> <th class="eb_th2">' . EB_EVENTS_L15 . '</th> <th class="eb_th2">' . EB_EVENTS_L16 . '</th> <th class="eb_th2">' . EB_EVENTS_L17 . '</th> <th class="eb_th2">' . EB_EVENTS_L18 . '</th> <th class="eb_th2">' . EB_EVENTS_L19 . '</th> <th class="eb_th2">' . EB_EVENTS_L34 . '</th> </tr>'; for ($i = 0; $i < $numEvents; $i++) { $gName = mysql_result($result, $i, TBL_GAMES . ".Name"); $gIcon = mysql_result($result, $i, TBL_GAMES . ".Icon"); $event_id = mysql_result($result, $i, TBL_EVENTS . ".EventID"); $event = new Event($event_id); if ($event->getField('StartDateTime') != 0) { $startdatetime_local = $event->getField('StartDateTime') + TIMEOFFSET; $date_start = date("d M Y", $startdatetime_local); } else { $date_start = "-"; } if ($event->getField('EndDateTime') != 0) { $enddatetime_local = $event->getField('EndDateTime') + TIMEOFFSET; $date_end = date("d M Y", $enddatetime_local); } else { $date_end = "-"; } /* Nbr players */ $q_2 = "SELECT COUNT(*) as NbrPlayers" . " FROM " . TBL_PLAYERS . " WHERE (Event = '{$event_id}')"; $result_2 = $sql->db_Query($q_2); $row = mysql_fetch_array($result_2); $nbrplayers = $row['NbrPlayers']; /* Nbr Teams */ $q_2 = "SELECT COUNT(*) as NbrTeams" . " FROM " . TBL_TEAMS . " WHERE (" . TBL_TEAMS . ".Event = '{$event_id}')"; $result_2 = $sql->db_Query($q_2); $row = mysql_fetch_array($result_2); $nbrTeams = $row['NbrTeams']; /* Nbr matches */ $q_2 = "SELECT COUNT(DISTINCT " . TBL_MATCHS . ".MatchID) as NbrMatches" . " FROM " . TBL_MATCHS . ", " . TBL_SCORES . " WHERE (Event = '{$event_id}')" . " AND (" . TBL_MATCHS . ".Status = 'active')" . " AND (" . TBL_SCORES . ".MatchID = " . TBL_MATCHS . ".MatchID)"; $result_2 = $sql->db_Query($q_2); $row = mysql_fetch_array($result_2); $nbrmatches = $row['NbrMatches']; switch ($event->getField('Type')) { case "One Player Ladder": case "One Player Tournament": $nbrTeamPlayers = $nbrplayers; break; case "Team Ladder": $nbrTeamPlayers = $nbrTeams . '/' . $nbrplayers; break; case "Clan Ladder": case "Clan Tournament": $nbrTeamPlayers = $nbrTeams; break; default: } $text .= '<tr> <td class="eb_td"><a href="' . e_PLUGIN . 'ebattles/eventinfo.php?eventid=' . $event_id . '">' . $event->getField('Name') . '</a></td> <td class="eb_td"><img ' . getGameIconResize($gIcon) . '/></td> <td class="eb_td">' . $gName . '</td> <td class="eb_td">' . ($event->getField('MatchType') != '' ? $event->getField('MatchType') . ' - ' : '') . $event->eventTypeToString() . '</td> <td class="eb_td">' . $date_start . '</td> <td class="eb_td">' . $date_end . '</td> <td class="eb_td">' . $nbrTeamPlayers . '</td> <td class="eb_td">' . $nbrmatches . '</td> <td class="eb_td">' . $event->eventStatusToString() . '</td> </tr>'; } $text .= '</tbody></table><br />'; $text .= '<div>'; $text .= ebImageLink('back_to_events', '', e_PLUGIN . 'ebattles/events.php', '', 'action_back.gif', EB_EVENTP_L3 . ' ' . EB_EVENTP_L4, 'jq-button'); $text .= '</div>'; } } }
function displayRecentEvents() { global $pref; global $sql; global $text; global $time; $pages = new Paginator(); // how many rows to show per page $rowsPerPage = $pref['eb_default_items_per_page']; if (!isset($_GET['gameid'])) { $_GET['gameid'] = "All"; } $gameid = eb_sanitize($_GET['gameid']); if (!isset($_GET['matchtype'])) { $_GET['matchtype'] = "All"; } $matchtype = eb_sanitize($_GET['matchtype']); $game_string = $gameid == "All" ? "" : " AND (" . TBL_EVENTS . ".Game = '{$gameid}')"; $matchtype_string = $matchtype == "All" ? "" : " AND (" . TBL_GAMES . ".MatchTypes LIKE '%{$matchtype}%')"; // Drop down list to select Games to display $q_Games = "SELECT DISTINCT " . TBL_GAMES . ".*" . " FROM " . TBL_GAMES . ", " . TBL_EVENTS . " WHERE (" . TBL_EVENTS . ".Game = " . TBL_GAMES . ".GameID)" . $matchtype_string . " ORDER BY Name"; $result_Games = $sql->db_Query($q_Games); $numGames = mysql_numrows($result_Games); if ($numGames > 0) { //$text .= '<div>'.$uname.' '.EB_USER_L35.'</div>'; // Display list of games icons $games_links_list = '<div class="spacer">'; for ($i = 0; $i < $numGames; $i++) { $gname = mysql_result($result_Games, $i, TBL_GAMES . ".Name"); $gicon = mysql_result($result_Games, $i, TBL_GAMES . ".Icon"); $gid = mysql_result($result_Games, $i, TBL_GAMES . ".GameID"); if ($gameid == "All") { $gname_selected = EB_EVENTS_L10; } if ($gid == $gameid) { $gname_selected = $gname; } $games_links_list .= '<a href="' . e_PLUGIN . 'ebattles/events.php?gameid=' . $gid . '"><img ' . getGameIconResize($gicon) . ' title="' . $gname . '"/></a>'; $games_links_list .= ' '; } $games_links_list .= '<br /><b>' . $gname_selected . '</b></div><br />'; } $text .= $games_links_list; // Drop down list to select Match type to display $q_mt = "SELECT " . TBL_GAMES . ".*" . " FROM " . TBL_GAMES . ", " . TBL_EVENTS . " WHERE (" . TBL_EVENTS . ".Game = " . TBL_GAMES . ".GameID)" . $game_string; $result_mt = $sql->db_Query($q_mt); $num_mt = mysql_numrows($result_mt); $gmatchtypes = ''; for ($i = 0; $i < $num_mt; $i++) { $gmatchtypes .= ',' . mysql_result($result_mt, $i, TBL_GAMES . ".MatchTypes"); } $text .= '<form id="submitformrecent" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="get">'; $text .= '<div>'; $text .= '<table class="table_left">'; $text .= '<tr>'; // Match Types drop down $text .= '<td>' . EB_EVENTS_L32 . '<br />'; $text .= '<select class="tbox" name="matchtype" onchange="this.form.submit()">'; $text .= '<option value="All" ' . ($matchtype == "All" ? 'selected="selected"' : '') . '>' . EB_EVENTS_L10 . '</option>'; $gmatchtypes = explode(",", $gmatchtypes); $gmatchtypes = array_unique($gmatchtypes); sort($gmatchtypes); foreach ($gmatchtypes as $gmatchtype) { if ($gmatchtype != '') { $text .= '<option value="' . $gmatchtype . '" ' . ($gmatchtype == $matchtype ? 'selected="selected"' : '') . '>' . htmlspecialchars($gmatchtype) . '</option>'; } } $text .= '</select>'; $text .= '</td>'; $text .= '</tr>'; $text .= '</table>'; $game_string = $gameid == "All" ? "" : " AND (" . TBL_EVENTS . ".Game = '{$gameid}')"; $matchtype_string = $matchtype == "All" ? "" : " AND (" . TBL_EVENTS . ".MatchType = '{$matchtype}')"; $q = "SELECT " . TBL_EVENTS . ".*, " . TBL_GAMES . ".*" . " FROM " . TBL_EVENTS . ", " . TBL_GAMES . " WHERE (" . TBL_EVENTS . ".Status = 'finished')" . " AND (" . TBL_EVENTS . ".Game = " . TBL_GAMES . ".GameID)" . $game_string . $matchtype_string . " LIMIT 0, {$rowsPerPage}"; $result = $sql->db_Query($q); $numEvents = mysql_numrows($result); if (!$result || $numEvents < 0) { /* Error occurred, return given name by default */ $text .= EB_EVENTS_L11 . '</div>'; $text .= '</form><br/>'; } else { if ($numEvents == 0) { $text .= EB_EVENTS_L12 . '</div>'; $text .= '</form><br/>'; } else { $text .= '</div>'; $text .= '</form><br/><br/>'; /* Display table contents */ $text .= '<table class="eb_table" style="width:95%"><tbody>'; $text .= '<tr> <th class="eb_th2">' . EB_EVENTS_L13 . '</th>'; if ($gameid == "All") { $text .= '<th colspan="2" class="eb_th2">' . EB_EVENTS_L14 . '</th>'; } $text .= ' <th class="eb_th2">' . EB_EVENTS_L15 . '</th> <th class="eb_th2">' . EB_EVENTS_L16 . '</th> <th class="eb_th2">' . EB_EVENTS_L17 . '</th> <th class="eb_th2">' . EB_EVENTS_L18 . '</th> <th class="eb_th2">' . EB_EVENTS_L19 . '</th> <th class="eb_th2">' . EB_EVENTS_L34 . '</th> </tr>'; for ($i = 0; $i < $numEvents; $i++) { $gName = mysql_result($result, $i, TBL_GAMES . ".Name"); $gIcon = mysql_result($result, $i, TBL_GAMES . ".Icon"); $event_id = mysql_result($result, $i, TBL_EVENTS . ".EventID"); $event = new Event($event_id); if ($event->getField('StartDateTime') != 0) { $startdatetime_local = $event->getField('StartDateTime') + TIMEOFFSET; $date_start = date("d M Y", $startdatetime_local); } else { $date_start = "-"; } if ($event->getField('EndDateTime') != 0) { $enddatetime_local = $event->getField('EndDateTime') + TIMEOFFSET; $date_end = date("d M Y", $enddatetime_local); } else { $date_end = "-"; } /* Nbr players */ $q_2 = "SELECT COUNT(*) as NbrPlayers" . " FROM " . TBL_PLAYERS . " WHERE (Event = '{$event_id}')"; $result_2 = $sql->db_Query($q_2); $row = mysql_fetch_array($result_2); $nbrplayers = $row['NbrPlayers']; /* Nbr Teams */ $q_2 = "SELECT COUNT(*) as NbrTeams" . " FROM " . TBL_TEAMS . " WHERE (" . TBL_TEAMS . ".Event = '{$event_id}')"; $result_2 = $sql->db_Query($q_2); $row = mysql_fetch_array($result_2); $nbrTeams = $row['NbrTeams']; /* Nbr matches */ $q_2 = "SELECT COUNT(DISTINCT " . TBL_MATCHS . ".MatchID) as NbrMatches" . " FROM " . TBL_MATCHS . ", " . TBL_SCORES . " WHERE (Event = '{$event_id}')" . " AND (" . TBL_MATCHS . ".Status = 'active')" . " AND (" . TBL_SCORES . ".MatchID = " . TBL_MATCHS . ".MatchID)"; $result_2 = $sql->db_Query($q_2); $row = mysql_fetch_array($result_2); $nbrmatches = $row['NbrMatches']; switch ($event->getField('Type')) { case "One Player Ladder": case "One Player Tournament": $nbrTeamPlayers = $nbrplayers; break; case "Team Ladder": $nbrTeamPlayers = $nbrTeams . '/' . $nbrplayers; break; case "Clan Ladder": case "Clan Tournament": $nbrTeamPlayers = $nbrTeams; break; default: } $text .= '<tr> <td class="eb_td"><a href="' . e_PLUGIN . 'ebattles/eventinfo.php?eventid=' . $event_id . '">' . $event->getField('Name') . '</a></td>'; if ($gameid == "All") { $text .= '<td class="eb_td"><img ' . getGameIconResize($gIcon) . '/></td> <td class="eb_td">' . $gName . '</td>'; } $text .= ' <td class="eb_td">' . ($event->getField('MatchType') != '' ? $event->getField('MatchType') . ' - ' : '') . $event->eventTypeToString() . '</td> <td class="eb_td">' . $date_start . '</td> <td class="eb_td">' . $date_end . '</td> <td class="eb_td">' . $nbrTeamPlayers . '</td> <td class="eb_td">' . $nbrmatches . '</td> <td class="eb_td">' . $event->eventStatusToString() . '</td> </tr>'; } $text .= '</tbody></table><br />'; $text .= '<div>'; $text .= ebImageLink('link_to_eventspast', '', e_PLUGIN . 'ebattles/eventspast.php', '', 'action_back.gif', EB_EVENTS_L21, 'jq-button'); $text .= '</div>'; } } }
$text .= '<span class="paginate" style="float:left;">' . $pages->display_pages() . '</span>'; $text .= '<span style="float:right">'; // Go To Page $text .= $pages->display_jump_menu(); $text .= ' '; // Items per page $text .= $pages->display_items_per_page(); $text .= '</span><br /><br />'; /* Stats/Results */ $q = "SELECT DISTINCT " . TBL_MATCHS . ".*" . " FROM " . TBL_MATCHS . ", " . TBL_SCORES . " WHERE (" . TBL_MATCHS . ".Event = '{$event_id}')" . " AND (" . TBL_SCORES . ".MatchID = " . TBL_MATCHS . ".MatchID)" . " AND (" . TBL_MATCHS . ".Status = 'active')" . " ORDER BY " . TBL_MATCHS . ".TimeReported DESC" . " {$pages->limit}"; $result = $sql->db_Query($q); $num_rows = mysql_numrows($result); if ($num_rows > 0) { /* Display table contents */ $text .= '<table class="table_left">'; for ($i = 0; $i < $num_rows; $i++) { $match_id = mysql_result($result, $i, TBL_MATCHS . ".MatchID"); $match = new Match($match_id); $text .= $match->displayMatchInfo(eb_MATCH_NOEVENTINFO); } $text .= '</table>'; } $text .= '<br />'; $text .= '<div>'; $text .= ebImageLink('back_to_event', '', e_PLUGIN . 'ebattles/eventinfo.php?eventid=' . $event_id, '', 'action_back.gif', EB_MATCHS_L3 . ' ' . EB_MATCHS_L4, 'jq-button'); $text .= '</div>'; $text .= '</div>'; $text .= '</div>'; $ns->tablerender("{$event->getField}('Name') ({$gName} - " . $event->eventTypeToString() . ")", $text); require_once FOOTERF; exit;
} if (isset($_POST['challenge_accept'])) { // Verify form $error_str = ''; if (!empty($error_str)) { // show form again $text .= $challenge->challengeConfirmForm(); // errors have occured, halt execution and show form again. $text .= '<div class="eb_errors">' . EB_MATCHR_L14; $text .= '<ul>' . $error_str . '</ul></div>'; } else { $challenge->challengeAccept(); $text .= EB_CHALLENGE_L22; $text .= '<br />'; $text .= '<br />' . EB_CHALLENGE_L13 . ' [<a href="' . e_PLUGIN . 'ebattles/eventinfo.php?eventid=' . $event_id . '">' . EB_CHALLENGE_L14 . '</a>]<br />'; } } if (isset($_POST['challenge_decline'])) { $challenge->challengeDecline(); $text .= EB_EVENT_L69; $text .= '<br />'; $text .= '<br />' . EB_CHALLENGE_L13 . ' [<a href="' . e_PLUGIN . 'ebattles/eventinfo.php?eventid=' . $event_id . '">' . EB_CHALLENGE_L14 . '</a>]<br />'; } $ns->tablerender($event->getField('Name') . " (" . $event->eventTypeToString() . ") - " . EB_CHALLENGE_L1, $text); require_once FOOTERF; exit; ?>
if (is_gold_system_active() && $event->getField('GoldEntryFee') > 0) { $gold_param['gold_user_id'] = USERID; $gold_param['gold_who_id'] = 0; $gold_param['gold_amount'] = $event->getField('GoldEntryFee'); $gold_param['gold_type'] = EB_L1; $gold_param['gold_action'] = "debit"; $gold_param['gold_plugin'] = "ebattles"; $gold_param['gold_log'] = EB_GOLD_L7 . ": event=" . $event_id . ", div=" . $div_id; $gold_param['gold_forum'] = 0; $gold_obj->gold_modify($gold_param); } header("Location: eventinfo.php?eventid={$event_id}"); } } else { $error_str = EB_EVENT_L100; } } if (isset($_POST['jointeamevent'])) { $team_id = $_POST['team']; $event->eventAddPlayer(USERID, $team_id, FALSE); header("Location: eventinfo.php?eventid={$event_id}"); } if (!empty($error_str)) { require_once HEADERF; require_once e_PLUGIN . "ebattles/include/ebattles_header.php"; $text = $error_str; $text .= '<p>' . EB_EVENT_L101 . ' [<a href="' . e_PLUGIN . 'ebattles/eventinfo.php?eventid=' . $event_id . '">' . $event->getField('Name') . '</a>]</p>'; $ns->tablerender($event->getField('Name') . " (" . $event->eventTypeToString() . ")", $text); require_once FOOTERF; exit; }