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->hasRight(
'categorie',
'lire')) {
37 $langs->loadLangs(array(
'categories',
'sendings'));
41 $label =
GETPOST(
'label',
'alpha');
45 $socid = $user->socid;
50 $result =
$object->fetch($id, $label);
57 if (is_numeric($type)) {
58 $type = Categorie::$MAP_ID_TO_CODE[$type];
65 $form =
new Form($db);
67 llxHeader(
'', $langs->trans(
'Categories'),
'');
71 $title = Categorie::$MAP_TYPE_TITLE_AREA[$type];
76 $backtolist = (
GETPOST(
'backtolist') ?
GETPOST(
'backtolist') : DOL_URL_ROOT.
'/categories/index.php?leftmenu=cat&type='.urlencode($type));
77 $linkback =
'<a href="'.dol_sanitizeUrl($backtolist).
'">'.$langs->trans(
"BackToList").
'</a>';
80 $morehtmlref =
'<br><div class="refidno"><a href="'.DOL_URL_ROOT.
'/categories/index.php?leftmenu=cat&type='.urlencode($type).
'">'.$langs->trans(
"Root").
'</a> >> ';
81 $ways =
$object->print_all_ways(
" >> ",
'', 1);
82 foreach ($ways as $way) {
83 $morehtmlref .= $way.
"<br>\n";
85 $morehtmlref .=
'</div>';
87 dol_banner_tab(
$object,
'label', $linkback, ($user->socid ? 0 : 1),
'label',
'label', $morehtmlref,
'&type='.$type, 0,
'',
'', 1);
91 print
'<div class="fichecenter">';
92 print
'<div class="underbanner clearboth"></div>';
96 print
'<table "border centpercent tableforfield">';
if($user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
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.
dol_print_object_info($object, $usetable=0)
Show information on an object TODO Move this into html.formother.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
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.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
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.