27 require
'../main.inc.php';
28 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
29 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
30 require_once DOL_DOCUMENT_ROOT.
'/core/lib/categories.lib.php';
32 if (!$user->rights->categorie->lire) {
37 $langs->loadLangs(array(
'categories',
'sendings'));
41 $label =
GETPOST(
'label',
'alpha');
45 $socid = $user->socid;
50 $result = $object->fetch($id, $label);
55 $type = $object->type;
56 if (is_numeric($type)) {
57 $type = Categorie::$MAP_ID_TO_CODE[$type];
66 llxHeader(
'', $langs->trans(
'Categories'),
'');
70 $title = Categorie::$MAP_TYPE_TITLE_AREA[$type];
75 $backtolist = (
GETPOST(
'backtolist') ?
GETPOST(
'backtolist') : DOL_URL_ROOT.
'/categories/index.php?leftmenu=cat&type='.urlencode($type));
76 $linkback =
'<a href="'.dol_sanitizeUrl($backtolist).
'">'.$langs->trans(
"BackToList").
'</a>';
77 $object->next_prev_filter =
' type = '.$object->type;
78 $object->ref = $object->label;
79 $morehtmlref =
'<br><div class="refidno"><a href="'.DOL_URL_ROOT.
'/categories/index.php?leftmenu=cat&type='.urlencode($type).
'">'.$langs->trans(
"Root").
'</a> >> ';
80 $ways = $object->print_all_ways(
" >> ",
'', 1);
81 foreach ($ways as $way) {
82 $morehtmlref .= $way.
"<br>\n";
84 $morehtmlref .=
'</div>';
86 dol_banner_tab($object,
'label', $linkback, ($user->socid ? 0 : 1),
'label',
'label', $morehtmlref,
'&type='.$type, 0,
'',
'', 1);
90 print
'<div class="fichecenter">';
91 print
'<div class="underbanner clearboth"></div>';
95 print
'<table "border centpercent tableforfield">';
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
categories_prepare_head(Categorie $object, $type)
Prepare array with list of tabs.
Class to manage categories.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
dol_print_object_info($object, $usetable=0)
Show informations on an object TODO Move this into html.formother.
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.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
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.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=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.