<? 
 if($_SESSION['page'] == '1' and $_SESSION['section'] == '1') 
 	{ 
		if ($_GET['stat'] == 'addnew' )
		   {
						$date_now   		  = date("Y").'-'.date("m").'-'.date("d"); 
						$uid				  = $_SESSION['Login_user_id'];
						$CPR 	   			  = $_POST['CPR'];
						$CR  	   			  = $_POST['CR'];
						$cli_name   		  = $_POST['cli_name'];
						$Created_Date		  = $date_now ;
						
						//821002325
						
						
						$query = mysql_query("SELECT * FROM ".$dcm_table_start."client where CPR = '".$CPR."' and CR = '".$CR."'"); 	
							if (mysql_num_rows($query) <> 0 and ( $CPR  <> "" or $CR <> "" ) )
								{
									header("Location: index.php?stat=Error101"); 
								}else{
									mysql_query("INSERT INTO ".$dcm_table_start."client ( uid , CPR, CR, cli_name,created_date) VALUES ($uid,'$CPR','$CR','$cli_name','$Created_Date')");
									header("Location: index.php?section=2"); 
								}	
				
			}
	}
?>