Subversion Repositories Applications.projet

Rev

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

Rev 254 Rev 313
Line 1... Line 1...
1
<?php
1
<?php
2
// $Id: ezmlm.php,v 1.6 2007-10-01 15:54:54 alexandre_tb Exp $
2
// $Id: ezmlm.php,v 1.7 2008-08-25 15:23:34 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 252... Line 262...
252
		print "</table>\n\n";
262
		print "</table>\n\n";
Line 253... Line 263...
253
 
263
 
254
		if ($critical) { die; }
264
		if ($critical) { die; }
255
	}
265
	}
256
    /**
266
    /**
257
     *  Parse une chaime et supprime les problème d'encodage de type ISO-4 ...
267
     *  Parse une chaine et supprime les probleme d'encodage de type ISO-4 ...
258
     *
268
     *
259
     * @return string
269
     * @return string
Line 260... Line 270...
260
     */
270
     */
Line 290... Line 300...
290
     *
300
     *
291
     * @return
301
     * @return
292
     */
302
     */
Line 293... Line 303...
293
    
303
    
294
    function date_francaise ($date_mail) {
304
    function date_francaise ($date_mail) {
295
        $date_mail = preg_replace ('/\(?CEST\)?/', '', $date_mail) ;
305
        $date_mail = preg_replace ('/CEST/', '', $date_mail) ;
296
        $numero_mois = date('m ', strtotime($date_mail)) - 1 ;
306
        $numero_mois = date('m ', strtotime($date_mail)) - 1 ;
297
        $date = date ('d ', strtotime($date_mail)).$GLOBALS['mois'][$numero_mois] ; // Le jour et le mois
307
        $date = date ('d ', strtotime($date_mail)).$GLOBALS['mois'][$numero_mois] ; // Le jour et le mois
298
        $date .= date(' Y ', strtotime($date_mail)) ; // l'année
308
        $date .= date(' Y ', strtotime($date_mail)) ; // l'annee
299
        if (date('a', strtotime($date_mail)) == 'pm') {
309
        if (date('a', strtotime($date_mail)) == 'pm') {
300
            $date .= (int) date('g', strtotime($date_mail)) + 12 ;  // Les heures
310
            $date .= (int) date('g', strtotime($date_mail)) + 12 ;  // Les heures
301
        } else {
311
        } else {
302
            $date .= date('g', strtotime($date_mail)) ;
312
            $date .= date('g', strtotime($date_mail)) ;