#! /usr/local/bin/perl ################################# # # # WeddingPlanner CGI # # # # Written by Zach Whalen -- # # (zwhalen@english.ufl.edu)# # # Please contact me if you use this # program or if you have any questions. # # # Copyleft Zach Whalen 2003 # # You can use this program if # # you want to. Just don't try to# # Copyright it yourself, please.# # # ################################# ### SUMMARY ### # # This is part of a script which helps you # keep up with addresses and other related # information when you're planning a wedding # (or conference). # alarm(30); use strict; require '/web/nwe/share/nwe.pm'; print "Content-type: text/html \n\n"; my %data = &Parse_web_data(); my $file = $data{file}; my @datfiles = glob "*.dat"; my $match; foreach (@datfiles){ my %hash = &make_hash($_); if ($_ == $file) { $match = 1; last; } } my %hash = &make_hash($_); if ($match){ print <

Are you sure you want to delete this file?

Just kidding, take me back to the cabinet.
Last Name First Name # in party Other's names Mailing Address E-Mail Inv. Sent? RSVPed? RSVP # Gift Thank-you?
$hash{surname} $hash{firstname} $hash{party} $hash{others} $hash{address} $hash{email} $hash{invite} $hash{RSVP} $hash{group} $hash{gift} $hash{thank}
END_OF_HTML }else {print <

File not found.

SECOND_HTML } sub make_hash { my ($key, $val, %hash); open READ, "$file" or return 0; my @file = ; close READ; foreach (@file){ chomp $_; ($key, $val) = split /=/,$_; $hash {$key}=$val; } return %hash; }