session_start();
$Section="Event Register";
$SectionImage="top_register.gif";
include ("includes/header.inc.php");
include "includes/validate.inc.php";
if(isset($mailit)) {
$Time = date("M d Y h:i:s", time());
if (empty($name)) $errors[] = ("
Name is Required");
if (chk_wds($name)) $errors[] = ("You have entered invalid information");
if (chk_wds($address)) $errors[] = ("You have entered invalid information");
if (empty($email) && empty($phone)) {
$errors[] = ("Telephone Number or Email Required");
}
else {
if (!empty($email)){
if (!chk_eml($email)) $errors[] = ("This is not a valid email address");
}
}
if (chk_wds($address)) $errors[] = ("Address information is invalid");
$body .= "iDance ".$ent."";
$body .= " ";
$body .= "";
$body .= "";
$body .= "| | ";
$body .= " iDance.ca Event Registration " .$Time. " | ";
$body .= "
";
$body .= "| | ";
$body .= "Event: | ";
$body .= " ".$ent."
|
";
$body .= "| | ";
$body .= "Name: | ";
$body .= " ".$name."
|
";
$body .= "| | ";
$body .= "Telephone Number: | ";
$body .= " ".$phone."
|
";
$body .= "| | ";
$body .= "Email: | ";
$body .= " ".$email."
|
";
$body .= "| | ";
$body .= "Address: | ";
$body .= " ".$address."
|
";
$body .= "| | ";
$body .= "Comment: | ";
$body .= " ".$comment."
|
";
$body .= "";
$body .= "
| ";
$body .= "
";
$body .= "
";
$body .= "";
$body .= "";
if (count($errors)) $have_errors = true;
if (!$have_errors){
include_once("Mail.php");
$to = "shawn@idance.ca";
if ($email == "") $from = "website@idance.ca";
else $from = $email;
$headers["From"] = $from;
$headers["To"] = $to;
$headers["Subject"] = "Incoming iDance Registration";
$headers["Content-Type"] = "text/html";
$params["host"] = 'smtp002.websoon.com';
$params["port"] = "25";
$params["auth"] = true;
$params["username"] = 'shawn@idance.ca';
$params["password"] = "4everFLY";
$mail_object =& Mail::factory("smtp", $params);
$mail_object->send($to, $headers, $body);
echo "";
exit();
}
}
?>
| |
Please fill out the form and submit to signup or get info for...
|
|
| |
if ($have_errors){
print "";
foreach($errors as $error => $err) {
print $err;
}
print " ";
}
?>
|