#!/usr/bin/perl # ****S4.pl**** # 4/26/01 1:31PM # This program is called from (RRS_validate.htm). It first checks the # the validity of the password passed by the source HTML document. Next, # a table is constructed, showing current service submissions. Each table # has a reference key assigned from the database which is used as part of a link # and data parameter. This information is used by the ( ) program to change the # status of a requisition use CGI qw/:standard/; use Win32::ODBC; print header, start_html('S-4 RRS Management'), h1('
'); if (param()) { my $response = param('ACTION'); my $record = param('REQ'); my $valid = 0; if ($response eq "NONE") { $valid = validate(param('PASSWORD')); if ($valid == 0) { print h1('UNIT | ID# | TYPE | QTY | UNITS | PURPOSE | REPORT DATE | REPORT TIME | PENDING | APPROVED | CANCEL | "; my ($database) = new Win32::ODBC('RRS'); $database->Sql("SELECT * FROM REQUESTS"); while ($database->FetchRow()) { my (%data) = $database->DataHash(); my $id = $data{'ID'}; print " |
$data{'UNIT'}"; # Here docs (EOT) must be terminated without tabs, hence the identention error! print <<"EOT"; | $id EOT print " | $data{'TYPE'}"; print " | $data{'QTY'}"; print " | $data{'UNITS'}"; print " | $data{'PURPOSE'}"; print " | $data{'REPORTDATE'}"; print " | $data{'REPORTTIME'}"; print " | $data{'PENDING'}"; print " | $data{'APPROVED'}"; print " | $data{'CANCEL'}"; } print " |