Subversion Repositories Applications.projet

Rev

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

Rev 249 Rev 294
Line 17... Line 17...
17
// |                                                                                                      |
17
// |                                                                                                      |
18
// | You should have received a copy of the GNU General Public                                            |
18
// | You should have received a copy of the GNU General Public                                            |
19
// | License along with this library; if not, write to the Free Software                                  |
19
// | License along with this library; if not, write to the Free Software                                  |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
21
// +------------------------------------------------------------------------------------------------------+
22
// CVS : $Id: forums.php,v 1.12 2007-06-25 12:15:06 alexandre_tb Exp $
22
// CVS : $Id: forums.php,v 1.13 2008-08-25 15:02:49 alexandre_tb Exp $
23
/**
23
/**
24
* Application projet
24
* Application projet
25
*
25
*
26
* Action forums
26
* Action forums
27
*
27
*
Line 29... Line 29...
29
//Auteur original :
29
//Auteur original :
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
31
//Autres auteurs :
31
//Autres auteurs :
32
*@author        Aucun
32
*@author        Aucun
33
*@copyright     Tela-Botanica 2000-2005
33
*@copyright     Tela-Botanica 2000-2005
34
*@version       $Revision: 1.12 $
34
*@version       $Revision: 1.13 $
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
*/
36
*/
Line 37... Line 37...
37
 
37
 
38
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
39
// |                                            ENTETE du PROGRAMME                                       |
39
// |                                            ENTETE du PROGRAMME                                       |
Line 40... Line 40...
40
// +------------------------------------------------------------------------------------------------------+
40
// +------------------------------------------------------------------------------------------------------+
41
 
41
 
42
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;
42
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;
43
include_once PROJET_CHEMIN_CLASSES.'participe.class.php' ;
43
include_once PROJET_CHEMIN_CLASSES.'participe.class.php' ;
44
include_once (PROJET_CHEMIN_CLASSES.'HTML_formulaireMail.class.php') ;
44
include_once PROJET_CHEMIN_CLASSES.'HTML_formulaireMail.class.php' ;
45
include_once (PROJET_CHEMIN_CLASSES.'inscription_liste.class.php') ;
45
include_once PROJET_CHEMIN_CLASSES.'inscription_liste.class.php' ;
46
include_once (PROJET_CHEMIN_CLASSES.'ezmlmAccessObject.class.php') ;
46
include_once PROJET_CHEMIN_CLASSES.'ezmlmAccessObject.class.php' ;
47
// RAPPEL IMPORTANT
47
// RAPPEL IMPORTANT
Line 48... Line 48...
48
// On se situe dans la méthode run() de la classe projetControleur
48
// On se situe dans la methode run() de la classe projetControleur
49
//
49
//
Line -... Line 50...
-
 
50
 
50
 
51
 
-
 
52
// creation de l'objet projet courant
51
 
53
$projet = new projet ($this->_db, $this->_id_projet) ;
-
 
54
 
52
// création de l'objet projet courant
55
/* contiendra le lien vers la liste yahoo */
-
 
56
$liste_ext_res = '' ;
-
 
57
 
-
 
58
$url_page_en_cours = $this->_url->getURL();
-
 
59
 
-
 
60
$inscription_laius ='' ;
-
 
61
$bouton_poster = '';
-
 
62
$bouton_desinscription_liste = '';
-
 
63
 
-
 
64
$loggue = $this->_auth->getAuth();
-
 
65
 
-
 
66
// Un appel a papyrus pour modifier le titre de la page
-
 
67
$GLOBALS['_PAPYRUS_']['rendu']['TITRE_PAGE'] = $projet->getTitre().' - '.PROJET_FORUM;
-
 
68
 
-
 
69
include_once PROJET_CHEMIN_CLASSES.'liste_externe.class.php' ;
-
 
70
$listes_ext = new liste_externe ($this->_db) ;
-
 
71
$tableau_liste = $listes_ext->getListesAssociees($this->_id_projet) ;
-
 
72
 
-
 
73
if (count ($tableau_liste) != 0) {
-
 
74
    //$liste_ext_res .= '<h2>'.PROJET_LISTES_ASSOCIEES.'</h2>'."\n" ;
-
 
75
    for ($i = 0; $i < count ($tableau_liste); $i++) {
-
 
76
        $info_liste = $listes_ext->getInfoListe($tableau_liste[$i]) ;
-
 
77
        $liste_ext_res .= '<p><a href="'.$info_liste->AGO_A_URLGRP.'">'.$info_liste->AGO_A_URLGRP.'</a></p>'."\n" ;
-
 
78
        $liste_ext_res .= '<br />'."\n" ;
-
 
79
    }
-
 
80
    $avoir_liste_externe = true;
-
 
81
    $adresse_envoie = $info_liste->AGO_A_MAILSEND;
53
$projet = new projet ($this->_db, $this->_id_projet) ;
82
} else {
54
 
83
	$avoir_liste_externe = false;
55
$liste_ext_res = '' ;
84
}
56
$sortie_liste = '' ;
85
 
57
$inscription_laius ='' ;
86
 
58
$this->_url->addQueryString (PROJET_VARIABLE_ID_PROJET, $this->_id_projet);
87
$this->_url->addQueryString (PROJET_VARIABLE_ID_PROJET, $this->_id_projet);
59
if ($projet->avoirListe()) {
88
if ($projet->avoirListe()) {
60
    foreach ($projet->_listes_associes as $info_liste) {
-
 
61
        ob_start() ;
89
    foreach ($projet->_listes_associes as $info_liste) {
62
        $id_u = $this->_auth->getAuthData(PROJET_CHAMPS_ID) ;
-
 
63
        if ($this->_auth->getAuth()) {
-
 
64
            $participant = new participe($this->_db) ;
-
 
65
            
-
 
66
            $isCoord = $participant->isCoordinateur($id_u, $this->_id_projet, $this->_db) ;
90
        ob_start() ;
67
            if ($isCoord) $droits = PROJET_DROIT_COORDINATEUR ;
91
        $id_u = $this->_auth->getAuthData(PROJET_CHAMPS_ID) ;
-
 
92
        if ($this->_auth->getAuth()) {
-
 
93
            $participant = new participe($this->_db) ;
-
 
94
             $droits = $participant->getStatut($id_u, $this->_id_projet);
-
 
95
        } else {
-
 
96
            $droits = PROJET_DROIT_AUCUN;
-
 
97
            $this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ACTION_S_INSCRIRE);
-
 
98
    		$lien_inscription = 'javascript:animatedcollapse.toggle(\'projet_bloc_inscription\');';
68
            $isAdm = participe::isAdministrateur($this->_auth->getAuthData(PROJET_CHAMPS_ID), $this->_db) ;
99
			$label_url_inscription = 'S\'inscrire &agrave; ce projet';
-
 
100
			GEN_stockerFichierScript('jquery', 'api/js/jquery/jquery.js');
-
 
101
			GEN_stockerFichierScript('animatedcollapse', 'api/js/jquery/animatedcollapse.js');
-
 
102
			GEN_stockerCodeScript('animatedcollapse.addDiv(\'projet_bloc_inscription\', \'fade=1, height="100px"\');' ."\n".
-
 
103
					'animatedcollapse.init();' ."\n");
-
 
104
        }
-
 
105
        switch ($droits) {
-
 
106
        	case PROJET_DROIT_AUCUN : 
-
 
107
	        	$this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ACTION_S_INSCRIRE);
-
 
108
	    		$lien_inscription = $this->_url->getURL();
-
 
109
	    		$label_url_inscription = 'S\'inscrire &agrave; ce projet';
69
            if ($isAdm) $droits = PROJET_DROIT_ADMINISTRATEUR ;
110
				GEN_stockerFichierScript('jquery', 'api/js/jquery/jquery.js');
70
            if ($isAdm) $isCoord = true ;
111
				GEN_stockerFichierScript('animatedcollapse', 'api/js/jquery/animatedcollapse.js');
71
        } else {
112
				GEN_stockerCodeScript('animatedcollapse.addDiv(\'projet_bloc_inscription\', \'fade=1, height="100px"\');' ."\n".
72
            $droits = PROJET_DROIT_AUCUN;
113
						'animatedcollapse.init();' ."\n");
73
        }
114
	    	break;
74
        
115
        }
75
        // gestion de l'inscription désinscription à la liste
116
        // gestion de l'inscription desinscription a la liste
76
        // TODO : la gestion de linscription au résumé
117
        // TODO : la gestion de linscription au resume
Line 85... Line 126...
85
	        	$this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ACTION_INSCRIPTION_LISTE);
126
	        	$this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ACTION_INSCRIPTION_LISTE);
86
	        	$inscription_laius ='<h2>'.PROJET_VOUS_N_ETES_PAS_INSCRIT.'</h2>'."\n" ;
127
	        	$inscription_laius ='<h2>'.PROJET_VOUS_N_ETES_PAS_INSCRIT.'</h2>'."\n" ;
87
	        	$inscription_laius .= '<a href="'.$this->_url->getURL().'">'.PROJET_S_INSCRIRE.'</a>'."\n" ;
128
	        	$inscription_laius .= '<a href="'.$this->_url->getURL().'">'.PROJET_S_INSCRIRE.'</a>'."\n" ;
88
	        }
129
	        }
89
        }
130
        }
-
 
131
        if ($inscription_liste->getStatutInscrit($info_liste->getId(),  $this->_auth) == 0) {
-
 
132
	        $action_inscription = PROJET_ACTION_INSCRIPTION_LISTE ;
-
 
133
	        $label_inscription = 'S\'inscrire &agrave; la liste' ;
-
 
134
	    } else {
-
 
135
	        // L'action envoyer un mail
-
 
136
	        $action_inscription = PROJET_ENVOYER_UN_MAIL ;
-
 
137
	        $label_inscription = PROJET_ECRIRE_LISTE ;
-
 
138
	        $this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ACTION_DESINSCRIPTION_LISTE);
-
 
139
	        $bouton_desinscription_liste = bouton::toHTML($this->_url->getURL(), 'Se d&eacute;sinscrire de la liste','cross');
-
 
140
	    }
Line 90... Line 141...
90
        
141
        
91
        if ($info_liste->isPublic() || $droits <= PROJET_DROIT_CONTRIBUTEUR) {
142
        if ($info_liste->isPublic() || $droits <= PROJET_DROIT_CONTRIBUTEUR) {
92
            include_once PROJET_CHEMIN_CLASSES_LISTES.'ezmlm.php' ;
143
            include_once PROJET_CHEMIN_CLASSES_LISTES.'ezmlm.php' ;
93
            $liste = new ezmlm_php() ;
144
            $liste = new ezmlm_php() ;
Line 94... Line 145...
94
            // Paramétrage de la liste
145
            // Parametrage de la liste
95
            
146
            
96
            $liste->listdir = PROJET_CHEMIN_LISTES.$info_liste->getDomaine().'/'.$info_liste->getNom();
147
            $liste->listdir = PROJET_CHEMIN_LISTES.$info_liste->getDomaine().'/'.$info_liste->getNom();
Line 106... Line 157...
106
            $liste->sendheaders	= false;
157
            $liste->sendheaders	= false;
107
            $liste->sendbody        = false;
158
            $liste->sendbody        = false;
108
            $liste->sendfooters    = false;
159
            $liste->sendfooters    = false;
109
            $liste->forcehref = $this->_url->getURL() ;
160
            $liste->forcehref = $this->_url->getURL() ;
Line -... Line 161...
-
 
161
            
-
 
162
            if (!$avoir_liste_externe) {
110
            
163
            	$adresse_envoie = $info_liste->getAdresseEnvoi();
111
            
164
            }
112
            print '<a href="mailto:'.$info_liste->getAdresseEnvoi().'">' . $info_liste->getAdresseEnvoi() ;
165
            print '<a href="mailto:'.$adresse_envoie.'">' . $adresse_envoie ;      
113
            print "</a><br />\n";
166
            print "</a><br />\n";
-
 
167
            $this->_url->addQueryString(PROJET_VARIABLE_ACTION, $action_inscription);
114
            $this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ENVOYER_UN_MAIL);
168
            $bouton_poster = bouton::toHTML($this->_url->getURL(), $label_inscription,'ecrire');
115
            if (isset ($GLOBALS['_GEN_commun']['info_application']->seulement_forum)) 
169
            if (isset ($GLOBALS['_GEN_commun']['info_application']->seulement_forum)) 
Line 116... Line 170...
116
            		print '<a href="'.$this->_url->getURL().'">'.PROJET_ECRIRE_LISTE.'</a><br />';
170
            		print '<a href="'.$this->_url->getURL().'">'.PROJET_ECRIRE_LISTE.'</a><br />';
117
            
171
            
Line -... Line 172...
-
 
172
            print '<h2>'.PROJET_TOUS_LES_MESSAGES.'</h2>'."\n";
118
            print '<h2>'.PROJET_TOUS_LES_MESSAGES.'</h2>'."\n";
173
            $this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ACTION_VOIR_FORUM);
119
            $this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ACTION_VOIR_FORUM);
174
            
120
            
175
            if ($liste->action != 'show_message') {
121
            $xml_parser = &new ezmlmAccessObject('calendrier_messages', $info_liste->getDomaine(),
176
	            $xml_parser = &new ezmlmAccessObject('calendrier_messages', $info_liste->getDomaine(),
-
 
177
	            									$info_liste->getNom(), $GLOBALS['lang'], 
122
            									$info_liste->getNom(), $GLOBALS['lang'], 
178
	            									$this->_url->getURL()) ;
-
 
179
				$xml_parser->load();
-
 
180
				ob_start();
123
            									$this->_url->getURL()) ;
181
				$resultat = $xml_parser->parse() ;
124
			$xml_parser->load();
182
				$calendrier = ob_get_contents();
125
			$resultat = $xml_parser->parse() ;
183
				ob_end_clean();
Line 126... Line 184...
126
			$xml_parser->reset();
184
				$xml_parser->reset();
127
          
185
            }
128
            //$this->_url->addQueryString(PROJET_VARIABLE_ACTION, $this->_action) ;
186
            //$this->_url->addQueryString(PROJET_VARIABLE_ACTION, $this->_action) ;
129
            
187
            
130
            // On teste si l'on vient d'une réponse à un email, si oui
188
            // On teste si l'on vient d'une reponse a un email, si oui
131
            // on modifie $liste->action pour renvoyer le message auquelon vient de répondre
189
            // on modifie $liste->action pour renvoyer le message auquelon vient de repondre
132
            if (isset($_POST['messageid'])) {
190
            if (isset($_POST['messageid'])) {
133
                $liste->action = 'show_msg' ;
191
                $liste->action = 'show_msg' ;
134
            }
192
            }
135
            switch ($liste->action) {
193
            switch ($liste->action) {
Line -... Line 194...
-
 
194
                case "show_msg":
136
                case "show_msg":
195
                    if (count($liste->actionargs) < 2) {
137
                    if (count($liste->actionargs) < 2) {
196
                        $liste->error(EZMLM_INVALID_SYNTAX,TRUE);
138
                        $liste->error(EZMLM_INVALID_SYNTAX,TRUE);
197
                    }
139
                    }
198
                    
140
                    
199
                    
141
                    // actionargs[0] contient le nom du répertoire et actionargs[1] le nom du fichier
200
                    // actionargs[0] contient le nom du repertoire et actionargs[1] le nom du fichier
Line 151... Line 210...
151
                    $mimeDecode = new Mail_mimeDecode($mail) ;
210
                    $mimeDecode = new Mail_mimeDecode($mail) ;
152
        			$mailDecode = $mimeDecode->decode(array('decode_bodies' => 'true', 
211
        			$mailDecode = $mimeDecode->decode(array('decode_bodies' => 'true', 
153
												'include_bodies' => 'true')) ;
212
												'include_bodies' => 'true')) ;
154
					$message = new ezmlm_msgdisplay() ;
213
					$message = new ezmlm_msgdisplay() ;
155
					$message->listname = $info_liste->getNom();
214
					$message->listname = $info_liste->getNom();
-
 
215
					
-
 
216
					$numero_message = $xml_parser->getNumeroMessage();
-
 
217
        			$total_message = $xml_parser->getNombreTotalMessage();
-
 
218
        			
156
					$this->_url->addQueryString ('action', 'show_msg');
219
					$this->_url->addQueryString ('action', 'show_msg');
-
 
220
					
-
 
221
					ob_start();
157
					if ($xml_parser->getNumeroFichierPrecedent() != '') {
222
					if ($xml_parser->getNumeroFichierPrecedent() != 0) {
158
			            print '[<a href="' . $this->_url->getURL(). '&amp;actionargs[]='.
223
			            $lien_precedent = $this->_url->getURL(). '&amp;actionargs[]='.
159
			            		$xml_parser->getNumeroRepertoirePrecedent().'&amp;actionargs[]='.
224
			            		$xml_parser->getNumeroRepertoirePrecedent().'&amp;actionargs[]='.
160
			            		$xml_parser->getNumeroFichierPrecedent().
225
			            		$xml_parser->getNumeroFichierPrecedent();
-
 
226
			            $bouton_precedent = bouton::toHTML($lien_precedent, PROJET_PRECEDENT, 'gauche', 'projet_bouton_inline');
161
								'">'.PROJET_PRECEDENT.'</a>]';
227
			            $navigation = $bouton_precedent;	
162
			        } else {
228
			        }
-
 
229
			        
-
 
230
			        if ($xml_parser->getNumeroFichierSuivant() != '' && (int) $numero_message < (int) $total_message) {
-
 
231
			            $lien_suivant = $this->_url->getURL(). '&amp;actionargs[]='.
-
 
232
			            		$xml_parser->getNumeroRepertoireSuivant().'&amp;actionargs[]='.
-
 
233
			            		$xml_parser->getNumeroFichierSuivant();
-
 
234
			            $bouton_suivant = bouton::toHTML($lien_suivant ,PROJET_SUIVANT, 'droite', 'projet_bouton_inline');
163
			            print '['.PROJET_PRECEDENT.']' ;
235
			            $navigation .= $bouton_suivant;
164
			        }
236
			        }
165
			        if ($xml_parser->getNumeroFichierSuivant() != '') {
-
 
166
			            print '[<a href="' .$this->_url->getURL().'&amp;actionargs[]='.$xml_parser->getNumeroRepertoireSuivant()
-
 
167
			            		.'&amp;actionargs[]='.$xml_parser->getNumeroFichierSuivant().'">'.PROJET_SUIVANT. '</a>]';
-
 
168
			        } else {
-
 
169
			            print '['.PROJET_SUIVANT.']' ;
-
 
170
        			}
-
 
171
        			$this->_url->addQueryString ('action', 'repondre');
237
        			$this->_url->addQueryString ('action', 'repondre');
172
					print '[<a href="'.$this->_url->getURL().'&amp;actionargs[]='.$liste->actionargs[0].
238
        			$bouton_repondre = bouton::toHTML($this->_url->getURL().'&amp;actionargs[]='.$liste->actionargs[0].
173
							'&amp;actionargs[]='.$liste->actionargs[1].'">'.PROJET_REPONDRE.'</a>]';
239
							'&amp;actionargs[]='.$liste->actionargs[1], PROJET_REPONDRE, 'repondre', 'projet_bouton_inline');
-
 
240
        			$this->_url->removeQueryString('action');
-
 
241
        			/*
-
 
242
						Un bouton pour revenir a la liste des messages
174
					if ($isCoord) {
243
					*/
-
 
244
					
-
 
245
					$navigation .= bouton::toHTML($this->_url->getURL() ,'retour', 'haut', 'projet_bouton_inline');
-
 
246
					if (!$avoir_liste_externe && $droits <= PROJET_DROIT_CONTRIBUTEUR) $navigation .= $bouton_repondre;
-
 
247
					if ($droits == PROJET_DROIT_COORDINATEUR || $droits == PROJET_DROIT_ADMINISTRATEUR) {
175
						$this->_url->addQueryString ('action', 'supprimer');
248
						$this->_url->addQueryString ('action', 'supprimer');
-
 
249
 
176
						print '[<a href="'.$this->_url->getURL().'&amp;actionargs[]='.$liste->actionargs[0].
250
						$bouton_suppression_message = bouton::toHTML($this->_url->getURL().'&amp;actionargs[]='.$liste->actionargs[0].
177
							'&amp;actionargs[]='.$liste->actionargs[1].'" onclick="javascript:return confirm(\''.PROJET_SUPPRIMER.' ?\');">'.
251
							'&amp;actionargs[]='.$liste->actionargs[1], 'Supprimer', 'cross', 'projet_bouton_inline');
178
							PROJET_SUPPRIMER.'</a>]';
252
						$navigation .= $bouton_suppression_message;
179
					}
253
					}
-
 
254
					$this->_url->removeQueryString ('action');
180
					print '<div class="message">' ;
255
					print '<div class="message">' ;
181
                    print $message->parse_entete_mail($mailDecode) ;
256
                    print $message->parse_entete_mail($mailDecode) ;
182
        	        $message->parse_template($mailDecode, $liste->actionargs[1], $liste->actionargs[0]);
257
        	        $message->parse_template($mailDecode, $liste->actionargs[1], $liste->actionargs[0]);
183
       				print $message->message_rendu;
258
       				print $message->message_rendu;
184
       				print '</div>' ;
259
       				print '</div>' ;
-
 
260
       				$message = ob_get_contents();
-
 
261
       				ob_end_clean();
Line 185... Line 262...
185
       				
262
       				
Line 186... Line 263...
186
                    break;
263
                    break;
187
                    
-
 
188
                case "list_info":
-
 
189
     
264
                    
190
                    print'<h2>'.PROJET_DERNIERS_MESSAGES.'</h2>'."\n" ;
265
                case "list_info":
191
                    $xml_parser->reset() ;
266
                    $xml_parser->reset() ;
192
					$xml_parser->setAction ('derniers_messages');
267
					$xml_parser->setAction ('derniers_messages');
193
                    $xml_parser->load();
268
                    $xml_parser->load();
194
                    ob_start ();
269
                    ob_start ();
195
                    $xml_parser->parse() ;
270
                    $xml_parser->parse() ;
196
                    $derniers_messages = ob_get_contents() ;
-
 
-
 
271
                    $derniers_messages = ob_get_contents() ;
Line 197... Line 272...
197
                    ob_end_clean();
272
                    ob_end_clean();
198
                    echo $derniers_messages ;
273
 
199
                    
274
                    
200
                    break;
275
                    break;
Line 205... Line 280...
205
                    $xml_parser->load();
280
                    $xml_parser->load();
206
                    ob_start ();
281
                    ob_start ();
207
                    $xml_parser->parse() ;
282
                    $xml_parser->parse() ;
208
                    $messages_thread = ob_get_contents() ;
283
                    $messages_thread = ob_get_contents() ;
209
                    ob_end_clean();
284
                    ob_end_clean();
210
                    echo $messages_thread ;
285
                    $message = $messages_thread ;
211
                    break;
286
                    break;
212
                case "show_author_msgs" :
287
                case "show_author_msgs" :
213
                    $xml_parser->reset() ;
288
                    $xml_parser->reset() ;
214
					$xml_parser->setAction ('messages_auteur');
289
					$xml_parser->setAction ('messages_auteur');
215
					$xml_parser->setHashAuteur($liste->actionargs[0]);
290
					$xml_parser->setHashAuteur($liste->actionargs[0]);
216
                    $xml_parser->load();
291
                    $xml_parser->load();
217
                    ob_start ();
292
                    ob_start ();
218
                    $xml_parser->parse() ;
293
                    $xml_parser->parse() ;
219
                    $messages_auteur = ob_get_contents() ;
294
                    $messages_auteur = ob_get_contents() ;
220
                    ob_end_clean();
295
                    ob_end_clean();
221
                    echo $messages_auteur ;
296
                    $message = $messages_auteur ;
222
                    break;
297
                    break;
223
                case 'show_month' :
298
                case 'show_month' :
224
                	echo '[ '.$liste->makelink(PROJET_VARIABLE_ACTION.'=forums&amp;action=show_threads&amp;actionargs[]='.
299
                	$this->_url->addQueryString(PROJET_VARIABLE_ACTION, 'forums');
-
 
300
                	$this->_url->addQueryString('action', 'show_threads');
-
 
301
                	$this->_url->addQueryString('actionargs[]', $liste->actionargs[0]);
225
                			$liste->actionargs[0], 'par fil de discussion').' ]' ;
302
                	$message = '[<a href="'.$this->_url->getURL().'">par fil de discussion</a>]';
-
 
303
                	
226
                    $xml_parser->reset() ;
304
                    $xml_parser->reset() ;
227
					$xml_parser->setAction ('messages_mois');
305
					$xml_parser->setAction ('messages_mois');
228
					$xml_parser->setMois($liste->actionargs[0]);
306
					$xml_parser->setMois($liste->actionargs[0]);
229
                    $xml_parser->load();
307
                    $xml_parser->load();
230
                    ob_start ();
308
                    ob_start ();
231
                    $xml_parser->parse() ;
309
                    $xml_parser->parse() ;
232
                    $messages_mois = ob_get_contents() ;
310
                    $messages_mois = ob_get_contents() ;
233
                    ob_end_clean();
311
                    ob_end_clean();
234
                    echo $messages_mois ;
312
                    $message .= $messages_mois ;
235
                break;
313
                break;
236
                case 'repondre' :
314
                case 'repondre' :
237
                    if (count($liste->actionargs) < 2) {
315
                    if (count($liste->actionargs) < 2) {
238
                        $liste->error(EZMLM_INVALID_SYNTAX,TRUE);
316
                        $liste->error(EZMLM_INVALID_SYNTAX,TRUE);
239
                    }
317
                    }
Line 264... Line 342...
264
                    $this->_url->removeQueryString (PROJET_VARIABLE_ACTION) ;
342
                    $this->_url->removeQueryString (PROJET_VARIABLE_ACTION) ;
265
                    $repondre->forcehref = $this->_url->getURL();
343
                    $repondre->forcehref = $this->_url->getURL();
266
                    $repondre->listname = $info_liste->getNom() ;
344
                    $repondre->listname = $info_liste->getNom() ;
267
                    // actionargs[0] contient le nom du répertoire et actionargs[1] le nom du fichier
345
                    // actionargs[0] contient le nom du répertoire et actionargs[1] le nom du fichier
268
                    // On appelle la fonction qui affiche un fichier
346
                    // On appelle la fonction qui affiche un fichier
269
                    print'<h2>'.PROJET_REDIGER_REPONSE.'</h2>'."\n" ;
347
                    $message = '<h2>'.PROJET_REDIGER_REPONSE.'</h2>'."\n" ;
270
                    $repondre->repondre($liste->actionargs[0] . "/" . $liste->actionargs[1]);
348
                    $repondre->repondre($liste->actionargs[0] . "/" . $liste->actionargs[1]);
Line 271... Line 349...
271
                    
349
                    
272
                    $repondre->parse_template($mailDecode, $liste->actionargs[0], $liste->actionargs[1]);
350
                    $repondre->parse_template($mailDecode, $liste->actionargs[0], $liste->actionargs[1]);
273
			        $formulaireReponse->addElement ('hidden', 'messageid', $mailDecode->headers['message-id']) ;
351
			        $formulaireReponse->addElement ('hidden', 'messageid', $mailDecode->headers['message-id']) ;
Line 276... Line 354...
276
			        $repondre->message_rendu = "> ".implode ("\n> ", $tableau) ;
354
			        $repondre->message_rendu = "> ".implode ("\n> ", $tableau) ;
Line 277... Line 355...
277
			
355
			
278
			        $formulaireReponse->setDefaults(array('mail_corps' => $repondre->message_rendu,
356
			        $formulaireReponse->setDefaults(array('mail_corps' => $repondre->message_rendu,
Line 279... Line 357...
279
			                                              'mail_titre' => 'Re : '.$repondre->decode_iso ($mailDecode->headers['subject']))) ;
357
			                                              'mail_titre' => 'Re : '.$repondre->decode_iso ($mailDecode->headers['subject']))) ;
Line 280... Line 358...
280
			
358
			
281
			        print $formulaireReponse->toHTML() ;
359
			        $message .= $formulaireReponse->toHTML() ;
282
 
360
 
283
                    break;
361
                    break;
284
                case 'supprimer' :
362
                case 'supprimer' :
285
                    $xml_parser->reset() ;
363
                    $xml_parser->reset() ;
286
					$xml_parser->setAction ('supprimer');
364
					$xml_parser->setAction ('supprimer');
287
					$xml_parser->setIdMessage($liste->actionargs[0], $liste->actionargs[1]) ;
365
					$xml_parser->setIdMessage($liste->actionargs[0], $liste->actionargs[1]) ;
288
                    $xml_parser->load();
366
                    $xml_parser->load();
289
                    print'<h2>'.PROJET_DERNIERS_MESSAGES.'</h2>'."\n" ;
367
                    $message = '<h2>'.PROJET_DERNIERS_MESSAGES.'</h2>'."\n" ;
290
                    $xml_parser->reset() ;
368
                    $xml_parser->reset() ;
291
					$xml_parser->setAction ('derniers_messages');
369
					$xml_parser->setAction ('derniers_messages');
292
                    $xml_parser->load();
370
                    $xml_parser->load();
293
                    ob_start ();
371
                    ob_start ();
294
                    $xml_parser->parse() ;
-
 
-
 
372
                    $xml_parser->parse() ;
295
                    $derniers_messages = ob_get_contents() ;
373
                    $message .= ob_get_contents() ;
296
                    ob_end_clean();
374
                    ob_end_clean();
Line 297... Line 375...
297
                    echo $derniers_messages ;
375
                    
298
                break;
376
                break;
299
            }
377
            }
300
            
-
 
301
        } else {
378
            
302
            print PROJET_MESSAGE_LISTE_PRIVEE ;
379
        } else {
303
        }
380
            $message = PROJET_MESSAGE_LISTE_PRIVEE ;
Line 304... Line -...
304
        $sortie_liste = ob_get_contents() ;
-
 
305
        ob_end_clean() ;
-
 
306
    }
-
 
Line 307... Line -...
307
}
-
 
308
 
381
        }
309
include_once PROJET_CHEMIN_CLASSES.'liste_externe.class.php' ;
382
        ob_end_clean() ;
310
$listes_ext = new liste_externe ($this->_db) ;
383
    }
311
$tableau_liste = $listes_ext->getListesAssociees($this->_id_projet) ;
-
 
312
 
384
}
313
if (count ($tableau_liste) != 0) {
385
 
314
    //$liste_ext_res .= '<h2>'.PROJET_LISTES_ASSOCIEES.'</h2>'."\n" ;
-
 
Line 315... Line -...
315
    for ($i = 0; $i < count ($tableau_liste); $i++) {
-
 
316
        $info_liste = $listes_ext->getInfoListe($tableau_liste[$i]) ;
-
 
317
        $liste_ext_res .= '<p><a href="'.$info_liste->AGO_A_URLGRP.'">'.$info_liste->AGO_A_URLGRP.'</a></p>'."\n" ;
-
 
318
        $liste_ext_res .= '<br />'."\n" ;
-
 
319
    }
-
 
Line 320... Line 386...
320
}
386
 
-
 
387
if ($liste->action == 'show_msg') $squelette = 'message'; else $squelette = 'forum';
-
 
388
ob_start();
-
 
389
include_once PROJET_CHEMIN_APPLI.'/squelettes/'.$squelette.'.tpl.html';
321
 
390
$retour .= ob_get_contents();
-
 
391
ob_end_clean();
-
 
392
 
-
 
393
 
322
$retour .= '<h1>' ;
394
$this->_url->removeQueryString ('actionargs');
323
if (!isset($GLOBALS['_GEN_commun']['info_application']->seulement_forum)) $retour .= PROJET_PROJET.' : ';
395
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ACTION_VOIR_FORUM);