Colored names for users online
Posted: Fri Apr 07, 2006 6:25 pm
I have this script and i was wondering if there was a way i could get like say Smackie (me as i am an admin on the site) was on and several others but i only wanted Smackie like green and leave the others white how would i do that? i mean something like what the forum as for admin its like red and stuff like that..
here is the online script..
thank you
Smackie
here is the online script..
Code: Select all
<?php
require 'db.php';
mysql_query("UPDATE users SET online_time=now() WHERE user_name='".$_SESSION['user_name']."'");
$members_online = mysql_query("SELECT * FROM users WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(online_time) <=300");
if(mysql_num_rows($members_online) == 0) {
echo "<font class=\"txt\">No users online.</font>";
} else {
while($members_onlinearray = mysql_fetch_array($members_online)){
echo "<font class=\"txt\">";
echo '<a class="txt" href="../index.php?pages=members_profile&user_name='.$members_onlinearray['user_name'] .'">';
echo $members_onlinearray['user_name'];
echo '</a>';
echo "</font><br>";
}
}
?>Smackie
