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 % 2 == 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 ' ';
}
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