<?php
ob_start(); 
	//minimum characters allowed in the message box
	$msg_min_chars = "10";
	//maximum characters allowed in the message box
	$msg_max_chars = "4000";	
	$errors = array();
	function validate_form_items()
	{
	   global $msg_min_chars, $msg_max_chars;
	   $msg_chars = "{".$msg_min_chars.",".$msg_max_chars."}";
	   $form_items = array(		   
		   "name"  => array(
						   "regex" => "/^([a-zA-Z '-]+)$/",
						   "error" => "Your name appears to be in improper format",
						   ),
		   "Firstname"  => array(
						   "regex" => "/^([a-zA-Z '-]+)$/",
						   "error" => "Your first name appears to be in improper format",
						   ),
		   "Lastname"  => array(
						   "regex" => "/^([a-zA-Z '-]+)$/",
						   "error" => "Your last name appears to be in improper format",
						   ),
			"email" => array(
						   "regex" =>
							"/^[A-Za-z0-9](([_\.\-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})$/",
						   "error" => "email address is invalid",
						   ),
		   "message" => array(
						   "regex" => "/.*/",
						   "error" => "Your message is either too short or exceeds $msg_max_chars characters",
						   ),
	   );
	   global $errors;				
		if(!preg_match($form_items["Firstname"]["regex"], $_POST["txtFirstName"]))
			$errors[] = $form_items["Firstname"]["error"];			
			if(!preg_match($form_items["Lastname"]["regex"], $_POST["txtLastName"]))
			$errors[] = $form_items["Lastname"]["error"];		
		if(!preg_match($form_items["email"]["regex"], $_POST["txtEmail"]))
			$errors[] = "your ".$form_items["email"]["error"];				
	   return count($errors);
	}
	function email($from, $from_name, $to, $message)
	{
		//header("Location: thankyou1.html");return;
		$headers  = 'MIME-Version: 1.0' . "\r\n";
		$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
		// Additional headers
		//$headers .= 'To: '.$from.'>' . "\r\n";
		$headers .= 'From: '.$from.'' . "\r\n";
		$your_domian_name = "http://www.oncare.in";
		//edit what you want your vistors to see in their email here
		$subject = " Query From Website";
		$your_message = "Hello\r\n";
		$your_message.= ucfirst($from_name);		
		$message=$your_message.stripslashes($message);
		if (mail($to,$subject,$message,$headers))
		{
			return true;
		} else {
			return false;
		}
	}
	function print_error($errors)
	{
		foreach($errors as $error)
		{
			$err.=$error."<br/>";
		}
		echo 
		 "<div style=\"border:1px red solid; font-size:14px; font-weight:normal; color:red; margin:10px; padding:10px;\">
			$err
		 <div>";
	}
	function form_process()
	{	
		$from_name = "";
		$from_email = $_POST["txtEmail"];		
		$to = "info@oncare.in";		
		$message = createmessage();		
		$error_count = validate_form_items();		
		if($error_count == 0)
		{
			if(email($from_email, $from_name, $to, $message))			
			{
				ob_start();
				header("location: thankyou.html");
				exit;
			}
			else
			{
				global $errors;
				$errors[] = "Email coudn't be send at this time. <br>Please report the webmaster of this error.";
			}
		}		
	}
	function createmessage()
	{
	$message1=
	"<table>
		<tr>
				<td><b>Title :".		
				"</b></td>				
				<td>".
				$_POST["txtTitle"]
				."
				</td>
		</tr>
		<tr>
				<td><b>First Name :".
				"</b></td>
				<td>".
				$_POST["txtFirstName"]
				."
				</td>
		</tr>
		<tr>
				<td><b>Last Name :".
				"</b></td>
				<td>".
				$_POST["txtLastName"]
				."
				</td>
		</tr>
		<tr>
				<td><b>Company Name :".
				"</b></td>
				<td>".
				$_POST["txtCompanyName"]
				."
				</td>
		</tr>
<tr>
				<td><b>Website :".
				"</b></td>
				<td>".
				$_POST["txtWebsite"]
				."
				</td>
		</tr>
		<tr>
				<td><b>Address :".
				"</b></td>
				<td>".
				$_POST["txtAddress"]
				."
				</td>
		</tr>
		<tr>
				<td><b>City :".
				"</b></td>
				<td>".
				$_POST["txtCity"]
				."
				</td>
		</tr>
		<tr>
				<td><b>State :".
				"</b></td>
				<td>".
				$_POST["txtState"]
				."
				</td>
		</tr>
		<tr>
				<td><b>Country :".
				"</b></td>
				<td>".
				$_POST["txtCountry"]
				."
				</td>
		</tr>
		<tr>
				<td><b>Email :".
				"</b></td>
				<td>".
				$_POST["txtEmail"]
				."
				</td>
		</tr>
		<tr>
				<td><b>Phone :".
				"</b></td>
				<td>".
				$_POST["txtPhone"]
				."
				</td>
		</tr>
		<tr>
				<td><b>Mobile :".
				"</b></td>
				<td>".
				$_POST["txtMobile"]
				."
				</td>
		</tr>
		<tr>
				<td><b>Message :".
				"</b></td>
				<td>".
				$_POST["message"]
				."
				</td>
		</tr>
	</table>";
	return $message1;
	}
	if(isset($_POST["submit"]))
		form_process();
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- #BeginTemplate "template.dwt" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Description" content="Supplier and Distributor of Pharmaceutical Injection for Cancer Therapy, Gemcitabine Injection 200mg, Zoledronic Acid Injection IP, Gemcitabine Injection 1000 mg, Zolic and Methotrexate 50 mg/ 2 ml offered by Oncare Pharmaceuticals Private Limited, Chandigarh, Chandigarh, India." />
<meta name="keywords" content="Pharmaceutical injection for cancer therapy, Gemcitabine Injection 200mg, Gemcitabine Injection 1000 mg, Zoledronic Acid Injection IP, Methotrexate 50 mg/2 ml, Zolic" />
<meta http-equiv="Content-Language" content="EN">
<!-- #BeginEditable "doctitle" -->
<title>ONCARE PHARMACEUTICALS PVT LTD - Contact Us</title>
<!-- #EndEditable -->
<link rel="stylesheet" type="text/css" href="css/web.css">
<script language="javascript" src="scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
<script language="javascript" src="scripts/jquery.droppy.js" type="text/javascript" ></script>
<script language="javascript" type="text/javascript">
	$(function() {
    	$('#nav').droppy({speed:100});
	});
</script>
<!-- #BeginEditable "head" -->
<style type="text/css">







	fieldset{width:591px;height:510px;}
	.dvlbl {float: left;font-family: Arial, Tahoma, Verdana, Helvetica, sans-serif;font-size: 14px;color: #016D6D;padding-left: 5px;width:150px;}
	.dvdesc {float: left;padding-left: 9px;width:420px;}
</style>
<!-- #EndEditable -->
</head>
<body>
<div id="mainbody">
    <div id="header">
        <div id="logo">&nbsp;</div>
            <div id="phone">+(91)-(172)-4666070</div>
        </div>
        <div id="top-nav">
        	<ul id="nav" class="droppy">
            	<li><a href="index.htm">HOME</a></li>
                <li><a href="profile.htm">PROFILE</a></li>
                <li><a href="products.htm">OUR PRODUCTS</a>
                	<ul>
                    	<li><a href="Gemcitabine_Injection_200mg.htm">Gemcitabine Injection 200mg</a></li>
                        <li><a href="Gemcitabine_Injection_1000_mg.htm">Gemcitabine Injection 1000 mg</a></li>
                        <li><a href="Zoledronic_Acid_Injection_IP.htm">Zoledronic Acid Injection IP</a></li>
                        <li><a href="Methotrexate_50mg_2ml.htm">Methotrexate 50 mg/ 2 ml</a></li>
                        <li><a href="Imatinib_Mesylate_Tablet_100mg_400mg.htm">Imatinib Mesylate Tablet 100mg & 400mg</a></li>
                        <li><a href="Methotrexate_25_mg_5_mg.htm">Methotrexate Tab 2.5mg/5mg</a></li>
                        <li><a href="Capecitabine_Tablets_USP_500mg.htm">Capecitabine 500mg Tablet</a></li>
                    </ul>
                </li>
                <li><a href="trade_offers.htm">TRADE OFFERS</a></li>
                <li><a href="contact_us.php">CONTACT US</a></li>
                <li><a href="enquiry.php">ENQUIRY</a></li>
            </ul>
        </div>
        <div id="flash">
        	<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='950' height='278'>
              <param name="movie" value="ocare_header.swf" />
              <param name="quality" value="high" />
              <param name="wmode" value="transparent" />
              <embed src="ocare_header.swf" width="950" height="278" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed>
            </object>
        </div>
        <div id="content">
        <!-- #BeginEditable "ContentRegion" -->
          <h2>&nbsp;<span class="skyblue">Contact Us</span></h2>
		  <div id="contact-box">
		  	<p><strong>Contact Details<br />
		  	Oncare Pharmaceuticals Private Limited <br />
			</strong>178, Sector 35- D <br />
			Chandigarh - 160 035, India<br />
			<strong>Email :</strong> <a href="mailto:info@oncare.in?subject=Oncare%20Pharmaceuticals%20Private%20Limited%20Mail%20Through%20IndiaMART.com">info@oncare.in</a>
			<strong><br />
			Telephone :</strong> +(91)-(172)-4666070 
			<strong><br />
			Mobile :</strong> +(91)-9872663432/ 9814097079 </p>
		  </div>
		  
		  <form id="test" method="post" action="<?php echo $PHP_SELF?>" >
          <fieldset>
          	<legend>Enter your contact information</legend>
          	<div style="width: 591px">
				<?php
					global $errors;
					if(count($errors) != 0){
						print_error($errors);
					}
				?>
          	</div>
          	<div class="h25" style="width: 591px">
                <div class="dvlbl">Title *</div>
                <div class="dvdesc">
                	<input type="text" name="txtTitle" id="name" size="20" maxlength="25" value='<?php echo $_POST["txtTitle"]?>' />
				</div>
          	</div>
          	<div class="h25" style="width: 591px">
                <div class="dvlbl"> First Name</div>
                <div class="dvdesc">
	                <input type="text" name="txtFirstName" id="name0" size="20" maxlength="25" value="<?php echo $_POST["txtFirstName"]?>" />
				</div>
          	</div>
          	<div class="h25" style="width: 591px">
                <div class="dvlbl">Last Name</div>
                <div class="dvdesc">
                	<input type="text" name="txtLastName" id="name1" size="20" maxlength="25" value="<?php echo $_POST["txtLastName"]?>" />
                </div>
          	</div>
          	<div class="h25" style="width: 591px">
                <div class="dvlbl">Company Name</div>
                <div class="dvdesc">
                	<input type="text" name="txtCompanyName" id="name2" size="20" maxlength="25" value="<?php echo $_POST["txtCompanyName"]?>" />
                </div>
          	</div>
          	<div class="h25" style="width: 591px">
                <div class="dvlbl">Website</div>
                <div class="dvdesc">
					<input type="text" name="txtWebsite" id="name3" size="20" maxlength="25" value="<?php echo $_POST["txtWebsite"]?>" />
                </div>
          	</div>
          	<div class="h25" style="width: 591px">
                <div class="dvlbl">Address</div>
                <div class="dvdesc">
					<input type="text" name="txtAddress" id="name4" size="20" maxlength="25" value="<?php echo $_POST["txtAddress"]?>" />
                </div>
          	</div>
          	<div class="h25" style="width: 591px">
                <div class="dvlbl">City: </div>
                <div class="dvdesc">
					<input type="text" name="txtCity" id="name5" size="20" maxlength="25" value="<?php echo $_POST["txtCity"]?>" />
                </div>
          	</div>
          	<div class="h25" style="width: 591px">
                <div class="dvlbl">State </div>
                <div class="dvdesc">
					<input type="text" name="txtState" id="name6" size="20" maxlength="25" value="<?php echo $_POST["txtState"]?>" />
                </div>
          	</div>
          	<div class="h25" style="width: 591px">
                <div class="dvlbl">Country </div>
                <div class="dvdesc">
					<input type="text" name="txtCountry" id="name7" size="20" maxlength="25" value="<?php echo $_POST["txtCountry"]?>" />
                </div>
          	</div>
          	<div class="h25" style="width: 591px">
                <div class="dvlbl">Email: </div>
                <div class="dvdesc">
					<input type="text" name="txtEmail" id="name8" size="20" maxlength="25" value="<?php echo $_POST["txtEmail"]?>" />
                </div>
          	</div>
          	<div class="h25" style="width: 591px">
                <div class="dvlbl">Phone: </div>
                <div class="dvdesc">
					<input type="text" name="txtPhone" id="name9" size="20" maxlength="25" value="<?php echo $_POST["txtPhone"]?>" />
                </div>
          	</div>
          	<div class="h25" style="width: 591px">
                <div class="dvlbl">Mobile: </div>
                <div class="dvdesc">
					<input type="text" name="txtMobile" id="name10" size="20" maxlength="25" value="<?php echo $_POST["txtMobile"]?>" />
                </div>
          	</div>
          	<div style="width: 591px; height:130px;">
          		<p><strong>Describe Your Buying Requirements in Detail: </strong>
				<em>(max 4000 characters allowed)</em>
				<textarea name="message" id="message" cols="60" rows="5"><?php echo $_POST["message"]?></textarea></p>
          	</div>
          	<div class="h25" style="width: 591px">
          		<div class="dvlbl"><i>(* required fields)</i></div><input type="submit" value="submit" name="submit" />
          	</div>
          </fieldset>
          </form>
        <!-- #EndEditable -->
        </div>
    </div>
    <div id="footer">
      <div id="footer-address">
            <div class="addr">
            	178, Sector 35- D<br />
				Chandigarh - 160 035, India
            </div>
            <div class="addr phone center">
            	<img src="images/phone2.png" alt="phone" /> +(91)-(172)-4666070
            </div>
            <div class="addr phone right">
            	<a href="mailto:info@oncare.in?subject=Oncare%20Pharmaceuticals%20Private%20Limited%20Mail%20Through%20IndiaMART.com">
            		<img src="images/mail.png" alt="Mail" /> Contact Via Email
            	</a>
            </div>
            <div id="footer-links">
            	<a href="index.htm">HOME</a>
                <a href="profile.htm">PROFILE</a>
                <a href="products.htm">OUR PRODUCTS</a>
                <a href="trade_offers.htm">TRADE OFFERS</a>
                <a href="contact_us.php">CONTACT US</a>
                <a href="enquiry.php" class="last">ENQUIRY</a>
                <p>© 2011 Oncare Pharmaceuticals Private Limited, All Rights Reserved.</p>
            </div>
            <div id="footer-sociallinks">
            	<img src="images/share.gif" alt="share" />
                <p><a href="http://www.winuxsystems.com">Website developed by: Winux Systems </a></p>
            </div>
      </div>
    </div>
</body>
<!-- #EndTemplate -->
</html>
