Subversion Repositories Applications.projet

Rev

Rev 420 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 420 Rev 431
Line 1... Line 1...
1
<?php
1
<?php
2
// $Id: ezmlm-msgdisplay.php,v 1.11 2008-11-19 09:28:46 aperonnet Exp $
2
// $Id: ezmlm-msgdisplay.php,v 1.9 2008-05-23 10:18:37 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 123... Line 123...
123
		//echo $numero_message;
123
		//echo $numero_message;
124
		// on cherche la ligne avec le numero du message
124
		// on cherche la ligne avec le numero du message
125
		while (!feof($fichier_index)) {
125
		while (!feof($fichier_index)) {
Line 126... Line 126...
126
				
126
				
127
				$temp = fgets($fichier_index,4096);
-
 
128
				$x = preg_match('/(\d+): (\w+) (.*)/', $temp, $matches);
-
 
129
                array_shift($matches);
127
				$temp = fgets($fichier_index,4096);
Line 130... Line 128...
130
                list($num, $hash, $sujet) = $matches;
128
				list($num, $hash, $sujet) = split (':', $temp) ;
Line 131... Line 129...
131
 
129
				
132
				if ($num == $numero_message) {
130
				if ($num == $numero_message) {
Line 223... Line 221...
223
			      'fichier_precedent' => $fichier_precedent,
221
			      'fichier_precedent' => $fichier_precedent,
224
			      'repertoire_precedent' => $repertoire_precedent);
222
			      'repertoire_precedent' => $repertoire_precedent);
225
	}
223
	}
Line 226... Line 224...
226
	
224
	
227
    /**
225
    /**
228
    *   analyse l'entete d'un mail pour en extraire les entête
226
    *   analyse l'entete d'un mail pour en extraire les ent�tes
229
    *   to, from, subject, date
227
    *   to, from, subject, date
230
    *   met à jour la variable $this->msgtmpl
228
    *   met � jour la variable $this->msgtmpl
231
    *
229
    *
Line 232... Line 230...
232
    */
230
    */
233
    
231
    
Line 311... Line 309...
311
                        for ($j= 0; $j < count ($profondeur); $j++) $lien .= '&actionargs[]='.$profondeur[$j];
309
                        for ($j= 0; $j < count ($profondeur); $j++) $lien .= '&actionargs[]='.$profondeur[$j];
312
                    } 
310
                    } 
313
                    $lien .= '&actionargs[]='.$i ;
311
                    $lien .= '&actionargs[]='.$i ;
314
                    $corps .= '<a href="'.$lien.'">';
312
                    $corps .= '<a href="'.$lien.'">';
Line -... Line 313...
-
 
313
					
-
 
314
					$tableau_type_image = array ('jpg', 'jpeg', 'pjpeg');
-
 
315
                    
-
 
316
                    if (in_array ($mailDecode->parts[$i]->ctype_secondary, $tableau_type_image)) {
-
 
317
                    	$corps .= '<img src="'.$lien.'&amp;min=1" alt="'.$nom_piece_jointe.'" />&nbsp;' ;
-
 
318
                    	$texte_lien = '';
315
					
319
                    } else {
316
                    $corps .= '<img src="'.$mimeType->getCheminIcone().'" alt="'.$nom_piece_jointe.'" />&nbsp;' ;
320
                    	$corps .= '<img src="'.$mimeType->getCheminIcone().'" alt="'.$nom_piece_jointe.'" />&nbsp;' ;
317
                    if ($mailDecode->parts[$i]->ctype_secondary == 'jpg' || $mailDecode->parts[$i]->ctype_secondary == 'jpeg') 
321
                    	$texte_lien = $nom_piece_jointe;
318
                    	$corps .= '<img src="'.$lien.'" alt="'.$nom_piece_jointe.'" />&nbsp;' ;
322
                    }
319
                    $corps .= $nom_piece_jointe;
323
                    $corps .= $texte_lien;
320
                    $corps .= '</a><br />' ;
324
                    $corps .= '</a><br />' ;
321
                    break ;
325
                    break ;
322
                }
326
                }
323
            }
327
            }