#!/usr/bin/perl use CGI; print $q->header(); printf $q->startform; printf "

CVS User Management


"; printf "

"; printf "Please select which cvs repository your would like to administer.

"; foreach my $rep (<@reps>) { printf $q->radio_group (-name => 'cvsrep', -values => [$rep], -linebreak => 'true'); } printf "
"; printf "Please select the function to use.

"; my @functions =
('Register_User','Delete_User','Show_All_Users','Reset_Password'); foreach my $func (<@functions>) { printf $q->checkbox_group (-name => 'function',
-values => [$func], -linebreak
=> 'true', -defaults => 'other'); } printf "
"; printf $q->reset; printf $q->submit ('Submit', 'Submit'); printf $q->endform; %formvals = $q->Vars(); my $repaccess = $formvals{cvsrep}; my $repfunction = $formvals{function}; if($repfunction =~ /Register_User/) {
printf $logo; &displayreg($repaccess); } elsif ($repfunction =~ /Delete_User/) { printf $logo; &displaydel($repaccess); } elsif ($repfunction =~ /Show_All_Users/) { printf $logo; &showallusers($repaccess); } elsif ($repfunction =~ /Reset_Password/) { printf $logo; &displayreset($repaccess); } sub displayreg() { printf $q->h1("CVS New User registation for $_[0]"); # Print Header printf $q->start_form; printf "
"; printf "Please enter the details below to register a new user ";print"

"; printf "Users Username from GD "; print $q->textfield(-name=>'username',-size=>'20');print"

"; printf "Users Email Address "; print $q->textfield(-name=>'emailaddr',-size=>'30');print"

"; printf $q->hidden(-name =>'mode',-value=>'regthisuser'); printf $q->hidden(-name =>'repaccess',-value=>$_[0]); printf $q->submit(-value=>'Submit'); printf " "; printf $q->reset; printf $q->endform; printf "
"; }