From 1c763abab0dfa73d8b730196a282de1fe25ff711 Mon Sep 17 00:00:00 2001 From: Andre Cianfarani Date: Thu, 30 Mar 2006 15:44:52 +0000 Subject: [PATCH] ajout arbo complete des cate --- htdocs/categories/index.php | 43 ++++++++++++------------------------- 1 file changed, 14 insertions(+), 29 deletions(-) diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index 150b6e5a096..f695b65a842 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -95,37 +95,22 @@ if($_POST['catname']) { /* * Catégories principales */ -$cats = $c->get_main_categories (); - -if ($cats != -1) -{ - print ''; - print ''; +print '
'.$langs->trans("MainCats").'
'; + print ''; - foreach ($cats as $cat) - { - $i = !$i; - print "\t\n"; - print "\t\t\n"; - print "\t\t\n"; - - if ($cat->visible == 1) - { - print "\t\t\n"; - } - else - { - print "\t\t\n"; - } - - print "\t\n"; - } + $c->get_categories_arbo(); + $cate_arbo = $c->get_arbo_each_cate(); + + foreach($cate_arbo as $key => $value) + { + $i = !$i; + print "\t\n"; + print ''; + print "\t\n"; + } + + print "
'.$langs->trans("AllCats").'
".$cat->label."".$cat->description."".$langs->trans("ContentsVisibleByAllShort")."".$langs->trans("ContentsNotVisibleByAllShort")."
'.$value[0].'
"; -} -else -{ - dolibarr_print_error(); -} print '';