how to show just one rank with revcms?

Cronus

Cerberus Founder/Developer
Jul 19, 2013
449
25
I am using revcms how do I make it show only one rank here is the code:;

Code:
$GetRanks = mysql_query("SELECT id,name FROM ranks WHERE id > 12 AND id < 13 ORDER BY id DESC");
 

Brackson

卍卍卍卍卍卍卍卍卍卍卍
Jun 20, 2013
262
46
Code:
$GetRanks = mysql_query("SELECT id, name FROM ranks WHERE id = 12  ORDER BY id DESC");

Find the code that needs to be replaced in staff.php and replace it.


If you need help doing that task, leave Habbo reply to this thread.
 

Lee_01

Active Member
Jun 28, 2012
116
32
This should make it so only rank 12 shows on the staff page. Replace what you want using this;


Code:
<div id="container">
                <div id="content">
                    <div class="column" id="column2">
                        <?php   
                    $getRanks = mysql_query("SELECT id,name FROM ranks WHERE id = 12 ORDER BY id DESC");
                    while ($Ranks = mysql_fetch_assoc($getRanks))
                    {   
                    echo '<div class="habblet-container ">       
                    <div class="cbb clearfix red ">
                    <h2 class="title"><span style="float: left;">' . $Ranks['name'] . '</span> <span style="float: right; font-weight: normal; font-size: 75%;"></span></h2>';
                    $getMembers = mysql_query("SELECT id,username,motto,look,online,last_online FROM users WHERE rank = '" . $Ranks['id'] . "'");
                    echo '<div class="box-content">';
                    if (mysql_num_rows($getMembers)> 0)
                    {
                    $oe = 1;
                    while ($member = mysql_fetch_assoc($getMembers))
                    {
                    if ($oe == 2)
                    {
                    $oe = 1;
                    }
                    else
                    {
                    $oe = 2;
            }
                echo '<table width="107%" height="50px" style="padding: 5px; margin-left: -15px; background-color: ' . (($oe == 2) ? '#fff' : '#E6E6E6') . ';">
            <tbody>
                <tr>
                    <td valign="middle" width="25">
                        <img style="margin-top: -10px;" src="http://www.habbo.nl/habbo-imaging/avatarimage?figure=' .$member['look'] . '&size=m&direction=2&head_direction=3&gesture=sml">
                    </td>
                    <td valign="top">
                        </br><p style="margin-top: -10px;" style="font-size: 100%;"><strong><a><u>' .$member['username'] . '</a></u></strong><br>Motto: ' . $member['motto'] . '' . (($member['online'] == "1") ? '<font color="darkgreen"><p style="margin-left: 165px; margin-top: -37px;"><strong>Online</stromg>': '<font color="darkred"><strong><p style="margin-left: 165px; margin-top: -37px;">Offline</stromg>') . '</p></p><p style="margin-top: -8px;"><img src="{url}/r63/c_images/album1584/ADM.gif"></p>
                        ';   
                    echo '</td>
                    </td>
                </tr>
            </tbody>
            </table>';
        }
    }
    else
    {
        echo '<i>No information available.</i';
    }
   
    echo '</div>
    </div>
</div>
    <script type="text/javascript">if (!$(document.body).hasClassName(\'process-template\')) { Rounder.init(); }</script> ';
    }
 
                        ?>
                    </div>
                    <script type="text/javascript">
                        if (!$(document.body).hasClassName('process-template')) {
                            Rounder.init();
                        }
                    </script>
 

Users who are viewing this thread

Top