#!/usr/bin/perl use CGI; use strict; use Fcntl ':flock'; my $viewNotes = 6; chdir "/home/davei/public_html"; my $q = new CGI; open (COUNTER, "+; $hits++; my @status = stat COUNTER; seek(COUNTER, 0, 0); print COUNTER $hits,"\n"; flock (COUNTER, LOCK_UN); close COUNTER; print $q->header; print qq! The One True Dave's Home Page

The One True Dave's Home Page


This site is so very very under construction.


!; my @notes = sort `ls notes/`; my $skip; if ($skip = $q->param("start")) { if ($skip < 0) { $skip = 0; } else { for (my $ctr = 0; $ctr < $skip; $ctr++) { pop @notes; } } } for (my $ctr = 0; $ctr < $viewNotes; $ctr++) { my $notename = pop @notes; chomp $notename; last unless ($notename); print "\n
\n\n"; } print "
"; open (NOTE, "< notes/$notename/notes.txt"); my @comments = `ls notes/$notename/comment*`; my $commentCount = scalar(@comments); my $subject; while (!($subject)) { $subject = ; } print "$subject
\n"; while () { last if (eof(NOTE)); print; } s/\<.*>//g; print qq!
 
$_ Commments ($commentCount)
!; print "\n
"; if ($skip > 0) { my $startAt = $skip - $viewNotes; print qq!\n\n"; if (scalar(@notes)) { my $startAt = $skip + $viewNotes; print qq!
<-Prev!; } else { print " "; } print "NavigationNext->!; } else { print " "; } print "
\n"; print "\n";