#!/usr/bin/perl
#
# Variablen 
#
$|=1;

use strict;

my $orig="/home/httpd/htdocs/pinnwand/.guestbook.txt";
my $exlock=2;
my $unlock=8;

print "Content-type: text/html\n\n";
#
# Web-page fuer den Betrachter kreieren 
#
# Kopf
print <<EOF;
<html><head><title>Pinwand</title></head>
<body TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#FF00FF" ALINK="#FF0000">
<H1 ALIGN=CENTER>Pinwand</H1>
EOF
# Datei ausgeben
#
if ( open (IN, "<" . $orig) )
  {
  flock(IN, $exlock);
  print while (<IN>);
  flock(IN, $unlock);
  close IN;
  }
else
  { print "Cannot read from data file $orig"; }
#
# Fuss ausgeben
print "</body></html>\n";
exit 0

