27require
'../main.inc.php';
28require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
29require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/categories.lib.php';
32if (!$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);
57if (is_numeric($type)) {
58 $type = Categorie::$MAP_ID_TO_CODE[$type];
67llxHeader(
'', $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);
82foreach ($ways as $way) {
83 $morehtmlref .= $way.
"<br>\n";
85$morehtmlref .=
'</div>';
87dol_banner_tab($object,
'label', $linkback, ($user->socid ? 0 : 1),
'label',
'label', $morehtmlref,
'&type='.$type, 0,
'',
'', 1);
91print
'<div class="fichecenter">';
92print
'<div class="underbanner clearboth"></div>';
96print
'<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.