[ 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/product/stock/ -> index.php (source)

   1  <?php
   2  /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
   3   * Copyright (C) 2004 Laurent Destailleur  <eldy@users.sourceforge.net>
   4   *
   5   * This program is free software; you can redistribute it and/or modify
   6   * it under the terms of the GNU General Public License as published by
   7   * the Free Software Foundation; either version 2 of the License, or
   8   * (at your option) any later version.
   9   *
  10   * This program is distributed in the hope that it will be useful,
  11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13   * GNU General Public License for more details.
  14   *
  15   * You should have received a copy of the GNU General Public License
  16   * along with this program; if not, write to the Free Software
  17   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18   *
  19   * $Id: index.php,v 1.10 2005/08/31 21:29:03 eldy Exp $
  20   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/product/stock/index.php,v $
  21   */
  22  
  23  /**
  24          \file       htdocs/product/stock/index.php
  25          \ingroup    stock
  26          \brief      Page accueil stocks produits
  27          \version    $Revision: 1.10 $
  28  */
  29  
  30  require_once ("./pre.inc.php");
  31  require_once ("./entrepot.class.php");
  32  
  33  $user->getrights("stocks");
  34  $langs->load("stocks");
  35  
  36  if (!$user->rights->stock->lire)
  37    accessforbidden();
  38  
  39  
  40  llxHeader("","",$langs->trans("Stocks"));
  41  
  42  print_fiche_titre($langs->trans("StocksArea"));
  43  
  44  print '<table border="0" width="100%" class="notopnoleftnoright">';
  45  print '<tr><td valign="top" width="30%" class="notopnoleft">';
  46  
  47  
  48  /*
  49   * Zone recherche entrepot
  50   */
  51  print '<form method="post" action="'.DOL_URL_ROOT.'/product/stock/liste.php">';
  52  print '<table class="noborder" width="100%">';
  53  print "<tr class=\"liste_titre\">";
  54  print '<td colspan="3">'.$langs->trans("Search").'</td></tr>';
  55  print "<tr $bc[0]><td>";
  56  print $langs->trans("Ref").':</td><td><input class="flat" type="text" size="18" name="sf_ref"></td><td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
  57  print "<tr $bc[0]><td>".$langs->trans("Other").':</td><td><input type="text" name="sall" class="flat" size="18"></td>';
  58  print "</table></form><br>";
  59  
  60  
  61  
  62  $sql = "SELECT e.label, e.rowid, e.statut FROM ".MAIN_DB_PREFIX."entrepot as e";
  63  $sql .= " ORDER BY e.statut DESC ";
  64  $sql .= $db->plimit(15 ,0);
  65  $result = $db->query($sql) ;
  66  
  67  if ($result)
  68  {
  69      $num = $db->num_rows($result);
  70  
  71      $i = 0;
  72  
  73      print '<table class="noborder" width="100%">';
  74      print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Warehouses").'</td></tr>';
  75  
  76      if ($num)
  77      {
  78          $entrepot=new Entrepot($db);
  79  
  80          $var=True;
  81          while ($i < $num)
  82          {
  83              $objp = $db->fetch_object($result);
  84              $var=!$var;
  85              print "<tr $bc[$var]>";
  86              print "<td><a href=\"fiche.php?id=$objp->rowid\">".img_object($langs->trans("ShowStock"),"stock")." ".$objp->label."</a></td>\n";
  87              print '<td align="right">'.$entrepot->LibStatut($objp->statut).'</td>';
  88              print "</tr>\n";
  89              $i++;
  90          }
  91          $db->free($result);
  92  
  93      }
  94      print "</table>";
  95  }
  96  else
  97  {
  98      dolibarr_print_error($db);
  99  }
 100  
 101  print '</td><td valign="top" width="70%" class="notopnoleft">';
 102  
 103  
 104  print '</td></tr></table>';
 105  
 106  $db->close();
 107  
 108  llxFooter('$Date: 2005/08/31 21:29:03 $ - $Revision: 1.10 $');
 109  ?>


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