#!/usr/bin/perl -w use CGI qw(:standard -debug); use CGI::Carp qw(fatalsToBrowser); ########## credits ################## # Created by Todd Vandenbark # ###################################### # -------------------------------------- # Takes input from manualStudentLogin.html # and searches student.txt file for matching # ID, last name, or organization. Presents # matching results in a bulleted list. # Submits input to studentrept.cgi # to generate report of individual student's # record of dates and times spent studying. # -------------------------------------- #----------- define variables ---------- my $id; # student ID# my $username; # BSU username my $last; # last name my $first; # firstname my $org; # Greek organization my $session; # study session my $inStudents; # file of students in system my $inSessions; # file of study sessions my @s1list = ""; # temp input array my @studentlist = ""; # array of students $inStudents = '../../student.txt'; # list of students open (IN, "$inStudents") || die "Can't open $inStudents: $!\n"; @s1list = ; close IN; @studentlist = sort @s1list; # ---- start selection form ---- $method = 'post'; $action = 'studentrept.cgi'; $encoding = 'application/x-www-form-urlencoded'; my $css = ''; my $title = 'Report by student'; my $logo = ''; $subtitle = 'Select from list:'; print header(); print start_html(-title => $title, -head => $css, -class => 'oneColFixCtrHdr'); print '
'; print "\n"; print '
'; print h2("$subtitle"); print startform($method,$action,$encoding); print "\n"; print '
    ' . "\n"; foreach $key (@studentlist) { # read in student list ($id, $username, $first, $last, $org, $session) = split(/:/, $key); print '
  • ' . "\n" . '' . $last . ', ' . $first . ', ' . $id . "\n" . '
  • ' . "\n"; } print '
'; print "\n"; print '

'; print reset; print '   '; print submit(-name=>'submit', -value=>'Report'); print end_form(); print "\n"; print <

Report a problem.
Main menu. Help function EOF &footerprint(); # ------ subroutines used ------------------------------------ sub footerprint { print '
'. "\n" . ''. "\n" . '
' . "\n"; print end_html; }