I have this in my admincp:
PHP Code:
<td class="alt1">' . $usergroupid . '</td>
I want to have it display usergroup name instead of the usergroup id. Basically I just need the loop to use when I call the id's to match with the usergroup names then display the proper names or ALL if all usergroups have access.
This is the entire page code for just that one page:
PHP Code:
if ($_REQUEST['do'] == 'modfiles') {
if ($sendtoapp){
$fcount = $db->query_first("SELECT COUNT(file_id) as fcount FROM " . TABLE_PREFIX . "download WHERE moderated = '1'");
if ($fcount['fcount'] == '0'){
print_stop_message(bfc_download_nomod_files);
} else {
print_table_start();
print_table_header("BFC-Download :: Moderated File Listing", 8);
$filesql = $db->query_read("SELECT * FROM `" . TABLE_PREFIX . "download` WHERE moderated = '1'");
while ($filerow = $db->fetch_array($filesql))
{
$file_id = $filerow['file_id'];
$version = $filerow['version'];
$name = $filerow['name'];
$title = $filerow['title'];
$description = $filerow['description'];
$usergroupid = $filerow['usergroupid'];
$type = $filerow['type'];
$size = $filerow['size'];
$username = $filerow['username'];
$userid = $filerow['userid'];
$catid = $filerow['catid'];
$bytes = vbmksize($size);
echo '<tr><td class="alt2" align="center"><a href="user.php?do=edit&u=' . $userid . '">' . $username . '</a></td><td class="alt1">' . $title . '<br /><a href="download.php?id=' . $file_id . '">' . $name . '</a></td><td class="alt2">' . $description . '</td><td class="alt1">' . $usergroupid . '</td><td class="alt2">' . $type . '</td><td class="alt1">' . $bytes . '</td><td class="alt2">' . $catid . '</td><td class="alt1"><a href="download.php?do=okfile&fid='.$file_id.'">Approve ' . $username . '\'s File</a></td></tr>';
}
}
} else {
print_stop_message(bfc_download_noapproval);
}
print_table_footer(8, '', '', 0);
}
Thanks
Steve