[Commits] [svn:einsteintoolkit] www/info/documentation/ (Rev. 90)

gallen at cct.lsu.edu gallen at cct.lsu.edu
Sun Mar 21 18:22:11 CDT 2010


User: gallen
Date: 2010/03/21 06:22 PM

Added:
 /info/documentation/
  request.php, send-account.php

Modified:
 /info/documentation/
  index.php

Log:
 added an account request interface

File Changes:

Directory: /info/documentation/
===============================

File [modified]: index.php
Delta lines: +6 -2
===================================================================
--- info/documentation/index.php	2010-03-20 19:32:24 UTC (rev 89)
+++ info/documentation/index.php	2010-03-21 23:22:11 UTC (rev 90)
@@ -51,8 +51,12 @@
 
 <p><tt> cd Cactus<br>svn checkout https://svn.cct.lsu.edu/repos/numrel/simfactory</tt></p>
 
-<p>Configure the Simulation Factory (XXXX just the global email address?)</p>	
+<p>Configure the Simulation Factory</p>
 
+<p><tt>mv simfactory/udb.example.pm simfactory/udb.pm</tt>
+<br><tt>vi simfactory/udb.pm</tt></p>																		
+<p>Edit udb.pm and replace LOGIN_NAME with your username on Queen Bee.</p>
+
 <p><b>Download Einstein Toolkit Examples:</b></p>
 
 <p>From the Cactus directory,</p>
@@ -67,7 +71,7 @@
 
 <p>Create a batch queue script and submit it to queue the simulation:</p>
 	
-<p><tt>./simfactory/sim create-submit --parfile=EinsteinExamples/par/ks-mclachlan.par --procs=32 --walltime=8:0:0</tt></p>
+<p><tt>./simfactory/sim create-submit static_TOV --parfile=EinsteinExamples/par/static_TOV.par --procs=32 --walltime=8:0:0</tt></p>
 
 <p>To check the status of the simulation, use</p>
 

File [added]: request.php
Delta lines: +42 -0
===================================================================
--- info/documentation/request.php	                        (rev 0)
+++ info/documentation/request.php	2010-03-21 23:22:11 UTC (rev 90)
@@ -0,0 +1,42 @@
+<?php $title='Request Test Account';
+include_once($_SERVER['DOCUMENT_ROOT'].'/global/header.php');?>
+
+<p>Please fill out the following information to request a test account for the Einstein Toolkit.</p>
+
+<form name="request" action="send-account" method="post">
+<table>
+<tr>
+<td>Name: </td>
+<td><input type="text" name="name" /></td>
+</tr>
+<tr>
+<td>Email: </td>
+<td><input type="text" name="email" /></td>
+</tr>
+<tr>
+<td>Department: </td>
+<td><input type="text" name="department" /></td>
+</tr>
+<tr>
+<td>Institution: </td>
+<td><input type="text" name="institution" /></td>
+</tr>
+<tr>
+<td>Position</td>
+<td><input type="radio" name="list" value="undergraduate" checked /> undergraduate
+<input type="radio" name="list" value="graduate student" /> graduate student<br>
+<input type="radio" name="list" value="postdoc" /> postdoc
+<input type="radio" name="list" value="researcher" /> researcher
+<input type="radio" name="list" value="faculty" /> faculty
+</td>
+</tr>
+<tr>
+<td></td>
+<td><input type="submit" value="Submit" /></td>
+</tr>
+</table>
+</form>
+
+<!-- WHAT DO WE PUT HERE? -->
+
+<?php include_once($_SERVER['DOCUMENT_ROOT'].'/global/footer.php');?>



Property changes on: info/documentation/request.php
___________________________________________________________________
Name: svn:executable
   + *


File [added]: send-account.php
Delta lines: +44 -0
===================================================================
--- info/documentation/send-account.php	                        (rev 0)
+++ info/documentation/send-account.php	2010-03-21 23:22:11 UTC (rev 90)
@@ -0,0 +1,44 @@
+<?php $title='Sending account request...';
+include_once($_SERVER['DOCUMENT_ROOT'].'/global/header.php'); ?>
+
+<br />
+
+<?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'];
+$department = $HTTP_POST_VARS['department'];
+$institution = $HTTP_POST_VARS['institution'];
+$position = $HTTP_POST_VARS['position'];
+$advisor = $HTTP_POST_VARS['advisor'];
+
+if ($position=='undergraduate' || $position=='graduate') {
+$addtolist = 'This students advisor is $advisor.';
+}
+
+
+$message = "Einstein Toolkit maintainers: \n\n".$name." a ".$position$." in the ".$department."at".$institution." has submitted a request for a test account for the Einstein Toolkit. His or her email address is ".$email.".".$addtolist." \n\n Thanks,\n Einstein Toolkit Request Bot\n";
+
+/* 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 ($name == '') {
+  echo '<h4>Please fill in your name.</h4>';
+  echo '<br /><a href="javascript:history.back(1);">Try again</a>';
+  }
+  elseif (!preg_match("/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/", $email)) {
+  echo '<h4>Please provide a valid email address.</h4>';
+  echo '<br /><a href="javascript:history.back(1);">Try again</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 test account request received',$message,'From: RegistrationBot at einsteintoolkit.org')) {
+  echo '<h4>Your request for a test account has been successfully submitted. You will hear from us soon.</h4>';
+  echo '<br /><a href="/">Home</a>';
+} else {
+  echo '<h4>Unfortunately, there was a problem requesting an account.</h4>';
+  echo '<a href="javascript:history.back(1);">Go back to try again?</a>';
+}
+?>
+
+<br /><br />
+
+<?php include_once($_SERVER['DOCUMENT_ROOT'].'/global/footer.php');?>
\ No newline at end of file



More information about the Commits mailing list