FATAL [$errno] $errstr
\n"; echo " Fatal error in line $errline of file $errfile"; echo ", PHP " . PHP_VERSION . " (" . PHP_OS . ")
\n"; echo ""; die(); break; case ERROR: echo "ERROR [$errno] $errstr
\n"; echo " Error in line $errline of file $errfile"; echo ", PHP " . PHP_VERSION . " (" . PHP_OS . ")
\n"; break; case WARNING: echo "WARNING [$errno] $errstr
\n"; echo " Non-Fatal error in line $errline of file $errfile"; echo ", PHP " . PHP_VERSION . " (" . PHP_OS . ")
\n"; break; case OTHER: echo "PARSE [$errno] $errstr
\n"; echo " Parse error in line $errline of file $errfile"; echo ", PHP " . PHP_VERSION . " (" . PHP_OS . ")
\n"; break; default: echo $errno; break; } echo "-->"; } // set to the user defined error handler $old_error_handler = set_error_handler("myErrorHandler"); // globalize our vars :0 $ip = $_GET['ip']; $port = $_GET['port'];$qgame = $_GET['game']; $libpath="./SQuery/lib/"; // require our main library =) require($libpath.'main.lib.php'); ////////////////////////////////////////////////////////// function queryServer($address, $port, $protocol) { global $libpath; include_once($libpath."gsQuery.php"); if(!$address && !$port && !$protocol) { echo "No parameters given\n"; return FALSE; } $gameserver=gsQuery::createInstance($protocol, $address, $port); if(!$gameserver) { echo "Could not instantiate gsQuery class. Does the protocol you've specified exist?\n"; return FALSE; } if(!$gameserver->query_server(TRUE, TRUE)) { // fetch everything // query was not succesful, dumping some debug info echo "
Error ".$gameserver->errstr."
\n"; return FALSE; } return $gameserver; } function showFavorites() { //$numservers= mysql_numrows(mysql_query("SELECT * FROM ".$prefix."_squery_servers WHERE hideserver=1")); global $favorites,$numservers,$prefix; //$cnt = count($favorites); $cnt = $numservers -1; echo "("; if($numservers == 0){ echo"There are no servers active in the server list"; echo ")";} else{ $var1= 0; while ($var1 <= $cnt){ $resultyy = mysql_query("SELECT * FROM ".$prefix."_squery_servers WHERE hideserver=1 ORDER BY id ASC"); while ($row = mysql_fetch_array($resultyy)) { $idtt= $row['id']; $servername1tt= $row['servername']; $staticip1tt = $row['staticip']; $staticport1tt = $row['staticport']; $staticgame1tt = $row['staticgame']; //$fav=array("$servername1,$staticip1,$staticport1,$staticgame1"); //echo " $servername1tt,$staticip1tt,$staticport1tt,$staticgame1tt
"; echo " $servername1tt "; if ($var1 < $cnt) echo checkmark2(); $var1++; } } echo ")"; }// END else $server == 0 } $pagetitle = "-.:: SQuery ".$version." ::."; include("header.php"); ?>

      Host:      Port:      Game:   
$value) { if ($key==$qgame) $enginetype=$value; } } echo"Choose one of the next servers for their online status:
"; ?>

$value) { if ($key==$qgame) { $enginetype=$value; } } } if ($ip && $port) { ?>
gamename))?>

rules[".admin"]<>"") { ?> rules["admin"]<>"") { ?> rules["_admin"]<>"") { ?> rules["adminname"]<>"") { ?> rules["admin name"]<>"") { ?> rules["administrator"]<>"") { ?> rules[".administrator"]<>"") { ?> rules[".email"]<>"") { ?> rules["_email"]<>"") { ?> rules["sv_contact"]<>"") { ?> rules["adminemail"]<>"") { ?> rules["admin email"]<>"") { ?> rules["admin e-mail"]<>"") { ?> rules[".e-mail"]<>"") { ?> rules[".icq"]<>"") { ?> rules["icq"]<>"") { ?> rules[".website"]<>"") { ?> rules["_website"]<>"") { ?> rules[".location"]<>"") { ?> rules["_location"]<>"") { ?> rules["location"]<>"") { ?> rules["email"]<>"") { ?> rules[".url"]<>"") { ?> rules["web"]<>"") { ?> rules["webpage"]<>"") { ?> rules["url"]<>"") { ?> rules[".irc"]<>"") { ?> rules["irc"]<>"") { ?> rules["cpu"]<>"") { ?> rules[".cpu"]<>"") { ?> rules["server spec"]<>"") { ?> rules["connection"]<>"") { ?> rules["gamestartup"]<>"") { ?> rules["gameversion"]<>"") { ?> rules["plug"]<>"") { ?> rules["motd"]<>"") { ?>
Server name:htmlize($gameserver->servertitle)?>
Server Address:address?>:hostport?>   
Server Version:gameversion)?>
Players:numplayers?> / maxplayers; if ($gameserver->numplayers == $gameserver->maxplayers) echo "   (This server is FULL)"; elseif ($gameserver->numplayers == 0) echo "   (This server is EMPTY)"; ?>
Admin Name:rules[".admin"]?>
Admin Name:rules["admin"]?>
Admin Name:rules["_admin"]?>
Admin Name:rules["adminname"]?>
Admin Name:rules["admin name"]?>
Admin Name:rules["administrator"]?>
Admin Name:rules[".administrator"]?>
Admin Email:rules[".email"]?>
Admin Email:rules["_email"]?>
Admin Email:rules["sv_contact"]?>
Admin Email:rules["adminemail"]?>
Admin Email:rules["admin email"]?>
Admin Email:rules["admin e-mail"]?>
Admin Email:rules[".e-mail"]?>
Admin ICQ:rules[".icq"]?>
Admin ICQ:rules["icq"]?>
Website:rules[".website"]?>
Website:rules["_website"]?>
Server Location:rules[".location"]?>
Server Location:rules["_location"]?>
Server Location:rules["location"]?>
Admin Email:rules["email"]?>
Website:rules[".url"]?>
Website:rules["web"]?>
Website:rules["webpage"]?>
Website:rules["url"]?>
IRC Channel:rules[".irc"]?>
IRC Channel:rules["irc"]?>
CPU:rules["cpu"]?>
CPU:rules[".cpu"]?>
CPU:rules["server spec"]?>
Connection:rules["connection"]?>
Last Boot:rules["gamestartup"]?>
Game Ver:rules["gameversion"]?>
Motto:rules["plug"]?>
Motto:rules["motd"]?>

password) { case "1": echo "This server requires a password to join (Private Server)"; break; case"0": echo "This server is open to the public (No password)"; break; default: echo "Server Password Setting is Unknown."; break; } ?>

docvars($gameserver); ///////////////////////////////////////////////////////// // function is called, sees server type, creates a pathname to pictures based on mapname and server type. $mappic=domappic($gameserver); // if the picture isn't there, sets to unknown.gif. /////////////////////////////////////////////////////////////////////////////////// ?>
<?=htmlentities($gameserver->maptitle)?>

mapname=ucwords(htmlentities($gameserver->mapname)); ?> gametype=strtoupper(htmlentities($gameserver->gametype)); ?> rules["sv_punkbuster"]<>"") { ?>
Current Map:mapname?>
Game Type:gametype?>
PunkBuster:rules["sv_punkbuster"] == 1 ? "Enabled" : "Disabled")?>

Player Information

playerteams)) //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// { // No Team Info (like COD) ?>
playerkeys["name"]) { ?> playerkeys["score"]) { ?> playerkeys["goal"]) { ?> playerkeys["leader"]) { ?> playerkeys["enemy"]) { ?> playerkeys["kia"]) { ?> playerkeys["roe"]) { ?> playerkeys["ping"]) { ?> playerkeys["kills"]) { ?> playerkeys["deaths"]) { ?> playerkeys["skill"]) { ?> playerkeys["time"]) { ?> players)) { echo ""; } else { for ($i=0;$i<$gameserver->numplayers;$i++) { echo ""; if ($gameserver->playerkeys["name"]) { ?> playerkeys["score"]) { ?> playerkeys["goal"]) { ?> playerkeys["leader"]) { ?> playerkeys["enemy"]) { ?> playerkeys["kia"]) { ?> playerkeys["roe"]) { ?> playerkeys["ping"]) { ?> playerkeys["kills"]) { ?> playerkeys["deaths"]) { ?> playerkeys["skill"]) { ?> playerkeys["time"]) { ?> "; } } ?>
Player Name Score Goals Leader Enemy KIA ROE Ping Kills Deaths Skill Time
(none)  
htmlize($gameserver->players[$i]["name"])?> players[$i]["score"]?> players[$i]["goal"]?> players[$i]["leader"]?> players[$i]["enemy"]?> players[$i]["kia"]?> players[$i]["roe"]?> players[$i]["ping"]?> players[$i]["kills"]?> players[$i]["deaths"]?> players[$i]["skill"]?> players[$i]["time"]?>

team1?>
teamscore1) { ?>
Players on this team: teamcnt1?> Points scored: teamscore1?> scorelimit) { ?> / scorelimit?>
team2?>
teamscore2) { ?>
Players on this team: teamcnt2?> Points scored: teamscore2?> scorelimit) { ?> / scorelimit?>
playerkeys["name"]) { ?> playerkeys["ping"]) { ?> playerkeys["score"]) { ?> playerkeys["deaths"]) { ?> playerkeys["kills"]) { ?> playerkeys["time"]) { ?> numplayers+1;$i++) { if ($gameserver->playerteams[$i] == "1") { $o++; echo ""; if ($gameserver->playerkeys["name"]) { echo ""; } if ($gameserver->playerkeys["ping"]) { echo ""; } if ($gameserver->playerkeys["score"]) { echo ""; } if ($gameserver->playerkeys["deaths"]) { echo ""; } if ($gameserver->playerkeys["kills"]) { echo ""; } if ($gameserver->playerkeys["time"]) { echo ""; } echo ""; } } if ($o == 0) echo ""; ?>
Player Name Ping Score Deaths Kills Time
".$gameserver->htmlize($gameserver->players[$i]["name"])."".$gameserver->players[$i]["ping"]."".$gameserver->players[$i]["score"]."".$gameserver->players[$i]["deaths"]."".$gameserver->players[$i]["kills"]."".$gameserver->players[$i]["time"]."
(none)   
playerkeys["name"]) { ?> playerkeys["ping"]) { ?> playerkeys["score"]) { ?> playerkeys["deaths"]) { ?> playerkeys["kills"]) { ?> playerkeys["time"]) { ?> numplayers+1;$i++) { if ($gameserver->playerteams[$i] == "2") { $o++; echo ""; if ($gameserver->playerkeys["name"]) { echo ""; } if ($gameserver->playerkeys["ping"]) { echo""; } if ($gameserver->playerkeys["score"]) { echo""; } if ($gameserver->playerkeys["deaths"]) { echo""; } if ($gameserver->playerkeys["kills"]) { echo ""; } if ($gameserver->playerkeys["time"]) { echo""; } echo""; } } if ($o == 0) echo ""; ?>
Player Name Ping Score Deaths Kills Time
".$gameserver->htmlize($gameserver->players[$i]["name"])."".$gameserver->players[$i]["ping"]."".$gameserver->players[$i]["score"]."".$gameserver->players[$i]["deaths"]."".$gameserver->players[$i]["kills"]."".$gameserver->players[$i]["time"]."
(none)   

Spectators: numplayers;$i++) { if ($gameserver->playerteams[$i] == "3") { $o++; echo $gameserver->htmlize($gameserver->players[$i]["name"]); if ($o < $gameserver->spec) echo ", "; } } if ($o == 0) echo "(none)"; ?> Offline"; } ?>