/trunk/client/projet/classes/ezmlm-php-2.0/ezmlm-listinfo.php |
---|
1,5 → 1,5 |
<?php |
// $Id: ezmlm-listinfo.php,v 1.4 2008-08-25 15:22:48 alexandre_tb Exp $ |
// $Id: ezmlm-listinfo.php,v 1.5 2008-11-04 17:11:10 aperonnet Exp $ |
// |
// ezmlm-listinfo.php - ezmlm-php v2.0 |
// -------------------------------------------------------------- |
46,14 → 46,16 |
} |
function show_recentmsgs($title = "Messages récents") { |
function show_recentmsgs($title = "Messages ràcents") { |
if (!is_dir($this->listdir.'/archive/0')) return false; |
$html = '' ; |
$parser = new ezmlm_parser(); |
$parser->listdir = $this->listdir ; |
print '<table class="table_cadre">'."\n"; |
print '<tr><th class="col1">Num</th><th>De</th><th>Sujet</th><th>Date</th></tr>'."\n"; |
$html .= '<table class="table_cadre">'."\n"; |
$html .= '<tr><th class="col1">Num</th><th>De</th><th>Sujet</th><th>Date</th></tr>'."\n"; |
$ctc = 0; |
$recent = $parser->recent_msgs(); |
65,10 → 67,8 |
$class = array ('ligne_paire', 'ligne_impaire') ; |
include_once 'ezmlm-parser.php'; |
while (list($key,$val) = each($recent)) { |
print '<tr class="'.$class[$ctc].'">'."\n"; |
$html .= '<tr class="'.$class[$ctc].'">'."\n"; |
//print '<td>'.$val->nummessage.'</td>' ; |
// $key contient le numero du message tel que dans les fichiers d index par ex 216 |
76,7 → 76,7 |
$decimal = (string) $key; |
if ($key >= 100) { |
$fichier_message = substr($decimal, -2) ; |
$repertoire_message = substr ($decimal, 0,count ($decimal) -3) ; |
$repertoire_message = substr ($decimal, 0, -2) ; |
} else { |
if ($key < 10) { |
$fichier_message = '0'.$key; |
86,39 → 86,42 |
$repertoire_message = '0'; |
} |
print '<td>'.$key.'</td>' ; |
print '<td>'; |
$html .= '<td>'.$key.'</td>' ; |
$html .= '<td>'; |
$from = $val[4]; |
print $this->makelink("action=show_author_msgs&actionargs[]=".$val[3],$this->decode_iso($this->protect_email($from,false))); |
print "</td>\n"; |
print '<td><b>'; |
$html .= $this->makelink("action=show_author_msgs&actionargs[]=".$val[3],$this->decode_iso($this->protect_email($from,false))); |
$html .= "</td>\n"; |
$html .= '<td><b>'; |
$actionargs = preg_split("/\//", $val->msgfile); |
$parser = new ezmlm_parser(); |
$mailDecode = $parser->parse_file_headers($this->listdir.'/archive/'.$repertoire_message.'/'.$fichier_message); |
if (preg_match('/multipart/', $mailDecode->headers['content-type'])) |
print '<img src="client/projet/images/piece_jointe.png" alt="Pièce jointe" />'; |
print $this->makelink("action=show_msg&actionargs[]=" . $repertoire_message . |
"&actionargs[]=" . $fichier_message , $this->decode_iso($mailDecode->headers['subject']) /* $this->decode_iso($val[1]) */); |
$html .= $this->makelink("action=show_msg&actionargs[]=".$repertoire_message. |
"&actionargs[]=".$fichier_message ,$this->decode_iso($val[1])); |
print "</b></td>\n"; |
$html .= "</b></td>\n"; |
//print '<td>'.$this->date_francaise($val[2]).'</td>'."\n"; |
print '<td>'.$val[2].'</td>'."\n"; |
print "</tr>\n"; |
$html .= '<td>'.$val[2].'</td>'."\n"; |
$html .= "</tr>\n"; |
$ctc++; |
if ($ctc == 2) { $ctc = 0; } |
} |
print '</table>'."\n"; |
return true; |
$html .= '</table>'."\n"; |
return $html; |
} |
function show_month ($month) { |
// Le nom du fichier est annéemois ex 200501 pour janvier 2005 |
// le html est vide au début |
$html = '' ; |
// on ouvre chaque fichier en lecture |
if(!file_exists($this->listdir . '/archive/threads/' . $month)) { |
return false ; |
} |
$fd = file_get_contents($this->listdir . '/archive/threads/' . $month, 'r'); |
$fichier = explode ("\n", $fd) ; |
// on récupère la première ligne |
142,8 → 145,8 |
$numero_premier_mail = $numero_dernier_mail ; |
$numero_dernier_mail = $temp; |
} |
print '<table class="table_cadre">'."\n"; |
print '<tr><th class="col1">Num</th><th>De</th><th>Sujet</th><th>Date</th></tr>'."\n"; |
$html .= '<table class="table_cadre">'."\n"; |
$html .= '<tr><th class="col1">Num</th><th>De</th><th>Sujet</th><th>Date</th></tr>'."\n"; |
$ctc = 0; |
$class = array ('ligne_paire', 'ligne_impaire') ; |
163,32 → 166,32 |
$i = -1; |
} |
print '<tr class="'.$class[$ctc].'">'."\n"; |
print '<td>'.($repertoire_premier_mail != 0 ? $repertoire_premier_mail : '').$num_message.'</td><td>'; |
$html .= '<tr class="'.$class[$ctc].'">'."\n"; |
$html .= '<td>'.($repertoire_premier_mail != 0 ? $repertoire_premier_mail : '').$num_message.'</td><td>'; |
$hash = $this->makehash($mailDecode->headers['from']); |
print $this->makelink("action=show_author_msgs&actionargs[]=". |
$html .= $this->makelink("action=show_author_msgs&actionargs[]=". |
$hash,$this->decode_iso($this->protect_email($mailDecode->headers['from'],TRUE))); |
print "</td>\n"; |
print '<td><b>'; |
$html .= "</td>\n"; |
$html .= '<td><b>'; |
$actionargs[0] = $repertoire_premier_mail ; |
$actionargs[1] = $num_message ; |
if (count ($actionargs) > 1) { |
print $this->makelink("action=show_msg&actionargs[]=". |
$html .= $this->makelink("action=show_msg&actionargs[]=". |
$actionargs[(count($actionargs) - 2)] . |
"&actionargs[]=". |
$actionargs[(count($actionargs) - 1)] ,$this->decode_iso($mailDecode->headers['subject'])); |
} |
print "</b></td>\n"; |
print '<td>'.$this->date_francaise($mailDecode->headers['date']).'</td>'."\n"; |
print "</tr>\n"; |
$html .= "</b></td>\n"; |
$html .= '<td>'.$this->date_francaise($mailDecode->headers['date']).'</td>'."\n"; |
$html .= "</tr>\n"; |
$ctc++; |
if ($ctc == 2) { $ctc = 0; } |
} |
} |
print '</table>'."\n"; |
return true; |
$html .= '</table>'."\n"; |
return $html; |
} |
} |
?> |
/trunk/client/projet/classes/ezmlm-php-2.0/ezmlm.php |
---|
1,5 → 1,5 |
<?php |
// $Id: ezmlm.php,v 1.7 2008-08-25 15:23:34 alexandre_tb Exp $ |
// $Id: ezmlm.php,v 1.8 2008-11-04 17:11:10 aperonnet Exp $ |
// |
// ezmlm.php - ezmlm-php v2.0 |
// -------------------------------------------------------------- |
/trunk/client/projet/classes/ezmlm-php-2.0/services_vpopmail/messages_mois.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_mois.php,v 1.3 2008-08-25 15:24:09 alexandre_tb Exp $ |
// CVS : $Id: messages_mois.php,v 1.4 2008-11-04 17:11:10 aperonnet Exp $ |
/** |
* Application projet |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.3 $ |
*@version $Revision: 1.4 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
49,6 → 49,7 |
/** Calcul du cache */ |
require_once('Cache/Lite.php'); |
// Set a id for this cache |
69,21 → 70,19 |
include_once 'XML/Util.php' ; |
$xml = XML_Util::getXMLDeclaration('1.0', 'ISO-8859-15', 'no') ; |
ob_start() ; |
$html = $info->show_month($actionargs[0]); |
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 .= '<![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_messages_mois', array('domaine' => $domaine, 'liste' => $liste, 'langue' => $langue)) ; |
$xml .= '<![CDATA[ '.$html.']]>'; |
$xml .= XML_Util::createEndElement('ezmlm_messages_mois') ; |
$Cache_Lite->save($xml); |
} |
$html = ob_get_contents() ; |
ob_end_clean() ; |
$xml .= XML_Util::createStartElement ('ezmlm_messages_mois', array('domaine' => $domaine, 'liste' => $liste, 'langue' => $langue)) ; |
$xml .= '<![CDATA[ '.$html.']]>'; |
$xml .= XML_Util::createEndElement('ezmlm_messages_mois') ; |
$Cache_Lite->save($xml); |
} |
header ('Content-type: text/xml'); |
echo $xml ; |
91,6 → 90,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.3 2008-08-25 15:24:09 alexandre_tb |
* ajout de la gestion du cache |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/client/projet/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.3 2008-08-26 09:26:41 alexandre_tb Exp $ |
// CVS : $Id: messages_thread.php,v 1.4 2008-11-04 17:11:10 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.3 $ |
*@version $Revision: 1.4 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
include_once 'ezmlm-php-2.0/ezmlm.php' ; |
64,7 → 64,10 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.3 2008-08-26 09:26:41 alexandre_tb |
* ajout commentaire |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
?> |
/trunk/client/projet/classes/ezmlm-php-2.0/services_vpopmail/calendrier_messages.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: calendrier_messages.php,v 1.4 2008-08-25 15:25:47 alexandre_tb Exp $ |
// CVS : $Id: calendrier_messages.php,v 1.5 2008-11-04 17:11:10 aperonnet Exp $ |
/** |
* Application projet |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.4 $ |
*@version $Revision: 1.5 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
include_once 'ezmlm-php-2.0/ezmlm.php' ; |
107,6 → 107,7 |
//$Cache_Lite->save($xml, $id); |
} |
//} |
header ('Content-type: text/xml'); |
echo $xml ; |
113,6 → 114,9 |
/* +--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 |
/trunk/client/projet/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.4 $ |
*@version $Revision: 1.5 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
include_once 'ezmlm-php-2.0/ezmlm.php' ; |
58,19 → 58,15 |
exit(); |
} |
$html = $info->show_recentmsgs() ; |
ob_start() ; |
if (!$info->show_recentmsgs()) { |
if (!$html) { |
if (!$info) { |
ob_end_clean() ; |
echo 'Les fichiers de la liste ne sont pas visible sur le serveur' ; |
exit(); |
} |
} |
$html = ob_get_contents() ; |
ob_end_clean() ; |
$xml .= XML_Util::createStartElement ('ezmlm_derniers_messages', array('domaine' => $domaine, 'liste' => $liste, 'langue' => $langue)) ; |
$xml .= '<![CDATA[ '.$html.']]>'; |
82,7 → 78,10 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.4 2008-08-25 15:25:09 alexandre_tb |
* optimisation et gestion des erreurs |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |