Staff Page not Working

Dec 7, 2016
65
5
I don't know why it's not working

Code:
                <?php
                    $GetRanks = mysql_query("SELECT * FROM ranks WHERE id = 11");
                    while($Ranks = mysql_fetch_assoc($GetRanks))
                    {
                        echo "<div id='helpTitle' class='staffBoxTitle'>".$Ranks['name']."</div>";
                        
                        $GetUsers = mysql_query("SELECT * FROM users WHERE rank = '".$Ranks['id']."'");
                        while($Users = mysql_fetch_assoc($GetUsers))
                        {
                            echo "<div class='staffUser'>
                                    <div class='circle staffMember' style='";
                                        if($Users['online'] == 1) { print 'border:2px dotted #7ac552;'; } else { print 'border:2px dotted #E74C3C;'; }
                                        echo "background: url(http://localhost/habbo-imaging/avatarimage?figure=".$Users['look']."&amp;head_direction=2&amp;direction=2&amp;gesture=sml) rgba(255, 255, 255, 0.2) -2px -16px no-repeat;'>
                                    </div>
                                    
                                    <div class='StaffMemberInfo' style='margin-left:77px;'>
                                        <b><a href='index.php?url=home&username=".$Users['username']."'>".$Users['username']."</a></b><br />";
                                        if($Users['online'] == 1) {
                                            echo "<img src='app/tpl/skins/New/images/online_anim.gif'/>";
                                        } else {
                                            echo "<img src='app/tpl/skins/New/images/offline.gif'/>";
                                        }
                              echo "<br>".$Users['motto'];
                              echo "</div>
                                  </div>";
                        }
                    }
                ?>
 

regimozz

New Member
Jun 3, 2011
16
5
I don't know why it's not working

Code:
                <?php
                    $GetRanks = mysql_query("SELECT * FROM ranks WHERE id = 11");
                    while($Ranks = mysql_fetch_assoc($GetRanks))
                    {
                        echo "<div id='helpTitle' class='staffBoxTitle'>".$Ranks['name']."</div>";
                       
                        $GetUsers = mysql_query("SELECT * FROM users WHERE rank = '".$Ranks['id']."'");
                        while($Users = mysql_fetch_assoc($GetUsers))
                        {
                            echo "<div class='staffUser'>
                                    <div class='circle staffMember' style='";
                                        if($Users['online'] == 1) { print 'border:2px dotted #7ac552;'; } else { print 'border:2px dotted #E74C3C;'; }
                                        echo "background: url(http://localhost/habbo-imaging/avatarimage?figure=".$Users['look']."&amp;head_direction=2&amp;direction=2&amp;gesture=sml) rgba(255, 255, 255, 0.2) -2px -16px no-repeat;'>
                                    </div>
                                   
                                    <div class='StaffMemberInfo' style='margin-left:77px;'>
                                        <b><a href='index.php?url=home&username=".$Users['username']."'>".$Users['username']."</a></b><br />";
                                        if($Users['online'] == 1) {
                                            echo "<img src='app/tpl/skins/New/images/online_anim.gif'/>";
                                        } else {
                                            echo "<img src='app/tpl/skins/New/images/offline.gif'/>";
                                        }
                              echo "<br>".$Users['motto'];
                              echo "</div>
                                  </div>";
                        }
                    }
                ?>

Which emulator are you using? Do you definitely have a ranks table with the ID of 11? Not very good with PHP but couldn't you try pull from permissions_groups which if you're using Plus (I imagine), it might be better? Someone feel to correct me as no clue :')
 

Users who are viewing this thread

Top