Enthusiast: Member Count
I created this back when my fanlisting collective ran on Enthusiast; there are several others like it out there, so I'm sure this has been seen in so many different ways. Of course, Hannah's version » works just as well as mine.
Code
Place this in members.php or something similar, outside your Enthusiast admin panel. Make sure /path/to/your/main/directory/ is replaced with the absolute path to your main directory (where the config.php file is held, outside your Enthusiast admin panel).
<table class="owned" width="100%">
<thead><tr>
<th class="tc">Fanlisting</th>
<th class="tc">Member Count</th>
</tr></thead>
<?php
require("/path/to/your/main/directory/config.php");
$select = "SELECT * FROM `$db_owned` WHERE `status` = '2' ORDER BY `subject` ASC";
$true = mysql_query($select);
if($true == false) {
exit("<p>ERROR: Oops! Looks like there is an issue!</p>\n");
}
else {
while($getItem = mysql_fetch_array($true)) {
$approved = mysql_num_rows(mysql_query("SELECT * FROM `" . $getItem['dbtable'] . "` WHERE `pending` = '0'"));
$pending = mysql_num_rows(mysql_query("SELECT * FROM `" . $getItem['dbtable'] . "` WHERE `pending` = '1'"));
echo "<tbody><tr>\n";
echo "<td style=\"text-align: center;\">" . $getItem['subject'] . "</td>\n";
echo "<td style=\"text-align: center;\">" . $approved . " (" . $pending . " Pending)</td>\n";
echo "</tr></tbody>\n";
}
}
?>
</table>
Comments
Currently no comments!