11
"; $admin_email = "dalitz@zib.de"; ## $debug = "yes"; if (!empty($debug)){debug3();} $ctl = $_POST[CTL]; if (strcmp("$ctl","step2") == 0){ write_log ("$ctl: Enter Delegates Form"); reset($_POST); while (list($key,$value) = each ($_POST)){ ## echo "
$key => :$value:\n"; $value = ereg_replace("^ *","",$value); ## delete blanks at begin $value = ereg_replace(" *$","",$value); ## delete blanks at end $value = ereg_replace("'","\'",$value); ## escape ' $_POST[$key] = $value; ## echo "
$key => :$value:\n"; } ## preg_match ("/(.*)\((.*)\)/i",$Country,$tmp); ## $country = $tmp[1]; ## $group = $tmp[2]; ## echo "Country => :$country:\n"; ## echo "
Group => :$group:\n"; switch ($group){ case "I": $group_number = 1; break; case "II": $group_number = 2; break; case "III": $group_number = 3; break; case "IV": $group_number = 4; break; case "V": $group_number = 5; break; default: $group_number = 5; break; } ## echo "
Group_number => :$group_number:\n"; } else { write_log ("step3: fatal error"); show_error_msg("

Some Error(s) Occured.

We cannot handle your request. Sorry - try later."); exit (); } ?>

Delegates of

For each delegate we do need the following information

next step: check your data


Delegate $number Name E-Mail Organization Address Phone Fax \n"; } ################################### function debug3 (){ ################################### echo "
"; echo " formSubmit = :$_POST[formSubmit]:\n"; echo "
CHECK = :$_POST[CHECK]:\n"; echo "
Name = :$_POST[Name]:\n"; echo "
Email = :$_POST[Email]:\n"; echo "
Country = :$_POST[Country]:\n"; echo "
Adhering Org = :$_POST[AdOrg]:\n"; echo "
"; } ################################### function execute_sql ($sql){ ################################### global $debug; $result = ""; if (!empty($debug)){echo "
SQL=:$sql:";} $result = mysql_query($sql); if (!empty($debug)){ echo $result ? " ok" : " NOT ok" ;} return ($result); } ################################### function show_error_msg($msg){ ################################### echo "
$msg
"; } ################################### function show_success_msg_and_exit(){ ################################### $test = (ereg("\-test", getcwd(),$tmp))? "-test" : ""; ## Mailman: ## ## IMU-Net Subscription results ## Your subscription request has been received, and will soon be acted upon. ## Your subscription request has to be first confirmed by you via email. ## You will soon get a confirmation email which contains further instructions. ## ## In case of any trouble please feel free to contact imu-net-owner@mathunion.org echo "

Your EWDM${test} Entry

has been received, and will soon be acted upon.

Your entry will be stored into the EWDM${test} Database and will be visible for the public if and only if you confirm your entry. Therefore you will soon get a confirmation email which contains further instructions.

In case of any trouble please feel free to contact techsupport@mathunion.org

\n"; exit(); // quit PHP interpreter } ################################### function check_country ($c1,$c2){ ################################### if (!empty($c2)){ return ($c2); } else if (!eregi("select one",$c1,$tmp) ){ return ($c1); } return (""); } ################################### function mail_to_user($email,$name,$confirmkey){ ################################### $test = (ereg("\-test", getcwd(),$tmp))? "-test" : ""; $country = check_country ($_POST[Country1],$_POST[Country2]); $message = " Confirmation notice for the Electronic World Directory of Mathematicians (EWDM${test}) We have received a request for register you to the EWDM${test} with following data: Lastname = $_POST[Name] Firstname = $_POST[Firstname] Country = $country URL = $_POST[URL] Email = $_POST[Email] To make sure that the request came from you we ask you to confirm the request. Please visit this web page: http://www.mathunion.org/ewdm${test}/confirm.php?key=$confirmkey to confirm your registration. Your confirmation key is: $confirmkey If you do not answer within three days your entry will be deleted. "; $subject = "confirm your EWDM${test} entry"; $header = "From: webmaster@mathunion.org\nReply-To: webmaster@mathunion.org\nX-Mailer: PHP/".phpversion(); mail ("$email", $subject, $message, $header); return; } ################################### function alert_mail_to_user($email){ ################################### $test = (ereg("\-test", getcwd(),$tmp))? "-test" : ""; $message = " An attempt was made to register your email address to the Electronic World Directory of Mathematicians (EWDM${test}) but the email address is already stored in the EWDM${test}. It is possible that a bad person was trying to misuse your email address. This would be a privacy violation. If you submitted the joining request and forgot that you were already register to EWDM, then you can ignore this message. If you suspect that an attempt is being made to misuse your data and you are worried about your privacy, then feel free to send a message to the techsupport@mathunion.org. "; $subject = "EWDM${test} privacy alert"; $header = "From: webmaster@mathunion.org\nReply-To: webmaster@mathunion.org\nX-Mailer: PHP/".phpversion(); mail ("$email", $subject, $message, $header); return; } ################################### function write_log($msg){ ################################### ## phpinfo (); global $REMOTE_ADDR; $email = $_POST[Email]; $name = $_POST[Name]; $country = $_POST[Country]; $group = $_POST[Group]; $adorg = $_POST[AdOrg]; $ptype = $_POST[Ptype]; if (empty ($email)) { $email = "" ;} if (empty ($name)) { $name = "" ;} if (empty ($country)) { $country = "" ;} if (empty ($group)) { $group = "" ;} if (empty ($adorg)) { $adorg = "" ;} if (empty ($ptype)) { $ptype = "" ;} $fp = fopen ("LOGFILE","a"); $time = date("Y-m-d H:m:s", time()); $sysinfo = "$REMOTE_ADDR | $name | $email | $ptype | $country | $group | $adorg "; fputs ($fp, $time . " | " . $sysinfo . " | " . $msg . "\n"); fclose ($fp); } ################################### function mail_to_admin($admin_email,$confirmkey){ ################################### $test = (ereg("\-test", getcwd(),$tmp))? "-test" : ""; $country = check_country ($_POST[Country1],$_POST[Country2]); $email = $_POST[Email]; $message = " Confirmation notice for EWDM${test} was sent to $_POST[Email] Lastname = $_POST[Name] Firstname = $_POST[Firstname] Country = $country URL = $_POST[URL] Email = $email http://www.mathunion.org/ewdm${test}/confirm.php?key=$confirmkey "; $subject = "EWDM${test} Notice: $email"; $header = "From: webmaster@mathunion.org\nReply-To: webmaster@mathunion.org\nX-Mailer: PHP/".phpversion(); mail ("$admin_email", $subject, $message, $header); return; } ?> .