#!/usr/bin/perl -- print "Content-Type: text/html\n\n"; $center = "center.htm"; # html template # taken from formmail %Config = ('dir','','fil','','ttl','','alx',''); read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { local($name, $value) = split(/=/, $pair); $name =~ tr/+/ /; $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $name =~ tr/\0//d; $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ tr/\0//d; $value =~ s/\n//eg; if (defined($Config{$name})) { $Config{$name} = $value; } } $dir = $Config{dir}; $fil = $Config{fil}; $ttl = $Config{ttl}; $alx = $Config{alx}; $fl = join '', "../ujo/", $dir, "/", $fil, ".txt"; open CENTER, $center or die "Cannot open $center for read :$!"; while (
) { if (/text begin/) {$ate = 1;} if (/text end/) {$ate = 0;} if (/\<\/body\>/) {&printform;} if ($ate) {&printate;} else {print;} } sub printate{ print "\n"; print $alx; } sub printform{ print "

 

\n"; print <
Directory:   POINT print " \n"; print < File:   POINT print "

\n"; print < Title:   POINT print "

\n"; print < Text:   POINT print "
\n"; print "    \n"; print "

\n"; print " \n"; print " \n"; print " \n"; print " \n"; print "    "; print " "; print "
\n" }