208 |
neiluj |
1 |
<?php
|
249 |
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: liste_abonnes.php,v 1.3 2007-06-25 12:15:06 alexandre_tb Exp $
|
|
|
23 |
/**
|
|
|
24 |
* Application projet
|
|
|
25 |
*
|
|
|
26 |
* Le service liste abonne
|
|
|
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-2004
|
|
|
34 |
*@version $Revision: 1.3 $
|
|
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
36 |
*/
|
208 |
neiluj |
37 |
|
249 |
alexandre_ |
38 |
/* Le service attend 2 parametres
|
|
|
39 |
* domaine string le nom de domaine de la liste
|
|
|
40 |
* liste string le nom de la liste
|
|
|
41 |
* renvoie string une chaine xml avec la liste des mails des inscrits
|
|
|
42 |
*
|
|
|
43 |
* <ezmlm_liste_abonnes domaine="dom" liste="list">
|
|
|
44 |
* <email>toto@tsdd...</email>
|
|
|
45 |
* <email>qsdf@fdsq ..</email>
|
|
|
46 |
* ...
|
|
|
47 |
* </ezmlm_liste_abonnes>
|
|
|
48 |
*/
|
208 |
neiluj |
49 |
|
249 |
alexandre_ |
50 |
|
208 |
neiluj |
51 |
include_once 'XML/Util.php' ;
|
|
|
52 |
|
|
|
53 |
$xml = XML_Util::getXMLDeclaration('1.0', 'ISO-8859-15', 'no') ;
|
|
|
54 |
|
249 |
alexandre_ |
55 |
// Les 2 parametres doivent etres present
|
208 |
neiluj |
56 |
|
249 |
alexandre_ |
57 |
if (!isset($_GET['domaine']) || !isset($_GET['liste'])) {
|
|
|
58 |
$xml .= XML_Util::createTag('erreur', 'Vous devez spécifier un domaine et une liste');
|
|
|
59 |
} else {
|
|
|
60 |
$repertoire = '/home/vpopmail/domains/'.$domaine.'/'.$liste ;
|
|
|
61 |
exec ('ezmlm-list '.$repertoire, $output, $ret) ;
|
|
|
62 |
$xml .= XML_Util::createStartElement ('ezmlm_liste_abonnes', array('domaine' => $domaine, 'liste' => $liste)) ;
|
|
|
63 |
foreach ($output as $mail) $xml .= XML_Util::createTag('email', '', $mail) ;
|
|
|
64 |
$xml .= XML_Util::createEndElement('ezmlm_liste_abonnes') ;
|
|
|
65 |
}
|
208 |
neiluj |
66 |
|
|
|
67 |
header ('Content-type: text/xml');
|
|
|
68 |
echo $xml ;
|
249 |
alexandre_ |
69 |
|
|
|
70 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
|
|
71 |
* $Log: not supported by cvs2svn $
|
|
|
72 |
* Revision 1.2.2.1 2007-05-11 09:45:35 alexandre_tb
|
|
|
73 |
* ajout de commentaire et de la gestion des erreurs
|
|
|
74 |
*
|
|
|
75 |
* +-- Fin du code ----------------------------------------------------------------------------------------+
|
|
|
76 |
*/
|
|
|
77 |
|
|
|
78 |
?>
|