listdir.'/archive/0') ; } function display() { if (!is_dir($this->listdir.'/archive/0')) { // On teste si il y a au moins un message, cad le r�pertoire 0 echo $this->listdir.'/archive/0' ; return false ; } $parser = new ezmlm_parser(); $parser->listdir = $this->listdir ; //$this->show_info_file(); $threads = new ezmlm_threads(); $threads->listdir = $this->listdir ; $threads->listname = $this->listname ; $threads->forcehref = $this->forcehref ; /// ajout alex $threads->listmessages() ; $this->show_recentmsgs(); return true ; } function show_info_file() { if (@is_file($this->listdir . "/text/info")) { $infofile = @file($this->listdir . "/text/info"); while (list($line_num, $line) = each($infofile)) { print nl2br($line); } } } 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 ; $html .= '
Num | De | Sujet | Date | ||
---|---|---|---|---|---|
'.$val->nummessage.' | ' ; // $key contient le numero du message tel que dans les fichiers d index par ex 216 // on retrouve le nom du repertoire et le nom du fichier $decimal = (string) $key; if ($key >= 100) { $fichier_message = substr($decimal, -2) ; $repertoire_message = substr ($decimal, 0, -2) ; } else { if ($key < 10) { $fichier_message = '0'.$key; } else { $fichier_message = $decimal; } $repertoire_message = '0'; } $html .= ''.$key.' | ' ; $html .= ''; $from = $val[4]; $html .= $this->makelink("action=show_author_msgs&actionargs[]=".$val[3],$this->decode_iso($this->protect_email($from,false))); $html .= " | \n"; $html .= ''; $actionargs = preg_split("/\//", $val->msgfile); $html .= $this->makelink("action=show_msg&actionargs[]=".$repertoire_message. "&actionargs[]=".$fichier_message ,$this->decode_iso($val[1])); $html .= " | \n"; //print ''.$this->date_francaise($val[2]).' | '."\n"; $html .= ''.$val[2].' | '."\n"; $html .= "
Num | De | Sujet | Date |
---|---|---|---|
'.($repertoire_premier_mail != 0 ? $repertoire_premier_mail : '').$num_message.' | '; $hash = $this->makehash($mailDecode->headers['from']); $html .= $this->makelink("action=show_author_msgs&actionargs[]=". $hash,$this->decode_iso($this->protect_email($mailDecode->headers['from'],TRUE))); $html .= " | \n"; $html .= ''; $actionargs[0] = $repertoire_premier_mail ; $actionargs[1] = $num_message ; if (count ($actionargs) > 1) { $html .= $this->makelink("action=show_msg&actionargs[]=". $actionargs[(count($actionargs) - 2)] . "&actionargs[]=". $actionargs[(count($actionargs) - 1)] ,$this->decode_iso($mailDecode->headers['subject'])); } $html .= " | \n"; $html .= ''.$this->date_francaise($mailDecode->headers['date']).' | '."\n"; $html .= "