| Start date | Start time | End date | End time | Duration |
|---|---|---|---|---|
| $date2s | $stime | $date2e | $etime | $duration2 |


#!/usr/bin/perl -w
use CGI qw(:standard -debug);
use CGI::Carp qw(fatalsToBrowser);
use Time::Local;
########## credits ##################
# Created by Todd Vandenbark #
######################################
#----------- define variables ----------
my $idnum; # ID received from form
my $form1; # input form
my $sessnfile; # text file of study sessions
my @sessions=""; # study sessions to search
my @results=(); # matching sessions found
my $totalhrs=0; # total hours studied
$baseurl="http://studylog.firesidelibrarian.com/code/cgi";
$logo = '
';
# ---- get info from form
$form1 = 'findstudent.cgi';
$student = param("student");
($idnum, $username, $first, $last, $org, $session) = split(/:/, $student);
# ---- check for missing input ---- #
if (!$student) { # none selected
$title = 'oops...';
$subtitle = 'Missing input';
$content = '
Please select a student from the list.
' . "\n" . '' . "\n"; &pgprint(); exit; } # ---- open input file of study sessions -- $sessnfile = '../../session.txt'; open (IN, "$sessnfile") || die "Can't open $sessnfile: $!\n"; @sessions =| Start date | Start time | End date | End time | Duration |
|---|---|---|---|---|
| $date2s | $stime | $date2e | $etime | $duration2 |

