예제 #1
0
    $text .= '</tbody></table>';
    $text .= EB_GAME_L27 . '<br />';
    $text .= '<div>';
    $gamemapslist[0] = "";
    $handle = opendir(e_PLUGIN . "ebattles/images/games_maps/");
    while ($file = readdir($handle)) {
        if ($file != "." && $file != ".." && $file != "index.html" && $file != ".svn" && $game_shortname != "" && preg_match("/" . $game_shortname . "-/", $file)) {
            $gamemapslist[] = $file;
        }
    }
    closedir($handle);
    for ($c = 1; $c <= count($gamemapslist) - 1; $c++) {
        $MapImage = $gamemapslist[$c];
        $MapName = preg_replace("/{$game_shortname}-/", "", $MapImage);
        $MapName = preg_replace("/\\..*\$/", "", $MapName);
        $text .= '<a href="javascript:changeTextGameMap(\'' . $MapImage . '\', \'' . $MapName . '\')"><img ' . getMapImageResize($MapImage) . ' title="' . $MapImage . '"/></a> ';
    }
    $text .= '
	</div>
	';
    $text .= '</div>';
    // Games Maps tab-page
    $text .= '</div>';
    // Games tab-pane
    displayGames();
    // The usual, tell e107 what to include on the page
    $ns->tablerender(EB_ADMIN_L10, $text);
}
// ========================================================
//				RECENT ACTIVITY OPTIONS MENU
// ========================================================
예제 #2
0
    $categoriesToShow["Glicko2"] = FALSE;
}
//dbg: print_r($categoriesToShow);
$mapImage = '';
foreach ($matchMaps as $matchMap) {
    if ($matchMap != '0') {
        $q_Maps = "SELECT " . TBL_MAPS . ".*" . " FROM " . TBL_MAPS . " WHERE (" . TBL_MAPS . ".MapID = '{$matchMap}')";
        $result_Maps = $sql->db_Query($q_Maps);
        $numMaps = mysql_numrows($result_Maps);
        if ($numMaps > 0) {
            $mImage = mysql_result($result_Maps, $map, TBL_MAPS . ".Image");
            $mName = mysql_result($result_Maps, $map, TBL_MAPS . ".Name");
            $mDescrition = mysql_result($result_Maps, $map, TBL_MAPS . ".Description");
            $mDescrition = $mDescrition != '' ? ' - ' . $mDescrition : '';
            $mapImage .= EB_MATCHR_L44 . ':<br />';
            $mapImage .= $mImage != '' ? '<a href="' . getImagePath($mImage, 'games_maps') . '" rel="shadowbox"><img ' . getMapImageResize($mImage) . ' title="' . $mName . '"/>' : '';
            $mapImage .= '</a> ' . $mName . $mDescrition . '<br /><br />';
        }
    }
}
// Get the scores for this match
switch ($event->getMatchPlayersType()) {
    case 'Players':
        $q = "SELECT " . TBL_MATCHS . ".*, " . TBL_SCORES . ".*, " . TBL_PLAYERS . ".*, " . TBL_USERS . ".*" . " FROM " . TBL_MATCHS . ", " . TBL_SCORES . ", " . TBL_PLAYERS . ", " . TBL_GAMERS . ", " . TBL_USERS . " WHERE (" . TBL_MATCHS . ".MatchID = '{$match_id}')" . " AND (" . TBL_SCORES . ".MatchID = " . TBL_MATCHS . ".MatchID)" . " AND (" . TBL_PLAYERS . ".PlayerID = " . TBL_SCORES . ".Player)" . " AND (" . TBL_PLAYERS . ".Gamer = " . TBL_GAMERS . ".GamerID)" . " AND (" . TBL_USERS . ".user_id = " . TBL_GAMERS . ".User)" . " ORDER BY " . TBL_SCORES . ".Player_Rank, " . TBL_SCORES . ".Player_MatchTeam";
        break;
    case 'Teams':
        $q = "SELECT " . TBL_MATCHS . ".*, " . TBL_SCORES . ".*, " . TBL_CLANS . ".*, " . TBL_TEAMS . ".*, " . TBL_DIVISIONS . ".*" . " FROM " . TBL_MATCHS . ", " . TBL_SCORES . ", " . TBL_CLANS . ", " . TBL_TEAMS . ", " . TBL_DIVISIONS . " WHERE (" . TBL_MATCHS . ".MatchID = '{$match_id}')" . " AND (" . TBL_SCORES . ".MatchID = " . TBL_MATCHS . ".MatchID)" . " AND (" . TBL_TEAMS . ".TeamID = " . TBL_SCORES . ".Team)" . " AND (" . TBL_CLANS . ".ClanID = " . TBL_DIVISIONS . ".Clan)" . " AND (" . TBL_TEAMS . ".Division = " . TBL_DIVISIONS . ".DivisionID)" . " ORDER BY " . TBL_SCORES . ".Player_Rank, " . TBL_SCORES . ".Player_MatchTeam";
        break;
    default:
}
$result = $sql->db_Query($q);