Subversion Repositories Applications.annuaire

Rev

Rev 335 | Rev 355 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 335 Rev 343
Line 784... Line 784...
784
		
784
		
785
		foreach ($courriels as $id => $courriel) {
785
		foreach ($courriels as $id => $courriel) {
786
			$courriels[$id] = $this->proteger($courriel);
786
			$courriels[$id] = $this->proteger($courriel);
Line 787... Line 787...
787
		}
787
		}
788
		
788
		
789
		$requete = 	'SELECT '.$mappage['champ_mail'].', '.$mappage['champ_prenom'].', '.$mappage['champ_nom'].' '.
789
		$requete = 	'SELECT '.$mappage['champ_id'].', '.$mappage['champ_mail'].', '.$mappage['champ_prenom'].', '.$mappage['champ_nom'].' '.
790
					'FROM '.$annuaire['aa_bdd'].'.'.$annuaire['aa_table'].' '.
790
					'FROM '.$annuaire['aa_bdd'].'.'.$annuaire['aa_table'].' '.
Line 791... Line 791...
791
					'WHERE '.$mappage['champ_mail'].' IN ('.implode(',', $courriels).')';
791
					'WHERE '.$mappage['champ_mail'].' IN ('.implode(',', $courriels).')';
792
		$resultats = $this->requeteTous($requete);
792
		$resultats = $this->requeteTous($requete);
793
 
793
 
794
		if (!$resultats) {
794
		if (!$resultats) {
795
			return false;
795
			return false;
-
 
796
		} else {
796
		} else {
797
			$infos = array();
797
			$infos = array();
798
			foreach ($resultats as $resultat) {
-
 
799
				$id = $resultat[$mappage['champ_id']];
798
			foreach ($resultats as $resultat) {
800
				$prenom = AppControleur::formaterMotPremiereLettreChaqueMotEnMajuscule($resultat[$mappage['champ_prenom']]);
799
				$prenom = AppControleur::formaterMotPremiereLettreChaqueMotEnMajuscule($resultat[$mappage['champ_prenom']]);
801
				$nom = AppControleur::formaterMotEnMajuscule($resultat[$mappage['champ_nom']]);
800
				$nom = AppControleur::formaterMotEnMajuscule($resultat[$mappage['champ_nom']]);
802
				
801
				$infos[$resultat[$mappage['champ_mail']]] = array('prenom' => $prenom, 'nom' => $nom);
803
				$infos[$resultat[$mappage['champ_mail']]] = array('id' => $id, 'prenom' => $prenom, 'nom' => $nom);
Line 802... Line 804...
802
			}
804
			}