commit masivo.
[ecomupi.git] / include / view_active.php
blobc9058a953f45a904d6be807a70862514ffd9a67f
1 <?
2 if(!defined('TBL_ACTIVE_USERS')) {
3 die("Error processing page");
6 $q = "SELECT username FROM ".TBL_ACTIVE_USERS
7 ." ORDER BY timestamp DESC,username";
8 $result = $database->query($q);
9 /* Error occurred, return given name by default */
10 $num_rows = mysql_numrows($result);
11 if(!$result || ($num_rows < 0)){
12 echo "Error displaying info";
14 else if($num_rows > 0){
15 /* Display active users, with link to their info */
16 echo "<table align=\"left\" border=\"1\" cellspacing=\"0\" cellpadding=\"3\">\n";
17 echo "<tr><td><font size=\"2\">\n";
18 for($i=0; $i<$num_rows; $i++){
19 $uname = mysql_result($result,$i,"username");
21 echo "<a href=\"userinfo.php?user=$uname\">$uname</a> / ";
23 echo "</font></td></tr></table><br>\n";