Subversion Repositories Applications.projet

Rev

Rev 395 | Rev 423 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 395 Rev 405
Line 1... Line 1...
1
<?php
1
<?php
2
// $Id: ezmlm.php,v 1.9 2008-11-19 09:28:46 aperonnet Exp $
2
// $Id: ezmlm.php,v 1.3.2.2 2007/03/13 11:04:46 alexandre_tb Exp $
3
//
3
//
4
// ezmlm.php - ezmlm-php v2.0
4
// ezmlm.php - ezmlm-php v2.0
5
// --------------------------------------------------------------
5
// --------------------------------------------------------------
6
// As the site that ezmlm-php was developed for grew, and grew
6
// As the site that ezmlm-php was developed for grew, and grew
7
// the old system used had to be bandaid fixed more, and more
7
// the old system used had to be bandaid fixed more, and more
Line 28... Line 28...
28
require_once("ezmlm-listinfo.php");
28
require_once("ezmlm-listinfo.php");
29
require_once("ezmlm-msgdisplay.php");
29
require_once("ezmlm-msgdisplay.php");
30
require_once("ezmlm-repondre.php");
30
require_once("ezmlm-repondre.php");
31
require_once("ezmlm-author.php");
31
require_once("ezmlm-author.php");
Line 32... Line 32...
32
 
32
 
Line 33... Line 33...
33
$GLOBALS['mois'] = array ('Jan', 'Fév', 'Mars', 'Avril', 'Mai', 'Juin', 'Juil', 'Août', 'Sept', 'Oct', 'Nov', 'Dèc') ;
33
$GLOBALS['mois'] = array ('Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre') ;
34
 
34
 
35
// CLASS: ezmlm_php
35
// CLASS: ezmlm_php
36
// the base class, contains common functions and the config
36
// the base class, contains common functions and the config
Line 116... Line 116...
116
		    (!is_dir($this->listdir . "/archive/subjects"))) {
116
		    (!is_dir($this->listdir . "/archive/subjects"))) {
117
            return false ;
117
            return false ;
118
			/*$this->error(EZMLM_INVALID_DIR,TRUE);*/
118
			/*$this->error(EZMLM_INVALID_DIR,TRUE);*/
119
		}
119
		}
120
	}
120
	}
-
 
121
	/*
-
 
122
	 * Renvoi le nombre de message dans une archive
-
 
123
	 * Le nombre contenu dans liste/num 
-
 
124
	 */
-
 
125
	function getNumArchive() {
-
 
126
		if ($this->listdir != '') {
-
 
127
			$num = split(':', file_get_contents($this->listdir.'/num'));
-
 
128
			return $num[0];
-
 
129
		}
-
 
130
	}
Line 121... Line 131...
121
 
131
 
122
	function set_action($action) {
132
	function set_action($action) {
123
		if (is_array($action)) { $this->error(EZMLM_INVALID_SYNTAX,TRUE); }
133
		if (is_array($action)) { $this->error(EZMLM_INVALID_SYNTAX,TRUE); }
124
		$this->action = $action;
134
		$this->action = $action;
Line 231... Line 241...
231
 
241
 
232
		if ($short) {
242
		if ($short) {
233
			$outstr = preg_replace("/&lt;.*&gt;/", '', $outstr);
243
			$outstr = preg_replace("/&lt;.*&gt;/", '', $outstr);
234
			$outstr = preg_replace("/[\"']/", '', $outstr);
244
			$outstr = preg_replace("/[\"']/", '', $outstr);
235
		}
245
		}
236
		
246
 
237
		$at_split = explode('@',$outstr);
247
		$at_split = explode('@',$outstr);
Line 238... Line 248...
238
		$outstr = $at_split[0];
248
		$outstr = $at_split[0];
239
 
249
 
Line 261... Line 271...
261
		print "</table>\n\n";
271
		print "</table>\n\n";
Line 262... Line 272...
262
 
272
 
263
		if ($critical) { die; }
273
		if ($critical) { die; }
264
	}
274
	}
265
    /**
275
    /**
266
     *  Parse une chaime et supprime les problème d'encodage de type ISO-4 ...
276
     *  Parse une chaine et supprime les probleme d'encodage de type ISO-4 ...
267
     *
277
     *
268
     * @return string
278
     * @return string
Line 269... Line 279...
269
     */
279
     */
Line 299... Line 309...
299
     *
309
     *
300
     * @return
310
     * @return
301
     */
311
     */
Line 302... Line 312...
302
    
312
    
303
    function date_francaise ($date_mail) {
313
    function date_francaise ($date_mail) {
304
        $date_mail = preg_replace ('/\(?CEST\)?/', '', $date_mail) ;
314
        $date_mail = preg_replace ('/CEST/', '', $date_mail) ;
305
        $numero_mois = date('m ', strtotime($date_mail)) - 1 ;
315
        $numero_mois = date('m ', strtotime($date_mail)) - 1 ;
306
        $date = date ('d ', strtotime($date_mail)).$GLOBALS['mois'][$numero_mois] ; // Le jour et le mois
316
        $date = date ('d ', strtotime($date_mail)).$GLOBALS['mois'][$numero_mois] ; // Le jour et le mois
307
        $date .= date(' Y ', strtotime($date_mail)) ; // l'année
317
        $date .= date(' Y ', strtotime($date_mail)) ; // l'annee
308
        if (date('a', strtotime($date_mail)) == 'pm') {
318
        if (date('a', strtotime($date_mail)) == 'pm') {
309
            $date .= (int) date('g', strtotime($date_mail)) + 12 ;  // Les heures
319
            $date .= (int) date('g', strtotime($date_mail)) + 12 ;  // Les heures
310
        } else {
320
        } else {
311
            $date .= date('g', strtotime($date_mail)) ;
321
            $date .= date('g', strtotime($date_mail)) ;