Subversion Repositories Applications.projet

Rev

Rev 315 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 315 Rev 359
1
<?php
1
<?php
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
-
 
3
// +------------------------------------------------------------------------------------------------------+
-
 
4
// | PHP version 4.1                                                                                      |
-
 
5
// +------------------------------------------------------------------------------------------------------+
-
 
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
-
 
7
// +------------------------------------------------------------------------------------------------------+
-
 
8
// | This library is free software; you can redistribute it and/or                                        |
-
 
9
// | modify it under the terms of the GNU General Public                                                  |
-
 
10
// | License as published by the Free Software Foundation; either                                         |
-
 
11
// | version 2.1 of the License, or (at your option) any later version.                                   |
-
 
12
// |                                                                                                      |
-
 
13
// | This library is distributed in the hope that it will be useful,                                      |
-
 
14
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
-
 
15
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                                    |
-
 
16
// | General Public License for more details.                                                             |
-
 
17
// |                                                                                                      |
-
 
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                                  |
-
 
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
-
 
21
// +------------------------------------------------------------------------------------------------------+
-
 
22
// CVS : $Id $
-
 
23
/**
-
 
24
* Application projet
-
 
25
*
2
 
26
* Action forums
-
 
27
*
-
 
28
*@package projet
-
 
29
//Auteur original :
-
 
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
-
 
31
//Autres auteurs :
-
 
32
*@author        Aucun
-
 
33
*@copyright     Tela-Botanica 2000-2008
-
 
34
*@version       $Revision: 1.4 $
-
 
35
// +------------------------------------------------------------------------------------------------------+
-
 
36
*/
-
 
37
include_once 'ezmlm-php-2.0/ezmlm.php' ;
3
include_once 'ezmlm-php-2.0/ezmlm.php' ;
38
 
4
 
39
 
5
 
40
// Parametrage de la liste
6
// Parametrage de la liste
41
$message = new ezmlm_msgdisplay();
7
$message = new ezmlm_msgdisplay();
42
if (!$message) return 'Les fichiers de la liste ne sont pas visible sur le serveur' ;
8
if (!$message) return 'Les fichiers de la liste ne sont pas visible sur le serveur' ;
43
$message->forcehref = $url;
9
$message->forcehref = $url;
44
$message->listdir = '/home/vpopmail/domains/'.$domaine.'/'.$liste ;
10
$message->listdir = '/home/vpopmail/domains/'.$domaine.'/'.$liste ;
45
$message->listname = $liste;
11
$message->listname = $liste;
46
$message->listdomain = $domaine ;
12
$message->listdomain = $domaine ;
47
$id_rep = $actionargs[0] ;
13
$id_rep = $actionargs[0] ;
48
$num_message = $actionargs[1] ;
14
$num_message = $actionargs[1] ;
49
if ($id_rep =='' || $num_message == '') exit();
15
if ($id_rep =='' || $num_message == '') exit();
50
 
16
 
51
 
17
 
52
$html = $message->display ($id_rep.'/'.$num_message) ;
18
$html = $message->display ($id_rep.'/'.$num_message) ;
53
 
-
 
54
$num = split (':', file_get_contents($message->listdir.'/num'));
-
 
55
$numero_dernier_message = $num[0];
-
 
56
 
19
 
57
include_once 'XML/Util.php' ;
20
include_once 'XML/Util.php' ;
58
 
21
 
59
$xml = XML_Util::getXMLDeclaration('1.0', 'ISO-8859-15', 'no') ;
22
$xml = XML_Util::getXMLDeclaration('1.0', 'ISO-8859-15', 'no') ;
60
 
23
 
61
if (!$html) {
24
if (!$html) {
62
	$xml .= XML_Util::createStartElement ('erreur') ;
25
	$xml .= XML_Util::createStartElement ('ezmlm_erreur') ;
63
	$xml .= 'Le message n\'existe pas';
26
	$xml .= 'Le message n\'existe pas';
64
	$xml .= XML_Util::createEndElement('erreur') ;
27
	$xml .= XML_Util::createEndElement('ezmlm_erreur') ;
65
	header ('Content-type: text/xml');
28
	header ('Content-type: text/xml');
66
	echo $xml;
29
	echo $xml;
67
	exit();
30
	exit();
68
}
31
}
69
 
32
 
70
 
33
 
71
 
34
 
72
$xml .= XML_Util::createStartElement ('ezmlm_message', array('domaine' => $domaine, 'liste' => $liste, 'langue' => $langue)) ;
35
$xml .= XML_Util::createStartElement ('ezmlm_message', array('domaine' => $domaine, 'liste' => $liste, 'langue' => $langue)) ;
73
 
36
 
74
$xml .= "\n".'<![CDATA[ '.$html.']]>';
37
$xml .= "\n".'<![CDATA[ '.$html.']]>';
75
$xml .= XML_Util::createStartElement ('numero', array ('total_message' => $numero_dernier_message));
-
 
76
$xml .= ($id_rep == 0 ? '': $id_rep).$num_message;
-
 
77
$xml .= XML_Util::createEndElement('numero');
-
 
78
 
-
 
79
$info_suivant = $message->getInfoSuivant() ;
38
$info_suivant = $message->getInfoSuivant() ;
80
$xml .= XML_Util::createStartElement ('message_suivant', array ('numero' => $info_suivant['fichier_suivant'],
39
$xml .= XML_Util::createStartElement ('message_suivant', array ('numero' => $info_suivant['fichier_suivant'],
81
	                                                        'numero_repertoire' => $info_suivant['repertoire_suivant'])) ;
40
	                                                        'numero_repertoire' => $info_suivant['repertoire_suivant'])) ;
82
$xml .= XML_Util::createEndElement('message_suivant') ;
41
$xml .= XML_Util::createEndElement('message_suivant') ;
83
 
42
 
84
$xml .= XML_Util::createStartElement ('message_precedent', array ('numero' => $info_suivant['fichier_precedent'],
43
$xml .= XML_Util::createStartElement ('message_precedent', array ('numero' => $info_suivant['fichier_precedent'],
85
	                                                        'numero_repertoire' => $info_suivant['repertoire_precedent'])) ;
44
	                                                        'numero_repertoire' => $info_suivant['repertoire_precedent'])) ;
86
$xml .= XML_Util::createEndElement('message_precedent') ;
45
$xml .= XML_Util::createEndElement('message_precedent') ;
87
	
46
	
88
$xml .= XML_Util::createEndElement('ezmlm_message') ;
47
$xml .= XML_Util::createEndElement('ezmlm_message') ;
89
header ('Content-type: text/xml');
48
header ('Content-type: text/xml');
90
echo $xml ;
49
echo $xml ;
91
 
-
 
92
/* +--Fin du code ----------------------------------------------------------------------------------------+
-
 
93
*
-
 
94
* $Log: not supported by cvs2svn $
-
 
95
*
-
 
96
* +-- Fin du code ----------------------------------------------------------------------------------------+
-
 
97
*/
-
 
98
?>
50
?>