#!/usr/bin/perl # MemberManagerPro is copyright 2001 by Internalysis, all rights reserved. # Purchasing this script allows you to install and use it on ONE website for ONE client # You may not redistribute, sell, make copies, post for archival or download purposes or in any other way # violate the copyright of this application. Basically, if you want to make money off this script, let me # know and we'll both benefit. (I'll support your customers, as well as keep them up to date on upgrades and # you make an easy commission for doing next to no work :) # If you need help installing or configuring this script, please feel free to contact me, Marc Bissonnette, at # dragnet@internalysis.com # IMPORTANT: READ ALL THE COMMENTS IN THIS SCRIPT, ESPECIALLY THOSE IN THE &GetMembers SUBROUTINE! Customizing the display # of this CGI is fairly straightforward, but you need to understand what to edit (especially since editing one section will # affect another. # The name of the file containging your member list. If this is not in the same directory # as the CGI, include the full path $memberfile="memberfile.txt"; # The header file to display above the CGI-Generated Content $header="memberhead.html"; # The footer file to display below the CGI-Generated Content $footer="memberfoot.html"; # The URL of the CGI script $cgiurl="http://www.internalysis.com/memberpro/membermanagerprodemo.cgi"; # The name of your site. Used to create sentances like "Choose you you wish to display the $sitename member list $sitename="MemberManager Pro Demo"; # The subroutine library included in the download require '../cgi-bin/cgi-lib.pl'; # This helps display errors to your browser instead of the error log to make debugging easier use CGI::Carp qw(fatalsToBrowser); # Get content, if any, from the browser &ReadParse; # Check to see how to proceed &Handling; sub Handling { if (!$in{submit}) { &Default; } elsif ($in{method} eq "name" && $in{submit} eq "Continue") { &ShowAll; } elsif ($in{method} ne "name" && $in{submit} eq "Continue") { &ChoiceParse; exit; } elsif ($in{submit} eq "Show Members") { &ShowFiltered; exit; } } sub ChoiceParse { # This subroutine creates the drop-down menus for the filter choices. Edit at your own risk (You shouldn't have to) print &PrintHeader; &HeaderFile; print "
\n"; &FooterFile; exit; } sub ShowFiltered { # This subroutine displays the final content, based on the user's selection # This gets the memberlist. READ THE COMMENTS IN THIS SUBROUTINE &GetMembers; print &PrintHeader; &HeaderFile; print "\n"; print "Members in $in{filter} | \n";
$count=0;
print "|
| $$key{name} $$key{title} $$key{company} $$key{address} $$key{suite} $$key{city} $$key{province} $$key{postal} $$key{country} $$key{phone} $$key{fax} $$key{email} $$key{url} | \n";
# The value of $count is the number of columns displayed in the output, plus one. By default, it's two columns. If you want more, increase the value of count.
# For example, if you want a four column layout, change the value of $count to 3
if ($count==1) {
print "|
| $$key{name} $$key{title} $$key{company} $$key{address} $$key{suite} $$key{city} $$key{province} $$key{postal} $$key{country} $$key{phone} $$key{fax} $$key{email} $$key{url} | \n";
# The value of $count is the number of columns displayed in the output, plus one. By default, it's two columns. If you want more, increase the value of count.
# For example, if you want a four column layout, change the value of $count to 3
if ($count==1) {
print "
MemberManager Pro is © 2001 InternAlysis. All rights reserved.
\n"; open (FOOTER, "$footer"); while (