#!/usr/local/bin/perl # ----------------------------------------------------------------- # Filename: top.pl # Author: John Millard <millarj@muohio.edu> # Purpose: Generates the header of all MiamiLINK pages except the main page. # See "main.pl" for that one. # # Warnings: When editing, Always use a non-wrapping text editor like # Emacs or vi. Pico will place unwanted carriage-returns in the # text wich may affect how the program displays output. -jm # If interested, you can find my .emacs configuration file at # http://www.lib.muohio.edu/~millarj/software/ # ----------------------------------------------------------------- $agent = $ENV{"HTTP_USER_AGENT"}; $agent =~s/\W.*//; $agent_test = $agent; if ($agent_test eq "Lynx") { print "Content-type: text/html", "\n\n"; print <<EOFLYNX <BODY> MiamiLINK - Miami University Libraries' Information Network<P> <a href="/">[MiamiLINK Main Menu]</a> <a href="http://mycroft.lib.muohio.edu:8081/compass?view-template=simple1">[Site Search]</a> <a href="/search/siteindex.html">[Site Index]</a> <P> ---------------------------------------------------------------------- EOFLYNX } else { print "Content-type: text/html", "\n\n"; print <<EOF; <BODY bgcolor="#FFFAFO" link="#663333" vlink="#663333"> <IMG SRC="/images/small.mlink.gif" USEMAP="#toolbar" BORDER=0> <BODY bgcolor="#FFFAFO" link="#663333" vlink="#663333"> <IMG SRC="/images/small.mlink.gif" USEMAP="#toolbar" BORDER=0> <MAP NAME="toolbar"> <area shape=rect coords="1,1,134,32" HREF="/" ALT="Go Back to the MiamiLINK Main Menu"> <area shape=rect coords="297,1,350,33" HREF="/" ALT="Go Back to the MiamiLINK Main Menu"> <AREA SHAPE=RECT COORDS="355,1,430,36" HREF="http://www2.lib.muohio.edu/cgi-bin/texis/web <AREA SHAPE=RECT COORDS="432,1,510,36" HREF="/search/siteindex.html" ALT="Site Index"> <AREA SHAPE=default HREF="/cgi-bin/redirect.pl"> </MAP> EOF } exit; #!/usr/local/bin/perl # ----------------------------------------------------------------- # Filename: bottom.pl # Author: John Millard <millarj@muohio.edu> # Purpose: Generates the common footer of MiamiLINK Pages # # Warnings: When editing, Always use a non-wrapping text editor like # Emacs or vi. Pico will place unwanted carriage-returns in the # text wich may affect how the program displays output. -jm # If interested, you can find my .emacs configuration file at # http://www.lib.muohio.edu/~millarj/software/ # ----------------------------------------------------------------- # Next line is required because we call the include as an "exec cgi" print "Content-type: text/html", "\n\n"; print "<p>\n"; # Place RAW HTML between the EOF's print <<EOF; <table border="0" width=595> <tr><td colspan=2><hr size=1 noshade></td></tr> <tr> <TD WIDTH="85%" HEIGHT="37"> <form name="form1" action="/cgi-bin/dropbox.pl" method=post> <select name="dropbox_location"> <OPTION value=""> Select a Section to Jump to:</option> <option value="http://www.lib.muohio.edu/">MiamiLINK Homepage</option> <option value=""></option> <option value="telnet://holmes.lib.muohio.edu:1500">MU Catalog: Telnet</option> <OPTION value="http://holmes.lib.muohio.edu/search/">MU Catalog: Web</option> <option value="" <option value="http://www.lib.muohio.edu/catalogs/">Online Catalogs</option> <OPTION value="http://www.lib.muohio.edu/res/">Research Tools</option> <OPTION value="http://www.lib.muohio.edu/fulltext/">Full-Text Materials</option> <OPTION value="http://www.lib.muohio.edu/inet/">Internet and Websites</option> <OPTION value="http://www.lib.muohio.edu/requests/">Library Services</option> <option value="http://www.lib.muohio.edu/libinfo/">Library Information</option> <option value=""></option> <OPTION value="http://www2.lib.muohio.edu/cgi-bin/texis/webinator/mlink/search/">Site Search</o <option value="http://www.lib.muohio.edu/search/siteindex.html">Site Index</option> <option value=""></option> <option value="http://www.lib.muohio.edu/feedback/">Comments</option> <option value=""></option> <option value="http://www.muohio.edu/">Miami University Homepage</option> </select> <option value="http://www.lib.muohio.edu/feedback/">Comments</option> <option value=""></option> <option value="http://www.muohio.edu/">Miami University Homepage</option> </select> <input type=submit value="Go"> </form> <font face="HELVETICA, ARIAL, GENEVA" size="1">Please send <a href="/feedback/">comments or s Copyright 1998, <a href="/">Miami University Libraries</a>, Oxford, Ohio</font><br> </td> <TD WIDTH="15%" ROWSPAN="2" valign=top align="right"> <font face="HELVETICA, ARIAL, GENEVA" size="1"> <A HREF="http://www.muohio.edu">MU Home</A></font> </TD> </TR> </TABLE> </body> </html> EOF #print "<P>This page was last modified on: $month $day, 19$year\n"; #print "</body></html>\n"; #!/usr/local/bin/perl # ----------------------------------------------------------------- # Filename: main.pl # Author: John Millard <millarj@muohio.edu> # Purpose: Generates the header for the main page of MiamiLINK. It also # randomly selects a graphic to appear in place of the archway # graphic. # # Warnings: When editing, Always use a non-wrapping text editor like # Emacs or vi. Pico will place unwanted carriage-returns in the # text wich may affect how the program displays output. -jm # If interested, you can find my .emacs configuration file at # http://www.lib.muohio.edu/~millarj/software/ # ----------------------------------------------------------------- $agent = $ENV{"HTTP_USER_AGENT"}; $agent =~s/\W.*//; $agent_test = $agent; if ($agent_test eq "Lynx") { print "Content-type: text/html", "\n\n"; print <<EOFLYNX <base href="http://www.lib.muohio.edu"> <BODY> MiamiLINK - Miami University Libraries' Information Network<P> <a href="/">[MiamiLINK Main Menu]</a> <a href="http://mycroft.lib.muohio.edu:8081/compass?view-template=simple1">[Site Search]</a> <a href="/search/siteindex.html">[Site Index]</a> <P> ---------------------------------------------------------------------- EOFLYNX } else { print "Content-type: text/html", "\n\n"; print "<base href=\"http://www.lib.muohio.edu\">\n"; print "<BODY bgcolor= \"#FFFAFO\" link=\"#663333\" vlink=\"#663333\">\n"; print "<TABLE valign=top cellspacing=5 border=0>\n"; print "<tr><td align=left>\n"; print "<BODY bgcolor= \"#FFFAFO\" link=\"#663333\" vlink=\"#663333\">\n"; print "<TABLE valign=top cellspacing=5 border=0>\n"; print "<tr><td align=left>\n"; # Rotating Image code #print "<a href=\"http://www.muohio.edu/courselists/\"><img src=\"/images/course-listing.gif\" bor #print "<a href=\"/libinfo/graphic.html\"><img src=\"/images/archway.gif\"border=0></a>\n"; #print "<a href=\"http://www.ala.org/bbooks/\"><img #src=\"/images/bbooks.gif\" border=0></a>\n"; # End Rotating Image Code &print_snippet; print <<EOF; </td><td align=left> <IMG SRC="/images/new4.mlink.gif" BORDER=0 usemap="#toolbar"> <!-- Start of Client Side Image Map information --> <MAP NAME="toolbar"> <AREA COORDS="405,5,455,52" HREF="http://www2.lib.muohio.edu/cgi-bin/texis/webinator/mlink/s <AREA COORDS="461,6,506,52" HREF="/search/siteindex.html"> <AREA shape="default" HREF="/cgi-bin/redirect.pl"> </MAP></tr> </table> EOF } exit; sub print_snippet { $snippet_file = "/big/usr/local/etc/httpd/includes/random_snippet.txt"; $sep = '%'; open(F, $snippet_file) || die("$snippet_file: $!"); while (<F>) { $num_quotes++ if /^$sep$/; } srand; $rq= int(rand($num_quotes) + 1); seek(F, 0, 0); #print "Content-type: text/html\n\n"; while (<F>) { if( $count == $rq ) { last if /^$sep$/; while (<F>) { if( $count == $rq ) { last if /^$sep$/; print; } $count++ if /^$sep$/; } close (F); close (S); }