#!/usr/bin/perl -wT ############################################################ ## Written and copyright 2002 by ## Jacqueline D. Hamilton (kira@cgi101.com) ## ## This code is excerpted from "CGI Programming 201" ## (http://www.cgi101.com/advanced) ## ## You may use this code on your own website, however ## you may not publish or sell any copy or derivative work ## without permission of the author. ############################################################# use strict; use lib '../'; use MyBoard; &do_header("Board Administration"); print qq(

Board Administration

\n); # code will go here # Create New Groups print <Create Forum:
Forum Name Description Rank Expire Days*

*Expire days - the maximum # of days to keep posts. Default is 90 days.


EndCreate # Edit/Delete Forums # print qq( Edit Forums:

); my($sth) = $dbh->prepare("select forums.*, count(messages.id) as msgcount from forums left join messages on forums.id = messages.forum group by forums.id order by rank, name") or &dbdie; my($rv) = $sth->execute; my($f); while ($f = $sth->fetchrow_hashref) { print qq( ); } print qq(
Forum Name Description Rank # of Posts Expire Days
$f->{name} $f->{description} $f->{rank} $f->{msgcount} $f->{expiretime} [edit] [delete]
\n


\n); print qq(

Back to Groups

\n); &do_footer;