/trunk/classes/ezmlm-php-2.0/ezmlm-author.php |
---|
1,5 → 1,5 |
<?php |
// $Id: ezmlm-author.php,v 1.3 2007-04-19 15:34:35 neiluj Exp $ |
// $Id: ezmlm-author.php,v 1.4 2008-11-19 09:28:46 aperonnet Exp $ |
// |
// ezmlm-author.php - ezmlm-php v2.0 |
// -------------------------------------------------------------- |
/trunk/classes/ezmlm-php-2.0/ezmlm.php |
---|
1,5 → 1,5 |
<?php |
// $Id: ezmlm.php,v 1.8 2008-11-04 17:11:10 aperonnet Exp $ |
// $Id: ezmlm.php,v 1.9 2008-11-19 09:28:46 aperonnet Exp $ |
// |
// ezmlm.php - ezmlm-php v2.0 |
// -------------------------------------------------------------- |
30,7 → 30,7 |
require_once("ezmlm-repondre.php"); |
require_once("ezmlm-author.php"); |
$GLOBALS['mois'] = array ('Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre') ; |
$GLOBALS['mois'] = array ('Jan', 'Fév', 'Mars', 'Avril', 'Mai', 'Juin', 'Juil', 'Août', 'Sept', 'Oct', 'Nov', 'Dèc') ; |
// CLASS: ezmlm_php |
// the base class, contains common functions and the config |
118,16 → 118,6 |
/*$this->error(EZMLM_INVALID_DIR,TRUE);*/ |
} |
} |
/* |
* Renvoi le nombre de message dans une archive |
* Le nombre contenu dans liste/num |
*/ |
function getNumArchive() { |
if ($this->listdir != '') { |
$num = split(':', file_get_contents($this->listdir.'/num')); |
return $num[0]; |
} |
} |
function set_action($action) { |
if (is_array($action)) { $this->error(EZMLM_INVALID_SYNTAX,TRUE); } |
264,7 → 254,7 |
if ($critical) { die; } |
} |
/** |
* Parse une chaine et supprime les probleme d'encodage de type ISO-4 ... |
* Parse une chaime et supprime les problème d'encodage de type ISO-4 ... |
* |
* @return string |
*/ |
302,10 → 292,10 |
*/ |
function date_francaise ($date_mail) { |
$date_mail = preg_replace ('/CEST/', '', $date_mail) ; |
$date_mail = preg_replace ('/\(?CEST\)?/', '', $date_mail) ; |
$numero_mois = date('m ', strtotime($date_mail)) - 1 ; |
$date = date ('d ', strtotime($date_mail)).$GLOBALS['mois'][$numero_mois] ; // Le jour et le mois |
$date .= date(' Y ', strtotime($date_mail)) ; // l'annee |
$date .= date(' Y ', strtotime($date_mail)) ; // l'année |
if (date('a', strtotime($date_mail)) == 'pm') { |
$date .= (int) date('g', strtotime($date_mail)) + 12 ; // Les heures |
} else { |
/trunk/classes/ezmlm-php-2.0/services_vpopmail/suppression_liste.php |
---|
1,37 → 1,5 |
<?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: suppression_liste.php,v 1.3 2008-08-26 09:28:36 alexandre_tb Exp $ |
/** |
* Application projet |
* |
* Supprime un liste |
* |
*@package projet |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.3 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
if (!isset ($domaine) || $domaine == '' || !isset($liste) || $liste == '') { |
die ('manque paramètre domaine ou liste') ; |
} |
48,10 → 16,5 |
echo 'rm '.$fichier_qmail ; |
echo exec ('rm -rf '.$repertoire, $output, $ret) ; |
echo 'rm -rf '.$repertoire ; |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/classes/ezmlm-php-2.0/services_vpopmail/messages_auteur.php |
---|
1,37 → 1,5 |
<?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: messages_auteur.php,v 1.3 2008-08-26 09:25:41 alexandre_tb Exp $ |
/** |
* Application projet |
* |
* Renvoie les messages d un auteur |
* |
*@package projet |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.3 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
include_once 'ezmlm-php-2.0/ezmlm.php' ; |
61,10 → 29,4 |
$xml .= XML_Util::createEndElement('ezmlm_messages_auteur') ; |
header ('Content-type: text/xml'); |
echo $xml ; |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/classes/ezmlm-php-2.0/services_vpopmail/messages_thread.php |
---|
19,7 → 19,7 |
// | 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: messages_thread.php,v 1.4 2008-11-04 17:11:10 aperonnet Exp $ |
// CVS : $Id: messages_thread.php,v 1.5 2008-11-19 09:28:45 aperonnet Exp $ |
/** |
* Application projet |
* |
29,7 → 29,7 |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.4 $ |
*@version $Revision: 1.5 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
include_once 'ezmlm-php-2.0/ezmlm.php' ; |
43,12 → 43,10 |
$info->listname = $liste; |
$info->listdomain = $domaine ; |
$info->tempdir = '/home/vpopmail/www/tmp' ; |
ob_start() ; |
if (!$info->load($actionargs[0])) { |
$html = $info->load($actionargs[0]) ; |
if (!$html) { |
if (!$info) return 'Les fichiers de la liste ne sont pas visible sur le serveur' ; |
} |
$html = ob_get_contents() ; |
ob_end_clean() ; |
include_once 'XML/Util.php' ; |
64,6 → 62,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.4 2008-11-04 17:11:10 aperonnet |
* correction de bugs dans la liste des derniers messages |
* |
* Revision 1.3 2008-08-26 09:26:41 alexandre_tb |
* ajout commentaire |
* |
/trunk/classes/ezmlm-php-2.0/services_vpopmail/calendrier_messages.php |
---|
1,39 → 1,5 |
<?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: calendrier_messages.php,v 1.5 2008-11-04 17:11:10 aperonnet Exp $ |
/** |
* Application projet |
* |
* Action forums |
* |
*@package projet |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.5 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
include_once 'ezmlm-php-2.0/ezmlm.php' ; |
45,83 → 11,22 |
$info->listname = $liste; |
$info->listdomain = $domaine ; |
/** Calcul du cache */ |
/* |
require_once('Cache/Lite.php'); |
ob_start() ; |
if (!$info->listmessages()) { |
if (!$info) return 'Les fichiers de la liste ne sont pas visible sur le serveur' ; |
} |
$html = ob_get_contents() ; |
ob_end_clean() ; |
// Set a id for this cache |
$id = 'cache_'.$domaine.'_'.$liste; |
include_once 'XML/Util.php' ; |
// Set a few options |
$options = array( |
'cacheDir' => 'tmp/', |
'lifeTime' => null |
); |
*/ |
include_once 'XML/Util.php' ; |
$xml = XML_Util::getXMLDeclaration('1.0', 'ISO-8859-15', 'no') ; |
if (!file_exists($info->listdir.'/num')) { |
$xml .= XML_Util::createStartElement ('ezmlm_calendrier_messages', array('domaine' => $domaine, 'liste' => $liste, 'langue' => $langue)) ; |
$xml .= '<![CDATA[il n\'y a pas de messages dans cette liste pour le moment.]]>'; |
$xml .= XML_Util::createEndElement('ezmlm_calendrier_messages') ; |
header ('Content-type: text/xml'); |
echo $xml; |
exit(); |
} |
/* |
// Create a Cache_Lite object |
$Cache_Lite = new Cache_Lite($options); |
$recalcule = false ; |
$Cache_Lite->get($id); |
$xml .= XML_Util::createStartElement ('ezmlm_calendrier_messages', array('domaine' => $domaine, 'liste' => $liste, 'langue' => $langue)) ; |
$xml .= '<![CDATA[ '.$html.']]>'; |
if (@fileatime($info->listdir.'/num') > (int)$Cache_Lite->lastModified()) { |
$recalcule = true; |
} |
// Test if thereis a valide cache for this id |
if (!$recalcule) { |
$xml = $Cache_Lite->get($id); |
} else { // pas de cache, on construit le calendrier |
*/ |
$html = $info->listmessages(); |
if (!$html) { |
$xml .= XML_Util::createStartElement ('ezmlm_erreur', array('domaine' => $domaine, 'liste' => $liste, 'langue' => $langue)) ; |
$xml .= '<![CDATA[Les fichiers de la liste ne sont pas visibles sur le serveur]]>'; |
$xml .= XML_Util::createEndElement('ezmlm_erreur') ; |
} else { |
$xml .= XML_Util::createStartElement ('ezmlm_calendrier_messages', array('domaine' => $domaine, 'liste' => $liste, 'langue' => $langue)) ; |
$xml .= '<![CDATA[ '.$html.']]>'; |
$xml .= XML_Util::createEndElement('ezmlm_calendrier_messages') ; |
/* |
$xml .= XML_Util::createStartElement('cache_time') ; |
$xml .= (int)$Cache_Lite->lastmodified().'#'.fileatime($info->listdir.'/num'); |
$xml .= XML_Util::createEndElement('cache_time') ;*/ |
//$Cache_Lite->save($xml, $id); |
} |
//} |
$xml .= XML_Util::createEndElement('ezmlm_calendrier_messages') ; |
header ('Content-type: text/xml'); |
echo $xml ; |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.4 2008-08-25 15:25:47 alexandre_tb |
* optimisation et gestion du cache |
* |
* Revision 1.3 2008-06-09 10:05:28 alexandre_tb |
* Ajout de la gestion du cache |
* dependance avec Cache_Lite |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
?> |
/trunk/classes/ezmlm-php-2.0/services_vpopmail/derniers_messages.php |
---|
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.5 $ |
*@version $Revision: 1.6 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
include_once 'ezmlm-php-2.0/ezmlm.php' ; |
62,7 → 62,7 |
if (!$html) { |
if (!$info) { |
echo 'Les fichiers de la liste ne sont pas visible sur le serveur' ; |
echo 'Les fichiers de la liste ne sont pas visibles sur le serveur' ; |
exit(); |
} |
} |
78,6 → 78,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.5 2008-11-04 17:11:10 aperonnet |
* correction de bugs dans la liste des derniers messages |
* |
* Revision 1.4 2008-08-25 15:25:09 alexandre_tb |
* optimisation et gestion des erreurs |
* |
/trunk/classes/ezmlm-php-2.0/services_vpopmail/ajout_abonne.php |
---|
1,45 → 1,6 |
<?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: ajout_abonne.php,v 1.3 2008-08-26 08:55:53 alexandre_tb Exp $ |
/** |
* Application projet |
* |
* Action forums |
* |
*@package projet |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.3 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
$repertoire = '/home/vpopmail/domains/'.$domaine.'/'.$liste ; |
echo exec ('ezmlm-sub '.$repertoire.' '.$mail, $output, $ret) ; |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/classes/ezmlm-php-2.0/services_vpopmail/creation_liste.php |
---|
1,37 → 1,4 |
<?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: creation_liste.php,v 1.3 2008-08-26 09:22:54 alexandre_tb Exp $ |
/** |
* Application projet |
* |
* Action creation de liste |
* |
*@package projet |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.3 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
$repertoire = '/home/vpopmail/domains/'.$domaine.'/'.$liste ; |
$fichier_qmail = '/home/vpopmail/domains/'.$domaine.'/.qmail-'.$liste ; |
48,11 → 15,6 |
echo exec ('ezmlm-reply-to '.$domaine.' '.$liste) ; |
echo "\n" ; |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/classes/ezmlm-php-2.0/services_vpopmail/ajout_moderateur.php |
---|
1,46 → 1,7 |
<?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: ajout_moderateur.php,v 1.3 2008-08-26 09:21:45 alexandre_tb Exp $ |
/** |
* Application projet |
* |
* Action ajout de moderateur |
* |
*@package projet |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.3 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
$repertoire = '/home/vpopmail/domains/'.$domaine.'/'.$liste.'/mod' ; |
echo exec ('ezmlm-sub '.$repertoire.' '.$mail, $output, $ret) ; |
echo 'ezmlm-sub '.$repertoire.' '.$mail ; |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/classes/ezmlm-php-2.0/services_vpopmail/suppression_abonne.php |
---|
1,46 → 1,7 |
<?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: suppression_abonne.php,v 1.3 2008-08-26 09:27:45 alexandre_tb Exp $ |
/** |
* Application projet |
* |
* Supprime un abonne a une liste |
* |
*@package projet |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.3 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
$repertoire = '/home/vpopmail/domains/'.$domaine.'/'.$liste ; |
echo exec ('ezmlm-unsub '.$repertoire.' '.$mail, $output, $ret) ; |
echo 'ezmlm-unsub '.$repertoire.' '.$mail; |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/classes/ezmlm-php-2.0/services_vpopmail/message.php |
---|
1,39 → 1,5 |
<?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 $ |
/** |
* Application projet |
* |
* Action forums |
* |
*@package projet |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.4 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
include_once 'ezmlm-php-2.0/ezmlm.php' ; |
51,17 → 17,14 |
$html = $message->display ($id_rep.'/'.$num_message) ; |
$num = split (':', file_get_contents($message->listdir.'/num')); |
$numero_dernier_message = $num[0]; |
include_once 'XML/Util.php' ; |
$xml = XML_Util::getXMLDeclaration('1.0', 'ISO-8859-15', 'no') ; |
if (!$html) { |
$xml .= XML_Util::createStartElement ('erreur') ; |
$xml .= XML_Util::createStartElement ('ezmlm_erreur') ; |
$xml .= 'Le message n\'existe pas'; |
$xml .= XML_Util::createEndElement('erreur') ; |
$xml .= XML_Util::createEndElement('ezmlm_erreur') ; |
header ('Content-type: text/xml'); |
echo $xml; |
exit(); |
72,10 → 35,6 |
$xml .= XML_Util::createStartElement ('ezmlm_message', array('domaine' => $domaine, 'liste' => $liste, 'langue' => $langue)) ; |
$xml .= "\n".'<![CDATA[ '.$html.']]>'; |
$xml .= XML_Util::createStartElement ('numero', array ('total_message' => $numero_dernier_message)); |
$xml .= ($id_rep == 0 ? '': $id_rep).$num_message; |
$xml .= XML_Util::createEndElement('numero'); |
$info_suivant = $message->getInfoSuivant() ; |
$xml .= XML_Util::createStartElement ('message_suivant', array ('numero' => $info_suivant['fichier_suivant'], |
'numero_repertoire' => $info_suivant['repertoire_suivant'])) ; |
88,11 → 47,4 |
$xml .= XML_Util::createEndElement('ezmlm_message') ; |
header ('Content-type: text/xml'); |
echo $xml ; |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/classes/ezmlm-php-2.0/services_vpopmail/liste_abonnes.php |
---|
1,78 → 1,17 |
<?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: liste_abonnes.php,v 1.3 2007-06-25 12:15:06 alexandre_tb Exp $ |
/** |
* Application projet |
* |
* Le service liste abonne |
* |
*@package projet |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.3 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
/* Le service attend 2 parametres |
* domaine string le nom de domaine de la liste |
* liste string le nom de la liste |
* renvoie string une chaine xml avec la liste des mails des inscrits |
* |
* <ezmlm_liste_abonnes domaine="dom" liste="list"> |
* <email>toto@tsdd...</email> |
* <email>qsdf@fdsq ..</email> |
* ... |
* </ezmlm_liste_abonnes> |
*/ |
$repertoire = '/home/vpopmail/domains/'.$domaine.'/'.$liste ; |
exec ('ezmlm-list '.$repertoire, $output, $ret) ; |
include_once 'XML/Util.php' ; |
$xml = XML_Util::getXMLDeclaration('1.0', 'ISO-8859-15', 'no') ; |
// Les 2 parametres doivent etres present |
$xml .= XML_Util::createStartElement ('ezmlm_liste_abonnes', array('domaine' => $domaine, 'liste' => $liste)) ; |
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_liste_abonnes', array('domaine' => $domaine, 'liste' => $liste)) ; |
foreach ($output as $mail) $xml .= XML_Util::createTag('email', '', $mail) ; |
$xml .= XML_Util::createEndElement('ezmlm_liste_abonnes') ; |
} |
foreach ($output as $mail) $xml .= XML_Util::createTag('email', '', $mail) ; |
$xml .= XML_Util::createEndElement('ezmlm_liste_abonnes') ; |
header ('Content-type: text/xml'); |
echo $xml ; |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* $Log: not supported by cvs2svn $ |
* Revision 1.2.2.1 2007-05-11 09:45:35 alexandre_tb |
* ajout de commentaire et de la gestion des erreurs |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
?> |
/trunk/classes/ezmlm-php-2.0/services_vpopmail/supprimer.php |
---|
1,38 → 1,8 |
<?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: supprimer.php,v 1.3 2008-08-26 09:29:33 alexandre_tb Exp $ |
/** |
* Application projet |
* |
* Supprime un message d'une liste |
* Entrée domaine, liste, numero_repertoire, numero_message |
* |
*@package projet |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.3 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
* Supprime un message d'une liste |
* Entrée domaine, liste, numero_repertoire, numero_message |
*/ |
$repertoire_liste = '/home/vpopmail/domains/'.$domaine.'/'.$liste; |
$message_a_supprimer = $repertoire_liste.'/archive/'.$actionargs[0].'/'.$actionargs[1] ; |
43,10 → 13,3 |
exec ('ezmlm-archive -c '.$repertoire_liste); |
exec ('ezmlm-idx '.$repertoire_liste); |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/classes/ezmlm-php-2.0/ezmlm-listinfo.php |
---|
1,5 → 1,5 |
<?php |
// $Id: ezmlm-listinfo.php,v 1.5 2008-11-04 17:11:10 aperonnet Exp $ |
// $Id: ezmlm-listinfo.php,v 1.6 2008-11-19 09:28:46 aperonnet Exp $ |
// |
// ezmlm-listinfo.php - ezmlm-php v2.0 |
// -------------------------------------------------------------- |
46,7 → 46,7 |
} |
function show_recentmsgs($title = "Messages ràcents") { |
function show_recentmsgs($title = "Messages récents") { |
if (!is_dir($this->listdir.'/archive/0')) return false; |
/trunk/classes/ezmlm-php-2.0/ezmlm-threads.php |
---|
1,5 → 1,5 |
<?php |
// $Id: ezmlm-threads.php,v 1.6 2008-08-25 15:19:15 alexandre_tb Exp $ |
// $Id: ezmlm-threads.php,v 1.7 2008-11-19 09:28:46 aperonnet Exp $ |
// |
// ezmlm-threads.php - ezmlm-php v2.0 |
// -------------------------------------------------------------- |
37,7 → 37,8 |
$this->build($month); |
} |
} |
$this->display($month); |
$html = $this->display($month); |
return $html ; |
} |
// display: this loads each cache file sequentially and displays the messages in them |
44,6 → 45,7 |
// there is no checking of checksum's done here so load() is the preferred method to |
// view the threads |
function display($month) { |
$html = '' ; |
$seq = 0; |
if (!is_dir($this->tempdir . "/ezmlm-php-" . $this->listname)) { |
$cache = $this->tempdir . "/ezmlm-php-" . $this->listname . "-" . $month; |
51,21 → 53,24 |
$cache = $this->tempdir . "/ezmlm-php-" . $this->listname . "/" . $month; |
} |
// Le lien par date et par thread |
echo '[ '.$this->makelink('action=show_month&actionargs[]='.$month, 'par date').' ]' ; |
$months = array(1 => 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); |
$html .= '[ '.$this->makelink('action=show_month&actionargs[]='.$month, 'par date').' ]' ; |
$months = array(1 => 'January', 2 => 'February', 3 => 'March', 4 => 'April', 5 => 'May', 6 => 'June', 7 => 'July', 8 => 'August', |
9 => 'September', 10 => 'October', 11 => 'November', 12 => 'December'); |
// remplacé par le tableau globals $mois dans ezmlm.php |
print '<h2>'.FIL_DE_DISCUSSION.' pour '.$GLOBALS['mois'][((int)substr($month,4,2) / 1)] .', ' . substr($month,0,4) . '</h2>'."\n"; |
$html .= '<h2>'.FIL_DE_DISCUSSION.' pour '.$GLOBALS['mois'][((int)substr($month,4,2) / 1) -1] .', ' . substr($month,0,4) . '</h2>'."\n"; |
print '<table class="table_cadre">'."\n"; |
print '<tr><th>Num</th><th>De</th><th>Sujet</th><th>Date</th></tr>'."\n"; |
print '<tr><td colspan="3"><hr /></td></tr>'."\n"; |
$ctc = 0; |
$html .= '<table class="table_cadre">'."\n"; |
$html .= '<tr><th>Num</th><th>De</th><th>Sujet</th><th>Date</th></tr>'."\n"; |
$html .= '<tr><td colspan="3"><hr /></td></tr>'."\n"; |
$ctc .= 0; |
if (is_file($cache)) { |
include($cache); |
} |
print '<tr><td colspan="3"></td></tr>'."\n"; |
print '</table>'."\n"; |
$html .= '<tr><td colspan="3"></td></tr>'."\n"; |
$html .= '</table>'."\n"; |
return $html ; |
} |
122,7 → 127,37 |
$html .= '<tr><td colspan="3"><hr noshade size="1" /></td></tr>'."\n"; |
return $html; |
} |
// TODO: Fonction à tester et compléter |
// Construit un index de tous les messages envoyés dans une liste donnée pour un mois |
// au format YYYYMM |
function build_month_list($date) |
{ |
$months = array(1 => 'Jan', 2 => 'Feb', 3 => 'Mar', 4 => 'Apr', 5 => 'May', 6 => 'Jun', 7 => 'Jul', 8 => 'Aug', |
9 => 'Sep', 10 => 'Oct', 11 => 'Nov', 12 => 'Dec'); |
$month = $months[((int)substr($month,4,2) / 1) -1] ; |
$year = substr($month,0,4) ; |
$numArchive = $this->getNumArchive(); |
$dernierRepertoire = floor($numArchive / 100); |
$threads = array(); |
for ($rep_courant = $dernierRepertoire; $rep_courant >= 0; $rep_courant--) { |
$fichier_index = file ($this->listdir.'/archive/'.$rep_courant.'/index', FILE_IGNORE_NEW_LINES); |
// On parcourt le fichier a l envers |
for ($j = count($fichier_index)-1; $j >= 0; $j-=2) { |
$match = strpos($fichier_index[$j],$month.' '.$year) ; |
if ($match) { |
$threads[] = $fichier_index[$j-1] ; |
} |
} |
} |
} |
// build: takes one argument in the format YYYYMM and builds the thread cache file |
// for that month if the ezmlm thread file exists. The resulting cache file is then |
// stored in $this->tmpdir; |
252,7 → 287,7 |
// listmessages: prints out a nice little calendar and displays the message |
// totals for each month. The link jumps to the thread listing. |
// On lit le repetoire archive/threads/ qui contient un fichier par moi avec tous les thread, par sujet |
// On lit le repertoire archive/threads/ qui contient un fichier par mois avec tous les thread, par sujet |
// Presentes comme suit |
// num_thread:hash [taille_du_thread] Sujet du thread (le dernier) |
// les messages sont ranges par leur numero |
392,10 → 427,10 |
if ($this->isFichierCalendrierExiste()) { |
// S il existe mais qu il est trop vieux, il faut le recalculer |
if ($this->isDoitRecalculerCalendrier()) { |
// if ($this->isDoitRecalculerCalendrier()) { |
$annees = $this->getAnneesARecalculer(); |
$html .= $this->calculeCalendrierPermanent($annees); |
} |
// } |
$html .= file_get_contents('tmp/'.$this->listname.'.calendrier'); |
} else { |
$html .= $this->ecrireFichierCalendrier(); |
/trunk/classes/ezmlm-php-2.0/ezmlm-msgdisplay.php |
---|
1,5 → 1,5 |
<?php |
// $Id: ezmlm-msgdisplay.php,v 1.10 2008-08-25 15:22:03 alexandre_tb Exp $ |
// $Id: ezmlm-msgdisplay.php,v 1.11 2008-11-19 09:28:46 aperonnet Exp $ |
// |
// ezmlm-msgdisplay.php - ezmlm-php v2.0 |
// -------------------------------------------------------------- |
/trunk/classes/ezmlm-php-2.0/ezmlm-parser.php |
---|
19,7 → 19,7 |
// | 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: ezmlm-parser.php,v 1.4 2008-08-25 15:20:54 alexandre_tb Exp $ |
// CVS : $Id: ezmlm-parser.php,v 1.5 2008-11-19 09:28:46 aperonnet Exp $ |
/** |
* Application projet |
* |
29,7 → 29,7 |
//Auteur original : ?? recupere dans ezmlm-php |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.4 $ |
*@version $Revision: 1.5 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
38,7 → 38,7 |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// $Id: ezmlm-parser.php,v 1.4 2008-08-25 15:20:54 alexandre_tb Exp $ |
// $Id: ezmlm-parser.php,v 1.5 2008-11-19 09:28:46 aperonnet Exp $ |
// |
require_once("ezmlm.php"); |
87,10 → 87,17 |
$repertoire_archive = opendir($this->listdir . "/archive/"); |
$repertoire_message = array() ; |
$dernier_repertoire = 0 ; |
while (false !== ($item = readdir($repertoire_archive))) { |
// $item contient les noms des repertoires |
// on ne garde que ceux qui sont des chiffres |
$numArchive = $this->getNumArchive(); |
$dernier_repertoire = floor($numArchive / 100); |
if (preg_match('/[0-9]+/', $item)) { |
// on ouvre le fichier d index de chaque repertoire |
if ((int) $item > $dernier_repertoire) $dernier_repertoire = (int) $item; |
} |
} |
$tableau_message = array() ; |
$compteur_message = 0 ; |
$fichier_index = fopen ($this->listdir.'/archive/'.$dernier_repertoire.'/index', 'r') ; |
153,73 → 160,6 |
} |
/** |
* num_msg_lest_week renvoie le nombre de messages echanges la derniere semaine |
* |
* @return int un entier |
* @access public |
*/ |
function num_msg_last_week() { |
$repertoire_archive = opendir($this->listdir . "/archive/"); |
$repertoire_message = array() ; |
$dernier_repertoire = 0 ; |
// Recherche du dernier repertorie |
while (false !== ($item = readdir($repertoire_archive))) { |
// $item contient les noms des repertoires |
// on ne garde que ceux qui sont des chiffres |
if (preg_match('/[0-9]+/', $item)) { |
// on ouvre le fichier d index de chaque repertoire |
if ((int) $item > $dernier_repertoire) $dernier_repertoire = (int) $item; |
} |
} |
$tableau_date = array() ; |
$tableau_final = array(); |
$compteur_message = '0' ; |
while ($dernier_repertoire != -1) { |
if (!file_exists($this->listdir.'/archive/'.$dernier_repertoire.'/index')) return '0'; |
// Si le fichier index est vide, c'est probable que la liste soit nouvelle, |
// on retourne 0 |
if (filesize($this->listdir.'/archive/'.$dernier_repertoire.'/index') == 0) return '0'; |
$fichier_index = fopen ($this->listdir.'/archive/'.$dernier_repertoire.'/index', 'r') ; |
while (!feof($fichier_index)) { |
// Recuperation du numero de message, du hash du sujet et du sujet |
$temp = fgets($fichier_index, 4096); |
preg_match('/([0-9]+): ([a-z]+) (.*)/', $temp, $match) ; |
// dans la seconde on recupere la date, hash auteur et auteur |
$temp = fgets($fichier_index, 4096); |
preg_match('/\t([0-9]+) ([a-zA-Z][a-zA-Z][a-zA-Z]) ([0-9][0-9][0-9][0-9]) ([0-9][0-9]:[0-9][0-9]:[0-9][0-9]) ([^;]+);([^ ]*) (.*)/', $temp, $match_deuxieme_ligne) ; |
if ($match[1] != '') { |
$date = $match_deuxieme_ligne[1].' '.$match_deuxieme_ligne[2].' '.$match_deuxieme_ligne[3].' '.$match_deuxieme_ligne[4]; |
$tableau_date[] = $date; |
} |
} |
fclose ($fichier_index); |
$tableau_date = array_reverse($tableau_date); |
foreach ($tableau_date as $date) { |
if (strtotime ($date) > time() - 7 * 24 * 60 *60) { |
$tableau_final[] = $date; |
$compteur_message++; |
} else { |
return $compteur_message; |
} |
} |
$dernier_repertoire--; |
} |
} |
// parse_file - opens a file and feeds the data to parse, file can be relative to the listdir |
function parse_file($file,$simple = FALSE) { |
if (!is_file($file)) { |
/trunk/classes/ezmlm-php-2.0/ezmlm-repondre.php |
---|
1,5 → 1,5 |
<?php |
// $Id: ezmlm-repondre.php,v 1.3 2008-08-25 15:19:42 alexandre_tb Exp $ |
// $Id: ezmlm-repondre.php,v 1.4 2008-11-19 09:28:46 aperonnet Exp $ |
// |
// ezmlm-msgdisplay.php - ezmlm-php v2.0 |
// -------------------------------------------------------------- |