Subversion Repositories Applications.projet

Rev

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

Rev 166 Rev 175
Line 1... Line 1...
1
<?php
1
<?php
2
// $Id: ezmlm-author.php,v 1.2.4.1 2007-02-16 11:04:14 alexandre_tb Exp $
2
// $Id: ezmlm-author.php,v 1.2.4.2 2007-03-12 11:24:25 alexandre_tb Exp $
3
//
3
//
4
// ezmlm-author.php - ezmlm-php v2.0
4
// ezmlm-author.php - ezmlm-php v2.0
5
// --------------------------------------------------------------
5
// --------------------------------------------------------------
6
// Displays all messages by a given author
6
// Displays all messages by a given author
7
// --------------------------------------------------------------
7
// --------------------------------------------------------------
Line 27... Line 27...
27
                print '<h3>'.$author.'</h3>' ;
27
                print '<h3>'.$author.'</h3>' ;
28
				print '<table class="table_cadre">'."\n";
28
				print '<table class="table_cadre">'."\n";
29
                print '<tr><th class="col1">De</th><th>Sujet</th><th>Date</th></tr>'."\n";
29
                print '<tr><th class="col1">De</th><th>Sujet</th><th>Date</th></tr>'."\n";
30
				$tableopened = TRUE;
30
				$tableopened = TRUE;
31
			} else if (preg_match('/^[0-9]*:[0-9]/',$buf)) {
31
			} else if (preg_match('/^[0-9]*:[0-9]/',$buf)) {
32
				// this is a valid message line
32
				// si la ligne est valide
33
				// all we need is the first item
-
 
34
                // on récupère le numéro du message pour en extraire le nom du fichier
33
                // on récupère le numéro du message pour en extraire le nom du fichier
35
				$msgfile = preg_replace('/^([0-9]*):.*/', '\1', $buf);
34
				$msgfile = preg_replace('/^([0-9]*):.*/', '\1', $buf);
36
				$msgdir  = (int)((int)$msgfile / 100);
35
				$msgdir  = (int)((int)$msgfile / 100);
37
				$msgfile = (int)$msgfile % 100;
36
				$msgfile = (int)$msgfile % 100;
Line 54... Line 53...
54
                
53
                
55
				$subject = $mailDecode->headers['subject'];	
54
				$subject = $mailDecode->headers['subject'];	
56
				$subject = preg_replace("/\[" . $this->listname . "\]/", "", $subject);
55
				$subject = preg_replace("/\[" . $this->listname . "\]/", "", $subject);
57
                $date = preg_replace ('/CEST/', '', $mailDecode->headers['date']);	
56
                $date = preg_replace ('/CEST/', '', $mailDecode->headers['date']);	
58
				print '<tr class="'.$class[$i].'">'."\n";
-
 
-
 
57
				print '<tr class="'.$class[$i].'">'."\n";
59
                
58
                if ($mailDecode->headers['from'] == '') $from = $mailDecode->headers['return-path'] ; else $from = $mailDecode->headers['from'];
60
                $hash = $this->makehash($mailDecode->headers['from']);
59
                $hash = $this->makehash($from);
61
                print '<td>'.$this->makelink("action=show_author_msgs&actionargs[]=" . $hash,$this->decode_iso($this->protect_email($mailDecode->headers['from'],TRUE)));
60
                print '<td>'.$this->makelink("action=show_author_msgs&actionargs[]=" . $hash,$this->decode_iso($this->protect_email($from,false)));
62
                print '</td>';
-
 
63
                
61
                print '</td>';
64
                print "<td><b>" . $this->makelink("action=show_msg&actionargs[]=" . $msgdir . "&actionargs[]=" . $msgfile, $this->decode_iso($subject)) . "</b></td>";
-
 
65
                /*
-
 
66
                print "<td>[" . $this->makelink("action=show_threads&actionargs[]=" . 
-
 
67
                                date("Ym", strtotime($date)) . "#" . urlencode("/archive/" . $msgdir . "/" . $msgfile), PROJET_FILE_DE_DISCUSSION) . "]</td>\n";
-
 
68
                */
62
                print "<td><b>" . $this->makelink("action=show_msg&actionargs[]=" . $msgdir . "&actionargs[]=" . $msgfile, $this->decode_iso($subject)) . "</b></td>";
69
				print "<td>" . $this->date_francaise($mailDecode->headers['date']) . "</td>\n";
63
				print "<td>" . $this->date_francaise($mailDecode->headers['date']) . "</td>\n";
70
				print "</tr>\n";
64
				print "</tr>\n";
71
                $i++;
65
                $i++;
72
                if ($i == 2) $i = 0 ;
66
                if ($i == 2) $i = 0 ;