Connect()) { $prd_idd= strip_tags($_GET['prd_id']); $select_prod="select * from ".$tables['fixproduct']." where status ='active' and product_id ='".$prd_idd."' and status='active'"; // echo "
SEL--------->".$select_prod; $result_prod=$db->Execute($select_prod) or die(redirect_index()); $row_prod=$db->FetchArray($result_prod); $num_rows=$db->RowCount($result_prod); // echo "
TEST--------->".$row_prod['product_image1']; /* if($num_rows == '0') { echo ""; exit; } */ $current_image_path=SITE_ROOT.substr($row_prod['product_image1'],2); // echo "
CURRENT---------->".$current_image_path; list($uploade, $feature, $image,$imagename1) =split("/", substr($row_prod['product_image1'],2), 4); $new_image_path1=SITE_ROOT."product_images/product/small_".$imagename1; if(!file_exists($new_image_path)) { $make_magick = system("/usr/bin/convert -geometry 100 x 100 $current_image_path $new_image_path1", $retval); } if(isset($_POST['femail_x'])) { $yourName=strip_tags(stripslashes($_POST['y_name'])); $yourEmail=addslashes($_POST['y_email']); $frdName=strip_tags(stripslashes($_POST['f_name'])); $frdEmail=addslashes($_POST['f_email']); $prod_img=addslashes(substr($row_prod['product_image1'],2)); $price=MONEY_SIMBOL.$row_prod['product_price']; //$prod_img=$row_prod['']; // echo "
PP-------->".$price; // $title=addslashes(); $notes=addslashes($_POST['p_notes']); $returnpagesend=$_POST['prepageLink']; $prd_id_val=$_POST['prddetailid']; $select_prod="select * from ".$tables['fixproduct']." where product_id ='".$prd_id_val."'"; $result_prod=$db->Execute($select_prod) or die(redirect_index()); $row_prod=$db->FetchArray($result_prod); $mail_text_name=html_entity_decode($row_prod['product_name']); $mail_text=html_entity_decode($row_prod['product_description']); $mail_text=str_replace('src="','src="http://68.178.171.13',$mail_text); $ex1=""; $cont = "Dear ".$frdName.",

"; $cont .= $yourName." referred the the following Jewelry Item from www.JewelOcean.com

"; $cont .= "Please click here to open this page

"; $cont .= "If the click above did not work, please copy this into your browser.

"; $cont .= $returnpagesend."

"; $ex1=$cont."

"; $ex1.="Title:- ".$mail_text_name."

"; if($_POST['p_price']=="Yes") { $ex1.="Price:- ".$price."

"; } if(trim($_POST['p_notes'])!="") { $ex1.= $yourName." included the following notes with this item: ".stripslashes(str_replace("\r\n","
",$_POST['p_notes']))."

"; } $ex1.="Please note that all products from JewelOcean.com come with Free Shipping and 30 Day Return Policy. Your complete satisfaction is guaranteed.  "."

"; $ex1 .= "For any questions or information please do not hesitate to contact us at 800-742-1806 or email us at CustomerService@jewelocean.com

"; $ex1 .= "With Kind Regards

"; $ex1 .= "JewelOcean.com Customer Service Team

"; $from_email = $yourEmail; $main_mailto=$frdEmail; $main_mailme= 'customerservice@jewelocean.com'; //$mail_to = $mailsend_address; $from_display = "JewelOcean.com Jewelry Product Service"; $subject = "Recommended Jewelry product link from JewelOcean.com"; $line_breaks = "

"; $line_breaks_text = "\n\n"; $content_type = 'Content-Type: multipart/alternative; boundary="_jkkdsffds32432dlkjifewks_"'; $email_text1 = strip_tags($ex1) . "" . $line_breaks_text; $email_text1 = str_replace(" "," ",$email_text1); $email_body = "\n--_jkkdsffds32432dlkjifewks_\n"; $email_body .= "Content-type: text/plain\n\n"; $email_body .= $email_text1; $email_body .= "\n--_jkkdsffds32432dlkjifewks_\n"; $email_body .= "Content-type: text/html\n\n"; $email_body .= $ex1; $email_body .= "\n--_jkkdsffds32432dlkjifewks_--\n"; // echo "
MAIL--------------->".$email_body; // exit; // == multipart == // $headers = "From: \"" . $from_display . "\"<" . $from_email .">\r\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= $content_type . "\n"; $main_mailto1 = $yourEmail; $from_email1 = $yourEmail; $main_mailme = 'customerservice@jewelocean.com'; $headers1 = "From: \"" . $from_display . "\"<" . $from_email1 .">\r\n"; $headers1 .= "MIME-Version: 1.0\n"; $headers1 .= $content_type . "\n"; $subject = stripslashes($subject); mail($main_mailto,$subject,$email_body,$headers); mail($main_mailto1,$subject,$email_body,$headers1); mail($main_mailme, $main_mailto1, $email_body,$headers); header("location:product_details.php?prod_id=$prd_id_val&msg_email=Thanks,Your email with product link and details has been send successfully."); exit; } $referPageLink=$_SERVER['HTTP_REFERER']; /***************CODE FOR FETCHING META KEYWORDS AND DESCRIPTION**************************************/ $sql_meta_key_desc="select * from $tables[meta_key_desc]"; $res_meta_key_desc=mysql_query($sql_meta_key_desc) or die(redirect_index()); $line_meta_key_desc=mysql_fetch_array($res_meta_key_desc); $line_meta_desc=stripslashes($line_meta_key_desc['meta_desc']); $line_meta_key=stripslashes($line_meta_key_desc['meta_key']); /***************END OF CODE FOR FETCHING META KEYWORDS AND DESCRIPTION**************************************/ ?> Email to a Friend
 
 
Email to a Friend
MONEY_SIMBOL
Your First Name/Last Name
Your Email Address
Friends FirstName/Last Name
Friends Email Address
Any Notes
Include Price in Email YesNo
 
". $db->SQLERROR; } ?>