예제 #1
0
/* Display Unconfirmed Challenges */
$text .= '<br />';
$q = "SELECT DISTINCT " . TBL_CHALLENGES . ".*" . " FROM " . TBL_CHALLENGES . ", " . TBL_PLAYERS . " WHERE (" . TBL_CHALLENGES . ".Event = '" . $event_id . "')" . "   AND (" . TBL_CHALLENGES . ".Status = 'requested')" . " ORDER BY " . TBL_CHALLENGES . ".TimeReported DESC";
$result = $sql->db_Query($q);
$numChallenges = mysql_numrows($result);
if ($numChallenges > 0) {
    $text .= '<p><b>';
    $text .= $numChallenges . '&nbsp;' . EB_EVENT_L67;
    $text .= '</b></p>';
    $text .= '<br />';
    /* Display table contents */
    $text .= '<table class="table_left">';
    for ($i = 0; $i < $numChallenges; $i++) {
        $challenge_id = mysql_result($result, $i, TBL_CHALLENGES . ".ChallengeID");
        $challenge = new Challenge($challenge_id);
        $text .= $challenge->displayChallengeInfo(eb_MATCH_NOEVENTINFO);
    }
    $text .= '</table>';
}
$text .= '</div>';
// tabs-4 "Matches"
$text .= '<div id="tabs-5">';
$rowsPerPage = $pref['eb_default_items_per_page'];
$awards = array();
$nbr_awards = 0;
/* Latest awards */
$q = "SELECT " . TBL_AWARDS . ".*, " . TBL_PLAYERS . ".*, " . TBL_USERS . ".*" . " FROM " . TBL_AWARDS . ", " . TBL_PLAYERS . ", " . TBL_GAMERS . ", " . TBL_USERS . " WHERE (" . TBL_AWARDS . ".Player = " . TBL_PLAYERS . ".PlayerID)" . " AND (" . TBL_PLAYERS . ".Gamer = " . TBL_GAMERS . ".GamerID)" . " AND (" . TBL_GAMERS . ".User = "******".user_id)" . " AND (" . TBL_PLAYERS . ".Event = '{$event_id}')" . " ORDER BY " . TBL_AWARDS . ".timestamp DESC" . " LIMIT 0, {$rowsPerPage}";
$result = $sql->db_Query($q);
$numAwards = mysql_numrows($result);
if ($numAwards > 0) {
    /* Display table contents */
예제 #2
0
/* Display Unconfirmed Challenges */
$text .= '<br />';
$q = "SELECT DISTINCT " . TBL_CHALLENGES . ".*" . " FROM " . TBL_CHALLENGES . ", " . TBL_PLAYERS . ", " . TBL_GAMERS . " WHERE (" . TBL_CHALLENGES . ".Status = 'requested')" . "   AND ((" . TBL_PLAYERS . ".PlayerID = " . TBL_CHALLENGES . ".ChallengedPlayer)" . "    OR  ((" . TBL_PLAYERS . ".Team = " . TBL_CHALLENGES . ".ChallengedTeam)" . "   AND   (" . TBL_PLAYERS . ".Team != 0)))" . "   AND (" . TBL_PLAYERS . ".Gamer = " . TBL_GAMERS . ".GamerID)" . "   AND (" . TBL_GAMERS . ".User = '******')" . "   AND (" . TBL_GAMERS . ".Game = '{$game_id}')" . " ORDER BY " . TBL_CHALLENGES . ".TimeReported DESC";
$result = $sql->db_Query($q);
$numChallenges = mysql_numrows($result);
if ($numChallenges > 0) {
    $text .= '<p><b>';
    $text .= $numChallenges . '&nbsp;' . EB_EVENT_L67;
    $text .= '</b></p>';
    $text .= '<br />';
    /* Display table contents */
    $text .= '<table class="table_left">';
    for ($i = 0; $i < $numChallenges; $i++) {
        $challenge_id = mysql_result($result, $i, TBL_CHALLENGES . ".ChallengeID");
        $challenge = new Challenge($challenge_id);
        $text .= $challenge->displayChallengeInfo();
    }
    $text .= '</table>';
}
$text .= '</div>';
// tab-page "Matches"
/*
---------------------
Awards
---------------------
*/
$text .= '<div id="tabs-5">';
// tab-page "Awards"
// Display list of games icons
$text .= $games_links_list;
/* Stats/Results */