Subversion Repositories Applications.projet

Rev

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

Rev 356 Rev 359
Line 1... Line 1...
1
<?php
1
<?php
2
// $Id: ezmlm.php,v 1.8 2008-11-04 17:11:10 aperonnet Exp $
2
// $Id: ezmlm.php,v 1.9 2008-11-19 09:28:46 aperonnet 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 ('Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre') ;
33
$GLOBALS['mois'] = array ('Jan', 'Fév', 'Mars', 'Avril', 'Mai', 'Juin', 'Juil', 'Août', 'Sept', 'Oct', 'Nov', 'Dèc') ;
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 131... Line 121...
131
 
121
 
132
	function set_action($action) {
122
	function set_action($action) {
133
		if (is_array($action)) { $this->error(EZMLM_INVALID_SYNTAX,TRUE); }
123
		if (is_array($action)) { $this->error(EZMLM_INVALID_SYNTAX,TRUE); }
134
		$this->action = $action;
124
		$this->action = $action;
Line 262... Line 252...
262
		print "</table>\n\n";
252
		print "</table>\n\n";
Line 263... Line 253...
263
 
253
 
264
		if ($critical) { die; }
254
		if ($critical) { die; }
265
	}
255
	}
266
    /**
256
    /**
267
     *  Parse une chaine et supprime les probleme d'encodage de type ISO-4 ...
257
     *  Parse une chaime et supprime les problème d'encodage de type ISO-4 ...
268
     *
258
     *
269
     * @return string
259
     * @return string
Line 270... Line 260...
270
     */
260
     */
Line 300... Line 290...
300
     *
290
     *
301
     * @return
291
     * @return
302
     */
292
     */
Line 303... Line 293...
303
    
293
    
304
    function date_francaise ($date_mail) {
294
    function date_francaise ($date_mail) {
305
        $date_mail = preg_replace ('/CEST/', '', $date_mail) ;
295
        $date_mail = preg_replace ('/\(?CEST\)?/', '', $date_mail) ;
306
        $numero_mois = date('m ', strtotime($date_mail)) - 1 ;
296
        $numero_mois = date('m ', strtotime($date_mail)) - 1 ;
307
        $date = date ('d ', strtotime($date_mail)).$GLOBALS['mois'][$numero_mois] ; // Le jour et le mois
297
        $date = date ('d ', strtotime($date_mail)).$GLOBALS['mois'][$numero_mois] ; // Le jour et le mois
308
        $date .= date(' Y ', strtotime($date_mail)) ; // l'annee
298
        $date .= date(' Y ', strtotime($date_mail)) ; // l'année
309
        if (date('a', strtotime($date_mail)) == 'pm') {
299
        if (date('a', strtotime($date_mail)) == 'pm') {
310
            $date .= (int) date('g', strtotime($date_mail)) + 12 ;  // Les heures
300
            $date .= (int) date('g', strtotime($date_mail)) + 12 ;  // Les heures
311
        } else {
301
        } else {
312
            $date .= date('g', strtotime($date_mail)) ;
302
            $date .= date('g', strtotime($date_mail)) ;