Line 1... |
Line 1... |
1 |
<?php
|
1 |
<?php
|
2 |
// $Id: ezmlm-repondre.php,v 1.2 2005-09-27 16:43:08 alexandre_tb Exp $
|
2 |
// $Id: ezmlm-repondre.php,v 1.3 2008-08-25 15:19:42 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 113... |
Line 113... |
113 |
|
113 |
|
114 |
if ($mailDecode->parts[$i]->ctype_secondary == 'octet-stream') {
|
114 |
if ($mailDecode->parts[$i]->ctype_secondary == 'octet-stream') {
|
115 |
$nom_piece_jointe = $mailDecode->parts[$i]->ctype_parameters['name'] ;
|
115 |
$nom_piece_jointe = $mailDecode->parts[$i]->ctype_parameters['name'] ;
|
116 |
$tab = explode ('.', $nom_piece_jointe) ;
|
116 |
$tab = explode ('.', $nom_piece_jointe) ;
|
117 |
$extension = $tab[count ($tab) - 1] ;
|
117 |
$extension = $tab[count ($tab) - 1] ;
|
118 |
$mimeType = type_fichier_mime::factory($extension, $GLOBALS['projet_db']);
|
118 |
$mimeType = type_fichier_mime::factory($extension);
|
119 |
$mimeType->setCheminIcone(PROJET_CHEMIN_ICONES) ;
|
119 |
$mimeType->setCheminIcone(PROJET_CHEMIN_ICONES) ;
|
120 |
} else {
|
120 |
} else {
|
121 |
$nom_piece_jointe = isset ($mailDecode->parts[$i]->d_parameters['filename']) ?
|
121 |
$nom_piece_jointe = isset ($mailDecode->parts[$i]->d_parameters['filename']) ?
|
122 |
$mailDecode->parts[$i]->d_parameters['filename'] : $mailDecode->parts[$i]->ctype_parameters['name'] ;
|
122 |
$mailDecode->parts[$i]->d_parameters['filename'] : $mailDecode->parts[$i]->ctype_parameters['name'] ;
|
123 |
$mimeType = new type_fichier_mime($GLOBALS['projet_db'], $mailDecode->parts[$i]->ctype_primary.'/'.
|
123 |
$mimeType = new type_fichier_mime( $mailDecode->parts[$i]->ctype_primary.'/'.
|
124 |
$mailDecode->parts[$i]->ctype_secondary, PROJET_CHEMIN_ICONES) ;
|
124 |
$mailDecode->parts[$i]->ctype_secondary, PROJET_CHEMIN_ICONES) ;
|
Line 125... |
Line 125... |
125 |
}
|
125 |
}
|
Line 145... |
Line 145... |
145 |
$corps .= $this->parse_template($mailDecode->parts[0], $numero_mail, $numero_mois, 0) ;
|
145 |
$corps .= $this->parse_template($mailDecode->parts[0], $numero_mail, $numero_mois, 0) ;
|
146 |
$this->message_rendu .= preg_replace('/<ezmlm-body>/i', $this->cleanup_body($corps,true), $this->msgtmpl).'</div>';
|
146 |
$this->message_rendu .= preg_replace('/<ezmlm-body>/i', $this->cleanup_body($corps,true), $this->msgtmpl).'</div>';
|
Line 147... |
Line 147... |
147 |
|
147 |
|
148 |
} else if ($mailDecode->ctype_primary == 'application' || $mailDecode->ctype_primary == 'image'){
|
148 |
} else if ($mailDecode->ctype_primary == 'application' || $mailDecode->ctype_primary == 'image'){
|
149 |
if ($mailDecode->ctype_secondary == 'applefile') return ;
|
149 |
if ($mailDecode->ctype_secondary == 'applefile') return ;
|
Line 150... |
Line 150... |
150 |
$mimeType = new type_fichier_mime($GLOBALS['projet_db'], $mailDecode->ctype_primary.'/'.$mailDecode->ctype_secondary,PROJET_CHEMIN_ICONES) ;
|
150 |
$mimeType = new type_fichier_mime( $mailDecode->ctype_primary.'/'.$mailDecode->ctype_secondary,PROJET_CHEMIN_ICONES) ;
|
151 |
|
151 |
|
Line 152... |
Line 152... |
152 |
if ($mimeType->getIdType() != 12) {
|
152 |
if ($mimeType->getIdType() != 12) {
|