query_server(TRUE, TRUE)) { // fetch everything // query was not succesful, dumping some debug info $content.="
Error ".$gameserver->errstr."
\n"; return FALSE; } return $gameserver; }//end function TinyqueryServer $content=""; $content.=''; //$content.=''; $resultyy = mysql_query("SELECT * FROM ".$prefix."_squery_servers WHERE hideblock=1 ORDER BY id ASC"); while ($row = mysql_fetch_array($resultyy)) { //$idtt= $row['id']; $ip = $row['staticip']; $port = $row['staticport']; $qgame = $row['staticgame']; foreach($gametable as $key=>$value) { if ($key==$qgame) { $enginetype=$value; } } //$content.=''; $qport=calcqport($port,$qgame); if ($queryfromurl) { include_once($libpath."gsQuery.php"); $gameserver=gsQuery::unserializeFromURL("http://www.squery.com/sqserial/serializer.php?ip=$ip&port=$qport&protocol=$enginetype"); if(!$gameserver) { $content.="Could not fetch the serialized object."; } } else $gameserver=TinyqueryServer($ip,$qport,$enginetype); if ($gameserver) { $content.=''; $content.="
"; $content.=gametitle(htmlentities($gameserver->gamename)); $content.='
'; $content.='

'; $content.=''; $content.='
'; $gameserver->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. /////////////////////////////////////////////////////////////////////////////////// $content.='
'; $content.=""; $content.='

Server Name
'; $content.=$gameserver->htmlize($gameserver->servertitle); $content.='
'; $content.=''; $content.='
'; $content.=''; $content.=''; $content.=''; $content.='
'; $content.=$gameserver->mapname=ucwords(htmlentities($gameserver->mapname)); $content.='
'; $content.=''; $content.='
'; $content.=$gameserver->gametype=strtoupper(htmlentities($gameserver->gametype)); $content.='
'; $content.=''; $content.='
'; $content.='

IP:
'; $content.='

'; $content.=$gameserver->address; $content.='
'; $content.='
Port:'; $content.='
'; $content.=$gameserver->hostport; $content.='
'; $content.='
Users:'; $content.='
'; $content.=$gameserver->numplayers.' / '.$gameserver->maxplayers; $content.='
'; $content.='
Map:'; $content.='
'; $content.=$gameserver->mapname; $content.='
'; $content.='
Game:'; $content.='
'; $content.=$gameserver->gametype; $content.='
'; $content.='
'; $content.=''; if ($gameserver->numplayers == $gameserver->maxplayers) $content.="

This server is FULL
"; elseif ($gameserver->numplayers == 0) $content.="

This server is EMPTY
"; $content.='
'; } $content.='
'; } // end main loop $content.='
'; //$content.=showCredits(showVersion()); $content.="".showVersion().""; $content.='
'; ?>