#!/usr/bin/perl -w use CGI qw(:standard -debug); use CGI::Carp qw(fatalsToBrowser); ########### Credits ################# # Script written by R. Todd Vandenbark ##################################### # -------------------------------------- # Coming from smaint.html, creates form # with bulleted list of existing staff # users with radio buttons for selection. # Submit deletes selected user from list. # -------------------------------------- #----------- define variables ---------- my $bsuname; # BSU id name my $username; # staff system username my $passwd; # staff system password my $findName; # name input, whether bsu or staff my $choice; # edit or delete script my @sfile=""; # array of staff info # -------- password file -------- my $inputfile = "../../staff.txt"; # ---- get staff list ----- open (IN, "<$inputfile") or die "Can't open $inputfile: $!\n"; @sfile = ; close IN; # ---- start selection form ---- $action = 'deletestaff.cgi'; $method = 'post'; $encoding = 'application/x-www-form-urlencoded'; my $css = '' . "\n"; my $title = 'List of staff accounts'; print header(); print start_html(-title => $title, -head => $css, -class => 'oneColFixCtrHdr'); print '
' . "\n"; print '
' . "\n"; print startform($method,$action,$encoding); print '
    '; foreach $key ( @sfile ) { # -- create list -- ( $bsuname, $username, $passwd ) = split( /:/, $key); print '
  • '. ''. $bsuname . ', ' . $username . '
  • ' . "\n"; } # -- end foreach -- print '
' . "\n"; print '

'; print reset; print '   '; print submit(-name=>'submit', -value=>'Delete'); print '

' . "\n"; print end_form(); print <
Report a problem.
Main menu. Help function EOF print '
'. "\n" . ''. "\n" . '
' . "\n"; print end_html;