| Line 1... | 
            Line 1... | 
          
          
            | 1 | 
            <?php
  | 
            1 | 
            <?php
  | 
          
          
            | 2 | 
            // $Id: ezmlm-author.php,v 1.4 2008-11-19 09:28:46 aperonnet Exp $
  | 
            2 | 
            // $Id: ezmlm-author.php,v 1.3 2007/04/19 15:34:35 neiluj Exp $
  | 
          
          
            | 3 | 
            //
  | 
            3 | 
            //
  | 
          
          
            | 4 | 
            // ezmlm-author.php - ezmlm-php v2.0
  | 
            4 | 
            // ezmlm-author.php - ezmlm-php v2.0
  | 
          
          
            | 5 | 
            // --------------------------------------------------------------
  | 
            5 | 
            // --------------------------------------------------------------
  | 
          
          
            | 6 | 
            // Displays all messages by a given author
  | 
            6 | 
            // Displays all messages by a given author
  | 
          
          
            | 7 | 
            // --------------------------------------------------------------
  | 
            7 | 
            // --------------------------------------------------------------
  | 
          
          
            | Line 12... | 
            Line 12... | 
          
          
            | 12 | 
            	function display($authorhash) {
  | 
            12 | 
            	function display($authorhash) {
  | 
          
          
            | 13 | 
            		$file = "/archive/authors/" . substr($authorhash,0,2) . "/" . substr($authorhash,2,18);
  | 
            13 | 
            		$file = "/archive/authors/" . substr($authorhash,0,2) . "/" . substr($authorhash,2,18);
  | 
          
          
            | 14 | 
                    //echo $file ;
  | 
            14 | 
                    //echo $file ;
  | 
          
          
            | 15 | 
            		if (!is_file($this->listdir . $file)) { $this->error(EZMLM_INVALID_AUTHOR); return; }
  | 
            15 | 
            		if (!is_file($this->listdir . $file)) { $this->error(EZMLM_INVALID_AUTHOR); return; }
  | 
          
          
            | 16 | 
                    // Le fichier author comprend
  | 
            16 | 
                    // Le fichier author comprend
  | 
          
          
            | 17 | 
                    // première ligne hash_auteur nom_auteur
  | 
            17 | 
                    // Premi�re ligne hash_auteur nom_auteur
  | 
          
          
            | 18 | 
                    // num_mess:annéemois:hash_sujet sujet
  | 
            18 | 
                    // num_mess:ann�emois:hash_sujet sujet
  | 
          
          
            | 19 | 
            		$fd = @fopen($this->listdir . $file, "r");
  | 
            19 | 
            		$fd = @fopen($this->listdir . $file, "r");
  | 
          
          
            | 20 | 
                    $i = 0 ;
  | 
            20 | 
                    $i = 0 ;
  | 
          
          
            | 21 | 
                    $class = array ('ligne_impaire', 'ligne_paire') ;
  | 
            21 | 
                    $class = array ('ligne_impaire', 'ligne_paire') ;
  | 
          
          
            | 22 | 
            		while (!feof($fd)) {
  | 
            22 | 
            		while (!feof($fd)) {
  | 
          
          
            | 23 | 
            			$buf = fgets($fd,4096);
  | 
            23 | 
            			$buf = fgets($fd,4096);
  | 
          
          
            | Line 28... | 
            Line 28... | 
          
          
            | 28 | 
            				print '<table class="table_cadre">'."\n";
  | 
            28 | 
            				print '<table class="table_cadre">'."\n";
  | 
          
          
            | 29 | 
                            print '<tr><th class="col1">De</th><th>Sujet</th><th>Date</th></tr>'."\n";
  | 
            29 | 
                            print '<tr><th class="col1">De</th><th>Sujet</th><th>Date</th></tr>'."\n";
  | 
          
          
            | 30 | 
            				$tableopened = TRUE;
  | 
            30 | 
            				$tableopened = TRUE;
  | 
          
          
            | 31 | 
            			} else if (preg_match('/^[0-9]*:[0-9]/',$buf)) {
  | 
            31 | 
            			} else if (preg_match('/^[0-9]*:[0-9]/',$buf)) {
  | 
          
          
            | 32 | 
            				// si la ligne est valide
  | 
            32 | 
            				// si la ligne est valide
  | 
          
          
            | 33 | 
                            // on récupère le numéro du message pour en extraire le nom du fichier
  | 
            33 | 
                            // on r�cup�re le num�ro du message pour en extraire le nom du fichier
  | 
          
          
            | 34 | 
            				$msgfile = preg_replace('/^([0-9]*):.*/', '\1', $buf);
  | 
            34 | 
            				$msgfile = preg_replace('/^([0-9]*):.*/', '\1', $buf);
  | 
          
          
            | 35 | 
            				$msgdir  = (int)((int)$msgfile / 100);
  | 
            35 | 
            				$msgdir  = (int)((int)$msgfile / 100);
  | 
          
          
            | 36 | 
            				$msgfile = (int)$msgfile % 100;
  | 
            36 | 
            				$msgfile = (int)$msgfile % 100;
  | 
          
          
            | Line 37... | 
            Line 37... | 
          
          
            | 37 | 
             
  | 
            37 | 
             
  |