Subversion Repositories Applications.projet

Rev

Rev 399 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 399 Rev 431
Line 84... Line 84...
84
		}
84
		}
Line 85... Line 85...
85
 
85
 
86
		return $listes_projets;
86
		return $listes_projets;
Line 87... Line -...
87
	}
-
 
88
	
-
 
89
	protected function obtenirListesExternesAssocieesAuProjet($id_projet) {
-
 
90
 
-
 
91
		$requete_liste_projets = 'SELECT * FROM agora '.
-
 
92
								 'WHERE plle_id_liste IN '.
-
 
93
								 '(SELECT plle_id_liste from projet_lien_liste_externe '.
-
 
94
								 		'WHERE plle_id_projet='.$this->bdd->quote($id_projet).')' ;
-
 
95
 
-
 
96
		try {
-
 
97
			$listes_projets = $this->bdd->query($requete_liste_projets)->fetchAll(PDO::FETCH_ASSOC);
-
 
98
		} catch (PDOException $e) {
-
 
99
			Log::getInstance()->ajouterEntree('projet','Fichier: '.$e->getFile().' Ligne: '.$e->getLine().' '.$e->getMessage());
-
 
100
			return array();
-
 
101
		}
-
 
102
 
-
 
103
 
-
 
104
		if(!$listes_projets || count($listes_projets) <= 0) {
-
 
105
			return array();
-
 
106
		}
-
 
107
 
-
 
108
		return $listes_projets;
-
 
109
	}
87
	}
Line 110... Line 88...
110
	
88
	
111
	protected function supprimerInscriptionAListeProjet($id_utilisateur, $id_liste) {
89
	protected function supprimerInscriptionAListeProjet($id_utilisateur, $id_liste) {
Line 138... Line 116...
138
 
116
 
Line 139... Line 117...
139
	protected function estAbonneAListe($nom_liste, $mail) {
117
	protected function estAbonneAListe($nom_liste, $mail) {
140
 
118
 
141
		try {
-
 
142
			$est_abonne = '0' ;
119
		try {
143
			// TODO: externaliser l'adresse
120
			$est_abonne = '0' ;
Line 144... Line 121...
144
			$xml_abonne = new SimpleXMLElement(file_get_contents('http://vpopmail.tela-botanica.org/est_abonne.php?domaine=tela-botanica.org&liste='.$nom_liste.'&mail='.$mail)) ;
121
			$xml_abonne = new SimpleXMLElement(file_get_contents('http://vpopmail.tela-botanica.org/est_abonne.php?domaine=tela-botanica.org&liste='.$nom_liste.'&mail='.$mail)) ;
145
			$est_abonne = $xml_abonne[0] ;
122
			$est_abonne = $xml_abonne[0] ;
Line 160... Line 137...
160
	protected function modifierMailPourListe($nom_liste, $ancien_mail, $nouveau_mail) {
137
	protected function modifierMailPourListe($nom_liste, $ancien_mail, $nouveau_mail) {
161
		return ($this->desinscriptionListe($nom_liste, $ancien_mail) && $this->inscriptionListe($nom_liste, $nouveau_mail));
138
		return ($this->desinscriptionListe($nom_liste, $ancien_mail) && $this->inscriptionListe($nom_liste, $nouveau_mail));
162
	}
139
	}
Line 163... Line 140...
163
 
140
 
164
	protected function inscriptionListe($nom_liste, $mail) {
-
 
165
		// TODO: externaliser l'adresse
141
	protected function inscriptionListe($nom_liste, $mail) {
166
		return $inscription_abonne = file_get_contents('http://vpopmail.tela-botanica.org/ajout_abonne.php?domaine=tela-botanica.org&liste='.$nom_liste.'&mail='.$mail) ;
142
		return $inscription_abonne = file_get_contents('http://vpopmail.tela-botanica.org/ajout_abonne.php?domaine=tela-botanica.org&liste='.$nom_liste.'&mail='.$mail) ;
Line 167... Line 143...
167
	}
143
	}
168
 
-
 
169
	protected function desinscriptionListe($nom_liste, $mail) {
144
 
170
		// TODO: externaliser l'adresse
145
	protected function desinscriptionListe($nom_liste, $mail) {
171
		return $suppression_abonne = file_get_contents('http://vpopmail.tela-botanica.org/suppression_abonne.php?domaine=tela-botanica.org&liste='.$nom_liste.'&mail='.$mail) ;
146
		return $suppression_abonne = file_get_contents('http://vpopmail.tela-botanica.org/suppression_abonne.php?domaine=tela-botanica.org&liste='.$nom_liste.'&mail='.$mail) ;
172
	}
147
	}