New file |
0,0 → 1,65 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU General Public | |
// | License along with this library; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: est_abonne.php,v 1.1 2008-10-27 16:45:25 aperonnet Exp $ |
/** |
* Application projet |
* |
* Renvoie une balise xml contenant 1 si l'utilisateur est abonné à une liste de discussion donnée, 0 sinon |
* |
*@package projet |
//Auteur original : |
*@author Aurelien Peronnet <aurelien@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.1 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
include_once 'XML/Util.php' ; |
|
$xml = XML_Util::getXMLDeclaration('1.0', 'ISO-8859-15', 'no') ; |
|
// Les 2 parametres doivent etres present |
|
if (!isset($_GET['domaine']) || !isset($_GET['liste'])) { |
$xml .= XML_Util::createTag('erreur', 'Vous devez spécifier un domaine et une liste'); |
} else { |
$repertoire = '/home/vpopmail/domains/'.$domaine.'/'.$liste ; |
exec ('ezmlm-list '.$repertoire, $output, $ret) ; |
$xml .= XML_Util::createStartElement ('ezmlm_est_abonne') ; |
|
if(in_array($mail,$output) >= 1) { |
$xml .= '1' ; |
} |
else { |
$xml .= '0' ; |
} |
$xml .= XML_Util::createEndElement('ezmlm_est_abonne') ; |
header ('Content-type: text/xml'); |
echo $xml ; |
} |
|
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
|
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |