include ("webmaster/db.php");
//include ("webmaster/checkRegPhp.php");
session_start();
function checkSqlInject($checkVal){
//echo $checkVal;
$newstring=mysql_real_escape_string($checkVal);
$newstring = str_replace(' ', '-', $newstring); // Replaces all spaces with hyphens.
$newstring=preg_replace('/[^A-Za-z0-9\-]/', '', $newstring);
//$newstring=preg_replace("/[$&+,:;=?@#|'<>.-^*()%!{}]/",'', $checkVal);
$wordlist = array('insert', 'update', 'union','delete','select','truncate','union','drop','unionall','sleep','join');
$replaceWith = "";
$newstring=str_ireplace($wordlist, '', $newstring);
return $newstring;
}
if ($_GET["action"]=="add") {
if(isset($_POST['g-recaptcha-response'])){
$captcha=$_POST['g-recaptcha-response'];
}
if(!$captcha){
echo '
Please check the the captcha form.
';
exit;
}
$secretKey = "6Lf7ss0ZAAAAAFuZSCltUqOsloDpsQx6SFRas0wn";
$ip = $_SERVER['REMOTE_ADDR'];
// post request to server
$url = 'https://www.google.com/recaptcha/api/siteverify?secret=' . urlencode($secretKey) . '&response=' . urlencode($captcha);
$response = file_get_contents($url);
$responseKeys = json_decode($response,true);
// should return JSON with success as true
if($responseKeys["success"]) {
$numqry=mysql_fetch_array(mysql_query("SELECT max(number) from gianna_member"));
if ($numqry[0]==0) {
$number=1;
} else {
$number=$numqry[0]+1;
}
$firstname=$_POST["firstname"];
$lastname=$_POST["lastname"];
$address=$_POST["address"];
$city=$_POST["city"];
$state=$_POST["state"];
$zip=$_POST["zip"];
$country=$_POST["country"];
$email=$_POST["email"];
$errmsg = ''; // error message
if(trim($email) == '') {
$errmsg = 'Please enter your email address';
} else if(!isEmail($email)) {
$errmsg = 'Your email address is not valid';
}
$phone=$_POST["phone"];
$amount=$_POST["amount"];
$method="US MAIL";
if ($errmsg=="") {
$qry="Insert into gianna_member(memberid,firstname,lastname,address,city,state,zip,country,email,phone,method,date,number,amount) values (null,
'".checkSqlInject($firstname)."',
'".checkSqlInject($lastname)."',
'".checkSqlInject($address)."',
'".checkSqlInject($city)."',
'".checkSqlInject($state)."',
'".checkSqlInject($zip)."',
'".checkSqlInject($country)."',
'".addslashes($email)."',
'".checkSqlInject($phone)."',
'".checkSqlInject($method)."',now(),$number,$amount) ";
mysql_query($qry);
$memberid=mysql_insert_id();
$qry1="Insert into gianna_member_user(memberid,firstname,lastname,address,city,state,zip,country,method,date,email,phone,amount) values (null,
'".checkSqlInject($firstname)."',
'".checkSqlInject($lastname)."',
'".checkSqlInject($address)."',
'".checkSqlInject($city)."',
'".checkSqlInject($state)."',
'".checkSqlInject($zip)."',
'".checkSqlInject($country)."',
'".checkSqlInject($method)."',now(),
'".addslashes($email)."',
'".checkSqlInject($phone)."',
$amount) ";
mysql_query($qry1);
// changed by deepika on 13-07-16
date_default_timezone_set('America/Los_Angeles');
$date = date('m/d/Y');
$record = array();
$record['headers'] = array();
$record['body'] = array();
$from="members@saintgianna.org";
$cc="jcw@saintgianna.org";
$record['headers'][] = "MIME-Version: 1.0";
$record['headers'][] = "Content-type: text/html; charset=iso-8859-1";
//$record['headers'][] = "From: ".$record['sql']["email"];
$record['headers'][] = "From: ". $from ."\r\n" . "CC: ".$cc;
$record['headers'] = implode("\n",$record['headers']);
$record['to'] = $email;
$record['subject'] = "Membership Enrollment to the Society of Saint Gianna Beretta Molla";
$record['body'][] = "DATE:".$date."";
$record['body'][] = "Dear ".$firstname." ".$lastname.",";
$record['body'][] = "Thank you for becoming a member of the Society of Saint Gianna Beretta Molla. We ask you to keep us in your prayers and those who have submitted prayers petitions on our website.";
$record['body'][] = "Your membership is an important component of our mission: To educate people throughout the world about Saint Gianna Beretta Molla and, in doing so, spreading the Gospel of Christ.";
$record['body'][] = "We will send your membership gifts as soon as we can; usually within a couple of weeks. All membership information is sent by U. S. Mail.";
$record['body'][] = "In addition, if you would like stay in touch with Society information, please sign up for our eNewsletter at http://saintgianna.org. On our Home Page, in the upper left-hand corner of the webpage, you will see, an animated icon. Click on this icon and fill in your contact information. Once you click the SUBMIT button, our third-party vendor, GetResponse.com, will send you a confirmation email. This protects you from anyone but you adding your name to our eNewsletter subscription. We want to assure you that our eNewsletter is user-permission based, and we do not provide your information to any other entity. Once you receive an eNewsletter, you can change your contact information should you need to do or unsubscribe if you should want to.";
$record['body'][] = "We look forward to a long association, and welcome you to the Society of Saint Gianna Beretta Molla. ";
$record['body'][] = "May God Bless and Watch Over You and Your Loved Ones!
";
$record['body'][] = "The Board of Directors - The Society of Saint Gianna Beretta Molla";
$record['body'][] = "St. Gianna Beretta Molla, pray and intercede for us!";
$record['body'] = implode("
",$record['body']);
mail($record['to'], $record['subject'], $record['body'], $record['headers']);
//mail("testp7741@gmail.com", $record['subject'], $record['body'], $record['headers']);
/*end changed by deepika on 10-06-16*/
//mail($to1, $subject, $body, $headers);
//=============================
// send info to Getresponse (GR):
$gr = array('c' => 'sg_members',
'e' => $email,
'n' => $firstname);
include('getresponse/test.php');
//=============================
header("location:printmember.php?memberid=$memberid");
}
}
else{?>
}
}
function isEmail($email) {
return(preg_match("/^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)$|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i",$email));
}
?>
Saint Gianna Beretta Molla | St. Gianna | Catholic Pro-Life Saint
For those
of you who have been asking to become members of the Society of
St. Gianna, we are now accepting
enrollment. St. Gianna is a modern saint for families and life. Please
join us in membership asking St. Gianna, the saint of today’s
miracles, to intercede with Jesus for our needs.
The funds from this membership will help The Society of Saint
Gianna to carry out its mission as described on the
About Us page.
Lifetime Membership: $10.00
(Includes membership card, prayer card, St. Gianna medal and updates about The Society Activity periodically)
Contact webmaster@saintgianna.org with
comments or questions regarding this site.
Copyright, The Society of Gianna Beretta
Molla, All rights reserved If
you are not able to open or view .pdf files then please click here