[ Index ] |
|
Code source de Dolibarr 2.0.1 |
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 llxHeader ("","",$langs->trans("Categories")); 22 23 if ($_REQUEST['id'] == "") 24 { 25 dolibarr_print_error (); 26 exit (); 27 } 28 29 $c = new Categorie ($db, $_REQUEST['id']); 30 31 print_titre ($langs->trans("Categorie")." ".$c->label); 32 ?> 33 <table border="0" width="100%"> 34 <tr><td valign="top" width="30%"> 35 <?php 36 37 $ways = $c->print_all_ways (); 38 print "<div id='ways'>"; 39 foreach ($ways as $way) 40 { 41 print $way."<br />\n"; 42 } 43 print "</div>"; 44 45 $cats = $c->get_filles (); 46 47 if ($cats < 0) 48 { 49 dolibarr_print_error(); 50 } 51 else if (sizeof ($cats) > 0) 52 { 53 print "<table class='noborder' width='100%'>\n"; 54 print "<tr class='liste_titre'><td colspan='2'>".$langs->trans("SubCats")."</td></tr>\n"; 55 56 foreach ($cats as $cat) 57 { 58 $i++; 59 print "\t<tr ".$bc[$i%2].">\n"; 60 print "\t\t<td><a href='viewcat.php?id=".$cat->id."'>".$cat->label."</a></td>\n"; 61 print "\t\t<td>".$cat->description."</td>\n"; 62 print "\t</tr>\n"; 63 } 64 print "</table>\n<br/>\n"; 65 } 66 else 67 { 68 print "<p>".$langs->trans("NoSubCat")."</p>"; 69 } 70 71 $i = 0; 72 73 $prods = $c->get_products (); 74 75 if ($prods < 0) 76 { 77 dolibarr_print_error(); 78 } 79 else if (sizeof ($prods) > 0) 80 { 81 print "<table class='noborder' width='100%'>\n"; 82 print "<tr class='liste_titre'><td colspan='2'>".$langs->trans("Products")."</td></tr>\n"; 83 84 foreach ($prods as $prod) 85 { 86 $i++; 87 print "\t<tr ".$bc[$i%2].">\n"; 88 print "\t\t<td><a href='".DOL_URL_ROOT."/product/fiche.php?id=".$prod->id."'>".$prod->libelle."</a></td>\n"; 89 print "\t\t<td>".$prod->description."</td>\n"; 90 print "\t</tr>\n"; 91 } 92 print "</table>\n"; 93 } 94 else 95 { 96 print "<p>".$langs->trans ("NoProd")."</p>"; 97 } 98 99 print "<div class='tabsAction'>\n"; 100 print "<a class='tabAction' href='edit.php?id=".$c->id."'>Éditer</a>"; 101 print "<a class='tabAction' href='delete.php?id=".$c->id."'>Supprimer</a>"; 102 print "</div>"; 103 print '</td></tr></table>'; 104 105 $db->close(); 106 107 llxFooter("<em>Dernière modification $Date: 2005/04/13 12:06:58 $ révision $Revision: 1.1 $</em>"); 108 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |