#!/usr/local/bin/perl5 -w # # majordomo # # Build a form with some fields preset. The generated form will # allow most of the options which majordomo allows. # # This puts up a fairly simple screen to be filled out. # This also takes a query string which can be used to # fill in some defaults, as well as limit the options available. # # Parameters: # The first parameter is the name of the mailing list # and host. Something like: # oracle-bugs:peak.org # # The next set of parameters are those to avoid displaying # fields. They are: # -s -u -h -i -I -w -W -l -g # -s No subscribe # -u No unsubscribe # -h No help # -i No info # -I No index # -w No which # -W No who # -l No lists # -g No get # # The parameter "ro" says that the fields for mailing # list name and machine name cannot be changed. # # The next parameter is for color: # bgcolor=COLOR # If specified, this will be used as the background color. # Note that case is significant. The "bgcolor" must be all # lower case leters. # # The next parameter is for the next link off of the # majordomo2 page: # link=http://www.... # # Note that if I were to rewrite this program it would look # quite different. CGI.pm may have been one of those choices. # # Written by Dave Regan # 24 June 1996 # This program is in the Public Domain. # Do what you want with it. # ### ### Configuration ### $DefaultHost = "peak.org"; # Default mail server ### ### Main program ### HTMLhead("Marjordomo meets the web"); $Vars{'bgcolor'} = "#FFFFFF"; $Vars{'link'} = ""; $| = 1; ParseQueryString(); # printenv(); print "
\n"; $Vars[0] = "" if (!defined($Vars[0])); ($mlist, $host) = split(/[:\@]/, $Vars[0]); DisplayForm($mlist, $host); HTMLterm(); exit 0; ### ### DisplayForm ### ### Build a form for the user to fill in. ### sub DisplayForm { local($mlist, $host) = @_; print "This form will let you communicate with any majordomo mailing list server.\n"; $mlist = "" if (!defined($mlist)); $host = "" if (!defined($host)); if ($mlist ne "") { $host = $DefaultHost if ($host eq ""); if (!defined($Vars{'ro'})) { print "The current mailing list ($mlist on host $host)\n"; print "is selected as a default, but you\n"; print "can alter the mailing list name or host if you want.\n"; } } # print "You must enter your email address and your full name.\n"; print "You must enter your email address.\n"; print "
\n"; print "You can select any of the majordomo commands, and you can choose to select\n"; print "several of them.\n"; print "
\n"; print "