1
Nocturne
xmmemberstats Question
  • 2005/5/10 7:31

  • Nocturne

  • Just popping in

  • Posts: 7

  • Since: 2005/5/2 2


Im having some problems trying to add the special ranks to the ranks section of the members. IE: Webmaster, Moderator, and others. Here is the code

include "../../mainfile.php";
include 
"../../header.php";

    
$db =& Database::getInstance();


    echo 
"<br><h4 style='text-align:center;'>Member Rank</h4><br><br>

    <table width='100%' class='head' cellpadding='4' cellspacing='1'>
    <tr align='center'>
    <td><font color=#666666>Rank</font></td>
    <td><font color=#666666>Minimum Post</td>
    <td><font color=#666666>Maximum Post</font></td>
    <td><font color=#666666>Image</font></td></tr>"
;
    
$result $db->query("SELECT * FROM ".$db->prefix("ranks")." where rank_special=0 ORDER BY rank_id");
    
$count 0;
    while ( 
$rank $db->fetchArray($result) ) {
        if (
$count == 0) {
            
$class 'odd';
        } else {
            
$class 'even';
        }
        echo 
"<tr class='$class' align='center'>
        <td>"
.$rank['rank_title']."</td>
        <td>"
.$rank['rank_min']."</td>
        <td>"
.$rank['rank_max']."</td>
        <td>"
;
        if ( 
$rank['rank_image'] ) {
            echo 
'<img src="'.XOOPS_URL.'/uploads/'.$rank['rank_image'].'" alt="" /></td>';
        } else {
            echo 
'&nbsp;';
        }
        echo
"</tr>";
        
$count++;
    }
    echo 
'</table><br /><br />';

include_once 
XOOPS_ROOT_PATH."/footer.php";
?>


Now under
$result $db->query("SELECT * FROM ".$db->prefix("ranks")." where rank_special=0 ORDER BY rank_id");

If the "rank_special=0" is changed to "rank_special=1" then you get the special ranks of webmaster, moderator, and so forth, but you loose the normal ranks, I would like to put both the normal and special ranks on there. Anyhelp will do. Thanx

2
Nocturne
Re: xmmemberstats Question
  • 2005/5/10 19:42

  • Nocturne

  • Just popping in

  • Posts: 7

  • Since: 2005/5/2 2


Any thoughts?

Login

Who's Online

69 user(s) are online (38 user(s) are browsing Support Forums)


Members: 0


Guests: 69


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits