if (session_id() == "") {
session_start();
}
$SitePage = "blood-donor-submissions.php";
function zonedate($layout, $countryzone, $daylightsaving)
{
if ($daylightsaving){
$daylight_saving = date('I');
if ($daylight_saving){$zone=3600*($countryzone+1);}
}
else {
if ($countryzone>>0){$zone=3600*$countryzone;}
else {$zone=0;}
}
$date=gmdate($layout, time() + $zone);
return $date;
}
$Firstname = '';
$Lastname = '';
$cEmail = '';
$aptdate = '';
$Place = '';
$domail = '';
$oksendmail = false;
//$csc_email = 'al@ivrtours.com';
//$csc_email = 'Mugur.Padure@pwc.ca';
//$csc_email = 'mugur.padure@sympatico.ca';
$csc_email = 'mugur.mircea.padure@gmail.com';
if ((isset($_POST["Firstname"])) && ($_POST["Firstname"] != "") ) { $Firstname = ($_POST["Firstname"]); }
if ((isset($_POST["Lastname"])) && ($_POST["Lastname"] != "") ) { $Lastname = ($_POST["Lastname"]); }
if ((isset($_POST["cEmail"])) && ($_POST["cEmail"] != "") ) { $cEmail = ($_POST["cEmail"]); }
if ((isset($_POST["Place"])) && ($_POST["Place"] != "") ) { $Place = ($_POST["Place"]); }
if ((isset($_POST["aptdate"])) && ($_POST["aptdate"] != "") ) { $aptdate = ($_POST["aptdate"]); }
if ((isset($_POST["domail"])) && ($_POST["domail"] != "") ) { $domail = ($_POST["domail"]); }
if(isset($_POST["captcha"]))
{
if($_SESSION["captcha"]==$_POST["captcha"])
{
//CAPTHCA is valid; proceed the message: save to database, send by e-mail ...
$domail = 'true';
}
else
{
$domail = '';
}
} else {
$domail = '';
}
if ($Place != '' ) {
$search = array ("''si", // Strip out javascript
"'<[\/\!]*?[^<>]*?>'si", // Strip out HTML tags
"'([\r\n])[\s]+'", // Strip out white space
"'&(quot|#34);'i", // Replace HTML entities
"'&(amp|#38);'i",
"'&(lt|#60);'i",
"'&(gt|#62);'i",
"'&(nbsp|#160);'i",
"'&(iexcl|#161);'i",
"'&(cent|#162);'i",
"'&(pound|#163);'i",
"'&(copy|#169);'i",
"'(\d+);'e"); // evaluate as php
$replace = array ("",
"",
"\\1",
"\"",
"&",
"<",
">",
" ",
chr(161),
chr(162),
chr(163),
chr(169),
"chr(\\1)");
$Place = preg_replace($search, $replace, $Place);
//$message = nl2br($message);
//$message = str_replace('\r\n','
', $message);
}
if ( ($Firstname != '') && ($Lastname != '') && ($cEmail != '') && ($aptdate != '') && ($Place != '') && ($domail == 'true') ) {
$mime_boundary = "--PGL265." . md5(uniqid(time()));
$design1 = "--$mime_boundary\n";
$design1 .= "Content-Type: text/plain; charset=UTF-8\n";
$design1 .= "Content-Transfer-Encoding: 8bit\n\n";
$message .= '
From: '.$Firstname.' '.$Lastname.'
Email: '.$cEmail;
if ($Place != '') {
$message .= '
Donation Place: '.$Place;
}
if ($aptdate != '') {
$message .= '
Donation Date: '.$aptdate;
}
$mycurtime = zonedate("l dS \of F Y h:i:s A", -5, true);
//$mycurtime = date("l dS \of F Y h:i:s A");
$body = '
Patterson Grey Lodge 265 Messaging Service says:
A blood donor submission was sent from '.$Firstname.' '.$Lastname.' on '.$mycurtime.'.
Here is the message:
______________________________________________________
'.str_replace('\r\n','
', $message).'
______________________________________________________
';
$design1 .= $body;
$design1 .= "--$mime_boundary\n";
$design1 .= "Content-Type: text/html; charset=UTF-8\n";
$design1 .= "Content-Transfer-Encoding: 8bit\n\n";
$design1 .= '
'; } // xxxxxxxxxxx DEBUG ?>
'.$mydataVARs.'
'.$mydataIFs.'
Are you a Patterson Grey lodge member and have recently made blood donation?
Complete the form below to let your brethren know.
* To be completed by Patterson Grey Lodge 265 Memebers only.
//echo $_SESSION["captcha"];?>
The actual origins of Freemasonery have been lost in time, but is understood to have ... [more]
Share a concern and respect for human values, moral standards, the laws of society and... [more]
Is an organization that embraces confidentiality but is not a secret society ... [more]
So...you want to join the fraternity? ...[more]
Have you donated blood today? Tell us about your donation...[more]