Subversion Repositories Applications.projet

Rev

Rev 356 | Rev 417 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 356 Rev 359
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: messages_thread.php,v 1.4 2008-11-04 17:11:10 aperonnet Exp $
22
// CVS : $Id: messages_thread.php,v 1.5 2008-11-19 09:28:45 aperonnet Exp $
23
/**
23
/**
24
* Application projet
24
* Application projet
25
*
25
*
26
* Renvoie les messages d un thread
26
* Renvoie les messages d un thread
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
*@copyright     Tela-Botanica 2000-2008
31
*@copyright     Tela-Botanica 2000-2008
32
*@version       $Revision: 1.4 $
32
*@version       $Revision: 1.5 $
33
// +------------------------------------------------------------------------------------------------------+
33
// +------------------------------------------------------------------------------------------------------+
34
*/
34
*/
35
include_once 'ezmlm-php-2.0/ezmlm.php' ;
35
include_once 'ezmlm-php-2.0/ezmlm.php' ;
36
 
36
 
37
 
37
 
38
// Parametrage de la liste
38
// Parametrage de la liste
39
$info = new ezmlm_threads();
39
$info = new ezmlm_threads();
40
if (!$info) return 'Les fichiers de la liste ne sont pas visible sur le serveur' ;
40
if (!$info) return 'Les fichiers de la liste ne sont pas visible sur le serveur' ;
41
$info->forcehref = $url;
41
$info->forcehref = $url;
42
$info->listdir = '/home/vpopmail/domains/'.$domaine.'/'.$liste ;
42
$info->listdir = '/home/vpopmail/domains/'.$domaine.'/'.$liste ;
43
$info->listname = $liste;
43
$info->listname = $liste;
44
$info->listdomain = $domaine ;
44
$info->listdomain = $domaine ;
45
$info->tempdir = '/home/vpopmail/www/tmp' ;
45
$info->tempdir = '/home/vpopmail/www/tmp' ;
46
ob_start() ;
-
 
47
if (!$info->load($actionargs[0])) {
46
$html = $info->load($actionargs[0]) ;
-
 
47
if (!$html) {
48
    if (!$info) return 'Les fichiers de la liste ne sont pas visible sur le serveur' ;
48
    if (!$info) return 'Les fichiers de la liste ne sont pas visible sur le serveur' ;
49
}
49
}
50
$html = ob_get_contents() ;
-
 
51
ob_end_clean() ;
-
 
52
 
50
 
53
include_once 'XML/Util.php' ;
51
include_once 'XML/Util.php' ;
54
 
52
 
55
$xml = XML_Util::getXMLDeclaration('1.0', 'ISO-8859-15', 'no') ;
53
$xml = XML_Util::getXMLDeclaration('1.0', 'ISO-8859-15', 'no') ;
56
 
54
 
57
$xml .= XML_Util::createStartElement ('ezmlm_messages_thread', array('domaine' => $domaine, 'liste' => $liste, 'langue' => $langue)) ;
55
$xml .= XML_Util::createStartElement ('ezmlm_messages_thread', array('domaine' => $domaine, 'liste' => $liste, 'langue' => $langue)) ;
58
 
56
 
59
$xml .= '<![CDATA[ '.$html.']]>';
57
$xml .= '<![CDATA[ '.$html.']]>';
60
 
58
 
61
$xml .= XML_Util::createEndElement('ezmlm_messages_thread') ;
59
$xml .= XML_Util::createEndElement('ezmlm_messages_thread') ;
62
header ('Content-type: text/xml');
60
header ('Content-type: text/xml');
63
echo $xml ;
61
echo $xml ;
64
/* +--Fin du code ----------------------------------------------------------------------------------------+
62
/* +--Fin du code ----------------------------------------------------------------------------------------+
65
*
63
*
66
* $Log: not supported by cvs2svn $
64
* $Log: not supported by cvs2svn $
-
 
65
* Revision 1.4  2008-11-04 17:11:10  aperonnet
-
 
66
* correction de bugs dans la liste des derniers messages
-
 
67
*
67
* Revision 1.3  2008-08-26 09:26:41  alexandre_tb
68
* Revision 1.3  2008-08-26 09:26:41  alexandre_tb
68
* ajout commentaire
69
* ajout commentaire
69
*
70
*
70
*
71
*
71
* +-- Fin du code ----------------------------------------------------------------------------------------+
72
* +-- Fin du code ----------------------------------------------------------------------------------------+
72
*/
73
*/
73
?>
74
?>