#!/usr/bin/perl # by Shane T. Rogers # gsi03052@gsaix2.cc.gasou.edu # This program is used by the image map on the longer inv to select the # next box to display by gettig the name of the current file, modifing it # and returning the next box to the user. # # started 8 September 1998 # Finished 10 Spetember 1998, as if such things are ever really finished # Sheet music was the first collection this was used in # All Rights Reserved # #This is the basic URL for the collection, including the first part of the #file name. $base_url='http://library.georgiasouthern.edu/specialcollections/manu/inv/music/music'; #This adds the leading zero to numbers less than 10 $base_urlless='http://library.georgiasouthern.edu/specialcollections/manu/inv/music/music0'; #Used to roll over people going up from the last box $maxbox=46; $html=".html"; # Parse the current page being viewed &parse_page; # Search and replace the address &search_replace; # Return the HTML &return_html; sub parse_page { $reff_url=$ENV{HTTP_REFERER}; } sub search_replace { @ref_url=split('/music', $reff_url); $num=$ref_url[2]; @numm=split('.h', $num); $number=$numm[0]-1; if ($number < 1) {$number=$maxbox} if ($number<10) {$base_url=$base_urlless;} $next_url=join('',$base_url, $number, $html); } sub return_html { # Return a page of HTML that forwards the browser to the appropriate # page. I know it is a bit crude, but it should work. -- SR print "Content-type: text/html\n\n"; print "Getting Next Box\n"; print "\n"; print "
"; print "

Getting Next Page

"; }