$value) { ${$indx}=$value; } foreach($HTTP_GET_VARS as $indx => $value) { ${$indx}=$value; } $_nav_info['clr']="666666"; $_nav_info['dark_clr']="333366"; if(($rec_name)&&($rec_email)&&($rec2_name)&&($rec2_email)){ if($boxemail){ //mysql_db_query($_cfg_db_name,"INSERT INTO email_addresses (email_id,email_name) VALUES ('','$rec_email')"); //mysql_db_query($_cfg_db_name,"INSERT into `newsletter_emails` (`id`, `email_address`, `date`, `type`, `source`) VALUES ('', '$_POST[email]', NOW(), '1', '1')"); //----------/ End Post to VR $poststring.="email_address=".urlencode($rec_email)."&fp_reg=n&optin=1&form_submitted=submit&fid=3f765fe88d"; $curl = curl_init(); curl_setopt($curl, CURLOPT_URL,"http://optin.verticalresponse.com/"); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, $poststring); // echo curl_error($curl); curl_exec ($curl); curl_close ($curl); //----------/ End Post to VR } $mailTo = "$rec2_email"; //set the subject $mailSubject = "$rec_name"; //build body of the message $mailBody = "Hello $rec2_name\n\n"; $mailBody .= "Check out this link:\n"; $mailBody .= "$pagename\n\n"; $mailBody .= "$rec_com\n\n\n"; //$mailBody .= "iBerkshires.com.com - Keeping an eye on the Berkshires\nwww.iBerkshires.com\n\n"; //add a from header $mailHeaders = "From: $rec_name <$rec_email>"; //send mail //mail($mailTo, $mailSubject, $mailBody, $mailHeaders); //define who is to receive the mail $mailTo2 = "recommend@iberkshires.com"; //set the subject $mailSubject2 = "Page has been recommened"; //build body of the message $mailBody2 = "Page:\n$pagename\n\n======================\n\n"; $mailBody2 .= "Name: $rec_name\n"; $mailBody2 .= "Email: $rec_email\n"; $mailBody2 .= "Name: $rec2_name\n"; $mailBody2 .= "Email: $rec2_email\n\n"; $rec_com = stripslashes($rec_com); $mailBody2 .= "Comments:\n $rec_com\n\n"; $mailBody2 .= "IP: $rec_ip\n"; $mailBody2 .= "HOST: $rec_host\n\n"; //add a from header $mailHeaders2 = "From: Pittsfield.com Recommend "; //send mail //mail($mailTo2, $mailSubject2, $mailBody2, $mailHeaders2); print("
Thank you using this service, You can now click here or in a moment you will be brought back to the web page you were on.
"); print(""); }else{ print(""); print(""); print(""); print(""); print("
"); print("Recommend This Page To A Friend"); print("
"); print(""); print(""); print(" "); print(""); print("
Just fill out the form below and send the page to your friend

The page you are sending you friend is:
".$HTTP_SERVER_VARS['HTTP_REFERER']."

"); print("
"); print(""); print(""); print(" "); print(" "); print(""); print(""); print(" "); print(" "); print(""); echo ""; print(""); print(" "); print(" "); print(""); print(""); print(" "); print(" "); print(""); print(""); print(" "); print(""); print("
Your Name
Your Email
"; echo ""; echo "Get the iBerkshires iBeat Newsletter
Friend's Name
Friend's Email
Comments
"); print("
"); print(""); print(""); print(""); print("
"); print("
"); } include("side_bar.inc.php"); ?>