[ 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/compta/export/ -> liste.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: liste.php,v 1.4 2005/04/11 14:45:29 rodolphe Exp $
  19   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/compta/export/liste.php,v $
  20   *
  21   */
  22  require ("./pre.inc.php");
  23  
  24  llxHeader('','Compta - Export');
  25  /*
  26   * Sécurité accés client
  27   */
  28  if ($user->societe_id > 0) 
  29  {
  30    $action = '';
  31    $socidp = $user->societe_id;
  32  }
  33  
  34  
  35  /*
  36   *
  37   *
  38   */
  39  
  40  $page = $_GET["page"];
  41  $sortorder = $_GET["sortorder"];
  42  $sortfield = $_GET["sortfield"];
  43  
  44  $offset = $conf->liste_limit * $page ;
  45  if ($sortorder == "") $sortorder="DESC";
  46  if ($sortfield == "") $sortfield="ec.date_export";
  47  
  48  /*
  49   * Mode Liste
  50   *
  51   *
  52   *
  53   */
  54  
  55  $sql = "SELECT ec.rowid,".$db->pdate("ec.date_export")." as date_export, ec.ref";
  56  $sql .= " FROM ".MAIN_DB_PREFIX."export_compta as ec";
  57  
  58  $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset);
  59  
  60  $result = $db->query($sql);
  61  if ($result)
  62  {
  63    $num = $db->num_rows($result);
  64    $i = 0;
  65    
  66    print_barre_liste($langs->trans("Exports"), $page, "liste.php", $urladd, $sortfield, $sortorder, '', $num);
  67  
  68    print"\n<!-- debut table -->\n";
  69    print '<table class="noborder" width="100%">';
  70    print '<tr class="liste_titre">';
  71  
  72    print_liste_field_titre($langs->trans("Ref"),"liste.php","ec.ref");
  73    print_liste_field_titre($langs->trans("Date"),"liste.php","ec.date_export");
  74  
  75    print "<td>-</td></tr>\n";
  76  
  77    $var=True;
  78  
  79    $dir = DOL_DATA_ROOT."/compta/export/";
  80  
  81    while ($i < min($num,$conf->liste_limit))
  82      {
  83        $obj = $db->fetch_object($result);    
  84        $var=!$var;
  85  
  86        print "<tr $bc[$var]>";
  87  
  88        print '<td>'.stripslashes($obj->ref).'</td>';
  89        print '<td>'.strftime("%a %e %b %Y %H:%M:%S",$obj->date_export).'</td>';
  90        print '<td><a href="index.php?action=export&amp;id='.$obj->rowid.'">Regénérer</a></td>';
  91        print "</tr>\n";
  92        $i++;
  93      }
  94    print "</table>";
  95    $db->free($result);
  96  }
  97  else 
  98  {
  99    dolibarr_print_error($db);
 100  }
 101  
 102  $db->close();
 103  
 104  llxFooter("<em>Derni&egrave;re modification $Date: 2005/04/11 14:45:29 $ r&eacute;vision $Revision: 1.4 $</em>");
 105  ?>


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