#!/usr/bin/perl ############################################################################# # Online Administrative Feedback Form (v1.0) # # Created 5/97 # # # # Copyright 1997 Randy Jae Weinstein. All Rights Reserved. # # Randy Jae Weinstein # # Author EMail: rw263@NYU.EDU # # Author HomePage: http://homepages.NYU.EDU/~rw263/ # # # # New features in this version: # # -Paginated guestbook entries (10 entries/page) # # -admin can delete entries via check-box online form # # -admin can ban/unban ips # # # # In the works for next version: # # -allow admin to set maximum number of entries, and have the early # # entries deleted when that limit is reached # # -editable guestbook style (GBML Tags) via a name/pwd of administrator # # GBML Tags allow - a type of template as to how the output should be # # displayed stands for GuestBook Markup Language :-) # # -Multiple Guestbooks # # Auto creation/deletion of guestbooks # # # ### Modified From ########################################################### # Guestbook Version 2.3.1 # # Created 4/21/95 Last Modified 10/29/95 # # # # WWWBoard Admin Version 2.0 ALPHA 2 # # Created 10/21/95 Last Modified 11/25/95 # # # # Copyright 1996 Matt Wright mattw@worldwidemart.com # # Scripts Archive at: http://www.worldwidemart.com/scripts/ # # Copyright 1996 Matthew M. Wright All Rights Reserved. # ############################################################################# # Set Variables $baseDir = "../www"; # 'mesgFile' is located in this dir # IMPORTANT: 'chmod 600 mesgFile' $baseUrl = "http://Your.Host.COM"; # URL of above directory $cgiUrl = "$baseUrl/cgi-bin/feedback.cgi"; # where is this script placed? # IMPORTANT: 'chmod 755 thisCgiScript' $mesgFile = "$baseDir/entries"; # contents of the starter 'mesgFile': # default Name/Pwd: WebAdmin/WebBoard # # # $mailProg = '/usr/lib/sendmail -t'; # where is your sendmail located $recipient = 'you@Where.COM'; # Your EMail Address $recipientName = 'Your Full Name'; # Your Full Name $allowHtml = 1; # 1 = Yes; 0 = No ############################### Done Editing! ############################### ######################## Actual Script Starts Here!! ######################## ############################################################################# # Retrieve Date ############################################################################# &getDate; $query = $ENV{'QUERY_STRING'}; $command = ''; $page = 1; $USER = ''; $PWD = ''; if ($query) { if ($query =~ /&/) { @queryString = split(/&/,$query); foreach $qString (@queryString) { if ($qString =~ m/Page=(\d+)/) { $page = $1; } elsif ($qString =~ m/User=(.*)/) { $USER = $1; } elsif ($qString =~ m/Pwd=(.*)/) { $PWD = $1; } else { $command = $qString; } } } elsif ($query =~ /Page=(\d+)/) { $page = $1; } else { $command = $query; } } else { &parseForm; } ############################################################################# # Remove # Using this method allows you to delete all messages posted before # a certain date. ############################################################################# if ($command eq 'Remove') { &header('