[Commits] [svn:einsteintoolkit] www/about/members/ (Rev. 80)

cjordan at cct.lsu.edu cjordan at cct.lsu.edu
Wed Mar 17 12:21:24 CDT 2010


User: cjordan
Date: 2010/03/17 12:21 PM

Added:
 /about/members/
  send-registration.php

Modified:
 /about/members/
  index.php, join.php, statement.php

Log:
 maybe this script for registering will work on the first try

File Changes:

Directory: /about/members/
==========================

File [modified]: index.php
Delta lines: +1 -1
===================================================================
--- about/members/index.php	2010-03-16 20:56:00 UTC (rev 79)
+++ about/members/index.php	2010-03-17 17:21:24 UTC (rev 80)
@@ -3,7 +3,7 @@
 
 <p>
 We are building a consortium of users and developers for the Einstein Toolkit.
-Users of the Einstein Toolkit are encouraged to <a href="join.php">register on this page</a>.
+Users of the Einstein Toolkit are encouraged to <a href="join">register on this page</a>.
 </p>
 
 <h3>

File [modified]: join.php
Delta lines: +1 -1
===================================================================
--- about/members/join.php	2010-03-16 20:56:00 UTC (rev 79)
+++ about/members/join.php	2010-03-17 17:21:24 UTC (rev 80)
@@ -3,7 +3,7 @@
 
 <p>Please fill out the following information to register as a user of the Einstein Toolkit and a member of our consortium. </p>
 
-<form name="register" action="/send.php" method="get">
+<form name="register" action="send-registration" method="post">
 <table>
 <tr>
 <td>Name: </td>

File [added]: send-registration.php
Delta lines: +35 -0
===================================================================
--- about/members/send-registration.php	                        (rev 0)
+++ about/members/send-registration.php	2010-03-17 17:21:24 UTC (rev 80)
@@ -0,0 +1,35 @@
+<?php $title='Sending registration...';
+include_once($_SERVER['DOCUMENT_ROOT'].'/global/header.php');
+
+/* All form fields are automatically passed to the PHP script through the array $HTTP_POST_VARS. */
+$name = $HTTP_POST_VARS['name'];
+$email = $HTTP_POST_VARS['email'];
+$institution = $HTTP_POST_VARS['institution'];
+$list = $HTTP_POST_VARS['list'];
+
+if ($list=='yes') {
+$addtolist = 'Add this person to the users mailing list.';
+}
+else {
+$addtolist = 'Do not add this person to the users mailing list.';
+}
+
+$message = "Einstein Toolkit mainatiners: \n\n".$name." from ".$institution." has submitted a request to register with the Einstein Toolkit. His or her email address is ".$email.". ".$addtolist;
+
+/* PHP form validation: the script checks that the Email field contains a valid email address and the Subject field isn't empty. preg_match performs a regular expression match. It's a very powerful PHP function to validate form fields and other strings - see PHP manual for details. */
+if (!preg_match("/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/", $email)) {
+  echo "<h4>Please provide an email address.</h4>";
+  echo "<a href='javascript:history.back(1);'>Back</a>";
+} elseif ($name == "") {
+  echo "<h4>Please fill in your name.</h4>";
+  echo "<a href='javascript:history.back(1);'>Back</a>";
+}
+
+/* Sends the mail and outputs the "Thank you" string if the mail is successfully sent, or the error string otherwise. */
+elseif (mail("maintainers at einsteintoolkit.org","New Einstein Toolkit registration received",$message)) {
+  echo "<h4>Thank you for registering!</h4>";
+} else {
+  echo "<h4>There was a problem registering.</h4>";
+}
+
+include_once($_SERVER['DOCUMENT_ROOT'].'/global/footer.php');?>
\ No newline at end of file

File [modified]: statement.php
Delta lines: +1 -1
===================================================================
--- about/members/statement.php	2010-03-16 20:56:00 UTC (rev 79)
+++ about/members/statement.php	2010-03-17 17:21:24 UTC (rev 80)
@@ -39,6 +39,6 @@
 
 The Einstein Toolkit citation guidelines are designed to appropriately credit individuals who have made intellectual contributions to the toolkit in designing the algorithms and software implementations that contribute substantially to provision of an effective framework.
 
-WHAT DO WE PUT HERE?
+<!-- WHAT DO WE PUT HERE? -->
 
 <?php include_once($_SERVER['DOCUMENT_ROOT'].'/global/footer.php');?>



More information about the Commits mailing list