Amlioration de la navigation
This commit is contained in:
parent
13f3e5de7e
commit
af5bc71d6e
@ -58,11 +58,10 @@ if ($_POST["button_removefilter"] == $langs->trans("RemoveFilter")) {
|
||||
$snom="";
|
||||
}
|
||||
|
||||
if (strlen($_REQUEST['catid']) == 0)
|
||||
if (isset($_REQUEST['catid']))
|
||||
{
|
||||
$_REQUEST['catid'] = 1;
|
||||
$catid = $_REQUEST['catid'];
|
||||
}
|
||||
$catid = $_REQUEST['catid'];
|
||||
|
||||
/*
|
||||
* Mode Liste
|
||||
@ -152,38 +151,18 @@ if ($result)
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
$c = new Categorie ($db, $catid);
|
||||
|
||||
$ways = $c->print_all_ways(' > ','fourn/product/liste.php');
|
||||
print "<div id='ways'>";
|
||||
print '<a href="liste.php">Top</a>';
|
||||
|
||||
print $ways[0]."<br />\n";
|
||||
if (isset($catid))
|
||||
{
|
||||
$c = new Categorie ($db, $catid);
|
||||
$ways = $c->print_all_ways(' > ','fourn/product/liste.php');
|
||||
|
||||
print "</div>";
|
||||
|
||||
$cats = $c->get_filles();
|
||||
|
||||
print '<br><table class="noborder" width="100%">';
|
||||
print '<tr><td valign="top" width="10%">';
|
||||
if ($cats < 0)
|
||||
{
|
||||
print "-";
|
||||
print " > ".$ways[0]."<br />\n";
|
||||
}
|
||||
elseif (sizeof ($cats) > 0)
|
||||
{
|
||||
print "<table class='noborder' width='100%'>\n";
|
||||
foreach ($cats as $cat)
|
||||
{
|
||||
$i++;
|
||||
print "<tr ".$bc[$i%2].">\n";
|
||||
print "<td><a href='liste.php?catid=".$cat->id."'>".$cat->label."</a></td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
print "</table>\n";
|
||||
}
|
||||
|
||||
print '</td><td valign="top" width="90%">';
|
||||
print "</div><br />";
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
// Lignes des titres
|
||||
@ -232,7 +211,7 @@ if ($result)
|
||||
$db->free();
|
||||
|
||||
print "</table>";
|
||||
print '</td></tr></table>';
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -39,7 +39,7 @@ $user->getrights("produit");
|
||||
|
||||
function llxHeader($head = "", $title="", $help_url='',$addons='')
|
||||
{
|
||||
global $user, $conf, $langs;
|
||||
global $db, $user, $conf, $langs;
|
||||
|
||||
|
||||
top_menu($head, $title);
|
||||
@ -52,22 +52,6 @@ function llxHeader($head = "", $title="", $help_url='',$addons='')
|
||||
$menu->add($addons[0][0], $addons[0][1]);
|
||||
}
|
||||
|
||||
if ($conf->fournisseur->enabled)
|
||||
{
|
||||
$menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
|
||||
}
|
||||
|
||||
if ($conf->societe->enabled)
|
||||
{
|
||||
$menu->add_submenu(DOL_URL_ROOT."/fourn/contact.php",$langs->trans("Contacts"));
|
||||
}
|
||||
|
||||
$langs->load("bills");
|
||||
$menu->add(DOL_URL_ROOT."/fourn/facture/index.php", $langs->trans("Bills"));
|
||||
|
||||
$langs->load("orders");
|
||||
$menu->add(DOL_URL_ROOT."/fourn/commande/",$langs->trans("Orders"));
|
||||
|
||||
if ($conf->produit->enabled)
|
||||
{
|
||||
$menu->add(DOL_URL_ROOT."/fourn/product/", $langs->trans("Products"));
|
||||
@ -84,6 +68,40 @@ function llxHeader($head = "", $title="", $help_url='',$addons='')
|
||||
$menu->add(DOL_URL_ROOT."/categories/", $langs->trans("Categories"));
|
||||
}
|
||||
|
||||
$menu->add('liste.php','Top');
|
||||
|
||||
if (isset($_REQUEST['catid']))
|
||||
{
|
||||
$catid = $_REQUEST['catid'];
|
||||
|
||||
$c = new Categorie ($db, $catid);
|
||||
|
||||
$menu->add('liste.php?catid='.$c->id, $c->label);
|
||||
|
||||
$cats = $c->get_filles();
|
||||
|
||||
if (sizeof ($cats) > 0)
|
||||
{
|
||||
foreach ($cats as $cat)
|
||||
{
|
||||
$menu->add_submenu('liste.php?catid='.$cat->id, $cat->label);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$c = new Categorie ($db);
|
||||
$cats = $c->get_main_categories();
|
||||
|
||||
if (sizeof ($cats) > 0)
|
||||
{
|
||||
foreach ($cats as $cat)
|
||||
{
|
||||
$menu->add_submenu('liste.php?catid='.$cat->id, $cat->label);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
left_menu($menu->liste, $help_url);
|
||||
}
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user