<?php
$i=1;
$recent=date("U")-900;
$getusersonline="SELECT * from utilizatori where lasttime>'$recent'"; //grab from sql users on in last 15 minutes
$getusersonline2=mysql_query($getusersonline) or die("Could not get users");
$num=mysql_num_rows($getusersonline2);
$countguests="SELECT DISTINCT guestip from guestsonline where time>'$recent'";
$countguests2=mysql_query($countguests) or die("Could not count guests");
$thecount=mysql_num_rows($countguests2);
while($getusersonline3=mysql_fetch_array($getusersonline2))
{
$id = $getusersonline3["id"];
$mod = $getusersonline3["color"];
$avat = $getusersonline3["setavatar"];
$nume = $getusersonline3["nume"];
  print "<sup>$i.</sup><A href='profile.php?id=$id' class='$mod'><b>";
  print "$nume</b></a>  ";
$i++;
}
?>