id; if(trim($refno)!="sp" || trim($refno)!="lfp" || trim($refno)!="adv" || trim($refno)!="contact") { $dtdate=date("Y-m-d H:i:s"); $qry="insert into crm_buyers_sub(buyerid,propertyid,comments,dtdate,newsubFlag) values($id,'$refno','".str_singleQuoteReplace($comments)."','".$dtdate."','1')"; //echo "THis will store the informations in the SUB BUYERS TABLE with the PROPERTY ID"; mysql_query($qry);//die(); // Append the Countryid in the crm_buyers table if one select property id from NEW Country not in // countryids in crm_buyers table $checkQry="select countryid from property where refno='".$refno."' and countryid<>'' and countryid<>',,'"; $checkRes=mysql_query($checkQry); if($checkRow=mysql_fetch_object($checkRes)) $checkCountryid=$checkRow->countryid; $countryids_ARRAY=explode(",",$row->countryids); if($row->countryids!=",0,") { if(!in_array($checkCountryid,$countryids_ARRAY)) { $new_countryids=$row->countryids.$checkCountryid.","; $qry_update="update crm_buyers set countryids='$new_countryids' where id=$id"; mysql_query($qry_update); } } } // To set The Flag to know, that buyer enquired New property $newFlagQry="update crm_buyers set newFlag='1' where id=$id"; mysql_query($newFlagQry); $tomail="deb@caribbeanlandandproperty.com"; $tomail="info@caribbeanlandandproperty.com"; // $tomail="bradleyhicks@gmail.com"; // $tomail1="bradleyhicks@gmail.com"; $subject=$name." ".$lname." : ".$subject_refno; $frommail="info@caribbeanlandandproperty.com"; $fromname="CLP Property Lookup"; $message = "EXISTING BUYER ".str_htmlSpecialChars($name)." ".str_htmlSpecialChars($lname)." from ".str_htmlSpecialChars($email)." asks the following questions ".str_htmlSpecialChars($comments); require 'phpmm/PHPMailerAutoload.php'; $mail = new PHPMailer; $mail->setFrom('financial@caribbeanlandandproperty.com', 'CLP'); $mail->addAddress('info@caribbeanlandandproperty.com'); $mail->Subject = $subject; $mail->Body = $message; $mail->IsHTML(true); $mail->SMTPDebug = 0; if ($mail->send()) { $msuccess="Yes"; } else { $msuccess = "No"; /*echo "Mailer Error: " . $mail->ErrorInfo; */ } /* if (mail($tomail,$subject,$message,"From: ".$name." ".$lname." <".$email.">\nReturn-Path:".$email."\nContent-Type: text/html; charset=iso-8859-1") && mail($tomail1,$subject,$message,"From: ".$name." ".$lname." <".$email.">\nReturn-Path:".$email."\nContent-Type: text/html; charset=iso-8859-1")) $msuccess="Yes"; else $msuccess="Fail"; */ } else { $msuccess="No"; } //Check whether the Namd and email in other 7 tables -- on 27 June 2008 by Damian if(trim($msuccess)!="" && $msuccess=="No") { $message = ""; //Advertise [crm_advertise] Table $qry_advertise="select id from crm_advertise where email='".str_singleQuoteReplace($email)."'"; $res_advertise=mysql_query($qry_advertise); //Company_Information [crm_company_information] Table $qry_company_info="select id from crm_company_information where email='".str_singleQuoteReplace($email)."'"; $res_company_info=mysql_query($qry_company_info); //General Enquiry [crm_contact] Table $qry_general_enquiry="select id from crm_contact where email='".str_singleQuoteReplace($email)."'"; $res_general_enquiry=mysql_query($qry_general_enquiry); //Economic Citizenship [crm_economic] Table $qry_economic = "select id from crm_economic where email='".str_singleQuoteReplace($email)."'"; $res_economic = mysql_query($qry_economic); //Mortgages [crm_mortgage] Table $qry_mortgage = "select id from crm_mortgage where email='".str_singleQuoteReplace($email)."'"; $res_mortgage = mysql_query($qry_mortgage); //Owners - LIST [crm_owner] Table $qry_owner = "select ownerid from crm_owner where email='".str_singleQuoteReplace($email)."'"; //$qry_owner = "select ownerid from crm_owner where ownername='".str_singleQuoteReplace($name)."' AND email='".str_singleQuoteReplace($email)."'"; $res_owner = mysql_query($qry_owner); //Seller Enquiries [crm_sellers] Table $qry_sellers = "select id from crm_sellers where email='".str_singleQuoteReplace($email)."'"; $res_sellers = mysql_query($qry_sellers); if($row_advertise=mysql_fetch_object($res_advertise)) $message = "EXISTING ADVERTISER ".str_htmlSpecialChars($name)." ".str_htmlSpecialChars($lname)." from ".str_htmlSpecialChars($email)." asks the following questions ".str_htmlSpecialChars($comments); else if($row_company_info=mysql_fetch_object($res_company_info)) $message = "EXISTING COMPANY INFORMATION ".str_htmlSpecialChars($name)." ".str_htmlSpecialChars($lname)." from ".str_htmlSpecialChars($email)." asks the following questions ".str_htmlSpecialChars($comments); else if($row_general_enquiry=mysql_fetch_object($res_general_enquiry)) $message = "EXISTING GENERAL ENQUIRY ".str_htmlSpecialChars($name)." ".str_htmlSpecialChars($lname)." from ".str_htmlSpecialChars($email)." asks the following questions ".str_htmlSpecialChars($comments); else if($row_economic=mysql_fetch_object($res_economic)) $message = "EXISTING ECONOMIC CITIZENSHIP ".str_htmlSpecialChars($name)." ".str_htmlSpecialChars($lname)." from ".str_htmlSpecialChars($email)." asks the following questions ".str_htmlSpecialChars($comments); else if($row_mortgage=mysql_fetch_object($res_mortgage)) $message = "EXISTING MORTGAGES ".str_htmlSpecialChars($name)." ".str_htmlSpecialChars($lname)." from ".str_htmlSpecialChars($email)." asks the following questions ".str_htmlSpecialChars($comments); else if($row_owner=mysql_fetch_object($res_owner)) $message = "EXISTING OWNERS - LIST ".str_htmlSpecialChars($name)." ".str_htmlSpecialChars($lname)." from ".str_htmlSpecialChars($email)." asks the following questions ".str_htmlSpecialChars($comments); else if($row_sellers=mysql_fetch_object($res_sellers)) $message = "EXISTING SELLER ENQUIRIES ".str_htmlSpecialChars($name)." ".str_htmlSpecialChars($lname)." from ".str_htmlSpecialChars($email)." asks the following questions ".str_htmlSpecialChars($comments); //Sending Mail if(trim($message)!="") { $tomail="info@caribbeanlandandproperty.com"; $subject=$name." ".$lname." : ".$subject_refno; require 'phpmm/PHPMailerAutoload.php'; $mail = new PHPMailer; $mail->setFrom('financial@caribbeanlandandproperty.com', 'CLP'); $mail->addAddress('info@caribbeanlandandproperty.com'); $mail->Subject = $subject; $mail->Body = $message; $mail->IsHTML(true); $mail->SMTPDebug = 0; if ($mail->send()) { $msuccess="Yes"; } else { $msuccess = "No"; /*echo "Mailer Error: " . $mail->ErrorInfo; */ } } else { $msuccess="No"; } } } include "includes/keywords.php"; ?>
CONTACT US

toptextcontent; else $thanksContent=""; echo '

'.$thanksContent.'

'; ?>







!! ERROR - FORM NOT SUBMITTED!! - If you are not using the same name and email
address as used before - please CLICK HERE to submit your full details






Error submitting application, please retry after some time.






Wrong security code typed. Try again.

toptextcontent; else $content=""; if ($msuccess=="") { echo $content; } ?>
New Clients Please Click Here    Existing Clients Please Complete Form Below


Christian/First Name :  
Surname/Family Name :  
Email :  
Comments :