Staff Page not working

Focusing

New Member
Dec 10, 2014
4
0
For some odd reason, my staff pages aren't working.. The pages pick up the usergroup id (such as owners, admins, mod titles)

A screenshot and coding of the /staff page

8foRVlb.gif

Code:
<div class="box blue">

<?php


                            $GetRanks = mysql_query("SELECT id,name FROM ranks WHERE id = 11 ORDER BY id DESC");
                            while($Ranks = mysql_fetch_assoc($GetRanks))
                            {
                                                            echo "<h1 class=\"header\">{$Ranks['name']}</h1><div class=\"habblet-container \"><div class=\"cbb clearfix error \"><h2 class=\"title\"></span><span style=\"float: right; font-weight: normal; font-size: 75%\">" . "</span></h2><div style=\"padding:5px\"><p>";
                                $GetUsers = mysql_query("SELECT username,motto,rank,last_online,online,look,country,role,age FROM users WHERE rank = {$Ranks['id']} ORDER by id");
                                $amount = mysql_num_rows($GetUsers);
                                while($Users = mysql_fetch_assoc($GetUsers))
                                {
                                  if($Users['online'] == 1){ $OnlineStatus = "<img src='{url}/app/tpl/skins/Habbo/images/online.gif'/> "; } else { $OnlineStatus = "<img src='{url}/app/tpl/skins/Habbo/images/offline.gif'/> "; }
                                    echo "<div style='width: 64px; height: 120px; margin-top:-22px; margin-left:-10px; float: left; background: url(https://www.habbo.it/habbo-imaging/avatarimage?figure={$Users['look']}&action=crr=42&direction=&gesture=sml&size=m&img_format=gif);'><img style=\"position:absolute;margin-left:500px;margin-top:10px;\" src=\"{url}/country/{$Users['country']}.png\"><img src=\"{url}/swfs/c_images/album1584/ADM.gif\" style=\"position:absolute;margin-left:515px;margin-top:70px;\"></div>"
                                        ."<p style=\"margin-left:80px;\">{$OnlineStatus}<a href='#'><strong>{$Users['username']}</strong></a><font color='grey'> - <i>Owner & Founder</i></font><br><br><small>Motto: {$Users['motto']}</font><br>Role: {$Users['role']} <br /> Age: {$Users['age']}<br /><br /><b>Last Online: ". date('D, d M Y', $Users['last_online']) ."</b> </small>
                                       
";if($amount > 0)
{
echo "<br><img src='{url}/app/tpl/skins/Habbo/images/staffspace.png'  style='width:520px;height:13px;'/>";
}
                                }
                                echo "</div></div></div>";
                            }
                        ?>
</div>

<div class="box green">

<?php


                            $GetRanks = mysql_query("SELECT id,name FROM ranks WHERE id = 10 ORDER BY id DESC");
                            while($Ranks = mysql_fetch_assoc($GetRanks))
                            {
                                                            echo "<h1 class=\"header\">{$Ranks['name']}</h1><div class=\"habblet-container \"><div class=\"cbb clearfix error \"><h2 class=\"title\"></span><span style=\"float: right; font-weight: normal; font-size: 75%\">" . "</span></h2><div style=\"padding:5px\"><p>";
                                $GetUsers = mysql_query("SELECT username,motto,rank,last_online,online,look,country,role,age FROM users WHERE rank = {$Ranks['id']} ORDER by id");
                                $amount = mysql_num_rows($GetUsers);
                                while($Users = mysql_fetch_assoc($GetUsers))
                                {
                                  if($Users['online'] == 1){ $OnlineStatus = "<img src='{url}/app/tpl/skins/Habbo/images/online.gif'/> "; } else { $OnlineStatus = "<img src='{url}/app/tpl/skins/Habbo/images/offline.gif'/> "; }
                                    echo "<div style='width: 64px; height: 120px; margin-top:-22px; margin-left:-10px; float: left; background: url(https://www.habbo.it/habbo-imaging/avatarimage?figure={$Users['look']}&action=crr=42&direction=&gesture=sml&size=m&img_format=gif);'><img style=\"position:absolute;margin-left:500px;margin-top:10px;\" src=\"{url}/country/{$Users['country']}.png\"><img src=\"{url}/swfs/c_images/album1584/ADM.gif\" style=\"position:absolute;margin-left:515px;margin-top:70px;\"></div>"
                                        ."<p style=\"margin-left:80px;\">{$OnlineStatus}<a href='#'><strong>{$Users['username']}</strong></a><font color='grey'> - <i>Hotel Manager</i></font><br><br><small>Motto: {$Users['motto']}</font><br>Role: {$Users['role']} <br /> Age: {$Users['age']}<br /><br /><b>Last Online: ". date('D, d M Y', $Users['last_online']) ."</b> </small>
                                       
";if($amount > 0)
{
echo "<br><img src='{url}/app/tpl/skins/Habbo/images/staffspace.png' style='width:520px;height:13px;'/>";
}
                                }
                                echo "</div></div></div>";
                            }
                        ?>
</div><input type="hidden" id="page-title" value="Home">            </div>

        </div>
       
        <div class="clear"></div>
    </div>
 

JayC

Well-Known Member
Aug 8, 2013
5,505
1,401
Code:
<div class="box blue">

<?php


                            $GetRanks = mysql_query("SELECT id,name FROM ranks WHERE id = 11 ORDER BY id DESC");
                            while($Ranks = mysql_fetch_assoc($GetRanks))
                            {
                                                            echo "<h1 class=\"header\">{$Ranks['name']}</h1><div class=\"habblet-container \"><div class=\"cbb clearfix error \"><h2 class=\"title\"></span><span style=\"float: right; font-weight: normal; font-size: 75%\">" . "</span></h2><div style=\"padding:5px\"><p>";
                                $GetUsers = mysql_query("SELECT username,motto,rank,last_online,online,look,country,role,age FROM users WHERE rank = {$Ranks['id']} ORDER by id");
                                $amount = mysql_num_rows($GetUsers);
                                while($Users = mysql_fetch_assoc($GetUsers))
                                {
                                  if($Users['online'] == 1){ $OnlineStatus = "<img src='{url}/app/tpl/skins/Habbo/images/online.gif'/> "; } else { $OnlineStatus = "<img src='{url}/app/tpl/skins/Habbo/images/offline.gif'/> "; }
                                    echo "<div style='width: 64px; height: 120px; margin-top:-22px; margin-left:-10px; float: left; background: url(https://www.habbo.it/habbo-imaging/avatarimage?figure={$Users['look']}&action=crr=42&direction=&gesture=sml&size=m&img_format=gif);'><img style=\"position:absolute;margin-left:500px;margin-top:10px;\" src=\"{url}/country/{$Users['country']}.png\"><img src=\"{url}/swfs/c_images/album1584/ADM.gif\" style=\"position:absolute;margin-left:515px;margin-top:70px;\"></div>"
                                        ."<p style=\"margin-left:80px;\">{$OnlineStatus}<a href='#'><strong>{$Users['username']}</strong></a><font color='grey'> - <i>Owner & Founder</i></font><br><br><small>Motto: {$Users['motto']}</font><br>Role: {$Users['role']} <br /> Age: {$Users['age']}<br /><br /><b>Last Online: ". date('D, d M Y', $Users['last_online']) ."</b> </small>
                                      
";if($amount > 0)
{
echo "<br><img src='{url}/app/tpl/skins/Habbo/images/staffspace.png'  style='width:520px;height:13px;'/>";
}
                                }
                                echo "</div></div></div>";
                            }
                        ?>
</div>

<div class="box green">

<?php


                            $GetRanks = mysql_query("SELECT id,name FROM ranks WHERE id = 10 ORDER BY id DESC");
                            while($Ranks = mysql_fetch_assoc($GetRanks))
                            {
                                                            echo "<h1 class=\"header\">{$Ranks['name']}</h1><div class=\"habblet-container \"><div class=\"cbb clearfix error \"><h2 class=\"title\"></span><span style=\"float: right; font-weight: normal; font-size: 75%\">" . "</span></h2><div style=\"padding:5px\"><p>";
                                $GetUsers = mysql_query("SELECT username,motto,rank,last_online,online,look,country,role,age FROM users WHERE rank = {$Ranks['id']} ORDER by id");
                                $amount = mysql_num_rows($GetUsers);
                                while($Users = mysql_fetch_assoc($GetUsers))
                                {
                                  if($Users['online'] == 1){ $OnlineStatus = "<img src='{url}/app/tpl/skins/Habbo/images/online.gif'/> "; } else { $OnlineStatus = "<img src='{url}/app/tpl/skins/Habbo/images/offline.gif'/> "; }
                                    echo "<div style='width: 64px; height: 120px; margin-top:-22px; margin-left:-10px; float: left; background: url(https://www.habbo.it/habbo-imaging/avatarimage?figure={$Users['look']}&action=crr=42&direction=&gesture=sml&size=m&img_format=gif);'><img style=\"position:absolute;margin-left:500px;margin-top:10px;\" src=\"{url}/country/{$Users['country']}.png\"><img src=\"{url}/swfs/c_images/album1584/ADM.gif\" style=\"position:absolute;margin-left:515px;margin-top:70px;\"></div>"
                                        ."<p style=\"margin-left:80px;\">{$OnlineStatus}<a href='#'><strong>{$Users['username']}</strong></a><font color='grey'> - <i>Hotel Manager</i></font><br><br><small>Motto: {$Users['motto']}</font><br>Role: {$Users['role']} <br /> Age: {$Users['age']}<br /><br /><b>Last Online: ". date('D, d M Y', $Users['last_online']) ."</b> </small>
                                      
";if($amount > 0)
{
echo "<br><img src='{url}/app/tpl/skins/Habbo/images/staffspace.png' style='width:520px;height:13px;'/>";
}
                                }
                                echo "</div></div></div>";
                            }
                        ?>
</div><input type="hidden" id="page-title" value="Home">            </div>

        </div>
      
        <div class="clear"></div>
    </div>

This code is for Rank 11 and Rank 10 you know that right?
 

Jerry

not rly active lol
Jul 8, 2013
1,957
522
Most likely, its because of this line;
$GetUsers = mysql_query("SELECT username,motto,rank,last_online,online,look,country,role,age FROM users WHERE rank = {$Ranks['id']} ORDER by id");
You seem don't have the extra columns in your users table, hence why your staff page isn't appearing right. Try removing some? like country, role, age, etc.
 

13rad

King
Sep 15, 2013
156
36
Most likely, its because of this line;

You seem don't have the extra columns in your users table, hence why your staff page isn't appearing right. Try removing some? like country, role, age, etc.

Or just add the columns country, role, and age to your users table
 

Users who are viewing this thread

Top