Screen Topics body<= quote($_); } keys %cataccess); $and_cat_in = "AND tpcatid IN ($in)"; } $sth = $dbh->prepare("SELECT tptopid, tpcatid, topname FROM topic_list WHERE status='new' $and_cat_in"); $sth->execute; if ($dbh->err) { return $dbh->errstr; } @new = (); push @new, $_ while ($_ = $sth->fetchrow_hashref); unless (@new) { return "Empty! ... no topics are awaiting approval"; } $ret .= "
"; return $ret; sub load_cats_up { my $catid = shift; my $hashref = shift; $catid += 0; while ($catid) { unless ($hashref->{$catid}) { $sth = $dbh->prepare("SELECT parent, catname FROM topic_cats WHERE tpcatid=$catid"); $sth->execute; my $cat = $sth->fetchrow_hashref; if ($cat) { $hashref->{$catid} = $cat; $catid = $cat->{'parent'} } } else { $catid = $hashref->{$catid}->{'parent'}; } } } _code?> <=body page?> post: htdocs/admin/topics/screentop_do.bml _c?>