<?

//include("../includes/htmlMimeMail.php");
include_once("../include/main.inc.php");
check_session('MyCpanel','index.php');
@extract($_REQUEST);
//connect to database
$table_name='business_enquiry_tbl';
$massqry=mysql_query("SELECT * FROM business_enquiry_tbl where forwardstatus='Y' and inquiryID='$recordID' order by slno asc");

while($massres=mysql_fetch_array($massqry)) {
$mem_id=$massqrys['memberID'];
$memberRes=getResult("member_tbl"," where memberID='$mem_id'");
$message='<div style="font-family:Arial, Helvetica, sans-serif; font-size:12px; width:604px;"><div style="width:196px; float:left"><a href="http://www.naturaltherapyindia.com/"><img src="http://www.naturaltherapyindia.com/images/logo.jpg" align="left" border="0" hspace="0" width="196" height="55" alt=""></a></div><div style="font-size:11px; color:#333333; font-family:Arial, Helvetica, sans-serif; padding-top:39px; text-align:right; float:right; width:350px;"><a href="http://www.naturaltherapyindia.com/products-directory.htm" style="color:#868686;">Products</a> &nbsp;|&nbsp;<a href="http://www.naturaltherapyindia.com/companies-directory.htm" style="color:#868686;">Companies</a> &nbsp;|&nbsp;<a href="http://www.naturaltherapyindia.com/companies-directory.htm#services" style="color:#868686;">Services</a> &nbsp;|&nbsp;<a href="http://www.naturaltherapyindia.com/companies-directory.htm#institutes" style="color:#868686;">Schools</a> &nbsp;|&nbsp;<a href="http://www.naturaltherapyindia.com/login.htm" style="color:#868686;">Sign In</a></div><div></div><div style=" margin:0px 2px 0px 2px; border-left:1px solid #dcdcdd; border-right:1px solid #dcdcdd; padding:10px;font-size:12px; font-family:Arial, Helvetica, sans-serif; line-height:18px;"><strong> Dear '.$memberRes['memberName'].'</strong> &nbsp; ('.$memberRes['companyName'].')<br/><br/><a href="http://www.naturaltherapyindia.com/" target="_blank">naturaltherapyindia.com </a>  - largest online B2B marketplace. </br></br>We are glad to inform you that you have received a Business Inquiry through your Business Listing, Kindly Login into your MY Folder to get complete details </br></br>	<strong>your log-in details are as follows:</strong><div><div style="font-size:12px; margin-top:10px;">User Mail ID&nbsp;&nbsp;:&nbsp;&nbsp; '.$memberRes['email'].'<br> Password&nbsp;&nbsp;:&nbsp;&nbsp; '.$memberRes['pwd'].' &nbsp;&nbsp;<a href="http://www.naturaltherapyindia.com/login.htm" style="color:#0000ff; font-size:11px;">Click here to Login</a></div><div style="clear:both;">&nbsp;</div></div><p style="padding:5px 8px; margin:10px 0;background:#f8f8f8;"><b>Business inquiry Details:</b></p><table width="90%" border="0" cellspacing="0" cellpadding="0" align="center" style=" border-collapse:collapse; font-size:16px; font-family:Arial, Helvetica, sans-serif;" ><tr><td><table align="center" width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse; font-size:12px; font-family:Arial, Helvetica, sans-serif;"><tr><td width="35%" align="right" style="padding:5px; border:1px solid #e0e0e0;"><b>Contact Person : </b></td><td style="padding:5px; border:1px solid #e0e0e0;"> '.$inquiryRes['contactName'].'</td></tr><tr><td width="35%" align="right" style="padding:5px; border:1px solid #e0e0e0;"><b>Company Name : </b></td><td style="padding:5px; border:1px solid #e0e0e0;">  '.$inquiryRes['companyName'].'</td></tr><tr valign="top"><td align="right" style="padding:5px; border:1px solid #e0e0e0;"><b>Country :</b> </td><td style="padding:5px; border:1px solid #e0e0e0;"> NA </td></tr><tr valign="top"><td align="right" style="padding:5px; border:1px solid #e0e0e0;"><b>Inquiry For : </b></td><td style="padding:5px; border:1px solid #e0e0e0;">'.$inquiryRes['subject'].'</td></tr><tr valign="top"><td align="right" style="padding:5px; border:1px solid #e0e0e0;"><b>Inquiry Details : </b></td><td style="padding:5px; border:1px solid #e0e0e0;">'.$inquiryRes['comments'].'</td></tr></tr></table><tr><td align="center" style="padding:5px; border:1px solid #e0e0e0;"><a href="http://www.naturaltherapyindia.com/login.htm" target="_blank"><b>Click Here To Login </b></a></td></tr></table><br />	<div>&nbsp;</div><div>Kindly <a href="http://www.naturaltherapyindia.com/login.htm" target="_blank">log on to My Folder</a> and get the contact details of buyer.</div><div>&nbsp;</div><span style="font-size: 13px; color:#0505a9; font-weight:bold">Promote your business on www.naturaltherapyindia.com by using below given activities for FREE:</span><div><ul style="list-style-type:square; padding-left:15px;"><li>Create your Free Website at www.naturaltherapyindia.com</a></li>	<li>Display Your Business Listing Free .</li><li>Post unlimted Products / Services Free</a></li>	<div style="clear:both;"></div></div></div><br/>For further assistance or queries, kindly feel free to contact us at: <a href="http://www.naturaltherapyindia.com/contact-us.htm" style="color:#0000fe;">Contact us</a><br><br><strong>Wishing you the very best of business</strong>,<br>naturaltherapyindia.com Team <div style="clear:both;"></div></div></div></div>';
		$fromPerson="NaturalTherapyindia.com";
		$fromemail ="buyers@naturaltherapyindia.com";
		$eMail="buyers@naturaltherapyindia.com";
		$subject="Business Inquiry - ".$inquiryRes['subject'];
		echo $ContactPerson."<br>".$eMail."<br>".$email."<br>".$subject."<br>".$mess;
		$to=$memberRes['email'];
				
		$headers = "From: $fromPerson <buyers@naturaltherapyindia.com> \r\n";
	$headers .= "Reply-To: $eMail \r\n";
	$headers .= "X-Mailer:PHP v".phpversion()."\r\n";
	$headers .= "X-Priority:3\n";
	$headers .= "MIME-version:1.0\n";
	$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
	$msg=$message;
	ini_set(sendmail_from,'buyers@naturaltherapyindia.com');
	mail($to, $subject, $msg, $headers);			
		
		updateTable($table_name," status='Y' where slno='$massqrys['slno'];'");
	}
	
}
	$_SESSION[session_message]='Selected record(s) activated successfully.'.$mess;;
	
header('Location: http://www.naturaltherapyindia.com/sitepanel/manage_business_classified_enquiries.php');


?>
