Subversion Repositories Applications.projet

Rev

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

Rev 417 Rev 431
Line 1... Line 1...
1
<?php
1
<?php
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
3
// +------------------------------------------------------------------------------------------------------+
3
// +------------------------------------------------------------------------------------------------------+
4
// | PHP version 4.1                                                                                      |
4
// | PHP version 4.1                                                                                      |
5
// +------------------------------------------------------------------------------------------------------+
5
// +------------------------------------------------------------------------------------------------------+
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
7
// +------------------------------------------------------------------------------------------------------+
7
// +------------------------------------------------------------------------------------------------------+
8
// | This library is free software; you can redistribute it and/or                                        |
8
// | This library is free software; you can redistribute it and/or                                        |
9
// | modify it under the terms of the GNU General Public                                                  |
9
// | modify it under the terms of the GNU General Public                                                  |
10
// | License as published by the Free Software Foundation; either                                         |
10
// | License as published by the Free Software Foundation; either                                         |
11
// | version 2.1 of the License, or (at your option) any later version.                                   |
11
// | version 2.1 of the License, or (at your option) any later version.                                   |
12
// |                                                                                                      |
12
// |                                                                                                      |
13
// | This library is distributed in the hope that it will be useful,                                      |
13
// | This library is distributed in the hope that it will be useful,                                      |
14
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
14
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
15
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                                    |
15
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                                    |
16
// | General Public License for more details.                                                             |
16
// | General Public License for more details.                                                             |
17
// |                                                                                                      |
17
// |                                                                                                      |
18
// | You should have received a copy of the GNU General Public                                            |
18
// | You should have received a copy of the GNU General Public                                            |
19
// | License along with this library; if not, write to the Free Software                                  |
19
// | License along with this library; if not, write to the Free Software                                  |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
21
// +------------------------------------------------------------------------------------------------------+
22
// CVS : $Id $
22
// CVS : $Id $
23
/**
23
/**
24
* Application projet
24
* Application projet
25
*
25
*
26
* Action forums
26
* Action forums
27
*
27
*
28
*@package projet
28
*@package projet
29
//Auteur original :
29
//Auteur original :
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
31
//Autres auteurs :
31
//Autres auteurs :
32
*@author        Aucun
32
*@author        Aucun
33
*@copyright     Tela-Botanica 2000-2008
33
*@copyright     Tela-Botanica 2000-2008
34
*@version       $Revision: 1.6 $
34
*@version       $Revision: 1.5 $
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
*/
36
*/
37
include_once 'ezmlm-php-2.0/ezmlm.php' ;
37
include_once 'ezmlm-php-2.0/ezmlm.php' ;
38
 
38
 
39
error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_STRICT);
-
 
40
date_default_timezone_set("Europe/Paris");
-
 
41
// extract($_GET); // PHP-5.4, sans register_globals
-
 
42
 
39
 
43
// Parametrage de la liste
40
// Parametrage de la liste
44
$info = new ezmlm_listinfo();
41
$info = new ezmlm_listinfo();
45
if (!$info) return 'Les fichiers de la liste ne sont pas visible sur le serveur' ;
42
if (!$info) return 'Les fichiers de la liste ne sont pas visible sur le serveur' ;
46
$info->forcehref = $url;
43
$info->forcehref = $url;
47
$info->listdir = '/home/vpopmail/domains/'.$domaine.'/'.$liste ;
44
$info->listdir = '/home/vpopmail/domains/'.$domaine.'/'.$liste ;
48
$info->listname = $liste;
45
$info->listname = $liste;
49
$info->listdomain = $domaine ;
46
$info->listdomain = $domaine ;
50
 
47
 
51
include_once 'XML/Util.php' ;
48
include_once 'XML/Util.php' ;
52
 
49
 
53
$xml = XML_Util::getXMLDeclaration('1.0', 'ISO-8859-15', 'no') ;
50
$xml = XML_Util::getXMLDeclaration('1.0', 'ISO-8859-15', 'no') ;
54
 
51
 
55
if (!file_exists($info->listdir.'/num')) {
52
if (!file_exists($info->listdir.'/num')) {
56
	$xml .= XML_Util::createStartElement ('ezmlm_derniers_messages', array('domaine' => $domaine, 'liste' => $liste, 'langue' => $langue)) ;
53
	$xml .= XML_Util::createStartElement ('ezmlm_derniers_messages', array('domaine' => $domaine, 'liste' => $liste, 'langue' => $langue)) ;
57
	$xml .= '<![CDATA[il n\'y a pas de messages dans cette liste pour le moment.]]>';
54
	$xml .= '<![CDATA[il n\'y a pas de messages dans cette liste pour le moment.]]>';
58
	$xml .= XML_Util::createEndElement('ezmlm_derniers_messages') ;
55
	$xml .= XML_Util::createEndElement('ezmlm_derniers_messages') ;
59
	header ('Content-type: text/xml');
56
	header ('Content-type: text/xml');
60
	echo $xml;
57
	echo $xml;
61
	exit();
58
	exit();
62
}
59
}
63
 
60
 
64
$html = $info->show_recentmsgs() ;
61
$html = $info->show_recentmsgs() ;
65
 
62
 
66
if (!$html) {
63
if (!$html) {
67
    if (!$info) {
64
    if (!$info) {
68
    	echo 'Les fichiers de la liste ne sont pas visibles sur le serveur' ;
65
    	echo 'Les fichiers de la liste ne sont pas visibles sur le serveur' ;
69
    	exit();
66
    	exit();
70
    }
67
    }
71
}
68
}
72
 
69
 
73
$xml .= XML_Util::createStartElement ('ezmlm_derniers_messages', array('domaine' => $domaine, 'liste' => $liste, 'langue' => $langue)) ;
70
$xml .= XML_Util::createStartElement ('ezmlm_derniers_messages', array('domaine' => $domaine, 'liste' => $liste, 'langue' => $langue)) ;
74
 
71
 
75
$xml .= '<![CDATA[ '.$html.']]>';
72
$xml .= '<![CDATA[ '.$html.']]>';
76
 
73
 
77
$xml .= XML_Util::createEndElement('ezmlm_derniers_messages') ;
74
$xml .= XML_Util::createEndElement('ezmlm_derniers_messages') ;
78
header ('Content-type: text/xml');
75
header ('Content-type: text/xml');
79
echo $xml ;
76
echo $xml ;
80
 
77
 
81
/* +--Fin du code ----------------------------------------------------------------------------------------+
78
/* +--Fin du code ----------------------------------------------------------------------------------------+
82
*
79
*
83
* $Log: not supported by cvs2svn $
80
* $Log: derniers_messages.php,v $
84
* Revision 1.5  2008-11-04 17:11:10  aperonnet
81
* Revision 1.5  2008-11-04 17:11:10  aperonnet
85
* correction de bugs dans la liste des derniers messages
82
* correction de bugs dans la liste des derniers messages
86
*
83
*
87
* Revision 1.4  2008-08-25 15:25:09  alexandre_tb
84
* Revision 1.4  2008-08-25 15:25:09  alexandre_tb
88
* optimisation et gestion des erreurs
85
* optimisation et gestion des erreurs
89
*
86
*
90
*
87
*
91
* +-- Fin du code ----------------------------------------------------------------------------------------+
88
* +-- Fin du code ----------------------------------------------------------------------------------------+
92
*/
89
*/
93
?>
90
?>