diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php
index a7beeb47f7f..67af3432a17 100644
--- a/htdocs/categories/categorie.php
+++ b/htdocs/categories/categorie.php
@@ -266,50 +266,101 @@ if ($_GET["socid"])
}
else if ($_GET["id"] || $_GET["ref"])
{
- /*
- * Fiche categorie de produit
- */
- require_once(DOL_DOCUMENT_ROOT."/lib/product.lib.php");
- require_once(DOL_DOCUMENT_ROOT."/product.class.php");
+ if ($_GET["type"] == 0)
+ {
+ /*
+ * Fiche categorie de produit
+ */
+ require_once(DOL_DOCUMENT_ROOT."/lib/product.lib.php");
+ require_once(DOL_DOCUMENT_ROOT."/product.class.php");
- // Produit
- $product = new Product($db);
- if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
- if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
+ // Produit
+ $product = new Product($db);
+ if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
+ if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
- llxHeader("","",$langs->trans("CardProduct".$product->type));
+ llxHeader("","",$langs->trans("CardProduct".$product->type));
- $head=product_prepare_head($product, $user);
- $titre=$langs->trans("CardProduct".$product->type);
- $picto=($product->type==1?'service':'product');
- dol_fiche_head($head, 'category', $titre,0,$picto);
+ $head=product_prepare_head($product, $user);
+ $titre=$langs->trans("CardProduct".$product->type);
+ $picto=($product->type==1?'service':'product');
+ dol_fiche_head($head, 'category', $titre,0,$picto);
- print '
';
- print "";
- // Reference
- print '| '.$langs->trans("Ref").' | ';
- print $html->showrefnav($product,'ref','',1,'ref');
- print ' | ';
- print '
';
+ print '';
+ print "";
+ // Reference
+ print '| '.$langs->trans("Ref").' | ';
+ print $html->showrefnav($product,'ref','',1,'ref');
+ print ' | ';
+ print '
';
- // Libelle
- print '| '.$langs->trans("Label").' | '.$product->libelle.' | ';
- print '
';
+ // Libelle
+ print '| '.$langs->trans("Label").' | '.$product->libelle.' | ';
+ print '
';
- // Statut
- print '| '.$langs->trans("Status").' | ';
- print $product->getLibStatut(2);
- print ' |
';
+ // Statut
+ print '| '.$langs->trans("Status").' | ';
+ print $product->getLibStatut(2);
+ print ' |
';
- print '
';
+ print '
';
- print '';
+ print '';
- if ($mesg) print($mesg);
+ if ($mesg) print($mesg);
- formCategory($db,$product,0);
+ formCategory($db,$product,0);
+ }
+
+ if ($_GET["type"] == 3)
+ {
+ /*
+ * Fiche categorie d'adherent
+ */
+ require_once(DOL_DOCUMENT_ROOT."/lib/member.lib.php");
+ require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php");
+
+ // Produit
+ $member = new Adherent($db);
+ if ($_GET["ref"]) $result = $member->fetch('',$_GET["ref"]);
+ if ($_GET["id"]) $result = $member->fetch($_GET["id"]);
+
+ llxHeader("","",$langs->trans("CardMember"));
+
+
+ $head=member_prepare_head($product, $user);
+ $titre=$langs->trans("CardMember");
+ $picto='member';
+ dol_fiche_head($head, 'category', $titre,0,$picto);
+
+
+ print '';
+ print "";
+ // Reference
+ print '| '.$langs->trans("Ref").' | ';
+ print $html->showrefnav($member,'ref','',1,'ref');
+ print ' | ';
+ print '
';
+
+ // Libelle
+ print '| '.$langs->trans("Label").' | '.$member->libelle.' | ';
+ print '
';
+
+ // Statut
+ print '| '.$langs->trans("Status").' | ';
+ print $member->getLibStatut(2);
+ print ' |
';
+
+ print '
';
+
+ print '';
+
+ if ($mesg) print($mesg);
+
+ formCategory($db,$member,3);
+ }
}
diff --git a/htdocs/lib/member.lib.php b/htdocs/lib/member.lib.php
index 22cc751584a..4e439011368 100644
--- a/htdocs/lib/member.lib.php
+++ b/htdocs/lib/member.lib.php
@@ -19,7 +19,7 @@
/**
* \file htdocs/lib/member.lib.php
- * \brief Ensemble de fonctions de base pour les adh�rents
+ * \brief Ensemble de fonctions de base pour les adherents
* \version $Id$
*
* Ensemble de fonctions de base de dolibarr sous forme d'include