[ 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/categories/ -> liste.php (source)

   1  <?php
   2  /* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.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  
  19  require  "./pre.inc.php";
  20  
  21  
  22  llxHeader ("","",$langs->trans("Categories"));
  23  
  24  print_titre ($langs->trans ("CatList"));
  25  ?>
  26  <table border="0" width="100%">
  27  <tr><td valign="top" width="30%">
  28  <?php
  29  $c = new Categorie ($db);
  30  $cats = $c->get_all_categories ();
  31  
  32  
  33  if ($cats != -1)
  34  {
  35    print '<table class="noborder" width="100%">';
  36    print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("AllCats").'</td></tr>';
  37    
  38    foreach ($cats as $cat)
  39      {
  40        $i = !$i;
  41        print "\t<tr ".$bc[$i].">\n";
  42        print "\t\t<td><a href='viewcat.php?id=".$cat->id."'>".$cat->label."</a></td>\n";
  43        print "\t\t<td>".$cat->description."</td>\n";
  44        print "\t</tr>\n";
  45      }
  46    print "</table>";
  47  }
  48  else
  49  {
  50    dolibarr_print_error();
  51  }
  52  
  53  print '</td></tr></table>';
  54  
  55  $db->close();
  56  
  57  llxFooter("<em>Derni&egrave;re modification $Date: 2005/04/13 12:22:29 $ r&eacute;vision $Revision: 1.1 $</em>");
  58  ?>


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