Просмотр файла online.php

Размер файла: 627B
<? include("head.php");
$date=date("ndHis");
$users_q=mysql_query("SELECT * FROM `sh_user` WHERE `time`+60>$date ORDER BY `time` DESC");
if(mysql_num_rows($users_q)!=0){echo "Пользователи онлайн:<br/>";
while($user=mysql_fetch_array($users_q))
{echo "<a href='user.php?id=$user[id]'>$user[echologin]</a><br/>";
}}

$gost_q=mysql_query("SELECT * FROM `sh_online` WHERE `time`+60>$date ORDER BY `time` DESC");
if(mysql_num_rows($gost_q)!=0){echo "Гости онлайн:<br/>";
while($gost=mysql_fetch_array($gost_q))
{$ua=substr($gost['ua'], 0,100);echo "$ua<br/>";}
}


include("foot.php"); ?>