#!/usr/bin/perl use CGI qw/:standard/; require "common.sub"; print header; &Create_DB_Connection; &get_info; &print_results; # Disconnect from the database $dbh->disconnect; ################ BEGIN GET INFO SUBROUTINE sub get_info{ $SQL="SELECT oid,* FROM timeclock WHERE total_time = 0 ORDER BY l_name"; #my $sth = &Do_SQL; &Do_SQL; } ################ END GET INFO SUBROUTINE ################ BEGIN PRINT RESULTS SUBROUTINE sub print_results{ print <Pennswoods.net - Timeclock Search
Search Results

HTML while ($pointer = $sth->fetchrow_hashref){ $oid = $pointer->{'oid'}; $emp_id = $pointer->{'emp_id'}; $date = $pointer->{'date'}; $f_name = $pointer->{'f_name'}; $l_name = $pointer->{'l_name'}; $start_hour = $pointer->{'start_hour'}; $start_minute = $pointer->{'start_minute'}; $end_hour = $pointer->{'end_hour'}; $end_minute = $pointer->{'end_minute'}; $total_time = $pointer->{'total_time'}; $start_stamp = $pointer->{'start_stamp'}; $end_stamp = $pointer->{'end_stamp'}; $comment = $pointer->{'comment'}; ## Make our HTML look better if no data. $oid = " " if($oid eq ""); $emp_id = " " if($emp_id eq ""); $date = " " if($date eq ""); $start_hour = " " if($start_hour eq ""); $start_minute = " " if($start_minute eq ""); $end_hour = " " if($end_hour eq ""); $end_minute = " " if($end_minute eq ""); $start_stamp = " " if($start_stamp eq ""); $end_stamp = " " if($end_stamp eq ""); $total_time = " " if($total_time eq ""); $comment = " " if($comment eq ""); print < HTML } # End of while. print<


Main Page
HTML } # End of print_results subroutine ################ END PRINT RESULTS SUBROUTINE
Pennswoods.net - Employee Timeclock Database
Delete
Oid
Employee ID
Date
Name
Clocked In
Clocked Out
Total Time
Start Stamp
End Stamp
Comment
[Delete] $oid $emp_id $date $f_name $l_name $start_hour:$start_minute $end_hour:$end_minute $total_time $start_stamp $end_stamp $comment