#!/usr/bin/perl -w use CGI qw(:standard -debug); use CGI::Carp qw(fatalsToBrowser); ########### Credits ################# # Script written by R. Todd Vandenbark ##################################### #----------- 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 @sfile=""; # array of staff info # -------- password file -------- my $inputfile = "../staff.txt"; open (IN, "<$inputfile") or die "Can't open $inputfile: $!\n"; @sfile = ; close IN; # ---- start selection form ---- $method = 'post'; $action = 'editstaff.cgi'; $encoding = 'application/x-www-form-urlencoded'; my $css = ''; my $title = 'List of staff accounts'; print header(); print start_html(-title => $title, -head => $css, -class => 'oneColFixCtrHdr'); print '
'; print '
'; print startform($method,$action,$encoding); print '
    '; foreach $key ( @sfile ) { # -- create list -- ( $bsuname, $username, $passwd ) = split( /:/, $key); print '
  • '. ''. $bsuname . '
  • ' . "\n"; } # -- end foreach -- print '
'; print '

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

'. ''. '
'; print end_html;