Questa è parte del file php che legge i dati dal DB:
...
// -----------------------
// NOW RETURN ONLINE
// USERS
// -----------------------
$query = "SELECT user_name FROM $user WHERE ($time_start - user_date) < $active ORDER BY user_name ASC";
$sql = mysql_query($query,$db) or die("&output=false");
$a = 0;
while($row = mysql_fetch_assoc($sql))
{
$a++;
print "&__online$a=$row[user_name]";
}
mysql_free_result($sql);
%>
mentre la parte del filmato che mette i dati nel list-box è:
...
l.load(read_mysql + "?" + l.toString());
l.onLoad = function()
{
...
// -------------------
// who's online
// -------------------
var i = 1;
whosonline.removeAll();
whosonline.addItem("-- who's online ? --");
while (this['__online' + i] != undefined)
{
whosonline.addItem(this['__online' + i]);
i++;
}
whosonline.sortItemsBy('labels', 'ASC');
...
Eccolo quà.

Rispondi quotando
