#!/usr/bin/perl ################################################# # SPECIAL BOOK PAGE # STRUCTURED BASED ON CONFIG HERE # AND CONTENT OF FILES IN THIS DIRECTORY # # CKC 6/2008 # ################################################ use CGI; require "/home/www/cgi-bin/suplib.lib"; require "/home/www/lib/custom.pl"; my $debug = 0; my $query = new CGI; my $directory = clean_param( $query->param('d') ); my $file = clean_param( $query->param('f') ); my $valid; # for checking if config directories exist ### CONFIG ### MAIN DIRECTORIES IN MENU my @subDirs = ( "Key Points", "Cases", "Discussion Points", "Questions and Topics", "Graduate Notes", "Sample Syllabi"); ### OTHER PAGES ALLOWED TO EMBED FROM HERE my @arbDirs = ( "Description.htm", "Links.htm" ); my $stem = "/home/www/cgi-bin/economiclaw/"; my $hrefStem = "/economiclaw/"; my $isbn = "0804756708"; my $cover = "0804756708.jpg"; my $description = <This textbook companion website provides materials for both students and instructors, and will be updated over the life of The Economic Approach to Law, Second Edition. Please select chapters directly from the resource links above, or click on the additional sections listed below.

Note:  These materials are provided online as HTML for your convenience. The formulas and figures in some documents may have slight presentation and alignment issues due to conversion from word processing software. If you wish to print these materials, you should use the [DOWNLOAD AS WORD DOC] or [DOWNLOAD AS PDF] buttons at the top of most pages. In some cases, we are providing only PDFs because we cannot ensure the equations will appear properly in all browsers.

DESC # HEAD & STYLESHEETS my $mode = &print_head("/sup_custom.css"); # custom stylesheet(s) &customTitle; # PRINT TOP NAV ( 1 in second spot suppresses left nav ); &nav($mode, 1); # VALID DIRECTORY GIVEN ? my %subDirsHash; for my $subDir (@subDirs) { say ("$subDir"); $subDirsHash{$subDir} = 1; } if ( $subDirsHash{$directory} == 1 or ( $directory eq "" && ( length($file) > 0 ) ) ){ $valid = 1 }else{ $valid = 0 } # LEFT-HAND NAVIGATION &customLeftNav( $cover, $hrefStem, @subDirs ) if $valid; # IF LOOKING FOR INDEX if ( $file eq 'index' ) { &customIndex( $hrefStem, $directory ); # MAIN CONTENT }elsif ( $valid ){ say ( "stem is $stem, directory is $directory, file is $file" ); &embedHTMLPage( $stem, $directory, $file ); # ELSE SHOW MAIN PAGE }else{ &customMainPage( $isbn, $cover, $description, @subDirs ); } # FOOTER &foot($mode); ############################################### sub say { if ($debug) { print "$_\n" for (@_); } } sub customTitle { my $title = "THE ECONOMIC APPROACH TO LAW, 2nd ED."; my $author = "by THOMAS MICELI"; my $titleStyle = "position:absolute; left:180px; top:25px; color:#B22222; letter-spacing:4px; font-family:Sabon,\"Times New Roman\",serif;font-size:26px; font-weight:bold;"; my $authorStyle = "position:absolute; left:380px; top:65px; font-size:13px; color:#333333; letter-spacing:4px; font-family:Sabon,\"Times New Roman\",serif;font-weight:bold;"; print <$title
$author
TITLE }