#!/usr/bin/perl
############################################################################
# Voodoo 'Doll' Petskull #
# petskull@twistedport.com #
# http://www.twistedport.com #
#-gbook.cgi 1.0------------------------------------------------------------#
#--------------------------------------------------------------------------#
# (08.28.02) #
# Remember the book still has no way of generating the next pages once the #
# number of posts climbs higher than ten. However, the manner in which it #
# selects which posts go on the page is. #
# #
# Also, no links to the next pages yet (planning on having that dynamic- #
# cgi driven- as well). #
# #
# #
# (08.26.02) #
# The guestbook is now operational, the only problem being the number of #
# posts it displays. #
# #
############################################################################
# require "perl/cgi-lib.pl"; # hide for implementation..
# require "cgi-lib.cgi";
# &ReadParse(*input);
@field;
$noLinesinDat = '0';
# $func = $input{'function'};
# $page = $input{'page'};
# $username = $input{'username'};
# $addy = $input{'email'};
# $body = $input{'body'};
##### These variables are for testing purposes only ######
# $func = "post";
# $page = "2";
$username = "Fire Starter";
$addy = "supafs\@nospam.com";
$body = "Nifty page you've got here..";
##### End of testing variables ######
# $bookdata = "/usr/local/psa/home/vhosts/twistedport.com/httpdocs/guestbook/db.dat";
$bookdata = "db.dat";
$sampOut = "samp.dat";
sub parseStr{
$sample = shift;
$i='0';
$x='0';
do{ # this function will loop until no more '