26 require
'../main.inc.php';
27 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
28 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
29 require_once DOL_DOCUMENT_ROOT.
'/core/lib/categories.lib.php';
31 if (!$user->rights->categorie->lire) {
36 $langs->loadLangs(array(
'categories',
'sendings'));
42 if ($user->socid) $socid = $user->socid;
46 if (!$object->fetch($id) > 0) {
50 $type = $object->type;
51 if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type];
57 $form =
new Form($db);
59 llxHeader(
'', $langs->trans(
'Categories'),
'');
63 $title = Categorie::$MAP_TYPE_TITLE_AREA[$type];
68 $backtolist = (
GETPOST(
'backtolist') ?
GETPOST(
'backtolist') : DOL_URL_ROOT.
'/categories/index.php?leftmenu=cat&type='.$type);
69 $linkback =
'<a href="'.$backtolist.
'">'.$langs->trans(
"BackToList").
'</a>';
70 $object->next_prev_filter =
' type = '.$type;
71 $object->ref = $object->label;
72 $morehtmlref =
'<br><div class="refidno"><a href="'.DOL_URL_ROOT.
'/categories/index.php?leftmenu=cat&type='.$type.
'">'.$langs->trans(
"Root").
'</a> >> ';
73 $ways = $object->print_all_ways(
" >> ",
'', 1);
74 foreach ($ways as $way) {
75 $morehtmlref .= $way.
"<br>\n";
77 $morehtmlref .=
'</div>';
79 dol_banner_tab($object,
'label', $linkback, ($user->socid ? 0 : 1),
'label',
'label', $morehtmlref,
'&type='.$type, 0,
'',
'', 1);
83 print '<div class="fichecenter">';
84 print '<div class="underbanner clearboth"></div>';
88 print '<table "border centpercent tableforfield">';
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_object_info($object, $usetable=0)
Show informations on an object TODO Move this into html.formother.
categories_prepare_head(Categorie $object, $type)
Prepare array with list of tabs.
Class to manage categories.
restrictedArea($user, $features, $objectid=0, $tableandshare= '', $feature2= '', $dbt_keyfield= 'fk_soc', $dbt_select= 'rowid', $isdraft=0)
Check permissions of a user to show a page and an object.
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_banner_tab($object, $paramid, $morehtml= '', $shownav=1, $fieldid= 'rowid', $fieldref= 'ref', $morehtmlref= '', $moreparam= '', $nodbprefix=0, $morehtmlleft= '', $morehtmlstatus= '', $onlybanner=0, $morehtmlright= '')
Show tab footer of a card.