Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: online status neveikia

Parašė Lordcraft· 2009 Lie. 10 21:07:51
#1

openside("<center>Naujausi CS Serveriai</center>");
$result = dbquery("SELECT * FROM ".$db_prefix."money_cs ORDER BY galiojaiki DESC");

if (dbrows($result) != 0) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
while ($data = dbarray($result)) {
echo "<tr>
<td class='small'>
<img src='".THEME."images/bullet.gif'>
<a href='http://".$data['serverip']."' title='".$data['serverip']."' class='side'>".trimlink($data['serverip'], 23).":".trimlink($data['serveroprt'], 23)."</a></td>
<td align='right'>";
error_reporting(0);
$servo_ip = $data['serverip'];
$servo_port = $data['serveroprt'];
$IP = array( "$servo_ip:$servo_port"); while(list($ServerName,$Host)=each($IP)) {
list($IPAddress,$Port)=explode(":",$Host);
 
if($fp=fsockopen($IPAddress,$Port,$ERROR_NO,$ERROR_STR,(float)0.5)) {
echo("<img src='http://mu-online.lt/images/server_online.gif'>");
fclose($fp);
}
else {
echo ("<img src='http://mu-online.lt/images/server_offline.gif'>");
}
}
echo "</td></tr>";
}
echo "</table>";
} else {
echo "<div style='text-align:center'>".$locale['004']."</div>\n";
}
echo "";
closeside();





Gal galit pasakyto kodel visados ir visur rodo kad servai offline nors jie yra online. lyg ir viskas ok bet vistiek rodo offline.
P.S. serveroprt taip ir yra parasyta sql'e