#!/usr/local/bin/perl use CGI qw(:standard); ##################################### # File: ShowPage.cgi # # Takes contents of various files and # presents contents as an HTML # document. # # Files: # reporter reporterNum # abi abiNum # agricola agricolaNum # art artNum # biography biographyNum # biosis biosisNum # library libraryNum # pais paisNum # sport sportNum # dissertation dissertationNum # periodical periodicalNum # ei eiNum # # LastUse - Date/Time contents changed # ###################################### ###################################### # # Check that files are available unless(open(REPORTER,"reporter")) {error_message("reporter")}; unless(open(ABI,"abi")) {error_message("abi")}; unless(open(AGRICOLA,"agricola")) {error_message("agricola")}; unless(open(ART,"art")) {error_message("art")}; unless(open(BIOGRAPHY,"biography")) {error_message("biography")}; unless(open(BIOSIS,"biosis")) {error_message("biosis")}; unless(open(LIBRARY,"library")) {error_message("library")}; unless(open(PAIS,"pais")) {error_message("pais")}; unless(open(SPORT,"sport")) {error_message("sport")}; unless(open(DISSERTATION,"dissertation")) {error_message("dissertation")}; unless(open(PERIODICAL,"periodical")) {error_message("periodical")}; unless(open(EI,"ei")) {error_message("ei")}; unless(open (UPDATE,"LastUse")) {error_message("LastUse")}; ###################################### # # Write out HTML document print header; start_html("503 Assignments"); print h1("Student Assignment Groups"); ############################################# # # Date/Time of last contents change # while (<UPDATE>) { print "Contents last changed "; print $_; } ############################################# # # The various files # print hr(); print "The World Reporter Group<BR><BR>\n"; $num = 0; while(<REPORTER>) { $num++; print("$num. $_<BR>\n"); } close(REPORTER); ########################################## print hr(); print "The ABI/INFORM Group<BR><BR>\n"; $num = 0; while (<ABI>) { $num++; print("$num. $_<BR>\n"); } close(ABI); ########################################### print hr(); print "The AGRICOLA Group<BR><BR>\n"; $num = 0; while(<AGRICOLA>) { $num++; print("$num. $_<BR>\n"); } close(AGRICOLA); ############################################ print hr(); print "The Art Abstracts, etc. Group<br><br>\n"; $num = 0; while(<ART>) { $num++; print("$num. $_<br>\n"); } close(ART); ############################################# print hr(); print "The Biography Index, etc. Group<br><br>\n"; $num = 0; while(<BIOGRAPHY>) { $num++; print("$num. $_<br>\n"); } close(BIOGRAPHY); ############################################# print hr(); print "The BIOSIS Group<br><br>\n"; $num = 0; while(<BIOSIS>) { $num++; print("$num. $_<br>\n"); } close(BIOSIS); ############################################## print hr(); print "The Library Literature, etc. Group<br><br>\n"; $num = 0; while(<LIBRARY>) { $num++; print("$num. $_<br>\n"); } close(LIBRARY); ############################################### print hr(); print "The PAIS Group<br><br>\n"; $num = 0; while(<PAIS>) { $num++; print("$num. $_<br>\n"); } close(PAIS); ################################################# print hr(); print "The SPORTDiscus Group<br><br>\n"; $num = 0; while(<SPORT>) { $num++; print("$num. $_<br>\n"); } close(SPORT); ################################################# print hr(); print "The Dissertation Abstracts Group<br><br>\n"; $num = 0; while(<DISSERTATION>) { $num++; print("$num. $_<br>\n"); } close(DISSERTATION); #################################################### print hr(); print "The Periodical Abstracts Group<br><br>\n"; $num = 0; while(<PERIODICAL>) { $num++; print("$num. $_<br>\n"); } close(PERIODICAL); ###################################################### print hr(); print "The Ei Compendex Group<br><br>\n"; $num = 0; while(<EI>) { $num++; print("$num. $_<br>\n"); } close(EI); ###################################################### print hr(); print hr(); print "Go to the "; print a({href=>'GetInfo.cgi'},'Add/Delete'); print " page."; print hr(); print end_html; exit(0); ###################################### # # Subroutine to report error on file # opening sub error_message { print header; start_html(); print "\nError in opening file: $_[0]"; print end_html; exit(); }