X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=maps%2Fbin%2Fregisterform.cgi;h=03f2c5a1ddad435f35a1c0fcf29194a00b83c637;hb=b4b5e8a7e6180ad1de85382f97e7496347057a51;hp=eb762c6dc2ce8c997fdc54cf5b7e964589b3c53e;hpb=020a4a5ea2be725b155cae3a2cadc9aba3911b9b;p=clearscm.git
diff --git a/maps/bin/registerform.cgi b/maps/bin/registerform.cgi
index eb762c6..03f2c5a 100755
--- a/maps/bin/registerform.cgi
+++ b/maps/bin/registerform.cgi
@@ -2,8 +2,8 @@
################################################################################
#
# File: $RCSfile: registerform.cgi,v $
-# Revision: $Revision: 1.1 $
-# Description: Register a MAPS user
+# Revision: $Revision: 1.1 $
+# Description: Register a MAPS user
# Author: Andrew@DeFaria.com
# Created: Mon Jan 16 20:25:32 PST 2006
# Modified: $Date: 2013/06/12 14:05:47 $
@@ -20,89 +20,91 @@ $0 = $FindBin::Script;
use CGI qw/:standard *table start_div end_div/;
+use lib "$FindBin::Bin/../lib";
+
use MAPS;
use MAPSWeb;
-my $userid = param ("userid");
-my $Userid = ucfirst $userid;
-my $sender = param ("sender");
-my $errormsg = param ("errormsg");
+my $userid = param ('userid');
+my $Userid = ucfirst $userid;
+my $sender = param ('sender');
+my $errormsg = param ('errormsg');
-sub Heading {
+sub MyHeading {
print
- header (-title => "MAPS Registration"),
+ header (-title => "MAPS Registration"),
start_html (-title => "MAPS Registration",
- -author => "Andrew\@DeFaria.com",
- -style => {-src => "/maps/css/MAPSPlain.css"},
- -script => [{ -language => "JavaScript1.2",
- -src => "/maps/JavaScript/MAPSUtils.js"},
- { -language => "JavaScript1.2",
- -src => "/maps/JavaScript/CheckRegistration.js"}
- ]);
+ -author => "Andrew\@DeFaria.com",
+ -style => {-src => "/maps/css/MAPSPlain.css"},
+ -script => [{ -language => "JavaScript1.2",
+ -src => "/maps/JavaScript/MAPSUtils.js"},
+ { -language => "JavaScript1.2",
+ -src => "/maps/JavaScript/CheckRegistration.js"}
+ ]);
print
h2 ({-class => "header", -align => "center"},
font ({-class => "standout"}, "MAPS"),
"Mail Authorization and Permission System");
- if (defined $errormsg) {
+ if ($errormsg) {
DisplayError $errormsg;
exit;
} # if
-} # Heading
+} # MyHeading
sub Body {
print start_div {-class => "content"};
print p ("${Userid}'s email is protected by MAPS, a spam elimination
- system. In order to email $Userid you must register. You need
- only register once to be added to ${Userid}'s white list,
- thereafter you should have no problems emailing them. This is not
- unlike the acceptance procedure for many instant messaging clients.");
+ system. In order to email $Userid you must register. You need
+ only register once to be added to ${Userid}'s white list,
+ thereafter you should have no problems emailing them. This is not
+ unlike the acceptance procedure for many instant messaging clients.");
print p ("Please enter your full name and click on Register to complete the
- registration.");
+ registration.");
print start_form {
- -method => "post",
- -action => "register.cgi",
- -onSubmit => "return validate (this);"
+ -method => "post",
+ -action => "register.cgi",
+ -onSubmit => "return validate (this);"
};
print start_table {
- -cellpadding => 2,
- -cellspacing => 0,
- -border => 0,
- -align => "center",
- -width => "360"
+ -cellpadding => 2,
+ -cellspacing => 0,
+ -border => 0,
+ -align => "center",
+ -width => "360"
};
- print hidden (-name => "userid",
- -value => "$userid");
+ print hidden (-name => "userid",
+ -value => "$userid");
print Tr [
td ({-class => "header"}, "Full name:") .
- td (textfield {-class => "inputfield",
- -size => 50,
- -name => "fullname"})
+ td (textfield {-class => "inputfield",
+ -size => 50,
+ -name => "fullname"})
];
- print hidden (-name => "sender",
- -value => "$userid");
+ print hidden (-name => "sender",
+ -value => "$userid");
print end_table;
- print p {-align => "center"},
- submit (-name => "submit",
- -value => "Register");
+ print p {-align => "center"},
+ submit (-name => "submit",
+ -value => "Register");
print end_form;
print p ("Tired of dealing with unsolicited email (AKA SPAM)? Want to know
- more about MAPS, the Mail Authorization and Permission System for
- eliminating SPAM? Click",
- a ({-href => "/maps/",
- -target => "_blank"},
- "here"),
- "to find out more.");
+ more about MAPS, the Mail Authorization and Permission System for
+ eliminating SPAM? Click",
+ a ({-href => "/maps/",
+ -target => "_blank"},
+ "here"),
+ "to find out more.");
print start_table {
- -cellpadding => 2,
- -cellspacing => 0,
- -border => 1,
- -align => "center",
- -width => "50%"
+ -cellpadding => 2,
+ -cellspacing => 0,
+ -border => 1,
+ -align => "center",
+ -width => "50%"
};
print Tr [
td ({-class => "note",
- -align => "center"}, "Note")
+ -align => "center"}, "Note")
];
print Tr [
td ({-class => "notetext"},
@@ -114,7 +116,7 @@ sub Body {
print end_div;
} # Body
-if (!defined $userid) {
+if (!$userid) {
$errormsg = "Internal error: Userid not specified";
} else {
if (!UserExists ($userid)) {
@@ -122,6 +124,6 @@ if (!defined $userid) {
} # if
}
-Heading;
+MyHeading;
Body;
Footing;