- Joined
- Mar 19, 2008
- Messages
- 143
- Reaction score
- 13
hello im currently making a script for my site
here it is:
this shows a list of users online, but i want to separate the users from the admins&mods is there anything i could use to do this i thought an IF query would do, but as im just starting out in php and SQL i don't know any other methods or how to do it properly.
here it is:
PHP:
<?php $lang->addLocale("widget.recommended"); ?>
<div class="habblet-container ">
<div class="cbb clearfix blue ">
<h2 class="title"><b><i>Online Users:</b></i></h2>
<div id="promogroups-habblet-list-container" class="habblet-list-container groups-list">
<center>
</br>
<?php
$page['id'] = "community";
echo '<b>The following users are currently online:</b>';
$getUsers = mysql_query("SELECT id,name FROM cms_users WHERE show_online = '1' ORDER BY id ASC");
$getRank = mysql_query("SELECT rank FROM users ORDER BY id ASC");
if($getRank['rank'] == "7")
{
echo '<span style="font-weight:bold;color:#339966;background: url(http://forum.ragezone.com/images/backround9.gif)">';
}
echo '<ul style="margin: 0; color:#000000">';
if(mysql_num_rows($getUsers))
{
while ($u = mysql_fetch_assoc($getUsers))
{
echo " ".$getUsers['name'].($u['name']);" ";
echo ', ';
}
echo '</ul>';
echo '</span> ';
}
?>
</div>
</div>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
this shows a list of users online, but i want to separate the users from the admins&mods is there anything i could use to do this i thought an IF query would do, but as im just starting out in php and SQL i don't know any other methods or how to do it properly.
Last edited:

