aboutsummaryrefslogtreecommitdiffhomepage
path: root/html/register
blob: d7723846bfcb1406b95b87646063f09858439a88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?php  
##
##  Proof General registration form.
##  
##  David Aspinall, June 1999.
##
##  $Id$
##
  require('functions.php3');

  $failure= ($argv[0]=="submit" && ($name=="" || $email=="" || $site==""));

  if ($argv[0] !="submit" || $failure):
###
### Registration form
###
  small_header("Proof General Registration"); 

  if ($failure):
?>
<p>
  Your registration form was incomplete.  Please fill in all
  the fields, thank-you!
</p>
<?php else: 
  $mailinglist=true 
?>
<p>
Please register your download using the short form below.  
<br> 
The information provided will only be used to help
provide a case for support for Proof General in the future.
</p>
<p>
If you have already registered you do not need to fill in the form
again, so return to <a href="download#prereq">the download page</a>.
</p>
<?php endif; ?>
<h2>Registration Form</h2>
<form method=post action="<?php print $PHP_SELF . "?submit"; ?>">
<table width="600" border="0" cellspacing="2" cellpadding="0">
<tr>
 <td width="30%">Your name:</td>
 <td width="70%"><input type=text name="name" size="40" 
		  value="<?php echo $name;?>"></td>
</tr>
<tr>
 <td width="30%">Email address:</td>
 <td width="70%"><input type=text name="email" size="40"
		  value="<?php echo $email;?>"></td>
</tr>
<tr>
 <td width="30%">Your site name:</td>
 <td width="70%"><input type=text name="site" size="40"
		  value="<?php echo $site;?>"></td>
</tr>
<tr>
 <td width="30%"><input type=checkbox name="mailinglist"
		  <?php if ($mailinglist) print "checked"; ?>></td>
 <td width="70%">Please add me to the mailing list.</td>
</table>
<input type=submit value="Send form"> 
</form>
<p>
</p>
<?php  
   click_to_go_back(); 
   footer(); 
  else:
##
##  Process registration
##
   small_header("Registration Form Sent");


   $message = "Registration form for using Proof General" 
	    . "\nName:\t\t " . $name
	    . "\nEmail:\t\t " . $email
	    . "\nSite:\t\t " . $site
	    . "\nSubmitted:\t" . date("h:ia D jS F Y");
   mail("proofgen@dcs.ed.ac.uk",
	"[Registration form from ~proofgen]",
	 $message);
   
   print "<p>Dear " . $name . ",</p>\n"; 
   print "<p>";
   print "Thank you for filling in the form. Your registration has been sent.<br>";

   /* Next bit duplicated in mailinglist.html.  
      Could be a function in functions.php3 */

   if ($mailinglist) {
	$message = "subscribe address=$email"; 
	mail("proofgeneral-request@informatics.ed.ac.uk",
	     "[Web form from Proof General]",
	     $message,
	    "Reply-To: " . $email . "\nFrom: " . $email);
        print "A subscription request has been sent for the Proof General mailing list.<br>";
   }
   print "</p>\n<p>";

   print "<p>\nClick ";
   print "<a href=\"download#prereq\">here</a>";
   print " to return to the download page.<br></p>\n";
   click_to_go_back();
  
   footer();
 endif;
?>