<?php

	require_once("../include/config.php");	
	require_once("../include/startup.php");

$obj  = new Client();

if($_POST['SUBMIT'])
{ 

							
															
		//$image 						=  IMAGE_DIR;
	 //  $whether = $_POST['whether'];
	 
	 //Information
	// 	$NewProduct['companyname']					= sanitize($_POST['txtcompanyname'],SQL);
	// 	$NewProduct['panno']					= sanitize($_POST['txtpanno'],SQL);
	 	$NewProduct['clientname']					= sanitize($_POST['txtclientname'],SQL);
	 	$NewProduct['clientsurname']				= sanitize($_POST['txtclientsurname'],SQL);
	 	
	 	//Address
	 	$NewProduct['Addline1'] 						= sanitize($_POST['Addline1'],SQL);
	 	$NewProduct['head_CityName1'] 				= sanitize($_POST['txthead_CityName1'],SQL);
	 	$NewProduct['head_Stateid1'] 				= sanitize($_POST['txthead_Stateid1'],SQL);
	 	$NewProduct['Country'] 						= sanitize($_POST['txtCountry1'],SQL);
		$NewProduct['pincode'] 						= sanitize($_POST['txtpincode1'],SQL);
		
	//	$NewProduct['gstno'] 						= sanitize($_POST['txtgstno1'],SQL);
	
		//Personal Information
	 	$NewProduct['dateofbirth']					= date("Y-m-d",strtotime($_POST['txtDOB']));
	 	$NewProduct['gender']							= $_POST['txtgender'];
	 	
	   //Contact Information
	 	$NewProduct['head_TelNo'] 	      				= sanitize($_POST['txthead_TelNo'],SQL);
		$NewProduct['head_mobNo'] 	     		 	= sanitize($_POST['head_mobNo'],SQL);
		$NewProduct['head_Email'] 	      		= sanitize($_POST['head_Email'],SQL);
	
	
	   //Information
		$NewProduct['state']								= $_POST['txtstate'];
	 	$NewProduct['gstapplicable']					= $_POST['txtgstapplicable'];
		
		
		//Factory Address
/*		$NewProduct['factorystradd'] 					= sanitize($_POST['txtfactorystradd1'],SQL);
	 	$NewProduct['factorystraddress'] 			= sanitize($_POST['txtfactorystraddress1'],SQL);
		$NewProduct['factorycityname'] 				= sanitize($_POST['txtfactorycityname1'],SQL);
		$NewProduct['factoryStatename'] 				= sanitize($_POST['txtfactoryStatename1'],SQL);
	 	$NewProduct['factorypincode'] 				= sanitize($_POST['txtfactorypincode1'],SQL);
	 	$NewProduct['factoryCountry'] 				= sanitize($_POST['txtfactoryCountry1'],SQL);
		$NewProduct['factoryGSTNO'] 						= sanitize($_POST['txtfactoryGST1'],SQL);	
		
		//Branch Address
		$NewProduct['Branchstradd'] 					= sanitize($_POST['txtBranchstradd1'],SQL);
	 	$NewProduct['Branchstraddress'] 			= sanitize($_POST['txtBranchstraddress1'],SQL);
		$NewProduct['Branchcityname'] 				= sanitize($_POST['txtBranchCity1'],SQL);
		$NewProduct['BranchStatename'] 				= sanitize($_POST['txtfactoryStatename1'],SQL);
	 	$NewProduct['Branchpincode'] 				= sanitize($_POST['txtBranchpincode1'],SQL);
	 	$NewProduct['BranchCountry'] 				= sanitize($_POST['txtBranchCountry1'],SQL);
	 	$NewProduct['BranchGSTNO'] 				= sanitize($_POST['txtBranchgstno1'],SQL);
	*/	
	 	
	 
	 
	 /*
	 	$NewProduct['MemberID']							= $_POST['txtmemberid'];
	 	$NewProduct['gender']							= $_POST['txtgender'];
	   $NewProduct['memberid_ref']					= sanitize($_POST['txtmemberid_ref'],SQL);
		$NewProduct['billing_address']				= sanitize($_POST['txtbilling_address'],SQL);
		$NewProduct['officeid']							= sanitize($_POST['txtofficeid'],SQL);
		$NewProduct['panelid']							= $_POST['txtpanelid'];
		$NewProduct['accessid'] 	  					= sanitize($_POST['txtaccessid'],SQL);
		$NewProduct['MembershipNo'] 	     			= $_POST['txtMembershipNo'];
		$NewProduct['Removed_MembershipNo'] 	   = $_POST['txtRemoved_MembershipNo'];
		$NewProduct['apl_id'] 	      				= $_POST['txtapl_id'];
		$NewProduct['clubbed_apl_id'] 	     		= $_POST['txtclubbed_apl_id'];
		$NewProduct['viru_iec'] 	   				= sanitize($_POST['txtviru_iec'],SQL);
		$NewProduct['MemberName'] 						= sanitize($_POST['txtMemberName'],SQL);
		$NewProduct['MemberOldName'] 	   			= sanitize($_POST['txtMemberOldName'],SQL);
		$NewProduct['Estd'] 	   						= sanitize($_POST['txtEstd'],SQL);
		$NewProduct['MemberUsername'] 				= $_POST['txtMemberUsername'];
		$NewProduct['mobileforsms'] 					= $_POST['txtmobileforsms'];
		$NewProduct['reg_date'] 						=  date("Y-m-d",strtotime($_POST['dateofbirth']));
		$NewProduct['reg_date'] 						=  date("Y-m-d",strtotime($_POST['reg_date']));
		$NewProduct['re_registered_date'] 			=  date("Y-m-d",strtotime($_POST['re_registered_date']));
		$NewProduct['admission_date'] 				=  date("Y-m-d",strtotime($_POST['admission_date']));
		$NewProduct['taxnotapplicable'] 	      	= $_POST['taxnotapplicable'];
		$NewProduct['GST_no'] 						= $_POST['GST_no'];
		$NewProduct['gstnotapplicable'] 				= sanitize($_POST['gstnotapplicable'],SQL);
		$NewProduct['Tan_No'] 							= sanitize($_POST['Tan_No'],SQL);
		$NewProduct['Cin_No'] 							= sanitize($_POST['Cin_No'],SQL);
		$NewProduct['head_Add1'] 						= sanitize($_POST['head_Add1'],SQL);
		//$NewProduct['Addline1'] 						= sanitize($_POST['txtAddline1'],SQL);
		//$NewProduct['Addline1'] 						= sanitize($_POST['txtAddline1'],SQL);
		
		$NewProduct['Email1'] 							= sanitize($_POST['txtEmail1'],SQL);
		$NewProduct['Email2'] 							= sanitize($_POST['txtEmail2'],SQL);
		
		$NewProduct['Telex'] 	      				= sanitize($_POST['txtTelex'],SQL);
		$NewProduct['PersonName1'] 	      		= sanitize($_POST['txtPersonName1'],SQL);
		$NewProduct['Designation1'] 	     		 	= sanitize($_POST['txtDesignation1'],SQL);
		$NewProduct['PersonName2'] 	      		= sanitize($_POST['txtPersonName2'],SQL);
		$NewProduct['Products'] 	      			= $_POST['Products'];
		$NewProduct['productsexported'] 	     	 	= $_POST['productsexported'];
		$NewProduct['addinfo'] 	      				= $_POST['	addinfo'];
		$NewProduct['productcategory'] 	      	= $_POST['productcategory'];
		$NewProduct['bannerfile'] 	   				= sanitize($_POST['bannerfile'],SQL);
		$NewProduct['bannerurl'] 	      			= sanitize($_POST['bannerurl'],SQL);
		$NewProduct['isadvertiser'] 	   			= $_POST['isadvertiser'];
		$NewProduct['memberapprovalstatus'] 	   = $_POST['txtstatus'];
		$NewProduct['approved_date'] 	      		=  date("Y-m-d",strtotime($_POST['approved_date']));
		//$NewProduct['isManufacturer_1'] 	     	= sanitize($_POST['isManufacturer_1'],SQL);
		$NewProduct['old_categoryid'] 	  	 		= sanitize($_POST['old_categoryid1'],SQL);
		//$NewProduct['category_changed_date1'] 	=  date("Y-m-d",strtotime($_POST['category_changed_date1']));
		$NewProduct['isDeleted']						= 	sanitize($_POST['isDeleted'],SQL);
		$NewProduct['closed_reason']					= 	sanitize($_POST['closed_reason'],SQL);
		$NewProduct['deleted_date']					= 	sanitize($_POST['deleted_date'],SQL);
		$NewProduct['special_comments']				=	sanitize($_POST['txtspecial_comments'],SQL);
		$NewProduct['CompanyCategory']				= 	sanitize($_POST['txtCompanyCategory'],SQL);
		$NewProduct['Cor_Add1']							= 	sanitize($_POST['txtCor_Add1'],SQL);
		$NewProduct['Cor_addressline2']				= 	sanitize($_POST['txtCor_addressline2'],SQL);
		$NewProduct['Cor_addressline3']				= 	sanitize($_POST['txtCor_addressline3'],SQL);
		$NewProduct['Cor_addressline4']				=	sanitize($_POST['txtCor_addressline4'],SQL);
		$NewProduct['Cor_Pin']							=	sanitize($_POST['txtCor_Pin'],SQL);
		$NewProduct['cor_stateid']						=	sanitize($_POST['txtcor_stateid'],SQL);
		$NewProduct['Cor_StateName']					=	sanitize($_POST['txtCor_StateName'],SQL);
		$NewProduct['cor_faxno']						=	sanitize($_POST['txtcor_faxno'],SQL);
		$NewProduct['cor_email']						=	sanitize($_POST['txtcor_email'],SQL);
		$NewProduct['doc_isApproved']					=	sanitize($_POST['txtdoc_isApproved'],SQL);
		$NewProduct['doc_ApproveDate'] 	     	=  date("Y-m-d",strtotime($_POST['doc_ApproveDate']));
		$NewProduct['doc_ApprovedBy'] 	   		= sanitize($_POST['doc_ApprovedBy'],SQL);
		//$NewProduct['	latest_rcmcid1'] 	     	= sanitize($_POST['latest_rcmcid1'],SQL);
		$NewProduct['isprofileupdated'] 	   	= sanitize($_POST['isprofileupdated'],SQL);
		$NewProduct['profile_updated_date'] 	   =  date("Y-m-d",strtotime($_POST['profile_updated_date']));
		$NewProduct['ApplicationNO'] 	  				= sanitize($_POST['ApplicationNO'],SQL);
		$NewProduct['ApplicationStatus'] 	   	= sanitize($_POST['ApplicationStatus'],SQL);
		

		
			*/

		 
		 $addresult     = $obj -> AddClient($NewProduct);
		
	
		 
				
		  		
		   	require_once("register_success.php");
		   	
		   }
?>