[RevCMS] Staff pages

Results 1 to 5 of 5
  1. #1
    Member ThisBoss is offline
    MemberRank
    Nov 2012 Join Date
    43Posts

    [RevCMS] Staff pages

    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? Rank 8 is the lowest staff rank with rank 14 being the highest staff rank. I've attached the phpcode for it below

    PHP 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>
    Last edited by ThisBoss; 19-11-14 at 12:38 AM.


  2. #2
    www.Epic Hosts.co.uk Terrum is offline
    Grand MasterRank
    Jun 2008 Join Date
    EpicHosts,co.ukLocation
    1,322Posts

    Re: [RevCMS] Staff pages

    Change > to = on this line:

    Code:
    "SELECT id,name FROM ranks WHERE id > 8 ORDER BY id DESC"
    (So it shows id = 8)

    And then change '8' to the id of which rank you wish to show only.

  3. #3
    Member ThisBoss is offline
    MemberRank
    Nov 2012 Join Date
    43Posts

    Re: [RevCMS] Staff pages

    Quote Originally Posted by Terrum View Post
    Change > to = on this line:

    Code:
    "SELECT id,name FROM ranks WHERE id > 8 ORDER BY id DESC"
    (So it shows id = 8)

    And then change '8' to the id of which rank you wish to show only.
    edit: thanks :)

  4. #4
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,613Posts

    Re: [RevCMS] Staff pages

    Quote Originally Posted by ThisBoss View Post
    edit: thanks :)
    Please let us now if you have solved the issue so this thread can be marked as solved.

  5. #5
    Elite Member Kristophers is offline
    Member +Rank
    Dec 2013 Join Date
    198Posts

    Re: [RevCMS] Staff pages

    It's solved. I've done this and if any reader see's the id = 8 they should understand that it should be that and to make sure its solved here you go!

    Spoiler:

    <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>






Advertisement