Exemplo n.º 1
0
		$nom 		= $row[$_REQUEST['nom']];
		$prenom 	= $row[$_REQUEST['prenom']];
		$societe	= $row[$_REQUEST['societe']];
		$adresse 	= $row[$_REQUEST['adresse']];
		$cp 		= $row[$_REQUEST['cp']];
		$ville 		= $row[$_REQUEST['ville']];
		$email 		= $row[$_REQUEST['email']];
		$telephone 	= $row[$_REQUEST['telephone']];
		$mobile 	= $row[$_REQUEST['mobile']];
		$web 		= $row[$_REQUEST['web']];
		$pays 		= $row[$_REQUEST['pays']];
		$login 		= CTableUser::create_login($nom);
		$passe 		= CFunction::get_password();
		
		//traitement particuliers
		$code_pays 	= CTablePays::get_element($pays, 'id');
		$id_civilite= CTableCivilite::get_id($civilite);
		
		$id_user = CTableUser::get_id_by_phone($telephone, $mobile);				
		
		if($id_user > 0 && $_REQUEST['update'] == 'yes') {
			$obj = new CTableUser(array(
			'id'=>$id_user, 
			'nom'=>CFunction::clean_user_input($nom), 
			'prenom'=>CFunction::clean_user_input($prenom), 
			'societe'=>CFunction::clean_user_input($societe), 
			'adresse'=>CFunction::clean_user_input($adresse), 
			'cp'=>CFunction::clean_user_input($cp), 
			'ville'=>CFunction::clean_user_input($ville), 
			'email'=>CFunction::clean_user_input($email), 
			'telephone'=>CFunction::clean_user_input($telephone),