[ Index ]
 

Code source de Dolibarr 2.0.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/htdocs/telephonie/ligne/commande/retour/ -> fichiers.php (source)

   1  <?PHP
   2  /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
   3   *
   4   * This program is free software; you can redistribute it and/or modify
   5   * it under the terms of the GNU General Public License as published by
   6   * the Free Software Foundation; either version 2 of the License, or
   7   * (at your option) any later version.
   8   *
   9   * This program is distributed in the hope that it will be useful,
  10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12   * GNU General Public License for more details.
  13   *
  14   * You should have received a copy of the GNU General Public License
  15   * along with this program; if not, write to the Free Software
  16   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17   *
  18   * $Id: fichiers.php,v 1.1 2005/07/29 08:31:03 rodolphe Exp $
  19   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/telephonie/ligne/commande/retour/fichiers.php,v $
  20   *
  21   */
  22  require ("./pre.inc.php");
  23  
  24  $page = $_GET["page"];
  25  $sortorder = $_GET["sortorder"];
  26  
  27  if (!$user->rights->telephonie->lire)
  28    accessforbidden();
  29  
  30  
  31  $upload_dir = DOL_DATA_ROOT."/telephonie/ligne/commande/retour/traite";
  32  
  33  llxHeader('','Telephonie - Ligne - Commande - Retour - Fichiers');
  34  
  35  /*
  36   * Sécurité accés client
  37   */
  38  if ($user->societe_id > 0) 
  39  {
  40    $action = '';
  41    $socidp = $user->societe_id;
  42  }
  43  
  44  /*
  45   * Mode Liste
  46   *
  47   *
  48   *
  49   */
  50  
  51  
  52  print_titre("20 derniers Fichiers traités");
  53  
  54  $upload_dir = $upload_dir."/";
  55  $handle=opendir($upload_dir);
  56  
  57  $files = array();
  58  $i = 0;
  59  while (($file = readdir($handle))!==false)
  60  {
  61    if (is_readable($upload_dir.$file) && is_file($upload_dir.$file))
  62      {
  63        $files[$i][0] = $file;
  64        $files[$i][1] = filesize($upload_dir.$file); 
  65        $files[$i][2] = filemtime($upload_dir.$file);
  66        $i++;
  67      }
  68  }
  69  
  70  
  71  print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
  72  print '<tr class="liste_titre"><td>Fichier</td><td>Taille</td><td>Date</td>';
  73  print "</tr>\n";
  74  $var=True;
  75  
  76  sort($files, 2);
  77  
  78  $n = min(20, sizeof($files));
  79  
  80  for ($i = 0 ; $i < $n ; $i++)
  81  {
  82    $var=!$var;
  83  
  84    print "<tr $bc[$var]>";
  85    print '<td><a href="'.DOL_URL_ROOT.'/document.php?file='.$upload_dir.$files[$i][0].'&amp;type=text/plain">';
  86    print $files[$i][0].'</a></td>';                       
  87    
  88    print '<td>'.$files[$i][1]. ' bytes</td>';
  89    print '<td>'.strftime("%A %d %b %Y %H:%M:%S", $files[$i][2]).'</td>';      
  90    print '</tr>';
  91  }
  92  
  93  
  94  
  95  
  96  
  97  
  98  print "</table>";
  99  
 100  
 101  $db->close();
 102  
 103  llxFooter("<em>Derni&egrave;re modification $Date: 2005/07/29 08:31:03 $ r&eacute;vision $Revision: 1.1 $</em>");
 104  ?>


Généré le : Mon Nov 26 12:29:37 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics