Subversion Repositories Applications.papyrus

Rev

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

Rev 1688 Rev 1965
Line 1... Line 1...
1
<?php
1
<?php
2
// $Id: ezmlm-listinfo.php,v 1.3 2007-04-19 15:34:35 neiluj Exp $
2
// $Id: ezmlm-listinfo.php,v 1.3.4.1 2008-11-05 09:45:04 aperonnet Exp $
3
//
3
//
4
// ezmlm-listinfo.php - ezmlm-php v2.0
4
// ezmlm-listinfo.php - ezmlm-php v2.0
5
// --------------------------------------------------------------
5
// --------------------------------------------------------------
6
// Displays general list info in the format of a welcome page.
6
// Displays general list info in the format of a welcome page.
7
// --------------------------------------------------------------
7
// --------------------------------------------------------------
Line 48... Line 48...
48
 
48
 
Line 49... Line 49...
49
	function show_recentmsgs($title = "Messages ràcents") {
49
	function show_recentmsgs($title = "Messages ràcents") {
Line -... Line 50...
-
 
50
        
-
 
51
        if (!is_dir($this->listdir.'/archive/0')) return false;
50
        
52
        
51
        if (!is_dir($this->listdir.'/archive/0')) return false;
53
        
52
        
54
        $html = '' ;
53
		$parser = new ezmlm_parser();
55
		$parser = new ezmlm_parser();
54
        $parser->listdir = $this->listdir ;
56
        $parser->listdir = $this->listdir ;
55
        print '<table class="table_cadre">'."\n";
57
        $html .= '<table class="table_cadre">'."\n";
Line 56... Line 58...
56
        print '<tr><th class="col1">Num</th><th>De</th><th>Sujet</th><th>Date</th></tr>'."\n";
58
        $html .= '<tr><th class="col1">Num</th><th>De</th><th>Sujet</th><th>Date</th></tr>'."\n";
57
        $ctc = 0;
59
        $ctc = 0;
Line 64... Line 66...
64
        // $recent[numero_message][4] auteur
66
        // $recent[numero_message][4] auteur
Line 65... Line 67...
65
        
67
        
Line 66... Line 68...
66
        $class = array ('ligne_paire', 'ligne_impaire') ;
68
        $class = array ('ligne_paire', 'ligne_impaire') ;
67
        
69
        
68
        while (list($key,$val) = each($recent)) {
70
        while (list($key,$val) = each($recent)) {
Line 69... Line 71...
69
            print '<tr class="'.$class[$ctc].'">'."\n";
71
            $html .= '<tr class="'.$class[$ctc].'">'."\n";
70
            //print '<td>'.$val->nummessage.'</td>' ;
72
            //print '<td>'.$val->nummessage.'</td>' ;
71
            
73
            
72
            // $key contient le numero du message tel que dans les fichiers d index par ex 216
74
            // $key contient le numero du message tel que dans les fichiers d index par ex 216
73
            // on retrouve le nom du repertoire et le nom du fichier
75
            // on retrouve le nom du repertoire et le nom du fichier
74
            $decimal = (string) $key;
76
            $decimal = (string) $key;
75
            if ($key >= 100) {
77
            if ($key >= 100) {
76
					$fichier_message = substr($decimal, -2) ;
78
					$fichier_message = substr($decimal, -2) ;
77
					$repertoire_message = substr ($decimal, 0,count ($decimal) -2) ;
79
					$repertoire_message = substr ($decimal, 0, -2) ;
78
				} else {
80
				} else {
79
					if ($key < 10) {
81
					if ($key < 10) {
80
						$fichier_message = '0'.$key;
82
						$fichier_message = '0'.$key;
81
					} else {
83
					} else {
82
						$fichier_message = $decimal;
84
						$fichier_message = $decimal;
Line 83... Line 85...
83
					}
85
					}
84
					$repertoire_message = '0';
86
					$repertoire_message = '0';
Line 85... Line 87...
85
			}
87
			}
Line 86... Line 88...
86
            
88
            
87
            print '<td>'.$key.'</td>' ;
89
            $html .= '<td>'.$key.'</td>' ;
88
            print '<td>';
90
            $html .= '<td>';
89
 
91
 
Line 90... Line 92...
90
            $from = $val[4];
92
            $from = $val[4];
91
 
93
 
Line 92... Line 94...
92
            print $this->makelink("action=show_author_msgs&actionargs[]=".$val[3],$this->decode_iso($this->protect_email($from,false)));
94
            $html .= $this->makelink("action=show_author_msgs&actionargs[]=".$val[3],$this->decode_iso($this->protect_email($from,false)));
Line 93... Line 95...
93
            print "</td>\n";
95
            $html .= "</td>\n";
94
            print '<td><b>';
96
            $html .= '<td><b>';
95
            $actionargs = preg_split("/\//", $val->msgfile);
97
            $actionargs = preg_split("/\//", $val->msgfile);
Line 96... Line 98...
96
            
98
            
97
            print $this->makelink("action=show_msg&actionargs[]=" .  $repertoire_message . 
99
            $html .= $this->makelink("action=show_msg&actionargs[]=".$repertoire_message.
98
                                "&actionargs[]=" .  $fichier_message ,$this->decode_iso($val[1]));
100
                                "&actionargs[]=".$fichier_message ,$this->decode_iso($val[1]));
99
 
101
 
100
            print "</b></td>\n";
102
            $html .= "</b></td>\n";
101
            
103
            
Line 102... Line 104...
102
            //print '<td>'.$this->date_francaise($val[2]).'</td>'."\n";
104
            //print '<td>'.$this->date_francaise($val[2]).'</td>'."\n";
103
            print '<td>'.$val[2].'</td>'."\n";
105
            $html .= '<td>'.$val[2].'</td>'."\n";
Line -... Line 106...
-
 
106
            $html .= "</tr>\n";
-
 
107
 
-
 
108
            $ctc++;
104
            print "</tr>\n";
109
            if ($ctc == 2) { $ctc = 0; }
-
 
110
        }
-
 
111
        $html .= '</table>'."\n";
-
 
112
        return $html;
105
 
113
	}
106
            $ctc++;
114
    
107
            if ($ctc == 2) { $ctc = 0; }
115
    function show_month ($month) {
108
        }
116
        // Le nom du fichier est annéemois ex 200501 pour janvier 2005
109
        print '</table>'."\n";
117
        
Line 135... Line 143...
135
        if ($numero_premier_mail > $numero_dernier_mail) {
143
        if ($numero_premier_mail > $numero_dernier_mail) {
136
        	$temp = $numero_premier_mail;
144
        	$temp = $numero_premier_mail;
137
        	$numero_premier_mail = $numero_dernier_mail ;
145
        	$numero_premier_mail = $numero_dernier_mail ;
138
        	$numero_dernier_mail = $temp;
146
        	$numero_dernier_mail = $temp;
139
        }
147
        }
140
        print '<table class="table_cadre">'."\n";
148
        $html .= '<table class="table_cadre">'."\n";
141
        print '<tr><th class="col1">Num</th><th>De</th><th>Sujet</th><th>Date</th></tr>'."\n";
149
        $html .= '<tr><th class="col1">Num</th><th>De</th><th>Sujet</th><th>Date</th></tr>'."\n";
142
        $ctc = 0;
150
        $ctc = 0;
Line 143... Line 151...
143
        
151
        
Line 144... Line 152...
144
        $class = array ('ligne_paire', 'ligne_impaire') ;
152
        $class = array ('ligne_paire', 'ligne_impaire') ;
Line 156... Line 164...
156
            	if ($i == 99) {
164
            	if ($i == 99) {
157
                	$repertoire_premier_mail++;
165
                	$repertoire_premier_mail++;
158
               	 $i = -1;
166
               	 $i = -1;
159
            	}
167
            	}
Line 160... Line 168...
160
            
168
            
161
           	 	print '<tr class="'.$class[$ctc].'">'."\n";
169
           	 	$html .= '<tr class="'.$class[$ctc].'">'."\n";
162
            	print '<td>'.($repertoire_premier_mail != 0 ? $repertoire_premier_mail : '').$num_message.'</td><td>';
170
            	$html .= '<td>'.($repertoire_premier_mail != 0 ? $repertoire_premier_mail : '').$num_message.'</td><td>';
Line 163... Line 171...
163
            	$hash = $this->makehash($mailDecode->headers['from']);
171
            	$hash = $this->makehash($mailDecode->headers['from']);
164
            
172
            
165
            	print $this->makelink("action=show_author_msgs&actionargs[]=".
173
            	$html .= $this->makelink("action=show_author_msgs&actionargs[]=".
166
            			$hash,$this->decode_iso($this->protect_email($mailDecode->headers['from'],TRUE)));
174
            			$hash,$this->decode_iso($this->protect_email($mailDecode->headers['from'],TRUE)));
167
            	print "</td>\n";
175
            	$html .= "</td>\n";
168
            	print '<td><b>';
176
            	$html .= '<td><b>';
Line 169... Line 177...
169
            	$actionargs[0] = $repertoire_premier_mail ;
177
            	$actionargs[0] = $repertoire_premier_mail ;
170
            	$actionargs[1] = $num_message ;
178
            	$actionargs[1] = $num_message ;
171
            
179
            
172
           	 	if (count ($actionargs) > 1) {
180
           	 	if (count ($actionargs) > 1) {
173
                	print $this->makelink("action=show_msg&actionargs[]=".
181
                	$html .= $this->makelink("action=show_msg&actionargs[]=".
174
                			$actionargs[(count($actionargs) - 2)] . 
182
                			$actionargs[(count($actionargs) - 2)] . 
175
                            "&actionargs[]=".
183
                            "&actionargs[]=".
176
                            $actionargs[(count($actionargs) - 1)] ,$this->decode_iso($mailDecode->headers['subject']));
184
                            $actionargs[(count($actionargs) - 1)] ,$this->decode_iso($mailDecode->headers['subject']));
177
            	}
185
            	}
178
            	print "</b></td>\n";
186
            	$html .= "</b></td>\n";
179
           	 	print '<td>'.$this->date_francaise($mailDecode->headers['date']).'</td>'."\n";
187
           	 	$html .= '<td>'.$this->date_francaise($mailDecode->headers['date']).'</td>'."\n";
180
            	print "</tr>\n";
188
            	$html .= "</tr>\n";
181
            	$ctc++;
189
            	$ctc++;
182
            	if ($ctc == 2) { $ctc = 0; }
190
            	if ($ctc == 2) { $ctc = 0; }
183
			}
191
			}
184
        }
192
        }
185
        print '</table>'."\n";
193
        $html .= '</table>'."\n";