err question

Drakey

New Member
Oct 30, 2011
6
0
can anyone like fix this code to only allow certain ranks on the staff page, like if i want it to only show 3-8 what code would that be here is what i have:
PHP:
<?php
 
function GetDescr($level)
{
    switch ($level)
    {
        case 10:
       
            return '';
        case 9:
 
            return '';
        case 8:
       
            return '';
        case 7:
       
            return '';
           
        case 6:
       
            return '';
           
        case 5:
       
            return '';
           
        case 4:
       
            return '';
 
       
   
        default:
       
            return '';
    }
}
 
$getGroups = dbquery("SELECT id,name FROM ranks WHERE id >= 3 ORDER BY id DESC");
 
while ($group = mysql_fetch_assoc($getGroups))
{   
    echo '<div class="habblet-container ">       
<div class="cbb clearfix green ">
<h2 class="title"><span style="float: left;">' . clean($group['name']) . '</span> <span style="float: right; font-weight: normal; font-size: 75%;">' . GetDescr($group['id']) . '</span></h2>';
   
    $getMembers = dbquery("SELECT id,username,motto,look,online,last_online,rank FROM users WHERE rank = '" . $group['id'] . "' ORDER BY id ASC");
   
    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;
            }
           
            if($member['username'] == "Jontycat")
            {
                $username = '<font color="#EE1289">Jontycat</font>';
            }
            elseif($member['username'] == "Jazba")
            {
                $username = '<font color="orange">Jazba</font>';
            }
       
            elseif($member['username'] == "acid")
            {
                $username = '<font color="purple">acid</font>';
            }
 
           
            else
            {
                $username = clean($member['username']);
            }
   
            echo '<table width="107%" 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=l&direction=2&head_direction=3&gesture=sml&size=sml">
                    </td>
                    <td valign="top">
                        <b style="font-size: 110%;"><a href="%www%/home/' . clean($member['username']) . '">' . $username . '</a></b><br />
                        Motto: <i>' . clean($member['motto']) . '</i><br /> Last Visit: ' . @date('l \t\h\e\ d\t\h\ \o\f\ F, Y', $member['last_online']) . '
                        <br />';
 
?>
                    </td>
                    <td valign="top" style="float: right;">
                    <?php if($member['online'] == 1){ ?>
                        <b style="color: green;">Online</b> <?php } else { ?>
                        <b style="color: darkred;">Offline</b> <?php } ?>
                    </td>
                </tr>
            </tbody>
            </table>
<?php
        }
    }
    else
    {
        echo '<i>No information avaliable.</i>';
    }
   
    echo '</div>
    </div>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName(\'process-template\')) { Rounder.init(); }</script> ';
}
 
?>

love you all init <3
 

Users who are viewing this thread

Top