Staff page badges are not showing up.

WanknessHD

Hardcore Habboer
Jun 13, 2011
48
5
I am trying to display badges on my staff page, and I am able to see them but the badge id is not linking correctly.

so this:
PHP:
<?php
                            $GetRanks = mysql_query("SELECT id,name FROM ranks WHERE id < 8 AND id > 2 ORDER BY id DESC");
                            while($Ranks = mysql_fetch_assoc($GetRanks))
                            {
                                echo "<div class=\"habblet-container \"><div class=\"cbb clearfix blue \"><font size=1><h2 class=\"title\">{$Ranks['name']}s</h2></font><div style=\"padding:5px\"><p>";
                                $GetUsers = mysql_query("SELECT username,motto,rank,last_online,online,look,country FROM users WHERE rank = {$Ranks['id']}");
                                while($Users = mysql_fetch_assoc($GetUsers))
                                {
                                    $Bans = mysql_query("SELECT * FROM `bans` WHERE `added_by` = '" . $Users['username'] . "'");
                                    $BanCount = mysql_num_rows($Bans);
                                    $Tickets = mysql_query("SELECT * FROM `moderation_tickets` WHERE `moderator_id` = '" . $Users['id'] . "'");
                                    $TicketsCount = mysql_num_rows($Tickets);
                                    $getBadges = mysql_query("SELECT * FROM `user_badges` WHERE `user_id` = '".$Users['username']."' ORDER LIMIT 6");
                                    $badges = mysql_fetch_array($getBadges);
                                    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 "<img style=\"position:absolute;\" src=\"http://www.habbo.nl/habbo-imaging/avatarimage?figure={$Users['look']}&action=wav&direction=2&head_direction=3&gesture=srp\">"
                                        ."<p style=\"margin-left:80px;margin-top:20px;\"><strong><span style=\"color:green;\"><a style=\"text-decoration:none\" href= \"{url}/home/{$Users['username']}\">{$Users['username']}</a> - {$OnlineStatus}</span></strong><br><b>Motto:</b> {$Users['motto']}<br><small><b>Last Online:</b> ". date("l jS \of F \a\t h:i:s A", $Users['last_online']) ."</small><br><b>CFH's:</b> {$TicketsCount} | <b>Bans:</b> {$BanCount}<br><img src=\"{url}/swf/c_images/album1584/{$badges['badge_id']}.gif\" style=\"display:inline;\" draggable=\"false\"></p>"
                                        ."<div style='width: 48px; display: inline;height: 48px;margin-top: -60px;margin-right: 20px;float: right; background: url({url}/app/tpl/skins/Habbo/images/flags_small/{$Users['country']}.png); background-position:center; background-repeat:no-repeat;'></div><br><br><br>";
                                }
                                echo "</div></div></div>";
                            }
                        
                        ?>

Which gives me this:
e9eee4ba4c844af097625d5353786dc6.png

and when I right click view image its this: http:/link/swf/c_images/album1584/.gif

Could anyone point to what I am doing wrong? Im kinda confused and frustrated why it's not.
 

JayC

Always Learning
Aug 8, 2013
5,493
1,398
"{url}/swf/c_images/album1584/{$badges['badge_id']}.gif\"

You are selecting 6 badges, but not loop throughing each element ur only displaying $badges
 

WanknessHD

Hardcore Habboer
Jun 13, 2011
48
5
"{url}/swf/c_images/album1584/{$badges['badge_id']}.gif\"

You are selecting 6 badges, but not loop throughing each element ur only displaying $badges
Okay I understand, are you able to show me an example I could go off of? Im not very good at php.
I was basically just trying to copy it from showing badges from my profile page.
PHP:
<?php
                        $getBadges = mysql_query("SELECT * FROM `user_badges` WHERE `user_id` = '".$user['id']."' ORDER BY rand() LIMIT 13");
                        if (mysql_num_rows($getBadges) == 0)
                            echo 'You do not have any badges!';
                        else
                        {
                            while ($badgeInfo = mysql_fetch_array($getBadges))
                            {       
                                echo '<img src="{url}/swf/c_images/album1584/'.$badgeInfo['badge_id'].'.gif" style="display:inline;" draggable="false"> ';   
                            }
                        }   
                        
                        ?>
 

Users who are viewing this thread

Top