#! /usr/bin/perl # ________________________________________________________________ # /\ /\ CyberWeb SoftWare: Internet Information Systems # -{-<*>-}- World-Wide Web # __\/_\/_________________________________________________________ # Author : Alan Richmond, # File : ht_subs.pl # Version : 1.999 # Purpose : General routines for HTML creation. # Comment : These routines are used by several utilities, # typically for adding standard Head and Foot HTML. # It was originally written for the ht utility so # look at that for some clues about how to use this.. # Disclaimer: This software is provided freely on the understanding # that the Author will not be held responsible for any # problems arising from it's use, and that there is no # support except by agreement on a fee for services. # ________________________________________________________________ require "/opt/u/richmond/DEV/Software/Perl/site.pl"; $CM = "/Multimedia/Design/"; sub Head { # Put standard HTML Head out. # ________________________________________________________________ local ($banner) = @_; $File = 'ht' unless $File; $Version= '1.0' unless $Version; $Copyrt = "Jupitermedia Corporation"; $Crlink = "http://www.internet.com/corporate/legal.html"; # Colon-delimited records in the ht file have been read and split into # name-value pairs, now stored in the associative array v{}, e.g. for 'Author'. # Author initials from the ht file # ================================ $Author = $v{'Author'}; if ($Author eq 'AR') { $Author = 'Alan Richmond'; $Aulink = '/WDVL/Authors/#Alan'; } elsif ($Author eq 'ALEL') { $Author = 'Alan and Lucy Richmond, Linda Cole, Edward Grossman'; $Aulink = '/WDVL/Authors/'; } elsif ($Author eq 'ALR') { $Author = 'Alan and Lucy Richmond'; $Aulink = '/WDVL/Authors/#Lucy'; } elsif ($Author eq 'LR') { $Author = 'Lucy Richmond'; $Aulink = '/WDVL/Authors/#Lucy'; } elsif ($Author eq 'AS') { $Author = 'Andrew Starling'; $Aulink = '/WDVL/Authors/#AS'; } elsif ($Author eq 'AW') { $Author = 'Aaron Weiss'; $Aulink = '/WDVL/Authors/#Aaron'; } elsif ($Author eq 'CA') { $Author = 'Chris Assenza'; $Aulink = '/WDVL/Authors/#ChrisA'; } elsif ($Author eq 'CP') { $Author = 'Chris Payne'; $Aulink = '/WDVL/Authors/#ChrisP'; } elsif ($Author eq 'CM') { $Author = 'Charlie Morey'; $Aulink = '/WDVL/Authors/#Charlie'; } elsif ($Author eq 'cm') { $Author = 'Charlie Morris'; $Aulink = '/WDVL/Authors/#Morris'; } elsif ($Author eq 'BJ') { $Author = 'Benoy Jose'; $Aulink = '/WDVL/Authors/#Benoy'; } elsif ($Author eq 'DL') { $Author = 'Diana Luckevich'; $Aulink = '/WDVL/Authors/#Diana'; } elsif ($Author eq 'DW') { $Author = 'David Walker'; $Aulink = 'http://werple.net.au/~dwalker/'; } elsif ($Author eq 'EG') { $Author = 'Edward Grossman'; $Aulink = '/WDVL/Authors/#Ed'; } elsif ($Author eq 'gh') { $Author = 'glasshaus'; $Aulink = 'http://www.glasshaus.com/'; } elsif ($Author eq 'hd') { $Author = 'Harshal Deo'; $Aulink = '/WDVL/Authors/#hd'; } elsif ($Author eq 'IG') { $Author = 'Ian Gilfillan'; $Aulink = '/WDVL/Authors/#ig'; } elsif ($Author eq 'idm') { $Author = 'Reprint from Intranet Design Magazine'; $Aulink = 'http://idm.internet.com'; } elsif ($Author eq 'jkjs') { $Author = 'Jason Kinner and JJ Snyder'; $Aulink = '/WDVL/Authors/#jkjs'; } elsif ($Author eq 'je') { $Author = 'Jonathan Eisenzopf'; $Aulink = '/WDVL/Authors/#je'; } elsif ($Author eq 'JR') { $Author = 'Jeff Rule'; $Aulink = '/WDVL/Authors/#Jeff'; } elsif ($Author eq 'JS') { $Author = 'Jason Shindler'; $Aulink = '/WDVL/Authors/#jason'; } elsif ($Author eq 'KS') { $Author = 'Ken Sall'; $Aulink = '/WDVL/Authors/#Ken'; } elsif ($Author eq 'LC') { $Author = 'Linda Cole'; $Aulink = '/WDVL/Authors/#Linda'; } elsif ($Author eq 'lc') { $Author = 'Lee Creek'; $Aulink = '/WDVL/Authors/#Lee'; } elsif ($Author eq 'lac') { $Author = 'Lee and Andrew Creek'; $Aulink = '/WDVL/Authors/#Lee'; } elsif ($Author eq 'MH') { $Author = 'Michael Hurwicz'; $Aulink = '/WDVL/Authors/#MH'; } elsif ($Author eq 'MK') { $Author = 'Michael M Krznaric'; $Aulink = '/WDVL/Authors/#MK'; } elsif ($Author eq 'LM') { $Author = 'Laurie D. T. Mann'; $Aulink = 'http://www.city-net.com/~lmann/'; } elsif ($Author eq 'lu') { $Author = 'Lee Underwood'; $Aulink = '/WDVL/Authors/#LeeU'; } elsif ($Author eq 'man') { $Author = 'Manning Publications Co.'; $Aulink = 'http://www.manning.com/'; } elsif ($Author eq 'mh') { $Author = 'McGraw-Hill/Osborne Media'; $Aulink = 'http://www.osborne.com/'; } elsif ($Author eq 'nk') { $Author = 'Selena Sol and Nikhil Kaul'; $Aulink = '/WDVL/Authors/#Selena'; } elsif ($Author eq 'nr') { $Author = 'New Riders Publishing'; $Aulink = 'http://www.newriders.com/'; } elsif ($Author eq 'OR') { $Author = ' O\'Reilly & Associates, Inc.'; $Aulink = 'http://www.oreilly.com/'; } elsif ($Author eq 'que') { $Author = 'Que Publishing'; $Aulink = 'http://www.quepublishing.com/'; } elsif ($Author eq 'rf') { $Author = 'Richard Friedman'; $Aulink = '/WDVL/Authors/#rf'; } elsif ($Author eq 'SP') { $Author = ' SitePoint'; $Aulink = 'http://sitepoint.com/books/?bookid=program-book'; } elsif ($Author eq 'ssbw') { $Author = 'Selena Sol and Edi Baker-Wells'; $Aulink = '/WDVL/Authors/#Selena'; } elsif ($Author eq 'phpb') { $Author = 'Reprint from PHPBuilder.com'; $Aulink = 'http://phpbuilder.com/'; } elsif ($Author eq 'PSW') { $Author = 'PS Woods'; $Aulink = '/WDVL/Authors/#PSW'; } elsif ($Author eq 'QZ') { $Author = 'Quadzilla Archive'; $Aulink = '/WDVL/Authors/#QZ'; } elsif ($Author eq 'RM') { $Author = 'Rhonda McGuinness'; $Aulink = '/WDVL/Authors/#Rhonda'; } elsif ($Author eq 'RH') { $Author = 'Reaz Hoque'; $Aulink = 'mailto:rhoque@rhoque.com'; } elsif ($Author eq 'SJT') { $Author = 'Steve J. Thompson'; $Aulink = 'mailto:sjt112@psu.edu'; } elsif ($Author eq 'SC') { $Author = 'Scott Clark'; $Aulink = '/WDVL/Authors/#Clark'; } elsif ($Author eq 'SP') { $Author = 'Shelley Powers'; $Aulink = '/WDVL/Authors/#Shelley'; } elsif ($Author eq 'sr') { $Author = 'Shawn Ryder'; $Aulink = '/WDVL/Authors/#Shawn'; } elsif ($Author eq 'SK') { $Author = 'Selena Sol and Kenji Tachibana'; $Aulink = '/WDVL/Authors/#Selena'; } elsif ($Author eq 'SS') { $Author = 'Selena Sol'; $Aulink = '/WDVL/Authors/#Selena'; $v{'Class'} = 'WDVL' unless $v{'Class'}; } elsif ($Author eq 'MN') { $Author = 'Mark Nottingham'; $Aulink = 'http://mnot.cbd.net.au/'; } elsif ($Author eq 'WD') { $Author = 'WebDeveloper.com'; $Aulink = 'http://webdeveloper.internet.com/'; } elsif ($Author eq 'WDJ') { $Author = 'Web Developers Journal'; $Aulink = 'http://webdevelopersJournal.com/'; } elsif ($Author eq 'wrox') { $Author = 'Wrox Press'; $Aulink = 'http://www.wrox.com/'; } $Auth = $Author; # Defaults # ======== # 'Class' determines the page style. $v{'Width'} = '85%' unless $v{'Width'}; $Width = $v{'Width'}; $v{'Class'} = 'NavMar' unless $v{'Class'}; $Class = $v{'Class'}; $v{'Class'} = 'NavMar' if $v{'Class'} eq 'Plain'; $v{'Valid'} = 'Yes' unless $v{'Valid'}; $Valid = $v{'Valid'}; $v{'Font'} = 'Arial' unless $v{'Font'}; $Font = $v{'Font'}; $v{'CSS'} = 'Yes' unless $v{'CSS'}; $Strict = $Valid =~ /Strict/i; $Abc = "#cccc99"; # Set BODY attributes according to Class. # -------------------------------------- if ($Class =~ /WDVL/i) { $v{'Bgcolor'} = "#ffffff" unless $v{'Bgcolor'}; $v{'Text'} = "#000033" unless $v{'Text'}; $v{'Link'} = "#0033cc" unless $v{'Link'}; $v{'Vlink'} = "#330066" unless $v{'Vlink'}; $v{'Alink'} = "#ff0000" unless $v{'Alink'}; } elsif ($Class =~ /NavMar/i) { $v{'Bgcolor'} = "#ffffff" unless $v{'Bgcolor'}; $v{'Text'} = "#000000" unless $v{'Text'}; $v{'Link'} = "#ff0000" unless $v{'Link'}; $v{'Vlink'} = "#993300" unless $v{'Vlink'}; $Abc = "#eeeedd"; } elsif ($Class =~ /Astro/i) { $v{'Bgcolor'} = "#000000" unless $v{'Bgcolor'}; $v{'Text'} = "#ffd766" unless $v{'Text'}; $v{'Link'} = "#ffff99" unless $v{'Link'}; $v{'Vlink'} = "#ffcc33" unless $v{'Vlink'}; $Abc = "#333333"; # $v{'CSS'} = 'No'; $butbg = 'Navy'; } elsif ($Class =~ /Nova/i) { $v{'Bgcolor'} = "#000000" unless $v{'Bgcolor'}; $v{'Text'} = "#ffcc00" unless $v{'Text'}; $v{'Link'} = "#ffd766" unless $v{'Link'}; $v{'Vlink'} = "#cc9933" unless $v{'Vlink'}; $Abc = "#333333"; # $v{'CSS'} = 'No'; $butbg = 'Navy'; } elsif ($Class =~ /Morey/i) { $v{'Bgcolor'} = "#336699" unless $v{'Bgcolor'}; $v{'Text'} = "#ffcc33" unless $v{'Text'}; $v{'Link'} = "#ffffcc" unless $v{'Link'}; $v{'Vlink'} = "#ffcc99" unless $v{'Vlink'}; $Abc = "#003366"; } # This was an experiment with using W3C Core Styles. if ($Class =~ /W3C:/) { $Class =~ s/W3C://; $Sheet = "http://www.w3.org/StyleSheets/Core/" . $Class; $W3C = 1; } else { # Select style sheet with same name as Class $Sheet = "http://wdvl.com/Authoring/Style/Sheets/$Class.css"; } # Meta-refresh used on a few obsolete pages. $Refresh= $v{'Refresh'}; $Refresh= "" if $Refresh; # META tag keywords. The default list is probably too long..NOT ANYMORE!! $Key = $v{'Keywords'}; $Key = "web design tutorial java HTML,free javascript how to,domain names, cgi script tutorial ecommerce,dhtml web page design" unless $Key; #Hypertext Markup Language,Cascading Style Sheets,Virtual Reality Modelling Language,History, #Doctype,Elements,Body,Forms,Checkbox,Mailto,Password,Client Side,Server Side,Meta,Player, #Primers,Tutorials,How To,Guides,Tools,Learn,Jobs,Library,Reference,Libraries,Resources, $Key = "" if $Key; # META tag description. $Desc = $v{'Description'}; $Desc = "The Web Developer's Virtual Library is a resource for web development, including a JavaScript tutorial, html tag info, JavaScript events, html special characters, paint shop pro, database normalization, PHP and more." unless $Desc; $Desc = "" if $Desc; # META tag date. format YYYY/MM/DD ($date, $time) = &datime; $Dat = $v{'Date'}; $Dat = $date unless $Dat; $Dat = "" if $Dat; # META tag channel. $Cha = $v{'Channel'}; $Cha = "Developer" unless $Cha; $Cha = "" if $Cha; # META tag author. # $Auth = $v{'Author'}; $Auth = "WDVL" unless $Auth; $Auth = "" if $Auth; # JavaScript $JS = $v{'JavaScript'}; $JS = "" if $JS; $Style = $v{'Style'}; # Background image $BG = $v{'Background'}; $BG = '/Images/Backgrounds/starfiel.gif' if ($BG =~ /stars/i); $Style = "Body{background:url($BG)}" if $BG; $BG = "Background = \"$BG\"" if $BG; # Style sheet $Style = "" if $Style; $CSS = $v{'CSS'}; if ($CSS eq 'Yes') { $CSS = "" ; } else { $CSS = ""; } # Colors, e.g. in BODY tag $Tccolor= $v{'Tccolor'}; # table cell color ? $Bgcolor= "bgcolor = \"$v{'Bgcolor'}\"" if $v{'Bgcolor'}; $Text = "Text = \"$v{'Text'}\"" if $v{'Text'}; $Link = "Link = \"$v{'Link'}\"" if $v{'Link'}; $Vlink = "Vlink = \"$v{'Vlink'}\"" if $v{'Vlink'}; $Alink = "Alink = \"$v{'Alink'}\"" if $v{'Alink'}; ($date, $time) = &datime; $url = &URL ; # figure out where we are $Title = $v{'Title'}; # has to follow &URL; # DOCTYPE and HTML/HEAD $dtd = ' Transitional' unless $Strict; print < WDVL: $Title EOT # BASE tag $Base = $v{'Base'}; # $Base = $URL unless $Base; $Base = "\n" if $Base; # Print HEAD stuff print " $Base\n" if $Base; print " $Refresh\n" if $Refresh; print " $Key\n" if $Key; print " $Desc\n" if $Desc; print " $Cha\n" if $Cha; print " $Auth\n" if $Auth; print " $Dat\n" if $Dat; print " $JS\n" if $JS ; print " $CSS\n" if $CSS ; print " $Style\n" if $Style; print < EOT # End HEAD, start BODY # ==================== $center = "
"; $_center = "
"; print ""; $align = 'center'; # Print page header, e.g. open layout tables. if ($Class eq 'NavMar') { # Page Header open (XX, ") { print ; } close (XX); } elsif ($Class eq 'Astro') { print "$center
\n" unless $Width eq '100%'; } elsif ($Class eq 'Table') { print <
EOT } else { # impossible case - Class was set. print "$center
\n" unless $Width eq '100%'; } # Old WDVL style had 'gold bar' banner linked to /Index.html $Index = "Index.html" unless $url eq "/Index.html"; # WDVL banner (old style) # ----------- print <
$_center EOT &TopLeft if $Class eq 'Morey'; &Banner if $banner && ($Class ne 'NavMar'); &BotRight if $Class eq 'Morey'; print < EOT # Title, Author, PubDate, Abstract # -------------------------------- print "$center

$Title

$_center\n" unless (($v{'url'} =~ /Vlib\//) # Vlib puts own title && !($v{'url'} =~ /Vlib\/New.html/)) || ($v{'Heading'} eq 'No') ; print "

$center

$_center" if $Author; print "

$center

$v{'PubDate'}
$_center" if $v{'PubDate'}; # Abstract # -------- print < $center
$v{'Abstract'}
$_center

EOT print "

\n"; # To apply CSS to first paragraph. print "<\!--content_start-->\n"; } # ________________________________________________________________ sub Foot { # Append standard Foot to HTML file. # ________________________________________________________________ $File = 'ht' unless $File; $Version= '0.5 BETA' unless $Version; $SWP = "$WDVL/Software/Perl"; $bghead = "#cccccc"; $bgcell = "#cccccc"; ($date, $time) = &datime; &URL ; print "\n"; if ($Class eq 'NavMar') { # Right-hand Navigation Margin open (XX, ") { print ; } close (XX); print "


"; } else { print < EOT print "
" unless $v{'Width'} eq '100%'; } print "$center

\n"; print <Home EOT @levels = split('/',$v{'url'}); $ll = $#levels; $ll-- if ($levels[$ll] eq 'index.html'); for ($i=1;$i<$ll;$i++) { $urlev .= $levels[$i] . '/'; print " / $levels[$i]"; } print "$_center\n"; &TopLeft if $Class eq 'Morey'; if ($Class eq 'NavMar') { # internet.com navbar open (XN, ") { print ; } close (XN); print "


"; # } print # bottom banner ad "

$center"; } # Old style had a navbar of gold buttons.. print < $center
Guide Keywords Lexicon Site Map Top 100 Tutorials
EOT print <

EOT &BotRight if $Class eq 'Morey'; print ""; undef %v; } # ________________________________________________________________ sub datime { # Return current date and time. # ________________________________________________________________ @days = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'); @mons = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time); # $mon = $mons[$mon]; $mon = $mon + 1; if ($mon =~ /\d/) {$mod =~ s/(\d)/0$1/;} if ($mday =~ /\d/) {$mday =~s/(\d)/0$1/;} $year = $year + 1900; ("$year-$mon-$mday","$hour:$min:$sec"); } # ________________________________________________________________ sub GetTitle{ # Get title from HTML file. # ________________________________________________________________ local ($titonly) = @_; undef $hn; undef $title; $t = $h = 0; while () { chop ; if (//i) { $t = !/<\/Title>/i; $title = $_; last if $titonly && /<\/Title>/i;; last if $file =~ /3d/; #? last if $file =~ /Vlib/; } elsif (/<\/Title>/i) { $title .= $_; # return if $titonly; $t = 0; } elsif (/<H\d.*>/i) { $h = !/<\/H\d>/i; $hn = $_; last if !$h; } elsif (/<\/H\d>/i) { $hn .= $_; last; } elsif ($t) { $title .= $_; } elsif ($h) { $hn .= $_; } } if ($hn) { $title = $hn; } elsif ($title) { } else { $title = $file; } $title =~ s/WDVL://; $title =~ s/^\s*//; $title =~ s/\s*$//; $title =~ s/<[^>]+>//g; $title =~ s/[^>]+>//g; return $title; } # ________________________________________________________________ sub URL { # Determine URL of current file. # ________________________________________________________________ if (!$v{'url'}) { if ($v{'File'} =~ /\//) { # Running from top of web tree @file = split (/\//, $v{'File'}); $file = $file [$#file]; $dir = $file [$#file-1]; $URL = "/" . $v{'File'}; $v{'url'} = "$URL.html"; } else {# Running from same dir. $_ = $ENV{'PWD'}; split (/\//); $dir = $_[$#_]; until ($shft_cnt > $shft) { shift (@_); $shft_cnt++; } $URL = join ('/',@_) ; $URL = "/" . $URL if $URL; $v{'file'} = 'index' if !$v{'file'}; $v{'url'} = "$URL/$v{'file'}.html"; } if (!$v{'Title'}) { $v{'Title'} = $v{'file'}; $v{'Title'} = $dir if $v{'file'} eq 'index'; } } if (!$v{'URL'}) { $v{'URL'} = $base . "$v{'url'}"; } $URL = $v{'URL'}; # complete, absolute URL $url = $v{'url'}; # relative URL (path and file name) } # ________________________________________________________________ sub Banner { # Ad banner # ________________________________________________________________ $banner = $v{'Banner'}; return if ($banner =~ /^None$/i); print <<EOT; <!--#config errmsg="" --> EOT $banner = <<EOT; <!-- SOMEONE SHOULD CLEAN THIS UP --> EOT print "$center\n$banner\n$_center\n"; $v{'Banner'} = $banner; } # ________________________________________________________________ sub Macros { # Prev/Up/Next buttons # ________________________________________________________________ if (/\@Prev\s*\(([^)]*)\)/) { $title = &getTitle($1) ; print <<EOT; <a href = "$1"> <Img src = "/WDVL/Website/Design/images/l_arrow7.gif" width = 16 height = 22 border = 0 alt = "" ></a> <span class=PUN><b><a href="$1">$title</a></b></span><br> EOT $_ = ""; } if (/\@Up\s*\(([^)]*)\)/) { $title = &getTitle($1) ; print <<EOT; <span class=PUN><b><a href="$1">$title</a></b></span><br> EOT $_ = ""; } if (/\@Next\s*\(([^)]*)\)/) { $title = &getTitle($1) ; print <<EOT; <span class=PUN><b><a href="$1">$title</a></b></span> <a href = "$1"> <Img src = "/WDVL/Website/Design/images/r_arrow7.gif" width = 16 height = 22 border = 0 align = middle alt = "" ></a> EOT $_ = ""; } # s|\@Up\s*\(([^)]*)\)|<a href="$1"><Img alt="Up" border=0 src = "/Icons/Buttons/Index.gif"></a>|ig; # s|\@Next\s*\(([^)]*)\)|<a href="$1"><Img alt="Next" border=0 src = "/Icons/Buttons/Next.gif"></a>|ig; # s|\@Prev\s*\(([^)]*)\)|<a href="$1"><Img alt="Previous" border=0 src = "/Icons/Buttons/Previous.gif"></a>|ig; s|\@Drop\s*\((.*)\)|<table cellpadding=4 align=left><tr><td class=Drop valign=top bgcolor="#003366"><b><font size="+2" color="gold">$1</font></b><p> </td></tr></table>|ig; s|\@href\s*\(([^,]*),([^)]*)\)|<a href="$1">$2</a>|ig; s|\@banner\s*\((.*)\)|</tr><tr><th class=cols colspan=2><h2>$1</h2></th></tr><tr><td valign=top colspan=2>|ig; # s|\@banner\s*\((.*)\)|</tr><tr><th class=cols bgcolor="$colbg" colspan=2><font color=$colfg size="+2"><h2>$1</h2></font></th></tr><tr><td valign=top colspan=2>|ig; s|\@headers\s*\((.*),(.*)\)|\n</tr><tr>\n<th class=cols ><font color=$colfg size="+1">$1</font></th><th class=cols ><font color=$colfg size="+1">$2</font></th>\n</tr><tr>\n<td valign=top colspan=1>\n|ig; # s|\@headers\s*\((.*),(.*)\)|\n</tr><tr>\n<th class=cols bgcolor="$colbg" width="50%"><font color=$colfg size="+1"><h3>$1</h3></font></th><th class=cols bgcolor="$colbg" width="50%"><font color=$colfg size="+1"><h3>$2</h3></font></th>\n</tr><tr>\n<td valign=top colspan=1>\n|ig; s|\@em\s*\((.*)\)|<em>$1</em>|ig; s|\@leftcol|</td></tr><tr><td valign=top >|ig; s|\@rightcol|</td><td valign=top >|ig; # s|\@leftcol|</td></tr><tr><td valign=top width="50%">|ig; # s|\@rightcol|</td><td valign=top width="50%">|ig; # [! Begin table with header s/\[\!/<table align=center class=LuT cellpadding=$cellp cellspacing=$cells> <colgroup><col width="0*"> <tr><th class=LuT valign=top align=right $b1>\n/g; # [| Begin table with data cell s/\[\|/<table align=center class=LuT cellpadding=$cellp cellspacing=$cells><colgroup span=2><tr> <td class=LuT valign=top>\n/g; # |! table header s/\|\!/\n<th class=LuT valign=top align=right $b1>\n/g; # !! table header s/\!\!/\n<th class=LuT valign=top align=right $b1>\n/g; # |_ table cell s/\|\_/\n<\/td><td class=LuT valign=top $b2>\n/g; # !| table cell s/\!\|/\n<\/th><td class=LuT valign=top $b2>\n/g; # {{ bigger s/\{\{/<font size=4>/g; # }} bigger end s/\}\}/<\/font>/g; # !; end of table row # s/\s*\!\;/<\/th><\/tr><tr>/g; # |; end of table row s/\s*\|\;/<\/td><\/tr><tr>/g; # !] end of table s/\!\]/\n<\/tr><\/table>\n/g; # |] end of table s/\|\]/\n<\/tr><\/table>\n/g # if $v{'Class'} ne 'Text' ; # s/\|\]//g; } # ________________________________________________________________ sub getTitle { # Read Title from an ht file # ________________________________________________________________ local($file) = @_; if ($file =~ /\/$/) { $file .= 'index'; } $file =~ s/\#.*//; $file =~ s/\.html$//; $file .= '.ht'; if ($file =~ /^\//) { $file = "/opt/u/richmond/DEV$file"; } else { $file = "$path$file"; } open (HTX, "<$file")||&htErr; while (<HTX>) { if (/\s*Title\s*:\s*(.*)/) { close (HTX); return $1; } } return $file; } # ________________________________________________________________ sub htErr { # Error routine # ________________________________________________________________ die "$url : $path$file\n $!\n"; } # ________________________________________________________________ sub TopLeft { # Morey class only # ________________________________________________________________ print <<EOT; <CENTER> <TABLE WIDTH=526 CELLSPACING=0 CELLPADDING=0 BORDER=0> <TR> <TD COLSPAN=13><IMG SRC="$CM/remote-topleft.gif" ALT="" WIDTH=13 HEIGHT=15></TD> <TD><IMG SRC="$CM/remote-topmiddle.gif" ALT="" WIDTH=500 HEIGHT=15></TD> <TD COLSPAN=13><IMG SRC="$CM/remote-topright.gif" ALT="" WIDTH=13 HEIGHT=15></TD> </TR> <TR> <TD WIDTH=1 BGCOLOR="#00629C"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> <TD WIDTH=1 BGCOLOR="#00629C"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> <TD WIDTH=1 BGCOLOR="#00629C"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> <TD WIDTH=1 BGCOLOR="#00629C"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> <TD WIDTH=1 BGCOLOR="#00629C"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> <TD WIDTH=1 BGCOLOR="#006294"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> <TD WIDTH=1 BGCOLOR="#005A83"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> <TD WIDTH=1 BGCOLOR="#003952"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> <TD WIDTH=1 BGCOLOR="#003147"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> <TD WIDTH=1 BGCOLOR="#002941"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> <TD WIDTH=1 BGCOLOR="#003147"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> <TD WIDTH=1 BGCOLOR="#003982"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> <TD WIDTH=1 BGCOLOR="#005A83"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> <th> EOT } # ________________________________________________________________ sub BotRight { # Morey class only # ________________________________________________________________ print <<EOT; </th> <TD WIDTH=1 BGCOLOR="#00629C"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> <TD WIDTH=1 BGCOLOR="#00629C"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> <TD WIDTH=1 BGCOLOR="#006294"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> <TD WIDTH=1 BGCOLOR="#006294"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> <TD WIDTH=1 BGCOLOR="#186A9C"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> <TD WIDTH=1 BGCOLOR="#18739C"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> <TD WIDTH=1 BGCOLOR="#186A9C"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> <TD WIDTH=1 BGCOLOR="#18739C"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> <TD WIDTH=1 BGCOLOR="#186A9C"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> <TD WIDTH=1 BGCOLOR="#006294"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> <TD WIDTH=1 BGCOLOR="#006294"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> <TD WIDTH=1 BGCOLOR="#00629C"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> <TD WIDTH=1 BGCOLOR="#00629C"><IMG SRC="$CM/dot.gif" ALT="" WIDTH=1 HEIGHT=1></TD> </TR> <TR> <TD COLSPAN=13><IMG SRC="$CM/remote-bottomleft.gif" ALT="" WIDTH=13 HEIGHT=8></TD> <TD><IMG SRC="$CM/remote-bottommiddle.gif" ALT="" WIDTH=500 HEIGHT=8></TD> <TD COLSPAN=13><IMG SRC="$CM/remote-bottomright.gif" ALT="" WIDTH=13 HEIGHT=8></TD> </TR> </TABLE> </CENTER> EOT } 1;