"; //print_r($_POST['security_try']); //variables $valid_email=""; $start_time=""; $end_time=""; $end_date=""; if (!isset($_POST['lunch_monday'])){ $lunch_monday=""; } if (!isset($_POST['lunch_tuesday'])){ $lunch_tuesday=""; } if (!isset($_POST['lunch_wednesday'])){ $lunch_wednesday=""; } if (!isset($_POST['lunch_thursday'])){ $lunch_thursday=""; } if (!isset($_POST['lunch_friday'])){ $lunch_friday=""; } /*if (!isset($_POST['dinner_wednesday'])){ $dinner_wednesday=""; }*/ $message=""; $message0=""; $newmessage=""; //Define function to insert security image function insertSecurityImage($inputname) { //$refid = md5(mktime()*rand()); $refid = $_POST['security_refid']; $insertstr = "\"Security\n "; echo($insertstr); } // Check if security image was correct //Define function to check security image confirmation function checkSecurityImage($referenceid, $enteredvalue) { $referenceid = mysql_escape_string($referenceid); $enteredvalue = mysql_escape_string($enteredvalue); $tempQuery = mysql_query("SELECT ID FROM security_images WHERE referenceid='".$referenceid."' AND hiddentext='".$enteredvalue."'"); if (mysql_num_rows($tempQuery)!=0) { return true; } else { return false; } } if (isset($HTTP_POST_VARS["name"]) && isset($HTTP_POST_VARS["security_try"])) { //Connect to database mysql_connect($hostname, $username, $password); mysql_select_db("computing"); //Set variables, and call checkSecurityImage $security_refid = $HTTP_POST_VARS["security_refid"]; $security_try = $HTTP_POST_VARS["security_try"]; $checkSecurity = checkSecurityImage($security_refid, $security_try); //Depending on result, tell user entered value was correct or incorrect if ($checkSecurity) { $validnot = "correct"; } else { $validnot = "incorrect"; } } //print "validnot is $validnot\n"; if ( ( $validnot == "incorrect" ) || ($lastname == "") || ($firstname == "") || ($email == "") || ($valid_email == "no") || ($end_time < $start_time) ) { ?> 'Registration Confirmation'

Workshop on Sheaf-Theoretic Methods in Symplectic Topology

May 9-12, 2011


Your application had errors. Please fix!
You entered this as the security text:
\n ".$security_try."
\n This is ".$validnot.".
\n -------------------------------

\n "); } if ($valid_email == "no") { print "$email is not a valid address"; print "
"; print "
"; } if ($firstname == "") { print "First name required"; print "
"; print "
"; } if ($lastname == "") { print "Last name required"; print "
"; print "
"; } if ($email == "") { print "Email address required"; print "
"; print "
"; } if ($end_time < $start_time) { print "The end date is earlier than the start date"; print "
"; print "
"; } print "

"; ?>
* indicates required fields

Dates you plan to attend:

Start Date:              End Date:  

First name:

> *

Middle name:

>

Last name:

> *

Position:

Affiliation or Organization:

>

Street Address:

>

City:

>

State:

>

Zip or Postal Code:

>

Country:

>

Telephone:

>

Fax:

>

E-mail:

> *


So that our chef can prepare enough food for outside visitors during the workshop, please check the appropriate boxes below for the days you wish to have lunch at the Institute (at your expense).

Lunch

>Monday, May 09, 2011

>Tuesday, May 10, 2011

>Wednesday, May 11, 2011

>Thursday, May 12, 2011

characters remaining.


For security, enter the text you see in the image above:

check_email_address($email)) { // Email address is technically valid //print "yes \n"; $valid_email = "yes"; } else { //print "no \n"; // Email not valid $valid_email = "no"; } // Convert startdate and enddate into date format YYYY-MM-DD // Also convert into time so they can be compared to one another //startdate $start_orig = $startdate; list($start_month,$junk) = split(" ", $startdate); list($start_day,$start_year) = split(",",$junk); $start_date=date('Y-m-d', mktime(0,0,0,5,$start_day,$start_year)); $start_time = mktime(0,0,0,5,$start_day,$start_year); //echo "startdate is $startdate\n"; //echo "start_day is $start_day\n"; //echo "start_year is $start_year\n"; //echo "start_month is $start_month\n"; //echo "start_date is $start_date\n"; //echo "start_time is $start_time\n"; $end_orig = $end_date; list($end_month,$trash) = split(" ", $enddate); list($end_day,$end_year) = split(",",$trash); $end_date=date('Y-m-d', mktime(0,0,0,5,$end_day,$end_year)); $end_time = mktime(0,0,0,5,$end_day,$end_year); //echo "enddate is $enddate\n"; //echo "end_day is $end_day\n"; //echo "end_year is $end_year\n"; //echo "end_month is $end_month\n"; //echo "end_date is $end_date\n"; //echo "end_time is $end_time\n"; //? > //< ? // Connect to the registration database $table_name1="main"; $table_name2="conference"; $connection = mysql_connect($hostname, $username, $password) or die ("Couldn't Connect"); $db = @mysql_select_db($db_name, $connection) or die ("Couldn't select database."); if ( $lunch_monday == "ON") { $lunch_mon = "1"; } if ($lunch_tuesday == "ON" ) { $lunch_tues = "1"; } if ($lunch_wednesday == "ON" ) { $lunch_wed = "1"; } if ($lunch_thursday == "ON" ) { $lunch_thurs = "1"; } if ($lunch_friday == "ON" ) { $lunch_fri = "1"; } /*if ( $dinner_wednesday == "ON" ) { $dinner_wed = "1"; }*/ $conference_name = "STMST-2011"; $sql0 = "SELECT id FROM main WHERE firstname=\"$firstname\" AND lastname=\"$lastname\" AND conference_name=\"$conference_name\" "; // $result0 = @mysql_query($sql0, $connection) or die (mysql_error()); $result0 = @mysql_query($sql0, $connection) or die ("sql0"); while ($row0 = mysql_fetch_array($result0)) { if(!empty($row0['id'])) { $id = $row0['id']; ?>

Our records indicate that you have already registered

If you would like to change/update your information, please email: huguenin@ias.edu
"; print "

"; exit(); } } //Make sure that only one set of data goes through $sql="INSERT INTO $table_name1 ( firstname, middlename, lastname, email, startdate, enddate, fax, conference_name ) VALUES (\"$firstname\", \"$middlename\", \"$lastname\", \"$email\", \"$start_date\", \"$end_date\", \"$fax\", \"$conference_name\")"; $result = @mysql_query($sql, $connection) or die (mysql_error()); $sql1 = "SELECT id FROM main WHERE firstname=\"$firstname\" AND lastname=\"$lastname\" "; // $result1 = @mysql_query($sql1, $connection) or die (mysql_error()); $result1 = @mysql_query($sql1, $connection) or die ("sql1"); while ($row1 = mysql_fetch_array($result1)) { if(!empty($row1['id'])) { $id = $row1['id']; } } //$sql2 = "INSERT INTO $table_name2 ( id, affiliation, street_address, city, state, zipcode, country, telephone, lunch_monday, lunch_tuesday, lunch_wednesday, lunch_thursday, lunch_friday, dinner_wednesday, comments, people, veg ) // \"$dinner_wednesday\", $sql2 = "INSERT INTO $table_name2 ( id, affiliation, street_address, city, state, zipcode, country, telephone, lunch_monday, lunch_tuesday, lunch_wednesday, lunch_thursday, lunch_friday, comments, people, veg ) VALUES ( \"$id\", \"$affiliation\", \"$street_address\", \"$city\", \"$state\", \"$zipcode\", \"$country\", \"$telephone\", \"$lunch_monday\", \"$lunch_tuesday\", \"$lunch_wednesday\", \"$lunch_thursday\", \"$lunch_friday\", \"$comments\", \"$people\", \"$veg\" )"; $result2 = @mysql_query($sql2, $connection) or die (mysql_error()); ?> Registration Confirmation: Workshop on Sheaf-Theoretic Methods in Symplectic Topology

Workshop on Sheaf-Theoretic Methods in Symplectic Topology

May 9-12 2011


Your registration was successful. Thank you!


Dates you plan to attend:
First Name:  
Middle Name:  
Last Name:  
E-mail Address:  
Position:  
Affiliation or Organization  
Street Address:  
City:  
Zip or Postal Code:  
Country:  
Telephone:  
Fax:  
Meals:

You were accessing from:

Browser:

Remote address:

"; $headers = "MIME-Version: 1.0\r\n"; /* additional headers */ $headers .= "From: Michelle Huguenin \r\n"; $subject = "Workshop on Sheaf-Theoretic Methods in Symplectic Topology Registration Confirmation"; // Plain test Message $message0 = "This message is automatically generated\n\n"; $message0 .= "This is to confirm that your application for \n\n\t Workshop on Sheaf-Theoretic Methods in Symplectic Topology\n\t May 9-12, 2011 \n\n was successful. \n\n"; $message0 .= "\n\n"; $message .= "Dates attending:\t".$startdate." - ".$enddate."\n\n"; $message .= "First Name: ".$firstname."\n\n"; $message .= "Middle Name: ".$middlename."\n\n"; $message .= "Last Name: ".$lastname."\n\n"; $message .= "E-mail address: ".$email."\n\n"; $message .= "Position: ".$position."\n\n"; $message .= "Affiliation or Organization : ".$affiliation."\n\n"; $message .= "Street Address: ".$street_address."\n\n"; $message .= "City: ".$city."\n\n"; $message .= "Telephone: ".$telephone."\n\n"; $message .= "Fax: ".$fax."\n\n"; $message .= "Meals: ".$meals."\n\n"; /*$message .= "Number of people for dinner: ".$people."\n\n"; $message .= "Number of vegetarian meals: ".$veg."\n\n"; $message .= "Total: \$".$total."\n\n";*/ $message .= "Comments: ".$comments."\n\n"; //$message .="Check or money order must be received by Monday, May 1, 2011.\n If payment is not received by this day, your reservation will be cancelled\n Sorry, no refunds.\n Make check payable to: \nInstitute for Advanced Study\n Send to: Michelle Huguenin\n Institute for Advanced Study\n Einstein Drive\n"; /* Message in HTML // Generate a boundary string $semi_rand = md5(time()); $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x"; // Add the headers for a file attachment $headers .= "MIME-Version: 1.0\n" . "Content-Type: multipart/alternative;\n" . " boundary=\"{$mime_boundary}\""; // Add a multipart boundary above the plain message $message = "This is a multi-part message in MIME format.\n\n" . "--{$mime_boundary}\n" . "Content-Type: text/plain; charset=\"iso-8859-1\"\n" . "Content-Transfer-Encoding: 7bit\n\n" . $message . "\n\n"; / HTML message // Add a multipart boundary above the HTML message $htmlmsg .= "--{$mime_boundary}\n" . "Content-Type: text/html; charset=\"iso-8859-1\"\n" . "Content-Transfer-Encoding: 7bit\n\n"; $htmlmsg .= "

"; $htmlmsg = '

This message is automatically generated
"; This is to confirm that your reigrstion for

Workshop on Sheaf-Theoretic Methods in Symplectic Topology on
\t May 9-12, 2011

was successful

"; Dates you plan to attend:\t".$startdate." - ".$enddate."
"; First Name: ".html_entity_decode($firstname)."
"; Middle Name: ".html_entity_decode($middlename)."
"; Last Name: ".html_entity_decode($lastname)."
"; Position: ".html_entity_decode($position)."
"; Affiliation or Organization: ".html_entity_decode($affiliation)."
"; Street: ".html_entity_decode($street_address)."
"; City: ".html_entity_decode($city)."
"; Zip or Postal Code: ".html_entity_decode($zipcode)."
"; Country: ".html_entity_decode($country)."
"; Telephone: ".html_entity_decode($telephone)."
"; Fax: ".html_entity_decode($fax)."
"; E-mail address: ".html_entity_decode($email)."
"; Meals: ".html_entity_decode($meals)."
"; // List lunch and dinners $message .= "Comments: ".html_entity_decode($comments)."
"; //$message .="Check or money order must be received by Friday, October 7, 2005.
If payment is not received by this day, your reservation will be cancelled
Sorry, no refunds.
Make check payable to: Institute for Advanced Study
Send to: Michelle Huguenin
Institute for Advanced Study
Einstein Drive
"; //Close HTML message $htmlmsg .= "

\n\n"; //Append HTML message $message .= $htmlmsg; //End Email $message .= "--{$mime_boundary}\n" . */ // Mail it $newmessage = $message0.$message; mail($to, $subject, $newmessage, $headers); $to2 = "Michelle Huguenin "; //$to2 = "Theresa Arzadon-Labajo "; $headers2 .= "From: ".$fullname."<".$email."> \r\n"; $headers2 .= "CC: tarzadon@ias.edu\r\n"; $headers .= "Bcc: huguenin@math.ias.edu\r\n"; mail($to2,$subject,$message,$headers2); ?>