]> git.deb.at Git - pkg/blosxom.git/blob - blosxom.cgi
e5f80ac7d06d9fa6bb74d3916832bd39fcc099a4
[pkg/blosxom.git] / blosxom.cgi
1 #!/usr/bin/perl
2
3 # Blosxom
4 # Author: Rael Dornfest <rael@oreilly.com>
5 # Version: 2.0.2
6 # Home/Docs/Licensing: http://blosxom.sourceforge.net/
7 # Development/Downloads: http://sourceforge.net/projects/blosxom
8
9 package blosxom;
10
11 # --- Configurable variables -----
12
13 # What's this blog's title?
14 $blog_title = "My Weblog";
15
16 # What's this blog's description (for outgoing RSS feed)?
17 $blog_description = "Yet another Blosxom weblog.";
18
19 # What's this blog's primary language (for outgoing RSS feed)?
20 $blog_language = "en";
21
22 # Where are this blog's entries kept?
23 $datadir = "/Library/WebServer/Documents/blosxom";
24
25 # What's my preferred base URL for this blog (leave blank for automatic)?
26 $url = "";
27
28 # Should I stick only to the datadir for items or travel down the
29 # directory hierarchy looking for items?  If so, to what depth?
30 # 0 = infinite depth (aka grab everything), 1 = datadir only, n = n levels down
31 $depth = 0;
32
33 # How many entries should I show on the home page?
34 $num_entries = 40;
35
36 # What file extension signifies a blosxom entry?
37 $file_extension = "txt";
38
39 # What is the default flavour?
40 $default_flavour = "html";
41
42 # Should I show entries from the future (i.e. dated after now)?
43 $show_future_entries = 0;
44
45 # --- Plugins (Optional) -----
46
47 # File listing plugins blosxom should load (if empty blosxom will walk $plugin_dir)
48 $plugin_list = "";
49
50 # Where are my plugins kept?
51 $plugin_dir = "";
52
53 # Where should my modules keep their state information?
54 $plugin_state_dir = "$plugin_dir/state";
55
56 # --- Static Rendering -----
57
58 # Where are this blog's static files to be created?
59 $static_dir = "/Library/WebServer/Documents/blog";
60
61 # What's my administrative password (you must set this for static rendering)?
62 $static_password = "";
63
64 # What flavours should I generate statically?
65 @static_flavours = qw/html rss/;
66
67 # Should I statically generate individual entries?
68 # 0 = no, 1 = yes
69 $static_entries = 0;
70
71 # --------------------------------
72
73 use vars qw! $version $blog_title $blog_description $blog_language $datadir $url %template $template $depth $num_entries $file_extension $default_flavour $static_or_dynamic $config_dir $plugin_list $plugin_dir $plugin_state_dir @plugins %plugins $static_dir $static_password @static_flavours $static_entries $path_info $path_info_yr $path_info_mo $path_info_da $path_info_mo_num $flavour $static_or_dynamic %month2num @num2month $interpolate $entries $output $header $show_future_entries %files %indexes %others !;
74
75 use strict;
76 use FileHandle;
77 use File::Find;
78 use File::stat;
79 use Time::localtime;
80 use Time::Local;
81 use CGI qw/:standard :netscape/;
82
83 $version = "2.0.2";
84
85 # Load configuration from $ENV{BLOSXOM_CONFIG_DIR}/blosxom.conf, if it exists
86 my $blosxom_config;
87 if ($ENV{BLOSXOM_CONFIG_FILE} && -r $ENV{BLOSXOM_CONFIG_FILE}) {
88   $blosxom_config = $ENV{BLOSXOM_CONFIG_FILE};
89   ($config_dir = $blosxom_config) =~ s! / [^/]* $ !!x;                          
90 }
91 else {
92   for my $blosxom_config_dir ($ENV{BLOSXOM_CONFIG_DIR}, '/etc/blosxom', '/etc') {
93     if (-r "$blosxom_config_dir/blosxom.conf") {
94       $config_dir = $blosxom_config_dir;
95       $blosxom_config = "$blosxom_config_dir/blosxom.conf";
96       last;
97     }
98   }
99 }
100 # Load $blosxom_config
101 if ($blosxom_config) { 
102   if (-r $blosxom_config) {
103     eval { require $blosxom_config } or
104       warn "Error reading blosxom config file '$blosxom_config'" . ($@ ? ": $@" : '');
105   }
106   else {
107     warn "Cannot find or read blosxom config file '$blosxom_config'";
108   }
109 }
110
111 my $fh = new FileHandle;
112
113 %month2num = (nil=>'00', Jan=>'01', Feb=>'02', Mar=>'03', Apr=>'04', May=>'05', Jun=>'06', Jul=>'07', Aug=>'08', Sep=>'09', Oct=>'10', Nov=>'11', Dec=>'12');
114 @num2month = sort { $month2num{$a} <=> $month2num{$b} } keys %month2num;
115
116 # Use the stated preferred URL or figure it out automatically
117 $url ||= url(-path_info => 1);
118 $url =~ s/^included:/http:/ if $ENV{SERVER_PROTOCOL} eq 'INCLUDED';
119
120 # NOTE: Since v3.12, it looks as if CGI.pm misbehaves for SSIs and
121 # always appends path_info to the url. To fix this, we always
122 # request an url with path_info, and always remove it from the end of the
123 # string.
124 my $pi_len = length $ENV{PATH_INFO};
125 my $might_be_pi = substr($url, -$pi_len);
126 substr($url, -length $ENV{PATH_INFO}) = '' if $might_be_pi eq $ENV{PATH_INFO};
127
128 $url =~ s!/$!!;
129
130 # Drop ending any / from dir settings
131 $datadir =~ s!/$!!; $plugin_dir =~ s!/$!!; $static_dir =~ s!/$!!;
132   
133 # Fix depth to take into account datadir's path
134 $depth and $depth += ($datadir =~ tr[/][]) - 1;
135
136 # Global variable to be used in head/foot.{flavour} templates
137 $path_info = '';
138
139 $static_or_dynamic = (!$ENV{GATEWAY_INTERFACE} and param('-password') and $static_password and param('-password') eq $static_password) ? 'static' : 'dynamic';
140 $static_or_dynamic eq 'dynamic' and param(-name=>'-quiet', -value=>1);
141
142 # Path Info Magic
143 # Take a gander at HTTP's PATH_INFO for optional blog name, archive yr/mo/day
144 my @path_info = split m{/}, path_info() || param('path'); 
145 shift @path_info;
146
147 while ($path_info[0] and $path_info[0] =~ /^[a-zA-Z].*$/ and $path_info[0] !~ /(.*)\.(.*)/) { $path_info .= '/' . shift @path_info; }
148
149 # Flavour specified by ?flav={flav} or index.{flav}
150 $flavour = '';
151
152 if ( $path_info[$#path_info] =~ /(.+)\.(.+)$/ ) {
153   $flavour = $2;
154   $1 ne 'index' and $path_info .= "/$1.$2";
155   pop @path_info;
156 } else {
157   $flavour = param('flav') || $default_flavour;
158 }
159
160 # Strip spurious slashes
161 $path_info =~ s!(^/*)|(/*$)!!g;
162
163 # Date fiddling
164 ($path_info_yr,$path_info_mo,$path_info_da) = @path_info;
165 $path_info_mo_num = $path_info_mo ? ( $path_info_mo =~ /\d{2}/ ? $path_info_mo : ($month2num{ucfirst(lc $path_info_mo)} || undef) ) : undef;
166
167 # Define standard template subroutine, plugin-overridable at Plugins: Template
168 $template = 
169   sub {
170     my ($path, $chunk, $flavour) = @_;
171
172     do {
173       return join '', <$fh> if $fh->open("< $datadir/$path/$chunk.$flavour");
174     } while ($path =~ s/(\/*[^\/]*)$// and $1);
175
176     # Check for definedness, since flavour can be the empty string
177     if (defined $template{$flavour}{$chunk}) {
178         return $template{$flavour}{$chunk};
179     } elsif (defined $template{error}{$chunk}) {
180         return $template{error}{$chunk} 
181     } else {
182         return '';
183     }
184   };
185 # Bring in the templates
186 %template = ();
187 while (<DATA>) {
188   last if /^(__END__)$/;
189   my($ct, $comp, $txt) = /^(\S+)\s(\S+)(?:\s(.*))?$/ or next;
190   $txt =~ s/\\n/\n/mg;
191   $template{$ct}{$comp} .= $txt . "\n";
192 }
193
194 # Plugins: Start
195 my @plugin_list = ();
196
197 # If $plugin_list is set, read plugins to use from that file
198 $plugin_list = "$config_dir/$plugin_list"
199   if $plugin_list && $plugin_list !~ m!^\s*/!;
200 if ( $plugin_list and -r $plugin_list and $fh->open("< $plugin_list") ) {
201   @plugin_list = map { chomp $_; $_ } grep { /\S/ && ! /^#/ } <$fh>; 
202   $fh->close;
203 }
204 # Otherwise walk $plugin_dir to get list of plugins to use
205 elsif ( $plugin_dir and opendir PLUGINS, $plugin_dir ) {
206   @plugin_list = grep { /^[\w:]+$/ && ! /~$/ && -f "$plugin_dir/$_" } sort readdir(PLUGINS);
207   closedir PLUGINS;
208 }
209
210 unshift @INC, $plugin_dir;
211 foreach my $plugin ( @plugin_list ) {
212   my($plugin_name, $off) = $plugin =~ /^\d*([\w:]+?)(_?)$/;
213   my $on_off = $off eq '_' ? -1 : 1;
214   # Allow perl module plugins
215   if ($plugin =~ m/::/ && -z "$plugin_dir/$plugin") {
216     # For Blosxom::Plugin::Foo style plugins, we need to use a string require
217     eval "require $plugin_name";
218   }
219   else {
220     eval { require $plugin };
221   }
222   $@ and warn "error finding or loading blosxom plugin $plugin_name - skipping\n" and next;
223   $plugin_name->start() and ( $plugins{$plugin_name} = $on_off ) and push @plugins, $plugin_name;
224 }
225 shift @INC;
226
227 # Plugins: Template
228 # Allow for the first encountered plugin::template subroutine to override the
229 # default built-in template subroutine
230 my $tmp; foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('template') and defined($tmp = $plugin->template()) and $template = $tmp and last; }
231
232 # Provide backward compatibility for Blosxom < 2.0rc1 plug-ins
233 sub load_template {
234   return &$template(@_);
235 }
236
237 # Define default entries subroutine
238 $entries =
239   sub {
240     my(%files, %indexes, %others);
241     find(
242       sub {
243         my $d; 
244         my $curr_depth = $File::Find::dir =~ tr[/][]; 
245         return if $depth and $curr_depth > $depth; 
246      
247         if ( 
248           # a match
249           $File::Find::name =~ m!^$datadir/(?:(.*)/)?(.+)\.$file_extension$!
250           # not an index, .file, and is readable
251           and $2 ne 'index' and $2 !~ /^\./ and (-r $File::Find::name)
252         ) {
253
254             # to show or not to show future entries
255             ( 
256               $show_future_entries
257               or stat($File::Find::name)->mtime < time 
258             )
259
260               # add the file and its associated mtime to the list of files
261               and $files{$File::Find::name} = stat($File::Find::name)->mtime
262
263                 # static rendering bits
264                 and (
265                   param('-all') 
266                   or !-f "$static_dir/$1/index." . $static_flavours[0]
267                   or stat("$static_dir/$1/index." . $static_flavours[0])->mtime < stat($File::Find::name)->mtime
268                 )
269                   and $indexes{$1} = 1
270                     and $d = join('/', (nice_date($files{$File::Find::name}))[5,2,3])
271   
272                       and $indexes{$d} = $d
273                         and $static_entries and $indexes{ ($1 ? "$1/" : '') . "$2.$file_extension" } = 1
274
275             } 
276             else {
277               !-d $File::Find::name and -r $File::Find::name and $others{$File::Find::name} = stat($File::Find::name)->mtime
278             }
279       }, $datadir
280     );
281
282     return (\%files, \%indexes, \%others);
283   };
284
285 # Plugins: Entries
286 # Allow for the first encountered plugin::entries subroutine to override the
287 # default built-in entries subroutine
288 my $tmp; foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('entries') and defined($tmp = $plugin->entries()) and $entries = $tmp and last; }
289
290 my ($files, $indexes, $others) = &$entries();
291 %indexes = %$indexes;
292
293 # Static
294 if (!$ENV{GATEWAY_INTERFACE} and param('-password') and $static_password and param('-password') eq $static_password) {
295
296   param('-quiet') or print "Blosxom is generating static index pages...\n";
297
298   # Home Page and Directory Indexes
299   my %done;
300   foreach my $path ( sort keys %indexes) {
301     my $p = '';
302     foreach ( ('', split /\//, $path) ) {
303       $p .= "/$_";
304       $p =~ s!^/!!;
305       $done{$p}++ and next;
306       (-d "$static_dir/$p" or $p =~ /\.$file_extension$/) or mkdir "$static_dir/$p", 0755;
307       foreach $flavour ( @static_flavours ) {
308         my $content_type = (&$template($p,'content_type',$flavour));
309         $content_type =~ s!\n.*!!s;
310         my $fn = $p =~ m!^(.+)\.$file_extension$! ? $1 : "$p/index";
311         param('-quiet') or print "$fn.$flavour\n";
312         my $fh_w = new FileHandle "> $static_dir/$fn.$flavour" or die "Couldn't open $static_dir/$p for writing: $!";  
313         $output = '';
314         if ($indexes{$path} == 1) {
315           # category
316           $path_info = $p;
317           # individual story
318           $path_info =~ s!\.$file_extension$!\.$flavour!;
319           print $fh_w &generate('static', $path_info, '', $flavour, $content_type);
320         } else {
321           # date
322           local ($path_info_yr,$path_info_mo,$path_info_da, $path_info) = 
323               split /\//, $p, 4;
324           unless (defined $path_info) {$path_info = ""};
325           print $fh_w &generate('static', '', $p, $flavour, $content_type);
326         }
327         $fh_w->close;
328       }
329     }
330   }
331 }
332
333 # Dynamic
334 else {
335   my $content_type = (&$template($path_info,'content_type',$flavour));
336   $content_type =~ s!\n.*!!s;
337
338   print generate('dynamic', $path_info, "$path_info_yr/$path_info_mo_num/$path_info_da", $flavour, $content_type);
339 }
340
341 # Plugins: End
342 foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('end') and $entries = $plugin->end() }
343
344 # Generate 
345 sub generate {
346   my($static_or_dynamic, $currentdir, $date, $flavour, $content_type) = @_;
347
348   %files = %$files; %others = ref $others ? %$others : ();
349
350   # Plugins: Filter
351   foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('filter') and $entries = $plugin->filter(\%files, \%others) }
352
353   my %f = %files;
354
355   # Plugins: Skip
356   # Allow plugins to decide if we can cut short story generation
357   my $skip; foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('skip') and defined($tmp = $plugin->skip()) and $skip = $tmp and last; }
358   
359   # Define default interpolation subroutine
360   $interpolate = 
361     sub {
362       package blosxom;
363       my $template = shift;
364       $template =~ 
365         s/(\$\w+(?:::)?\w*)/"defined $1 ? $1 : ''"/gee;
366       return $template;
367     };  
368
369   unless (defined($skip) and $skip) {
370
371     # Plugins: Interpolate
372     # Allow for the first encountered plugin::interpolate subroutine to 
373     # override the default built-in interpolate subroutine
374     my $tmp; foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('interpolate') and defined($tmp = $plugin->interpolate()) and $interpolate = $tmp and last; }
375         
376     # Content_type
377     $content_type=&$interpolate($content_type);
378     $header = {-type=>$content_type};
379
380     # Head
381     my $head = (&$template($currentdir,'head',$flavour));
382   
383     # Plugins: Head
384     foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('head') and $entries = $plugin->head($currentdir, \$head) }
385   
386     $head = &$interpolate($head);
387   
388     $output .= $head;
389     
390     # Stories
391     my $curdate = '';
392     my $ne = $num_entries;
393
394     if ( $currentdir =~ /(.*?)([^\/]+)\.(.+)$/ and $2 ne 'index' ) {
395       $currentdir = "$1$2.$file_extension";
396       $files{"$datadir/$1$2.$file_extension"} and %f = ( "$datadir/$1$2.$file_extension" => $files{"$datadir/$1$2.$file_extension"} );
397     } 
398     else { 
399       $currentdir =~ s!/index\..+$!!;
400     }
401
402     # Define a default sort subroutine
403     my $sort = sub {
404       my($files_ref) = @_;
405       return sort { $files_ref->{$b} <=> $files_ref->{$a} } keys %$files_ref;
406     };
407   
408     # Plugins: Sort
409     # Allow for the first encountered plugin::sort subroutine to override the
410     # default built-in sort subroutine
411     my $tmp; foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('sort') and defined($tmp = $plugin->sort()) and $sort = $tmp and last; }
412   
413     foreach my $path_file ( &$sort(\%f, \%others) ) {
414       last if $ne <= 0 && $date !~ /\d/;
415       use vars qw/ $path $fn /;
416       ($path,$fn) = $path_file =~ m!^$datadir/(?:(.*)/)?(.*)\.$file_extension!;
417   
418       # Only stories in the right hierarchy
419       $path =~ /^$currentdir/ or $path_file eq "$datadir/$currentdir" or next;
420   
421       # Prepend a slash for use in templates only if a path exists
422       $path &&= "/$path";
423
424       # Date fiddling for by-{year,month,day} archive views
425       use vars qw/ $dw $mo $mo_num $da $ti $yr $hr $min $hr12 $ampm $utc_offset/;
426       ($dw,$mo,$mo_num,$da,$ti,$yr,$utc_offset) = nice_date($files{"$path_file"});
427       ($hr,$min) = split /:/, $ti;
428       ($hr12, $ampm) = $hr >= 12 ? ($hr - 12,'pm') : ($hr, 'am'); 
429       $hr12 =~ s/^0//; $hr12 == 0 and $hr12 = 12;
430   
431       # Only stories from the right date
432       my($path_info_yr,$path_info_mo_num, $path_info_da) = split /\//, $date;
433       next if $path_info_yr && $yr != $path_info_yr; last if $path_info_yr && $yr < $path_info_yr; 
434       next if $path_info_mo_num && $mo ne $num2month[$path_info_mo_num];
435       next if $path_info_da && $da != $path_info_da; last if $path_info_da && $da < $path_info_da; 
436   
437       # Date 
438       my $date = (&$template($path,'date',$flavour));
439       
440       # Plugins: Date
441       foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('date') and $entries = $plugin->date($currentdir, \$date, $files{$path_file}, $dw,$mo,$mo_num,$da,$ti,$yr) }
442   
443       $date = &$interpolate($date);
444   
445       $curdate ne $date and $curdate = $date and $output .= $date;
446       
447       use vars qw/ $title $body $raw /;
448       if (-f "$path_file" && $fh->open("< $path_file")) {
449         chomp($title = <$fh>);
450         chomp($body = join '', <$fh>);
451         $fh->close;
452         $raw = "$title\n$body";
453       }
454       my $story = (&$template($path,'story',$flavour));
455   
456       # Plugins: Story
457       foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('story') and $entries = $plugin->story($path, $fn, \$story, \$title, \$body) }
458       
459       if ($content_type =~ m{\bxml\b}) {
460         # Escape <, >, and &, and to produce valid RSS
461         my %escape = ('<'=>'&lt;', '>'=>'&gt;', '&'=>'&amp;', '"'=>'&quot;');  
462         my $escape_re  = join '|' => keys %escape;
463         $title =~ s/($escape_re)/$escape{$1}/g;
464         $body =~ s/($escape_re)/$escape{$1}/g;
465       }
466   
467       $story = &$interpolate($story);
468     
469       $output .= $story;
470       $fh->close;
471   
472       $ne--;
473     }
474   
475     # Foot
476     my $foot = (&$template($currentdir,'foot',$flavour));
477   
478     # Plugins: Foot
479     foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('foot') and $entries = $plugin->foot($currentdir, \$foot) }
480   
481     $foot = &$interpolate($foot);
482     $output .= $foot;
483
484     # Plugins: Last
485     foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('last') and $entries = $plugin->last() }
486
487   } # End skip
488
489   # Finally, add the header, if any and running dynamically
490   $static_or_dynamic eq 'dynamic' and $header and $output = header($header) . $output;
491   
492   $output;
493 }
494
495
496 sub nice_date {
497   my($unixtime) = @_;
498   
499   my $c_time = ctime($unixtime);
500   my($dw,$mo,$da,$hr,$min,$yr) = ( $c_time =~ /(\w{3}) +(\w{3}) +(\d{1,2}) +(\d{2}):(\d{2}):\d{2} +(\d{4})$/ );
501   $ti="$hr:$min";
502   $da = sprintf("%02d", $da);
503   my $mo_num = $month2num{$mo};
504
505   my $offset = timegm(00, $min, $hr, $da, $mo_num-1, $yr-1900)-$unixtime;  
506   my $utc_offset = sprintf("%+03d", int($offset / 3600)).sprintf("%02d", ($offset % 3600)/60) ;
507
508   return ($dw,$mo,$mo_num,$da,$ti,$yr,$utc_offset);
509 }
510
511
512 # Default HTML and RSS template bits
513 __DATA__
514 html content_type text/html
515
516 html head <html>
517 html head     <head>
518 html head         <link rel="alternate" type="type="application/rss+xml" title="RSS" href="$url/index.rss" />
519 html head         <title>$blog_title $path_info_da $path_info_mo $path_info_yr
520 html head         </title>
521 html head     </head>
522 html head     <body>
523 html head         <center>
524 html head             <font size="+3">$blog_title</font><br />
525 html head             $path_info_da $path_info_mo $path_info_yr
526 html head         </center>
527 html head         <p />
528
529 html story        <p>
530 html story            <a name="$fn"><b>$title</b></a><br />
531 html story            $body<br />
532 html story            <br />
533 html story            posted at: $ti | path: <a href="$url$path">$path </a> | <a href="$url/$yr/$mo_num/$da#$fn">permanent link to this entry</a>
534 html story        </p>
535
536 html date         <h3>$dw, $da $mo $yr</h3>
537
538 html foot
539 html foot         <p />
540 html foot         <center>
541 html foot             <a href="http://blosxom.sourceforge.net/"><img src="http://blosxom.sourceforge.net/images/pb_blosxom.gif" border="0" /></a>
542 html foot         </center>
543 html foot     </body>
544 html foot </html>
545
546 rss content_type text/xml
547
548 rss head <?xml version="1.0"?>
549 rss head <!-- name="generator" content="blosxom/$version" -->
550 rss head <!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">
551 rss head 
552 rss head <rss version="0.91">
553 rss head   <channel>
554 rss head     <title>$blog_title $path_info_da $path_info_mo $path_info_yr</title>
555 rss head     <link>$url</link>
556 rss head     <description>$blog_description</description>
557 rss head     <language>$blog_language</language>
558
559 rss story   <item>
560 rss story     <title>$title</title>
561 rss story     <link>$url/$yr/$mo_num/$da#$fn</link>
562 rss story     <description>$body</description>
563 rss story   </item>
564
565 rss date 
566
567 rss foot   </channel>
568 rss foot </rss>
569
570 error content_type text/html
571
572 error head <html>
573 error head <body>
574 error head     <p><font color="red">Error: I'm afraid this is the first I've heard of a "$flavour" flavoured Blosxom.  Try dropping the "/+$flavour" bit from the end of the URL.</font></p>
575
576
577 error story <p><b>$title</b><br />
578 error story $body <a href="$url/$yr/$mo_num/$da#fn.$default_flavour">#</a></p>
579
580 error date <h3>$dw, $da $mo $yr</h3>
581
582 error foot     </body>
583 error foot </html>
584 __END__