include_once("library/config.php"); ?>
// For Recaptcha Library
require_once('library/recaptchalib.php');
// Get a key from http://recaptcha.net/api/getkey
$publickey = getReCaptchaPublicKey();
$privatekey = getReCaptchaPrivateKey();
# the response from reCAPTCHA
$resp = null;
# the error code from reCAPTCHA, if any
$captcha_error = null;
?>
$cid=0;
$error="";
if(isset($_REQUEST['cid']))
{
$cid = $_REQUEST['cid'];
}
$celebrant_id=$cid;
$cr_cel_name="";
$sql="Select
user_name, email, password,first_name , last_name , street_address , subrub , zipcode ,
postal_address, website, phone , mobile , gender , state ,
secret_question , secret_answer , profile_created_date,
search_txt, profile_txt, photo1, photo2, photo3, thumbnail
From celebrants
Where celebrant_id='$celebrant_id'";
$rs=$db->ExecuteQuery($sql);
$rows = $rs->GetSelectedRows();
list($user_name, $email, $password, $first_name , $last_name , $street_address , $subrub , $zipcode ,
$postal_address, $website, $phone , $mobile , $gender , $state ,
$secret_question , $secret_answer , $profile_created_date,
$search_txt, $profile_txt, $photo1, $photo2, $photo3, $thumbnail)=$rs->FetchAsArray();
$cr_cel_name = trim(ucwords(strip_tags("$first_name $last_name")));
$bokmark_title = "$cr_cel_name - celebrante :: helping you find the right celebrant";
$bokmark_link = "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].$_SERVER['QUERY_STRING'];
if(isset($_REQUEST['btn_send']))
{
extract($_REQUEST);
extract($_POST);
$recaptcha_challenge_field = "";
$recaptcha_response_field="";
if(isset($_POST['recaptcha_challenge_field']))
{
$recaptcha_challenge_field = $_POST['recaptcha_challenge_field'];
}
if(isset($_POST['recaptcha_response_field']))
{
$recaptcha_response_field = $_POST['recaptcha_response_field'];
}
$resp = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$recaptcha_challenge_field,
$recaptcha_response_field);
if ($resp->is_valid) // valid captcha code
{
$email_subject = "$yname wants you to see this profile at ".getFromName();
$txt_profil_name= "";
if(!empty($cr_cel_name))
{
$txt_profil_name .= $cr_cel_name;
}
else
{
$txt_profil_name .= "Celebrant";
}
$txt_profil_name .= "'s Profile";
$line_saperator = "
";
$email_message = "";
$email_message .= $line_saperator."Your friend $yname ($yemail) has sent you a profile to look at:";
$email_message .= $line_saperator.$txt_profil_name;
$email_message .= $line_saperator.getCelebranteProfileLink($cid);
$email_message .= $line_saperator."---------------------------------------------------";
if(isset($comments) && !empty($comments))
{
$email_message .= $line_saperator."Personal notes:";
$email_message .= $line_saperator.$comments;
$email_message .= $line_saperator."---------------------------------------------------";
}
// send email to friend
sendEmail($femail, $email_subject, $email_message, "", $yname, $yemail);
header("Location: msg.php?action=friendemailsent");
exit;
}
else // captcha code is invalid
{
# set the error code so that we can display it
$captcha_error = $resp->error;
}
}
?>
Please fill in the following information to email your friend a link to the profile below:
if(!empty($cr_cel_name)){ echo $cr_cel_name;}else{ echo "Celebrant";} ?>'s Profile