コード例 #1
0
ファイル: contact.php プロジェクト: rakotobe/Rakotobe
	if(!empty($_POST['groupe'])) 		$groupe		 	= CFunctions::clean($_POST['groupe']);
	if(!empty($_POST['adresse'])) 		$adresse 		= CFunctions::clean($_POST['adresse']);
	if(!empty($_POST['cp'])) 			$cp 			= CFunctions::clean($_POST['cp']);
	if(!empty($_POST['ville'])) 		$ville 			= CFunctions::clean($_POST['ville']);
	if(!empty($_POST['pays'])) 			$pays 			= CFunctions::clean($_POST['pays']);
	if(!empty($_POST['email'])) 		$email 			= CFunctions::clean($_POST['email']);
	if(!empty($_POST['telephone']))		$telephone 		= trim($_POST['telephone']);
	if(!empty($_POST['societe'])) 		$societe 		= CFunctions::clean($_POST['societe']);
	if(!empty($_POST['web'])) 			$web 			= CFunctions::clean($_POST['web']);
	if(!empty($_POST['description'])) 	$description    = CFunctions::clean($_POST['description']);
	if(!empty($_POST['commentaire'])) 	$commentaire    = CFunctions::clean($_POST['commentaire']);
	if(!empty($_POST['unzip']))			$unzip 	  		= $_POST['unzip']==1;	
	if(!empty($_POST['image'])) 		$image 			= $_POST['image'];
	
	$login 		= CTableUtilisateur::create_login($nom);
	$passe 		= CFunction::get_password();
	
	// Traitement image
	$url_dest	= "image/entreprise/tmp" ;
	$url_base	= "image/entreprise" ;
	$zNow  		= date('Y-m-d') ;

	$files		= $_FILES['image'];
	$msginfoext = "";
	$tnames 	= explode(".",$files['name']);
	$extension  = $tnames[count($tnames)-1];
	$nom 		= $tnames[count($tnames)-2];
	
	// Suppression image existant
	$file_url = "image/entreprise/detail/".$nom."";
	if(file_exists($file_url)) {