Subversion Repositories Applications.projet

Rev

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

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