Subversion Repositories Applications.projet

Rev

Rev 249 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
208 neiluj 1
<?php
315 alexandre_ 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
*
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
*/
208 neiluj 37
include_once 'ezmlm-php-2.0/ezmlm.php' ;
38
 
39
 
40
// Parametrage de la liste
41
$message = new ezmlm_msgdisplay();
42
if (!$message) return 'Les fichiers de la liste ne sont pas visible sur le serveur' ;
43
$message->forcehref = $url;
44
$message->listdir = '/home/vpopmail/domains/'.$domaine.'/'.$liste ;
45
$message->listname = $liste;
46
$message->listdomain = $domaine ;
47
$id_rep = $actionargs[0] ;
48
$num_message = $actionargs[1] ;
49
if ($id_rep =='' || $num_message == '') exit();
50
 
249 alexandre_ 51
 
208 neiluj 52
$html = $message->display ($id_rep.'/'.$num_message) ;
53
 
315 alexandre_ 54
$num = split (':', file_get_contents($message->listdir.'/num'));
55
$numero_dernier_message = $num[0];
56
 
208 neiluj 57
include_once 'XML/Util.php' ;
58
 
59
$xml = XML_Util::getXMLDeclaration('1.0', 'ISO-8859-15', 'no') ;
60
 
249 alexandre_ 61
if (!$html) {
62
	$xml .= XML_Util::createStartElement ('erreur') ;
63
	$xml .= 'Le message n\'existe pas';
64
	$xml .= XML_Util::createEndElement('erreur') ;
65
	header ('Content-type: text/xml');
66
	echo $xml;
67
	exit();
68
}
69
 
70
 
71
 
208 neiluj 72
$xml .= XML_Util::createStartElement ('ezmlm_message', array('domaine' => $domaine, 'liste' => $liste, 'langue' => $langue)) ;
73
 
74
$xml .= "\n".'<![CDATA[ '.$html.']]>';
315 alexandre_ 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
 
208 neiluj 79
$info_suivant = $message->getInfoSuivant() ;
80
$xml .= XML_Util::createStartElement ('message_suivant', array ('numero' => $info_suivant['fichier_suivant'],
81
	                                                        'numero_repertoire' => $info_suivant['repertoire_suivant'])) ;
82
$xml .= XML_Util::createEndElement('message_suivant') ;
83
 
84
$xml .= XML_Util::createStartElement ('message_precedent', array ('numero' => $info_suivant['fichier_precedent'],
85
	                                                        'numero_repertoire' => $info_suivant['repertoire_precedent'])) ;
86
$xml .= XML_Util::createEndElement('message_precedent') ;
87
 
88
$xml .= XML_Util::createEndElement('ezmlm_message') ;
89
header ('Content-type: text/xml');
90
echo $xml ;
315 alexandre_ 91
 
92
/* +--Fin du code ----------------------------------------------------------------------------------------+
93
*
94
* $Log: not supported by cvs2svn $
95
*
96
* +-- Fin du code ----------------------------------------------------------------------------------------+
97
*/
208 neiluj 98
?>