[REVCMS] Staff pages

JustBoss

Member
Nov 7, 2012
50
4
Hi guys.
I'm wanting to create seperate pages for each staff department (A admin page, Mod page & so on) but the pages keep showing each rank still on each page.. How do I get it so that it only displays one group for each page? I've attached the phpcode for it below


PHP:
<div id="container">
                <div id="content" style="position: relative" class="clearfix">
                    <div id="column1" class="column">
                        <?php
                            $GetRanks = mysql_query("SELECT id,name FROM ranks WHERE id > 8 ORDER BY id DESC");
                            while($Ranks = mysql_fetch_assoc($GetRanks))
                            {
                                echo "<div class=\"habblet-container \"><div class=\"cbb clearfix green \"><h2 class=\"title\">{$Ranks['name']}</h2><div style=\"padding:5px\"><p>";
                                $GetUsers = mysql_query("SELECT username,motto,rank,last_online,online,look FROM users WHERE rank = {$Ranks['id']}");
                                while($Users = mysql_fetch_assoc($GetUsers))
                                {
                                    if($Users['online'] == 1){ $OnlineStatus = "<br><br><b><marquee width=48 behavior=alternate><font color=darkgreen>Online</font></marquee></b>"; } else { $OnlineStatus = "<br><br><font color=\"darkred\"><b>Offline</b></font>"; }
                                    echo "<img style=\"position:absolute;\" src=\"http://www.habbo.nl/habbo-imaging/avatarimage?figure={$Users['look']}&action=wav&direction=2&head_direction=3&gesture=srp&size=m\">"
                                        ."<p style=\"margin-left:80px;margin-top:20px;\">Username: <strong>{$Users['username']}</strong><br>Motto: <strong>{$Users['motto']}</strong><br><small>Last Online: ". date("D, d F Y H:i (P)", $Users['last_online']) ."</small></p>"
                                        ."<p style=\"float:right;margin-top:-30px;margin-right:5px;\">{$OnlineStatus}</p><br><br><br>";
                                }
                                echo "</div></div></div>";
                            }
                        ?>
                        <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
                    </div>
 

JayC

Always Learning
Aug 8, 2013
5,494
1,398
Code:
<div id="container">
<div id="content" style="position: relative" class="clearfix">
<div id="column1" class="column">
<?php
$GetRanks = mysql_query("SELECT id,name FROM ranks WHERE id > 8 ORDER BY id DESC");
while($Ranks = mysql_fetch_assoc($GetRanks))
{
echo "<div class=\"habblet-container \"><div class=\"cbb clearfix green \"><h2 class=\"title\">{$Ranks['name']}</h2><div style=\"padding:5px\"><p>";$GetUsers = mysql_query("SELECT username,motto,rank,last_online,online,look FROM users WHERE rank = {$Ranks['id']}");
while($Users = mysql_fetch_assoc($GetUsers))
{
if($Users['online'] == 1){ $OnlineStatus = "<br><br><b><marquee width=48 behavior=alternate><font color=darkgreen>Online</font></marquee></b>"; } else { $OnlineStatus = "<br><br><font color=\"darkred\"><b>Offline</b></font>"; }
echo "<img style=\"position:absolute;\" src=\"http://www.habbo.nl/habbo-imaging/avatarimage?figure={$Users['look']}&action=wav&direction=2&head_direction=3&gesture=srp&size=m\">"."<p style=\"margin-left:80px;margin-top:20px;\">Username: <strong>{$Users['username']}</strong><br>Motto: <strong>{$Users['motto']}</strong><br><small>Last Online: ". date("D, d F Y H:i (P)", $Users['last_online']) ."</small></p>"."<p style=\"float:right;margin-top:-30px;margin-right:5px;\">{$OnlineStatus}</p><br><br><br>";
}
echo "</div></div></div>";
}?> <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
</div>
Change id > 8 to id = 8 , id = 9, id = 10 (whatever the rank you need) and the rest will work itself out.
 

Users who are viewing this thread

Top