} else { echo _DEDICATED; } echo " "; if (strstr($data[$GSgame]['Dedicated'], 'lin')) { echo _LINUX; } elseif (strstr($data[$GSgame]['Dedicated'], 'win')) { echo _WINDOWS; } else { echo _UNKNOWN; } echo "</td></tr>" . "<tr><td>" . _SVERSION . "</td><td>" . GetArrVal($data[$GSgame]['gamever']) . "</td></tr>" . "<tr><td>" . _PING . "</td><td>" . $ping . "</td></tr>"; if ($data[$GSgame]['game_id_name'] == "BFVietnam") { echo "<tr><td>" . _HOSTADDRESS . "</td><td>" . GetArrVal($data[$GSgame]['custom']['address']) . ":" . GetArrVal($data[$GSgame]['hostport']) . " " . ASElink($data[$GSgame]['custom'], "GS") . "</td></tr>"; } else { echo "<tr><td>" . _HOSTADDRESS . "</td><td>" . GetArrVal($data[$GSgame]['custom']['address']) . ":" . GetArrVal($data[$GSgame]['hostport']) . " " . ASElink($data[$GSgame]['custom'], "NEW") . "</td></tr>"; } echo "<tr><td>" . _MAPNAME . "</td><td>" . GetArrVal($data[$GSgame]['mapname']) . "</td></tr>" . "<tr><td>" . _GAMETYPE . "</td><td>" . GetArrVal($data[$GSgame]['gametype']); if (isset($data[$GSgame]['teamname_0'])) { echo " - " . GetArrVal($data[$GSgame]['teamname_0']); } if (isset($data[$GSgame]['teamname_1'])) { echo " vs. " . GetArrVal($data[$GSgame]['teamname_1']); } if (isset($data[$GSgame]['teamname_2'])) { echo " vs. " . GetArrVal($data[$GSgame]['teamname_2']); } echo "</td></tr>" . "<tr><td>" . _PLAYERS . "</td><td>" . $vp . "/" . GetArrVal($data[$GSgame]['maxplayers']) . "</td></tr>" . "<tr><td>" . _PASSWORD . "</td><td>"; if ($data[$GSgame]['password']) { echo _PASSREQY; } else {
//this should filter out the odd characters out of playernames //they are probably for color codes like quake3 but i couldn't find any documentation on them $junk = array("", "", "", "", "", "", "", "", "�", "", "", "", "", "", "", "", ""); $host = str_replace($junk, "", $data[$GSgame]['hostname']); echo "<LINK REL=\"StyleSheet\" HREF=\"modules/" . $module_name . "/q3col.css\" TYPE=\"text/css\">" . "<table border='0' cellpadding='0' cellspacing='10' width='100%'>" . "<tr><td width='20%'>" . _SERVERNAME . "</td><td width='40%'>" . $host . "</td><td width='40%' valign='top' rowspan='20'>" . "<table><tr><td colspan=3>" . MapPic($data[$GSgame]['custom']['id'], $data[$GSgame]['mapname'], 0, "") . "</td></tr><tr><td>"; if (GetArrVal($data[$GSgame]['num_players']) != 0) { $cols[0] = array(_PLAYERNAME, _SCORE, _PING); for ($p = 0; $p <= GetArrVal($data[$GSgame]['num_players']) - 1; $p++) { $cols[$p + 1][0] = str_replace($junk, "", $data[$GSgame]['players'][$p]['name']); $cols[$p + 1][1] = GetArrVal($data[$GSgame]['players'][$p]['score']); $cols[$p + 1][2] = GetArrVal($data[$GSgame]['players'][$p]['ping']); } echo PlayerList($cols); } echo "</td></tr></table></td></tr>" . "<tr><td>" . _HOSTADDRESS . "</td><td>" . $data[$GSgame]['custom']['address'] . ":" . $data[$GSgame]['custom']['query_port'] . " " . ASElink($data[$GSgame]['custom'], "SOF") . "</td></tr>" . "<tr><td>" . _MAPNAME . "</td><td>" . $data[$GSgame]['mapname'] . "</td></tr>"; if (isset($data[$GSgame]['gameversion'])) { echo "<tr><td>" . _SVERSION . "</td><td>" . $data[$GSgame]['gameversion'] . "</td></tr>"; } echo "<tr><td>" . _PING . "</td><td>" . $ping . "</td></tr>"; echo "<tr><td>" . _PLAYERS . "</td><td>" . $data[$GSgame]['num_players'] . "/" . $data[$GSgame]['maxclients'] . "</td></tr>"; if (isset($data[$GSgame]['timelimit'])) { echo "<tr><td>" . _TIMELIMIT . "</td><td>" . $data[$GSgame]['timelimit'] . "</td></tr>"; } if (isset($data[$GSgame]['fraglimit'])) { echo "<tr><td>" . _FRAGLIMIT . "</td><td>" . $data[$GSgame]['fraglimit'] . "</td></tr>"; } if (isset($data[$GSgame]['mp_pointlimit'])) { echo "<tr><td>" . _POINTLIMIT . "</td><td>" . $data[$GSgame]['mp_pointlimit'] . "</td></tr>"; } if (isset($data[$GSgame]['capturelimit'])) {
<?php echo "<table border='0' cellpadding='0' cellspacing='10' width='100%'>" . "<tr><td width='30%'>" . _SERVERNAME . "</td><td width='40%'>" . Q3colors($data[$GSgame]['sv_hostname'], $GSTags) . "</td><td width='40%' valign='top' rowspan='15'>" . "<table><tr><td colspan=3>" . MapPic($data[$GSgame]['custom']['id'], $data[$GSgame]['mapname'], 0, "") . "</td></tr><tr><td>"; if (GetArrVal($data[$GSgame]['num_players']) != 0) { $cols[0] = array(_PLAYERNAME, _SCORE, _PING); for ($p = 0; $p <= GetArrVal($data[$GSgame]['num_players']) - 1; $p++) { $cols[$p + 1][0] = Q3colors($data[$GSgame]['players'][$p]['name'], $GSTags); $cols[$p + 1][1] = GetArrVal($data[$GSgame]['players'][$p]['score']); $cols[$p + 1][2] = GetArrVal($data[$GSgame]['players'][$p]['ping']); } echo PlayerList($cols); } echo "</td></tr></table>"; echo "</td></tr>" . "<tr><td>" . _HOSTADDRESS . "</td><td>" . $data[$GSgame]['custom']['address'] . ":" . $data[$GSgame]['custom']['query_port'] . " " . ASElink($data[$GSgame]['custom'], "Q3") . "</td></tr>" . "<tr><td>" . _SERVERTYPE . "</td><td>"; echo " "; if (strstr(GetArrVal($data[$GSgame]['version']), 'win')) { echo _WINDOWS; } elseif (strstr(GetArrVal($data[$GSgame]['version']), 'lin')) { echo _LINUX; } else { echo _UNKNOWN; } echo "<tr><td>" . _MAPNAME . "</td><td>" . GetArrVal($data[$GSgame]['mapname']) . "</td></tr>"; if (isset($data[$GSgame]['gameversion'])) { echo "<tr><td>" . _SVERSION . "</td><td>" . GetArrVal($data[$GSgame]['gameversion']) . "</td></tr>"; } echo "<tr><td>" . _PING . "</td><td>" . $ping . "</td></tr>"; echo "<tr><td>" . _GAMETYPE . "</td><td>" . GetArrVal($data[$GSgame]['g_gametype']) . "</td></tr>" . "<tr><td>" . _PLAYERS . "</td><td>" . GetArrVal($data[$GSgame]['num_players']) . "/" . GetArrVal($data[$GSgame]['sv_maxclients']) . "</td></tr>"; if (isset($data[$GSgame]['g_needpass'])) { echo "<tr><td>" . _PASSWORD . "</td><td>"; if (GetArrVal($data[$GSgame]['g_needpass'])) {
<?php echo "<table border='0' cellpadding='0' cellspacing='10' width='100%'>" . "<tr><td width='20%' valign='top'>" . _GAMENAME . "</td><td width='40%' valign='top'>" . GetArrVal($data[$GSgame]['custom']['name']) . "</td><td width='40%' valign='top' rowspan='20'>" . "<table border=0 cellpadding=0 cellspacing=7><tr><td colspan=4>" . MapPic($data[$GSgame]['custom']['id'], $data[$GSgame]['mapname'], 0, "") . "</td></tr><tr><td>"; if (GetArrVal($data[$GSgame]['numplayers']) != 0) { $cols[0] = array(_PLAYERNAME, _TEAM, _PING); for ($p = 0; $p <= GetArrVal($data[$GSgame]['numplayers']) - 1; $p++) { $cols[$p + 1][0] = GetArrVal($data[$GSgame]['players'][$p]['player']); $cols[$p + 1][1] = GetArrVal($data[$GSgame]['players'][$p]['team']); $cols[$p + 1][2] = GetArrVal($data[$GSgame]['players'][$p]['ping']); } echo PlayerList($cols); } echo "</td></tr></table></td></tr>" . "<tr><td>" . _SERVERNAME . "</td><td>" . GetArrVal($data[$GSgame]['hostname']) . "</td></tr>" . "<tr><td>" . _HOSTADDRESS . "</td><td>" . $data[$GSgame]['custom']['address'] . ":" . $data[$GSgame]['custom']['query_port'] . " " . ASElink($data[$GSgame]['custom'], "RS") . "</td></tr>"; if (isset($data[$GSgame]['gamever'])) { echo "<tr><td>" . _SVERSION . "</td><td>" . GetArrVal($data[$GSgame]['gamever']) . "</td></tr>"; } echo "<tr><td>" . _PING . "</td><td>" . $ping . "</td></tr>"; echo "<tr><td>" . _MAPNAME . "</td><td>" . GetArrVal($data[$GSgame]['mapname']) . "</td></tr>"; echo "<tr><td>" . _GAMETYPE . "</td><td>" . GetArrVal($data[$GSgame]['gametype']) . "</td></tr>" . "<tr><td>" . _PLAYERS . "</td><td>" . GetArrVal($data[$GSgame]['numplayers']) . "/" . GetArrVal($data[$GSgame]['maxplayers']) . "</td></tr>"; if (isset($data[$GSgame]['password'])) { echo "<tr><td>" . _PASSWORD . "</td><td>"; if (GetArrVal($data[$GSgame]['password']) != 1) { echo _PASSREQN; } else { echo _PASSREQY; } } if (isset($data[$GSgame]['timelimit'])) { echo "<tr><td>" . _TIMELIMIT . "</td><td>" . GetArrVal($data[$GSgame]['timelimit']) . "</td></tr>"; } if (isset($data[$GSgame]['teamplay'])) {
<?php echo "<table border='0' cellpadding='0' cellspacing='10' width='100%'>" . "<tr><td width='20%' valign='top'>" . _SERVERNAME . "</td><td width='40%' valign='top'>" . GetArrVal($data[$GSgame]['hostname']) . "</td><td width='40%' valign='top' rowspan='12'>" . "<table><tr><td colspan=3>" . MapPic($data[$GSgame]['custom']['id'], GetArrVal($data[$GSgame]['map']), 0, "") . "</td></tr><tr><td>"; if (GetArrVal($data[$GSgame]['num_players']) != 0) { $cols[0] = array(_PLAYERNAME, _SCORE, _TIME); for ($p = 0; $p <= GetArrVal($data[$GSgame]['num_players']) - 1; $p++) { $cols[$p + 1][0] = GetArrVal($data[$GSgame]['players'][$p]['name']); $cols[$p + 1][1] = GetArrVal($data[$GSgame]['players'][$p]['frags']); $cols[$p + 1][2] = intval(GetArrVal($data[$GSgame]['players'][$p]['time'])); } echo PlayerList($cols); } echo "</td></tr></table></td></tr>" . "<tr><td>" . _HOSTADDRESS . "</td><td>" . GetArrVal($data[$GSgame]['custom']['address']) . ":" . GetArrVal($data[$GSgame]['custom']['query_port']) . " " . ASElink($data[$GSgame]['custom'], "HL") . "</td></tr>" . "<tr><td>" . _PING . "</td><td>" . $ping . "</td></tr>" . "<tr><td>" . _SERVERTYPE . "</td><td>"; if (GetArrVal($data[$GSgame]['dedicated']) == 'd') { echo _DEDICATED; } else { echo _NDEDICATED; } echo " "; if (GetArrVal($data[$GSgame]['server_os']) == 'w') { echo _WINDOWS; } else { echo _LINUX; } echo "</td></tr>"; echo "<tr><td>" . _MAPNAME . "</td><td>" . GetArrVal($data[$GSgame]['map']) . "</td></tr>" . "<tr><td>" . _MOD . "</td><td>" . YesNo($data[$GSgame]['mod']) . "</td></tr>"; if (GetArrVal($data[$GSgame]['game_dir']) and GetArrVal($data[$GSgame]['mod'])) { echo "<tr><td>" . _GAMEDIR . "</td><td>/" . GetArrVal($data[$GSgame]['game_dir']) . "</td></tr>"; } echo "<tr><td>" . _GAMETYPE . "</td><td>" . GetArrVal($data[$GSgame]['game_type']) . "</td></tr>" . "<tr><td>" . _PLAYERS . "</td><td>" . GetArrVal($data[$GSgame]['num_players']) . "/" . GetArrVal($data[$GSgame]['max_players']) . "</td></tr>" . "<tr><td>" . _PASSWORD . "</td><td>"; if (GetArrVal($data[$GSgame]['needpass'])) {
<?php echo "<LINK REL=\"StyleSheet\" HREF=\"modules/" . $module_name . "/q3col.css\" TYPE=\"text/css\">"; echo "<table border='0' cellpadding='0' cellspacing='10' width='100%'>" . "<tr><td width='20%' valign='top'>" . _SERVERNAME . "</td><td width='40%' valign='top'>" . Q3colors($data[$GSgame]['sv_hostname'], $GSTags) . "</td>" . "<td width='40%' valign='top' rowspan='15'><table><tr><td colspan=3>" . MapPic($data[$GSgame]['custom']['id'], GetArrVal($data[$GSgame]['mapname']), 0, "") . "</td></tr><tr><td>"; if (GetArrVal($data[$GSgame]['num_players']) != 0) { $cols[0] = array(_PLAYERNAME, _SCORE, _PING); for ($p = 0; $p <= GetArrVal($data[$GSgame]['num_players']) - 1; $p++) { $cols[$p + 1][0] = Q3colors($data[$GSgame]['players'][$p]['name'], $GSTags); $cols[$p + 1][1] = GetArrVal($data[$GSgame]['players'][$p]['score']); $cols[$p + 1][2] = GetArrVal($data[$GSgame]['players'][$p]['ping']); } echo PlayerList($cols); } echo "</td></tr></table></td></tr>" . "<tr><td>" . _HOSTADDRESS . "</td><td>" . GetArrVal($data[$GSgame]['custom']['address']) . ":" . GetArrVal($data[$GSgame]['custom']['query_port']) . " " . ASElink($data[$GSgame]['custom'], "COD") . "</td></tr>"; echo "<tr><td>" . _MAPNAME . "</td><td>" . GetArrVal($data[$GSgame]['mapname']) . "</td></tr>"; if (isset($data[$GSgame]['.Maps'])) { $MAPS = str_replace("-", "<br>", GetArrVal($data[$GSgame]['.Maps'])); echo "<tr><td valign='top'>" . _MAPLIST . "</td><td>" . $MAPS . "</td></tr>"; } if (isset($data[$GSgame]['.Campaign'])) { echo "<tr><td>" . _CAMPAIGN . "</td><td>" . GetArrVal($data[$GSgame]['.Campaign']) . "</td></tr>"; } echo "<tr><td>" . _SVERSION . "</td><td>" . GetArrVal($data[$GSgame]['shortversion']) . "</td></tr>"; echo "<tr><td>" . _PING . "</td><td>" . $ping . "</td></tr>"; echo "<tr><td>" . _GAMETYPE . "</td><td>" . GetArrVal($data[$GSgame]['g_gametype']) . "</td></tr>" . "<tr><td>" . _PLAYERS . "</td><td>" . GetArrVal($data[$GSgame]['num_players']) . "/" . GetArrVal($data[$GSgame]['sv_maxclients']) . "</td></tr>" . "<tr><td>" . _PASSWORD . "</td><td>"; if (GetArrVal($data[$GSgame]['pswrd'])) { echo _PASSREQY; } else { echo _PASSREQN; } echo "</td></tr>";