DJ Page

Results 1 to 3 of 3
  1. #1
    Member Tequiro is offline
    MemberRank
    May 2013 Join Date
    67Posts

    DJ Page

    I was trying to add a DJ page by editing my old staff page, but i'm facing a problem.
    I'm getting 3 columns, but I only want one.



    I'm using this code:

    <?php
    $GetRanks = mysql_query("SELECT * FROM users WHERE dj = 1");
    while($Ranks = mysql_fetch_assoc($GetRanks))
    {
    echo "<div class=\"habblet-container \"><div class=\"cbb clearfix blue \"><h2 class=\"title\">DeeJay</h2><div style=\"padding:5px\"><p>";
    $GetUsers = mysql_query("SELECT username,motto,rank,last_online,online,look FROM users WHERE rank = {$Ranks['id']}");
    while($Users = mysql_fetch_assoc($GetUsers))
    {
    if($Users['online'] == 1){ $OnlineStatus = "<font color=\"darkgreen\"><b>Online</b></font>"; } else { $OnlineStatus = "<font color=\"darkred\"><b>Offline</b></font>"; }
    echo "<img style=\"position:absolute;\" src=\"http://www.habbo.com/habbo-imaging/avatarimage?figure={$Users['look']}&head_direction=3&direction=3&gesture=sml\">"
    ."<p style=\"margin-left:80px;margin-top:20px;\">Naam: <strong>{$Users['username']}</strong><br>Motto: <strong>{$Users['motto']}</strong><br><small>Laatst Online: ". date("D, d F Y H:i (P)", $Users['last_online']) ."</small></p>"
    ."<p style=\"float:right;margin-top:-30px;margin-right:5px;\">{$OnlineStatus}</p><br><br><br>";
    }
    echo "</div></div></div>";
    }
    ?>


  2. #2
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,613Posts

    Re: DJ Page

    Code:
    <?php
    echo "<div class=\"habblet-container \"><div class=\"cbb clearfix blue \"><h2 class=\"title\">DeeJay</h2><div style=\"padding:5px\"><p>";
    $GetRanks = mysql_query("SELECT * FROM users WHERE dj = 1");
    while($Ranks = mysql_fetch_assoc($GetRanks))
    {
    $GetUsers = mysql_query("SELECT username,motto,rank,last_online,online,look FROM users WHERE rank = {$Ranks['id']}");
    while($Users = mysql_fetch_assoc($GetUsers))
    {
    if($Users['online'] == 1){ $OnlineStatus = "<font color=\"darkgreen\"><b>Online</b></font>"; } else { $OnlineStatus = "<font color=\"darkred\"><b>Offline</b></font>"; }
    echo "<img style=\"position:absolute;\" src=\"http://www.habbo.com/habbo-imaging/avatarimage?figure={$Users['look']}&head_direction=3&direction=3&gesture=sml\">"
    ."<p style=\"margin-left:80px;margin-top:20px;\">Naam: <strong>{$Users['username']}</strong><br>Motto: <strong>{$Users['motto']}</strong><br><small>Laatst Online: ". date("D, d F Y H:i (P)", $Users['last_online']) ."</small></p>"
    ."<p style=\"float:right;margin-top:-30px;margin-right:5px;\">{$OnlineStatus}</p><br><br><br>";
    }
    echo "</div></div></div>";
    }
    ?>
    Give that a try ^^

  3. #3
    Member Tequiro is offline
    MemberRank
    May 2013 Join Date
    67Posts

    Re: DJ Page

    Hmm it doesn't seem to select any user now.
    Db looks like this:




Advertisement