$txt{'20'} |
$txt{'330'} |
$txt{'21'} |
$txt{'22'} |
~;
foreach $curcat (@categories) {
unless( $openmemgr{$curcat} ) { next; }
####
if ($catpic{$curcat} =~ /\//i) {$catpic{$curcat} = qq~ ~;}
elsif ($catpic{$curcat}) {$catpic{$curcat} = qq~ ~;}
####
$yymain .= qq~
~;
#Check to see if the subcat.txt doesn't exist, if it doesn't we still need a forum header or it looks funny
if(!(-e "$vardir/subcat.txt"))
{
$yymain .= qq~
Forum Name |
$txt{'330'} |
$txt{'21'} |
$txt{'22'} |
~;
}
#Go through the categories and creat the tables if they are needed
foreach $curcat (@categories)
{
unless( $openmemgr{$curcat} ) { next; }
fopen(FILE, "$vardir/subcat.txt");
@subcategories = ;
fclose(FILE);
$newsubcatlist="";
$foundasubcat="false";
#Go through the subcats and check to see if the curcat is found in the subcats file (It is a subcategory)
foreach $cursubcat (@subcategories)
{
chomp($cursubcat);
($cursubcatid,$cursubcatname) = split(/\|/,$cursubcat);
#Check if we found a match
if ($curcat eq $cursubcatid)
{
$foundasubcat="true";
#This little code breaks the table away from the previous category
if ($curcat ne @categories[0]) { $yymain .= qq~ ~; }
$yymain .= qq~
$cursubcatname |
$txt{'330'} |
$txt{'21'} |
$txt{'22'} |
~;
}
}
#This code adds a table header for the very first category if the very first category is not found in subcat.txt
if ((-e "$vardir/subcat.txt") && $curcat eq @categories[0] && $foundasubcat eq "false")
{
$yymain .= qq~
Forum Name |
$txt{'330'} |
$txt{'21'} |
$txt{'22'} |
~;
}
$yymain .= qq~
| |