|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /domains/chsweb/survey/ |
Upload File : |
<?php
/*
-- variables from e-vite form:
$Name // contact name
$Company // company name
$Email // email address of contact
$Attending // (Yes | No) [Yes is default]
$GolfIndex // index (should be a #)
$cart_caddie
$loaner_clubs // (Right | Left | N/A) [N/A is default]
$pool
$tennis
$transport
$Comments // any comments left by user
$form_completed // (True | False) whether form has been verified and completed
*/
# -=-=-=- PHP FORM VARIABLES (add as many as you would like)
$Name = $_POST["Name"];
$Company = $_POST["Company"];
$Name1 = $_POST["Name1"];
$Company1 = $_POST["Company1"];
//$Email = $_POST["Email"];
//$Dinner = $_POST["Dinner"];
//$Transportation = $_POST["Transportation"];
$Airline = $_POST["Airline"];
$FlightNumber = $_POST["FlightNumber"];
$DepartureTime = $_POST["DepartureTime"];
//$DepartureAirport = $_POST["DepartureAirport"];
$form_completed = $_POST["form_completed"];
//$hotel = $_POST["hotel"];
//$hotelrequests = $_POST["hotelrequests"];
//$airport = $_POST["airport"];
if($form_completed) {
// form has not been completd, skip
# -=-=-=- MIME BOUNDARY
$mime_boundary = "----CHSCapitalLLC----".md5(time());
# -=-=-=- MAIL HEADERS
$to = "[email protected], [email protected]";
$subject = "Investor Conference 2011 Survey - $Name ";
$headers = "From: CHS Investor Conference <[email protected]>\n";
$headers .= "Reply-To: CHS Investor Conference <[email protected]>\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: multipart/alternative; boundary=\"$mime_boundary\"\n";
# -=-=-=- TEXT EMAIL PART
$message = "--$mime_boundary\n";
$message .= "Content-Type: text/plain; charset=UTF-8\n";
$message .= "Content-Transfer-Encoding: 8bit\n\n";
//$message .= "Response received for CHS Investor Conference on ".date("l F d, Y g:i:sa T", time())."\n\n";
$message .= "Name: \t\t$Name\n";
$message .= "Company: \t\t$Company\n\n";
//$message .= "Email: \t\t$Email\n\n";
//$message .= "Reception: \t\t$Dinner\n";
//$message .= "Meeting: \t\t$Transportation\n\n";
//$message .= "Hotel: \t\t$hotel\n";
//$message .= "Hotel Requests: \t$hotelrequests\n\n";
//$message .= "Ground Transportation?: \t$airport\n";
$message .= "Topics most informative: $Name\n\n";
$message .= "Additional Topics Future Conferences: $Company\n\n";
$message .= "hear from Portfolio CEOs again: $Airline\n\n";
$message .= "Items see covered in Greater Detail: $FlightNumber\n\n";
$message .= "Overall Improvements: $DepartureTime\n";
//$message .= "Departure Airport: \t$DepartureAirport\n";
# -=-=-=- HTML EMAIL PART
/*
$message .= "--$mime_boundary\n";
$message .= "Content-Type: text/html; charset=UTF-8\n";
$message .= "Content-Transfer-Encoding: 8bit\n\n";
$message .= "<html>\n";
$message .= "<body style=\"font-family:Verdana, Verdana, Geneva, sans-serif; font-size:14px; color:#666666;\">\n";
$message .= "A response has been received for the 2008 CHS Golf Outing:<br/><br/>\n";
$message .= "Name: $Name<br/>\n";
$message .= "Company: $Company<br/>\n";
$message .= "Email: $Email<br/>\n";
$message .= "Attending: $Attending<br/>\n";
$message .= "Handicap: $Handicap<br/>\n";
$message .= "Golf Index: $GolfIndex<br/>\n";
$message .= "Loaner Clubs: $loaner_clubs<br/>\n\n";
$message .= "Comments: $Comments<br/>\n";
$message .= "</body>\n";
$message .= "</html>\n";
# -=-=-=- FINAL BOUNDARY
$message .= "--$mime_boundary--\n\n";
*/
# -=-=-=- SEND MAIL
$mail_sent = @mail( $to, $subject, $message, $headers );
#echo $mail_sent ? "Mail sent" : "Mail may not have been sent..."
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<title>CHS 2010 Investors Conference</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript">
//<![CDATA[
// BEGIN GOOGLE MAPS...
function submit_form() {
var bln_valid;
var str_alert;
str_alert = "Please correct the following errors:\n\n";
bln_valid = true;
if (document.getElementById("Name").value.length < 1) {
// contact must provide name
bln_valid = false;
str_alert = str_alert + "\t- Must provide a name.\n";
//alert("Name: " + document.getElementById("Name").value);
}
if (document.getElementById("Company").value.length < 1) {
// contact must provide company name
bln_valid = false;
str_alert = str_alert + "\t- Must provide a company name.\n";
}
// if (document.getElementById("Email").value.length < 1) {
// contact must provide an email address
// bln_valid = false;
// str_alert = str_alert + "\t- Must provide an email.\n";
// }
// var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
//var address = document.getElementById("Email").value;
//if(reg.test(address) == false) {
// contact must provide a valid email address
// bln_valid = false;
// str_alert = str_alert + "\t- Must provide a valid email address.\n";
// }
if (bln_valid == false) {
alert(str_alert);
} else {
// update hidden field
document.getElementById("form_completed").value = bln_valid;
// submit the form
document.InvestorConference.submit();
}
}
//]]>
</script>
<style type="text/css">
<!--
.formField {
border: 1px solid #7e8082;
}
.TextWhite {
font-family: Arial Narrow, Verdana, Arial, Helvetica, sans-serif;
font-size: 15px;
color: #7e8082;
text-decoration: none;
}
.Textbox {
border: 1px solid #1D3C1C;
font-family: Arial Narrow, Verdana, Arial, Helvetica, sans-serif;
font-size: 15px;
line-height: 22px;
color: #000000;
height: 22px;
}
.Comments {
border: 1px solid #1D3C1C;
font-family: Arial Narrow, Verdana, Arial, Helvetica, sans-serif;
font-size: 15px;
color: #000000;
}
A {
color: #4678b6;
font-weight: bold;
}
A:VISITED {
color: #4678b6;
}
.invite_details {
font-family: Arial Narrow, Verdana, Arial, Helvetica, sans-serif;
font-size: 11pt;
text-align: left;
}
.Required {
font-family: Arial Narrow, Verdana, Arial, Helvetica, sans-serif;
font-size: 15px;
color: #015e15;
text-decoration: none;
font-style: italic;
}
IMG {
display: block;
}
-->
</style>
</head>
<body style="margin:0px;" color="#ffffff">
<table background = "backgroundgrey.jpg" border = 0 align = center width = 800>
<tr><td width = 800 valign=top>
<br />
<br />
<table align = center border = 0 width = 652><tr><td>
<img src = "title.jpg" border = 0>
<center>
<font color="#4678b6" size=5><b>Thank you for your response.</font></b>
<br />
<br />
<br />
<br />
</td></tr></table>
</td></tr>
</table>
<center>
<img src="bottombargrey.jpg" border=0>
</center>
</body>
</html>