Subversion Repositories Applications.papyrus

Rev

Rev 1598 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1598 Rev 1632
Line 1... Line 1...
1
<?php
1
<?php
2
// $Id: ezmlm-msgdisplay.php,v 1.6 2007-09-10 11:22:24 alexandre_tb Exp $
2
// $Id: ezmlm-msgdisplay.php,v 1.7 2007-10-02 09:00:06 alexandre_tb Exp $
3
//
3
//
4
// ezmlm-msgdisplay.php - ezmlm-php v2.0
4
// ezmlm-msgdisplay.php - ezmlm-php v2.0
5
// --------------------------------------------------------------
5
// --------------------------------------------------------------
6
// Will parse a template (if specified) and display a message.
6
// Will parse a template (if specified) and display a message.
7
// Includes a default template.
7
// Includes a default template.
Line 264... Line 264...
264
			for ($i = 0; $i < count($mailDecode->parts); $i++) {
264
			for ($i = 0; $i < count($mailDecode->parts); $i++) {
265
                switch ($mailDecode->parts[$i]->ctype_secondary) {
265
                switch ($mailDecode->parts[$i]->ctype_secondary) {
266
                    case 'plain' : 
266
                    case 'plain' : 
267
                    if ($mailDecode->parts[$i]->headers['content-transfer-encoding'] == '8bit') {
267
                    if ($mailDecode->parts[$i]->headers['content-transfer-encoding'] == '8bit') {
268
                    	$corps .= $this->_cte_8bit($mailDecode->parts[$i]->body);
268
                    	$corps .= $this->_cte_8bit($mailDecode->parts[$i]->body);
-
 
269
                    } else if ($mailDecode->parts[$i]->headers['content-transfer-encoding'] == 'quoted-printable') {
-
 
270
                    	if ($mailDecode->parts[$i]->ctype_parameters['charset'] == 'UTF-8') {
-
 
271
                    		$corps .= utf8_decode($mailDecode->parts[$i]->body);	
-
 
272
                    	}
269
                    }
273
                    }
270
                    break;
274
                    break;
271
                    case 'html' : $corps .= $mailDecode->parts[$i]->body ;
275
                    case 'html' : $corps .= $mailDecode->parts[$i]->body ;
272
                    break ;
276
                    break ;
273
                    case 'mixed' : 
277
                    case 'mixed' : 
Line 291... Line 295...
291
                                            $mailDecode->parts[$i]->d_parameters['filename'] : $mailDecode->parts[$i]->ctype_parameters['name'] ;
295
                                            $mailDecode->parts[$i]->d_parameters['filename'] : $mailDecode->parts[$i]->ctype_parameters['name'] ;
292
                        $mimeType = new type_fichier_mime($GLOBALS['projet_db'], $mailDecode->parts[$i]->ctype_primary.'/'.
296
                        $mimeType = new type_fichier_mime($GLOBALS['projet_db'], $mailDecode->parts[$i]->ctype_primary.'/'.
293
                                            $mailDecode->parts[$i]->ctype_secondary, PROJET_CHEMIN_ICONES) ;
297
                                            $mailDecode->parts[$i]->ctype_secondary, PROJET_CHEMIN_ICONES) ;
294
                    }
298
                    }
Line 295... Line 299...
295
                    
299
                    
296
                    $corps .= '<a href="'.PROJET_CHEMIN_APPLI.'synchroliste/fichier_attache.php?nom_liste='.$this->listname.
300
                    $corps .= '<a href="'.PROJET_CHEMIN_APPLI.'fichier_attache.php?nom_liste='.$this->listname.
297
                                    '&actionargs[]='.$numero_mois.
301
                                    '&actionargs[]='.$numero_mois.
Line 298... Line 302...
298
                                    '&actionargs[]='.$numero_mail;
302
                                    '&actionargs[]='.$numero_mail;
299
                                    
303
                                    
Line 319... Line 323...
319
        } else if ($mailDecode->ctype_primary == 'application' || $mailDecode->ctype_primary == 'image'){
323
        } else if ($mailDecode->ctype_primary == 'application' || $mailDecode->ctype_primary == 'image'){
320
            if ($mailDecode->ctype_secondary == 'applefile') return ;
324
            if ($mailDecode->ctype_secondary == 'applefile') return ;
321
            $mimeType = new type_fichier_mime($GLOBALS['projet_db'], $mailDecode->ctype_primary.'/'.$mailDecode->ctype_secondary,PROJET_CHEMIN_ICONES) ;
325
            $mimeType = new type_fichier_mime($GLOBALS['projet_db'], $mailDecode->ctype_primary.'/'.$mailDecode->ctype_secondary,PROJET_CHEMIN_ICONES) ;
Line 322... Line 326...
322
            
326
            
323
            if ($mimeType->getIdType() != 12) {
327
            if ($mimeType->getIdType() != 12) {
324
                $corps .= '<a href="'.PROJET_CHEMIN_APPLI.'synchroliste/fichier_attache.php?nom_liste='.$this->listname.'&actionargs[]='.
328
                $corps .= '<a href="'.PROJET_CHEMIN_APPLI.'fichier_attache.php?nom_liste='.$this->listname.'&actionargs[]='.
325
                                    $numero_mois.'&actionargs[]='.
329
                                    $numero_mois.'&actionargs[]='.
326
                                    $numero_mail.'&actionargs[]='.$i.'">'.
330
                                    $numero_mail.'&actionargs[]='.$i.'">'.
327
                                    '<img src="'.$mimeType->getCheminIcone().'" alt="'.$mailDecode->ctype_parameters['name'].'" />&nbsp;' ;
331
                                    '<img src="'.$mimeType->getCheminIcone().'" alt="'.$mailDecode->ctype_parameters['name'].'" />&nbsp;' ;