session_start();
$submitted = isset($_REQUEST["submitted"])?$_REQUEST["submitted"]:"";
$errormsg = "";
$programtitle = isset($_REQUEST["programtitle"])?$_REQUEST["programtitle"]:"";
$group1 = isset($_REQUEST["group1"])?$_REQUEST["group1"]:"";
//$check1 = isset($_REQUEST["check1"])?$_REQUEST["check1"]:"";
$group2 = isset($_REQUEST["group2"])?$_REQUEST["group2"]:"";
//$group3 = isset($_REQUEST["group3"])?$_REQUEST["group3"]:"";
$description = isset($_REQUEST["description"])?$_REQUEST["description"]:"";
$nameandtitle = isset($_REQUEST["nameandtitle"])?$_REQUEST["nameandtitle"]:"";
$institution = isset($_REQUEST["institution"])?$_REQUEST["institution"]:"";
$address1 = isset($_REQUEST["address1"])?$_REQUEST["address1"]:"";
$address2 = isset($_REQUEST["address2"])?$_REQUEST["address2"]:"";
$citystatezip = isset($_REQUEST["citystatezip"])?$_REQUEST["citystatezip"]:"";
$phone = isset($_REQUEST["phone"])?$_REQUEST["phone"]:"";
$fax = isset($_REQUEST["fax"])?$_REQUEST["fax"]:"";
$email = isset($_REQUEST["email"])?$_REQUEST["email"]:"";
$sessionencrypt = $_SESSION["security_code"];
$usercaptcha = ((isset($_POST["usercaptcha"])?$_POST["usercaptcha"]:""));
$errormsg = ($programtitle == "")?"Please enter a program title.\n\n
":"";
$errormsg .= ($group1 == "")?"Please select a Target Level of User.\n\n
":"";
//$errormsg .= ($check1 == "")?"Please select Type of Participation.\n\n
":"";
$errormsg .= ($group2 == "")?"Please select Program Format.\n\n
":"";
//$errormsg .= ($group3 == "" && $group2 == "Panel")?"Please choose if you will coordinate panel or be a panelist.\n\n
":"";
$errormsg .= ($description == "")?"Please enter a description of the Program or Poster.\n\n
":"";
$errormsg .= ($nameandtitle == "")?"Please enter your name.\n\n
":"";
$errormsg .= ($institution == "")?"Please enter your institution.\n\n
":"";
$errormsg .= ($address1 == "")?"Please enter your address.\n\n
":"";
$errormsg .= ($citystatezip == "")?"Please enter your City, State and Zip.\n\n
":"";
$errormsg .= ($phone == "")?"Please enter your phone number.\n\n
":"";
$errormsg .= ($email == "")?"Please enter your Email address.\n\n
":"";
//$errormsg .= ($usercaptcha != $sessionencrypt)?"Your text doesn't match the text in the image below!
\n":"";
//Create email message
$to = "jabradley2@bsu.edu";
$subject = "cdmmwoct 2011 CONTENTdm Users Group Proposal";
$message = "Program Title: $programtitle \n\n".
"Target Level of User: $group1 \n\n".
//"Type of Participation: $check1 \n\n".
"Program Format: $group2 \n\n".
//"Panel choice (if Panel is selected): $group3 \n\n".
"Description: $description \n\n".
"Name and Title: $nameandtitle \n\n".
"Institution: $institution \n\n".
"Address1: $address1 \n\n".
"Address2: $address2 \n\n".
"City, State, Zip: $citystatezip \n\n".
"Phone Number: $phone \n\n".
"Fax: $fax \n\n".
"Email: $email \n\n";
$headers = "From: DONOTREPLY@bsu.edu";
$success = 0;
if($submitted == 1 && $errormsg == ""){
mail($to, $subject, $message, $headers);
$success = 1;
}
?>