07.05.2013, 15:17
Witam, mam problem. Robię plugin i pętla while nie wyświetla mi wszystkich wyników tylko 1 ;/
Oto kod
Oto kod
Kod PHP:
while($servers = $db->fetch_array($query))
{
$ip = $servers['ip'];
$game = $servers['game'];
$server_ip = $servers['id'];
$ip1 = explode(":", $ip);
$gq = new GameQ();
$gq->addServer('serwer', array($game, $ip1[0], $ip1[1]));
$gq->setOption('timeout', 250);
$gq->setFilter('normalise');
$gq->setFilter('sortplayers', 'gq_ping');
$results = $gq->requestData();
$server_name = $results['serwer']['hostname'];
$server_map = $results['serwer']['map'];
$server_players = $results['serwer']['num_players']."/".$results['serwer']['max_players'];
$server_name1 = explode("@", $server_name);
$server_name = $server_name1[0];
$status = "<img src=\"images/servers_list/online.png\" alt=\"Online\" class=\"tipTip\" title=\"Online\"/>";
if($server_name == '')
{
$status = "<img src=\"images/servers_list/offline.png\" alt=\"Offline\" class=\"tipTip\" title=\"Offline\"/>";
}
eval("\$serverROW = \"".$templates->get("server_row")."\";");
}