Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Help With Code

  1. #11
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    with the code, its not realy a auto staff list, with the old 1, it put level 1 as management etc.....

    So it only lists management, not All staff :S

    Can any one make this, If user level = 1, only show them users?
    PHP Code:
    <table border="0">

    <?php

     
    require('config.php');

     
    $SQL mysql_query("SELECT * FROM `users` ORDER BY `level` ASC");

     while(
    $row mysql_fetch_array($SQL)) 
     {IF (
    $staff[level] == 1)
       if(!
    $n) print '<tr>';
       
    $n++;
       
       print <<<HTML
    <td><table id="table1" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="42" width="129" border="1">
        <tr>
            <font face="Verdana" color="#000000" size="1">
            <td style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; FONT-WEIGHT: normal; FONT-SIZE: 10pt; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; FONT-STYLE: normal; FONT-FAMILY: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; FONT-VARIANT: normal" align="middle" width="123" bgColor="#cce6ff" height="20">
            <b> <a href='members.php?view=Profile&user=
    {$row['username']}'>
            <font size="1" face="Verdana">
    {$row['habboname']}</font></a></b></td>
    </font>
        </tr>
        <tr>
            <font face="Verdana" color="#000000" size="1">
            <td style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; FONT-WEIGHT: normal; FONT-SIZE: 10pt; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; FONT-STYLE: normal; FONT-FAMILY: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; FONT-VARIANT: normal" align="middle" width="123" bgColor="#cce6ff" height="20">
            <i><font size="1" face="Verdana">DJ 
    {$row['username']} </td></font></i></td>
    </font>
        </tr>
    </table></td>
    HTML;
       if(
    $n!=3) continue;
       print 
    '</tr>';
       unset(
    $n);
     } 

    ?>

    </table>
    Last edited by Moh; 30-11-2006 at 11:13 AM.

  2. #12
    Join Date
    Nov 2006
    Location
    Manchester, UK
    Posts
    42
    Tokens
    0

    Default

    PHP Code:
    <table border="0"> 

    <?php 

     
    require('config.php'); 

     
    $SQL mysql_query("SELECT * FROM `users` ORDER BY `level` ASC"); 

     while(
    $row mysql_fetch_array($SQL))  
     if (
    $staff[level] == 1) {
       if(!
    $n) print '<tr>'
       
    $n++; 
        
       print <<<
    HTML 
    <td><table id="table1" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="42" width="129" border="1"
        <
    tr
            <
    font face="Verdana" color="#000000" size="1"
            <
    td style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; FONT-WEIGHT: normal; FONT-SIZE: 10pt; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; FONT-STYLE: normal; FONT-FAMILY: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; FONT-VARIANT: normal" align="middle" width="123" bgColor="#cce6ff" height="20"
            <
    b> <a href='members.php?view=Profile&user={$row['username']}'
            <
    font size="1" face="Verdana">{$row['habboname']}</font></a></b></td
    </
    font
        </
    tr
        <
    tr
            <
    font face="Verdana" color="#000000" size="1"
            <
    td style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; FONT-WEIGHT: normal; FONT-SIZE: 10pt; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; FONT-STYLE: normal; FONT-FAMILY: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; FONT-VARIANT: normal" align="middle" width="123" bgColor="#cce6ff" height="20"
            <
    i><font size="1" face="Verdana">DJ {$row['username']} </td></font></i></td
    </
    font
        </
    tr
    </
    table></td
    HTML
       if(
    $n!=3) continue; 
       print 
    '</tr>'
       unset(
    $n); 
     }  

    ?> 

    </table>

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •