Subversion Repositories Applications.projet

Rev

Rev 350 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
350 aperonnet 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: est_abonne.php,v 1.1 2008-10-27 16:45:25 aperonnet Exp $
23
/**
24
* Application projet
25
*
26
* Renvoie une balise xml contenant 1 si l'utilisateur est abonné à une liste de discussion donnée, 0 sinon
27
*
28
*@package projet
29
//Auteur original :
30
*@author        Aurelien Peronnet <aurelien@tela-botanica.org>
31
*@copyright     Tela-Botanica 2000-2008
32
*@version       $Revision: 1.1 $
33
// +------------------------------------------------------------------------------------------------------+
34
*/
35
include_once 'XML/Util.php' ;
36
 
37
$xml = XML_Util::getXMLDeclaration('1.0', 'ISO-8859-15', 'no') ;
38
 
39
// Les 2 parametres doivent etres present
40
 
41
if (!isset($_GET['domaine']) || !isset($_GET['liste'])) {
42
	$xml .= XML_Util::createTag('erreur', 'Vous devez sp&eacute;cifier un domaine et une liste');
43
} else {
44
	$repertoire = '/home/vpopmail/domains/'.$domaine.'/'.$liste ;
45
	exec ('ezmlm-list '.$repertoire, $output, $ret) ;
46
	$xml .= XML_Util::createStartElement ('ezmlm_est_abonne') ;
47
 
48
	if(in_array($mail,$output) >= 1) {
49
		$xml .= '1' ;
50
	}
51
	else {
52
		$xml .= '0' ;
53
	}
54
	$xml .= XML_Util::createEndElement('ezmlm_est_abonne') ;
55
	header ('Content-type: text/xml');
56
	echo $xml ;
57
}
58
 
59
/* +--Fin du code ----------------------------------------------------------------------------------------+
60
 
61
*
62
*
63
* +-- Fin du code ----------------------------------------------------------------------------------------+
64
*/
65
?>