36require
'../main.inc.php';
44require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
45require_once DOL_DOCUMENT_ROOT.
'/core/lib/categories.lib.php';
46require_once DOL_DOCUMENT_ROOT.
'/core/class/extrafields.class.php';
47require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
50$langs->loadLangs(array(
"categories",
"compta"));
52$action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
53$massaction =
GETPOST(
'massaction',
'alpha');
55$confirm =
GETPOST(
'confirm',
'alpha');
56$cancel =
GETPOST(
'cancel',
'alpha');
57$toselect =
GETPOST(
'toselect',
'array:int');
58$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'categorylist';
59$backtopage =
GETPOST(
'backtopage',
'alpha');
60$optioncss =
GETPOST(
'optioncss',
'aZ');
63$label =
GETPOST(
'label',
'alpha');
67if (
GETPOST(
'addintocategory')) {
68 $action =
'addintocategory';
74$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
75$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
77if (empty($page) || $page == -1 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha') || (empty($toselect) && $massaction ===
'0')) {
80$offset = $limit * $page;
84if ($id ==
"" && $label ==
"") {
90$hookmanager->initHooks(array(
'categorycard',
'globalcard'));
93$result =
$object->fetch($id, $label);
103if (is_numeric($type)) {
104 $type = array_search($type,
$object->MAP_ID);
108$extrafields->fetch_name_optionals_label(
$object->table_element);
114if ($confirm ==
'no') {
116 header(
"Location: ".$backtopage);
120$parameters = array(
'type' => $type,
'id' => $id,
'label' => $label);
121$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
123if ($id > 0 && $removeelem > 0 && $action ==
'unlink') {
126 if ($type == Categorie::TYPE_PRODUCT && ($user->hasRight(
'produit',
'creer') || $user->hasRight(
'service',
'creer'))) {
127 require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
129 $result = $tmpobject->fetch($removeelem);
130 $elementtype =
'product';
131 } elseif ($type == Categorie::TYPE_SUPPLIER && $user->hasRight(
'societe',
'creer')) {
133 $result = $tmpobject->fetch($removeelem);
134 $elementtype =
'supplier';
135 } elseif ($type == Categorie::TYPE_CUSTOMER && $user->hasRight(
'societe',
'creer')) {
137 $result = $tmpobject->fetch($removeelem);
138 $elementtype =
'customer';
139 } elseif ($type == Categorie::TYPE_MEMBER && $user->hasRight(
'adherent',
'creer')) {
140 require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
142 $result = $tmpobject->fetch($removeelem);
143 $elementtype =
'member';
144 } elseif ($type == Categorie::TYPE_CONTACT && $user->hasRight(
'societe',
'creer')) {
145 require_once DOL_DOCUMENT_ROOT.
'/contact/class/contact.class.php';
147 $result = $tmpobject->fetch($removeelem);
148 $elementtype =
'contact';
149 } elseif ($type == Categorie::TYPE_ACCOUNT && $user->hasRight(
'banque',
'configurer')) {
150 require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
152 $result = $tmpobject->fetch($removeelem);
153 $elementtype =
'account';
154 } elseif ($type == Categorie::TYPE_PROJECT && $user->hasRight(
'projet',
'creer')) {
155 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
157 $result = $tmpobject->fetch($removeelem);
158 $elementtype =
'project';
159 } elseif ($type == Categorie::TYPE_USER && $user->hasRight(
'user',
'user',
'creer')) {
160 require_once DOL_DOCUMENT_ROOT.
'/user/class/user.class.php';
161 $tmpobject =
new User($db);
162 $result = $tmpobject->fetch($removeelem);
163 $elementtype =
'user';
164 } elseif ($type == Categorie::TYPE_TICKET && $user->hasRight(
'ticket',
'write')) {
165 require_once DOL_DOCUMENT_ROOT.
'/ticket/class/ticket.class.php';
166 $tmpobject =
new Ticket($db);
167 $result = $tmpobject->fetch($removeelem);
168 $elementtype =
'ticket';
169 } elseif ($type == Categorie::TYPE_FICHINTER && $user->hasRight(
'ficheinter',
'write')) {
170 require_once DOL_DOCUMENT_ROOT.
'/fichinter/class/fichinter.class.php';
172 $result = $tmpobject->fetch($removeelem);
173 $elementtype =
'fichinter';
174 } elseif ($type == Categorie::TYPE_ORDER && $user->hasRight(
'commande',
'creer')) {
175 require_once DOL_DOCUMENT_ROOT.
'/commande/class/commande.class.php';
177 $result = $tmpobject->fetch($removeelem);
178 $elementtype =
'order';
179 } elseif ($type == Categorie::TYPE_INVOICE && $user->hasRight(
'facture',
'creer')) {
180 require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
182 $result = $tmpobject->fetch($removeelem);
183 $elementtype =
'invoice';
184 } elseif ($type == Categorie::TYPE_SUPPLIER_ORDER && $user->hasRight(
'fournisseur',
'commande',
'creer')) {
185 require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.commande.class.php';
187 $result = $tmpobject->fetch($removeelem);
188 $elementtype =
'supplier_order';
194 if ($tmpobject !==
null) {
196 $result =
$object->del_type($tmpobject, $elementtype);
203if ($user->hasRight(
'categorie',
'supprimer') && $action ==
'confirm_delete' && $confirm ==
'yes') {
204 if (
$object->delete($user) >= 0) {
206 header(
"Location: ".$backtopage);
209 header(
"Location: ".
dolBuildUrl(DOL_URL_ROOT.
'/categories/categorie_list.php', [
'type' => $type]));
217if ($elemid && $action ==
'addintocategory') {
220 if ($type == Categorie::TYPE_PRODUCT && ($user->hasRight(
'produit',
'creer') || $user->hasRight(
'service',
'creer'))) {
221 require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
223 $elementtype =
'product';
224 } elseif ($type == Categorie::TYPE_CUSTOMER && $user->hasRight(
'societe',
'creer')) {
225 require_once DOL_DOCUMENT_ROOT.
'/societe/class/societe.class.php';
227 $elementtype =
'customer';
228 } elseif ($type == Categorie::TYPE_SUPPLIER && $user->hasRight(
'societe',
'creer')) {
229 require_once DOL_DOCUMENT_ROOT.
'/societe/class/societe.class.php';
231 $elementtype =
'supplier';
232 } elseif ($type == Categorie::TYPE_TICKET && $user->hasRight(
'ticket',
'write')) {
233 require_once DOL_DOCUMENT_ROOT.
'/ticket/class/ticket.class.php';
234 $newobject =
new Ticket($db);
235 $elementtype =
'ticket';
236 } elseif ($type == Categorie::TYPE_FICHINTER && $user->hasRight(
'ficheinter',
'write')) {
237 require_once DOL_DOCUMENT_ROOT.
'/fichinter/class/fichinter.class.php';
239 $elementtype =
'fichinter';
240 } elseif ($type == Categorie::TYPE_PROJECT && $user->hasRight(
'projet',
'creer')) {
241 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
243 $elementtype =
'project';
244 } elseif ($type == Categorie::TYPE_MEMBER && $user->hasRight(
'adherent',
'creer')) {
245 require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
247 $elementtype =
'member';
248 } elseif ($type == Categorie::TYPE_CONTACT && $user->hasRight(
'societe',
'creer')) {
249 require_once DOL_DOCUMENT_ROOT.
'/contact/class/contact.class.php';
251 $elementtype =
'contact';
252 } elseif ($type == Categorie::TYPE_USER && $user->hasRight(
'user',
'user',
'creer')) {
253 require_once DOL_DOCUMENT_ROOT.
'/user/class/user.class.php';
254 $newobject =
new User($db);
255 $elementtype =
'user';
256 } elseif ($type == Categorie::TYPE_ACCOUNT && $user->hasRight(
'banque',
'configurer')) {
257 require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
259 $elementtype =
'bank_account';
260 } elseif ($type == Categorie::TYPE_ORDER && $user->hasRight(
'commande',
'creer')) {
261 require_once DOL_DOCUMENT_ROOT.
'/commande/class/commande.class.php';
263 $elementtype =
'order';
264 } elseif ($type == Categorie::TYPE_INVOICE && $user->hasRight(
'facture',
'creer')) {
265 require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
267 $elementtype =
'invoice';
268 } elseif ($type == Categorie::TYPE_SUPPLIER_ORDER && $user->hasRight(
'fournisseur',
'commande',
'creer')) {
269 require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.commande.class.php';
271 $elementtype =
'supplier_order';
272 } elseif ($type == Categorie::TYPE_SUPPLIER_INVOICE && $user->hasRight(
'fournisseur',
'facture',
'creer')) {
273 require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.facture.class.php';
275 $elementtype =
'supplier_invoice';
279 if ($newobject !==
null) {
280 $result = $newobject->fetch($elemid);
283 if ($result >= 0 && $newobject !==
null) {
285 $result =
$object->add_type($newobject, $elementtype);
288 setEventMessages($langs->trans(
"WasAddedSuccessfully", $newobject->ref),
null,
'mesgs');
290 if (
$object->error ==
'DB_ERROR_RECORD_ALREADY_EXISTS') {
291 setEventMessages($langs->trans(
"ObjectAlreadyLinkedToCategory"),
null,
'warnings');
303$form =
new Form($db);
307 '/includes/jquery/plugins/jquerytreeview/jquery.treeview.js',
308 '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js'
310$arrayofcss = array(
'/includes/jquery/plugins/jquerytreeview/jquery.treeview.css');
314llxHeader(
"", $langs->trans(
"Categories"), $help_url,
'', 0, 0, $arrayofjs, $arrayofcss);
316$title = $langs->trans(
"Categories");
317$title .=
' ('.$langs->trans(empty(Categorie::$MAP_TYPE_TITLE_AREA[$type]) ? ucfirst($type) :
Categorie::$MAP_TYPE_TITLE_AREA[$type]).
')';
322$backtolist = (
GETPOST(
'backtolist') ?
GETPOST(
'backtolist') : DOL_URL_ROOT.
'/categories/categorie_list.php?leftmenu=cat&type='.urlencode($type));
323$linkback =
'<a href="'.dol_sanitizeUrl($backtolist).
'">'.$langs->trans(
"BackToList").
'</a>';
326$morehtmlref =
'<br><div class="refidno"><a href="'.DOL_URL_ROOT.
'/categories/categorie_list.php?leftmenu=cat&type='.urlencode($type).
'">'.$langs->trans(
"Root").
'</a>';
327$morehtmlref .=
' > ';
328$ways =
$object->print_all_ways(
"auto",
'', 1, 0, 1);
329foreach ($ways as $way) {
330 $morehtmlref .= $way.
"<br>\n";
332$morehtmlref .=
'</div>';
334dol_banner_tab($object,
'label', $linkback, ($user->socid ? 0 : 1),
'label',
'label', $morehtmlref,
'&type='.urlencode($type), 0,
'',
'', 1);
338if ($action ==
'delete') {
340 print $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&type='.urlencode($type).
'&backtopage='.urlencode($backtopage), $langs->trans(
'DeleteCategory'), $langs->trans(
'ConfirmDeleteCategory'),
'confirm_delete',
'',
'', 2);
342 print $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&type='.urlencode($type), $langs->trans(
'DeleteCategory'), $langs->trans(
'ConfirmDeleteCategory'),
'confirm_delete',
'',
'', 1);
348print
'<div class="fichecenter">';
349print
'<div class="underbanner clearboth"></div>';
350print
'<table class="border centpercent tableforfield">';
353print
'<tr><td class="titlefield notopnoleft tdtop">';
354print $langs->trans(
"Description").
'</td><td>';
359print
'<tr><td class="notopnoleft">';
360print $langs->trans(
"Color").
'</td><td>';
361print $formother->showColor(
$object->color);
365print
'<tr><td class="titlefield notopnoleft">';
366print $langs->trans(
"Position").
'</td><td>';
371include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
383print
"<div class='tabsAction'>\n";
384$reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
388if (empty($reshook)) {
389 if ($user->hasRight(
'categorie',
'creer')) {
391 print
'<a class="butAction" href="'.dolBuildUrl(DOL_URL_ROOT.
'/categories/edit.php', [
'id' =>
$object->id,
'socid' => $socid,
'type' => $type]).
'">'.$langs->trans(
"Modify").
'</a>';
394 if ($user->hasRight(
'categorie',
'supprimer')) {
395 print
'<a class="butActionDelete" href="'.dolBuildUrl($_SERVER[
"PHP_SELF"], [
'action' =>
'delete',
'id' =>
$object->id,
'type' => $type,
'backtolist' => $backtolist],
true).
'">'.$langs->trans(
"Delete").
'</a>';
402if ($user->hasRight(
'categorie',
'creer')) {
403 $link =
dolBuildUrl(DOL_URL_ROOT.
'/categories/card.php', [
'action'=>
'create',
'type' => $type,
'catorigin' =>
$object->id,
'backtopage' =>
dolBuildUrl($_SERVER[
"PHP_SELF"], [
'type' => $type,
'id' => $id])]);
405 $newcardbutton =
'<div class="right">';
406 $newcardbutton .=
dolGetButtonTitle($langs->trans(
'NewCategory'),
'',
'fa fa-plus-circle', $link);
407 $newcardbutton .=
'</div>';
415print
'<div class="fichecenter">';
417print
load_fiche_titre($langs->trans(
"SubCats"), $newcardbutton,
'object_category');
421print
'<table class="liste nohover noborder centpercent borderbottom">';
423print
'<tr class="liste_titre">';
424print
'<td>'.$langs->trans(
"SubCats").
'</td>';
426print
'<td class="right">';
428if (is_array($cats) && count($cats) > 1 && !empty($conf->use_javascript_ajax)) {
429 print
'<div id="iddivjstreecontrol">';
430 print
'<a class="notasortlink" href="#">'.img_picto(
'',
'folder').
' '.$langs->trans(
"UndoExpandAll").
'</a>';
432 print
'<a class="notasortlink" href="#">'.img_picto(
'',
'folder-open').
' '.$langs->trans(
"ExpandAll").
'</a>';
439if (is_numeric($cats) && $cats < 0) {
441} elseif (count($cats) < 1) {
442 print
'<tr class="oddeven nobottom nohover">';
443 print
'<td colspan="3"><span class="opacitymedium">'.$langs->trans(
"NoSubCat").
'</span></td>';
448 $fulltree = $categstatic->get_full_arbo($type,
$object->id, 1);
452 if ($type == Categorie::TYPE_MEMBER) {
453 require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
455 if ($type == Categorie::TYPE_ACCOUNT) {
456 require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
458 if ($type == Categorie::TYPE_PROJECT) {
459 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
461 if ($type == Categorie::TYPE_USER) {
462 require_once DOL_DOCUMENT_ROOT.
'/user/class/user.class.php';
468 $data[] = array(
'rowid' => 0,
'fk_menu' => -1,
'title' =>
'racine',
'mainmenu' =>
'',
'leftmenu' =>
'',
'fk_mainmenu' =>
'',
'fk_leftmenu' =>
'');
469 foreach ($fulltree as $key => $val) {
470 $categstatic->id = $val[
'id'];
471 $categstatic->ref = $val[
'label'];
472 $categstatic->color = $val[
'color'];
473 $categstatic->type = $type;
479 $elements = $categstatic->getObjectsInCateg($type, 1);
481 $counter =
"<td class='left' width='40px;'>".(is_array($elements) ? count($elements) :
'0').
"</td>";
484 if ($categstatic->color) {
485 $stylecolor =
' style="background: #'.sprintf(
"%06s", $categstatic->color).
';"';
487 $stylecolor =
' style="background: #bbb;"';
489 $li = $categstatic->getNomUrl(1,
'', 60,
'&backtolist='.urlencode($_SERVER[
"PHP_SELF"].
'?id='.((
int) $id).
'&type='.urlencode($type)), 0);
491 $entry =
'<table class="nobordernopadding centpercent">';
495 $entry .=
'<span class="noborderoncategories" '.$stylecolor.
'>'.$li.
'</span>';
500 $entry .=
'<td class="right" width="20px;">';
501 $entry .=
'<a href="'.DOL_URL_ROOT.
'/categories/viewcat.php?id='.$val[
'id'].
'&type='.urlencode($type).
'&backtolist='.urlencode($_SERVER[
"PHP_SELF"].
'?id='.
$id.
'&type='.urlencode($type)).
'">'.
img_view().
'</a>';
503 $entry .=
'<td class="right" width="20px;">';
504 $entry .=
'<a class="editfielda" href="'.DOL_URL_ROOT.
'/categories/edit.php?id='.$val[
'id'].
'&type='.urlencode($type).
'&backtopage='.urlencode($_SERVER[
"PHP_SELF"].
'?id='.
$id.
'&type='.urlencode($type)).
'">'.
img_edit().
'</a>';
506 $entry .=
'<td class="right" width="20px;">';
507 $entry .=
'<a class="deletefilelink" href="'.DOL_URL_ROOT.
'/categories/viewcat.php?action=delete&token='.
newToken().
'&id='.$val[
'id'].
'&type='.urlencode($type).
'&backtopage='.urlencode($_SERVER[
"PHP_SELF"].
'?id='.
$id.
'&type='.urlencode($type)).
'&backtolist='.urlencode($_SERVER[
"PHP_SELF"].
'?id='.
$id.
'&type='.urlencode($type)).
'">'.
img_delete().
'</a>';
511 $entry .=
'</table>';
513 $data[] = array(
'rowid' => $val[
'rowid'],
'fk_menu' => $val[
'fk_parent'],
'entry' => $entry);
516 $nbofentries = (count($data) - 1);
517 if ($nbofentries > 0) {
518 require_once DOL_DOCUMENT_ROOT.
'/core/lib/treeview.lib.php';
519 print
'<tr class="pair">';
520 print
'<td colspan="3">';
528 print
'<tr class="pair">';
529 print
'<td colspan="3">';
530 print
'<table class="nobordernopadding">';
532 print
'<tr class="nobordernopadding">';
533 print
'<td>'.img_picto_common(
'',
'treemenu/branchbottom.gif').
'</td>';
534 print
'<td class="valignmiddle"><span class="opacitymedium">'.$langs->trans(
"NoCategoryYet").
'</span></td>';
535 print
'<td> </td>';
548$arrayofmassactions = array(
554$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
560if ($type == Categorie::TYPE_PRODUCT) {
561 if ($user->hasRight(
"product",
"read") || $user->hasRight(
"service",
"read")) {
562 $permission = ($user->hasRight(
'produit',
'creer') || $user->hasRight(
'service',
'creer'));
563 $showclassifyform = ($user->hasRight(
'produit',
'creer') || $user->hasRight(
'service',
'creer'));
565 $prods =
$object->getObjectsInCateg($type, 0, $limit, $offset,
'ref');
570 '@phan-var-force Product[] $prods';
572 print
'<form method="post" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
573 print
'<input type="hidden" name="token" value="'.newToken().
'">';
574 print
'<input type="hidden" name="typeid" value="'.$typeid.
'">';
575 print
'<input type="hidden" name="type" value="'.$typeid.
'">';
576 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
577 print
'<input type="hidden" name="page_y" value="">';
578 print
'<input type="hidden" name="action" value="list">';
581 $param =
'&limit='.$limit.
'&id='.
$id.
'&type='.$type;
582 $num = count($prods);
583 $nbtotalofrecords =
'';
584 $newcardbutton =
dolGetButtonTitle($langs->trans(
"AddProduct"),
'',
'fa fa-plus-circle', DOL_URL_ROOT.
'/product/card.php?action=create&categories[]='.
$object->id.
'&backtopage='.urlencode($_SERVER[
"PHP_SELF"].
'?id='.
$object->id),
'', $user->hasRight(
'societe',
'creer'));
587 print_barre_liste($langs->trans(
"ProductsAndServices"), $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'products', 0, $newcardbutton,
'', $limit);
589 if ($showclassifyform) {
590 print
'<table class="noborder centpercent">';
591 print
'<tr class="liste_titre"><td>';
592 print $langs->trans(
"AddProductServiceIntoCategory").
' ';
593 $form->select_produits(0,
'elemid',
'', 0, 0, -1, 2,
'', 1, array(), 0, 1, 0,
'', 0,
'',
null);
594 print
'<input type="submit" class="button buttongen" name="addintocategory" value="'.$langs->trans(
"ClassifyInCategory").
'"></td>';
599 print
'<table class="noborder centpercent">'.
"\n";
600 print
'<tr class="liste_titre"><td colspan="3">'.$langs->trans(
"Ref").
'</td></tr>'.
"\n";
602 if (count($prods) > 0) {
604 foreach ($prods as $prod) {
610 print
'<tr class="oddeven">'.
"\n";
611 print
'<td class="nowrap tdtop">';
612 print $prod->getNomUrl(1);
614 print
'<td class="tdtop">'.dolPrintHTML($prod->label).
"</td>\n";
616 print
'<td class="right">';
618 print
'<a class="reposition" href= "'.$_SERVER[
'PHP_SELF'].
"?".(empty($socid) ?
'id' :
'socid').
"=".((
int)
$object->id).
"&type=".urlencode($typeid).
"&action=unlink&token=".
newToken().
"&removeelem=".((int) $prod->id).($limit ?
'&limit='.$limit :
'').
'">';
620 print
img_picto($langs->trans(
"DeleteFromCat"),
'unlink',
'', 0, 0, 0,
'',
'paddingleft');
627 print
'<tr class="oddeven"><td colspan="2"><span class="opacitymedium">'.$langs->trans(
"ThisCategoryHasNoItems").
'</span></td></tr>';
634 print_barre_liste($langs->trans(
"ProductsAndServices"),
null, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', 0,
'',
'products');
640if ($type == Categorie::TYPE_CUSTOMER) {
641 if ($user->hasRight(
"societe",
"read")) {
642 $permission = $user->hasRight(
'societe',
'creer');
643 $showclassifyform = $user->hasRight(
'societe',
'creer');
645 $socs =
$object->getObjectsInCateg($type, 0, $limit, $offset,
'nom');
650 '@phan-var-force Societe[] $socs';
652 print
'<form method="post" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
653 print
'<input type="hidden" name="token" value="'.newToken().
'">';
654 print
'<input type="hidden" name="typeid" value="'.$typeid.
'">';
655 print
'<input type="hidden" name="type" value="'.$typeid.
'">';
656 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
657 print
'<input type="hidden" name="action" value="list">';
658 print
'<input type="hidden" name="page_y" value="">';
661 $param =
'&limit='.$limit.
'&id='.
$id.
'&type='.$type;
663 $nbtotalofrecords =
'';
664 $newcardbutton =
dolGetButtonTitle($langs->trans(
"AddThirdParty"),
'',
'fa fa-plus-circle', DOL_URL_ROOT.
'/societe/card.php?action=create&customer=3&custcats[]='.
$object->id.
'&backtopage='.urlencode($_SERVER[
"PHP_SELF"].
'?id='.
$object->id),
'', $user->hasRight(
'societe',
'creer'));
667 print_barre_liste($langs->trans(
"Customers"), $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'companies', 0, $newcardbutton,
'', $limit);
669 if ($showclassifyform) {
670 print
'<table class="noborder centpercent">';
671 print
'<tr class="liste_titre"><td>';
672 print $langs->trans(
"AddCustomerIntoCategory").
' ';
673 $filter =
'(s.client:IN:1,2,3)';
674 print $form->select_company(
'',
'elemid', $filter);
675 print
'<input type="submit" class="reposition button buttongen" name="addintocategory" value="'.$langs->trans(
"ClassifyInCategory").
'"></td>';
680 print
'<table class="noborder centpercent">'.
"\n";
681 print
'<tr class="liste_titre"><td colspan="2">'.$langs->trans(
"Name").
'</td></tr>'.
"\n";
683 if (count($socs) > 0) {
685 foreach ($socs as $key => $soc) {
691 print
"\t".
'<tr class="oddeven">'.
"\n";
692 print
'<td class="nowrap tdtop tdoverflowmax250">';
693 print $soc->getNomUrl(1);
696 print
'<td class="right">';
698 print
"<a href= '".$_SERVER[
'PHP_SELF'].
"?".(empty($socid) ?
'id' :
'socid').
"=".
$object->id.
"&type=".urlencode($typeid).
"&action=unlink&token=".
newToken().
"&removeelem=".((int) $soc->id).($limit ?
'&limit='.$limit :
'').
"'>";
700 print
img_picto($langs->trans(
"DeleteFromCat"),
'unlink',
'', 0, 0, 0,
'',
'paddingleft');
707 print
'<tr class="oddeven"><td colspan="2"><span class="opacitymedium">'.$langs->trans(
"ThisCategoryHasNoItems").
'</span></td></tr>';
714 print_barre_liste($langs->trans(
"Customers"),
null, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', 0,
'',
'companies');
720if ($type == Categorie::TYPE_SUPPLIER) {
721 if ($user->hasRight(
"fournisseur",
"read")) {
722 $permission = $user->hasRight(
'societe',
'creer');
723 $showclassifyform = $user->hasRight(
'societe',
'creer');
725 $socs =
$object->getObjectsInCateg($type, 0, $limit, $offset,
'nom');
731 '@phan-var-force Fournisseur[] $socs';
733 print
'<form method="post" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
734 print
'<input type="hidden" name="token" value="'.newToken().
'">';
735 print
'<input type="hidden" name="typeid" value="'.$typeid.
'">';
736 print
'<input type="hidden" name="type" value="'.$typeid.
'">';
737 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
738 print
'<input type="hidden" name="page_y" value="">';
739 print
'<input type="hidden" name="action" value="list">';
742 $param =
'&limit='.$limit.
'&id='.
$id.
'&type='.$type;
744 $nbtotalofrecords =
'';
745 $newcardbutton =
dolGetButtonTitle($langs->trans(
"AddSupplier"),
'',
'fa fa-plus-circle', DOL_URL_ROOT.
'/societe/card.php?action=create&fournisseur=1&suppcats[]='.
$object->id.
'&backtopage='.urlencode($_SERVER[
"PHP_SELF"].
'?id='.
$object->id),
'', $user->hasRight(
'societe',
'creer'));
748 print_barre_liste($langs->trans(
"Suppliers"), $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'companies', 0, $newcardbutton,
'', $limit);
750 if ($showclassifyform) {
751 print
'<table class="noborder centpercent">';
752 print
'<tr class="liste_titre"><td>';
753 print $langs->trans(
"AddSupplierIntoCategory").
' ';
754 $filter =
'(s.fournisseur:=:1)';
755 print $form->select_company(
'',
'elemid', $filter);
756 print
'<input type="submit" class="button buttongen" name="addintocategory" value="'.$langs->trans(
"ClassifyInCategory").
'"></td>';
761 print
'<table class="noborder centpercent">'.
"\n";
762 print
'<tr class="liste_titre"><td colspan="2">'.$langs->trans(
"Name").
"</td></tr>\n";
764 if (count($socs) > 0) {
766 foreach ($socs as $soc) {
772 print
"\t".
'<tr class="oddeven">'.
"\n";
773 print
'<td class="nowrap tdtop">';
774 print $soc->getNomUrl(1);
777 print
'<td class="right">';
779 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
"?".(empty($socid) ?
'id' :
'socid').
"=".
$object->id.
"&type=".urlencode($typeid).
"&action=unlink&token=".
newToken().
"&removeelem=".((int) $soc->id).($limit ?
'&limit='.$limit :
'').
'">';
781 print
img_picto($langs->trans(
"DeleteFromCat"),
'unlink',
'', 0, 0, 0,
'',
'paddingleft');
789 print
'<tr class="oddeven"><td colspan="2"><span class="opacitymedium">'.$langs->trans(
"ThisCategoryHasNoItems").
'</span></td></tr>';
796 print_barre_liste($langs->trans(
"Suppliers"),
null, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', 0,
'',
'companies');
802if ($type == Categorie::TYPE_MEMBER) {
803 if ($user->hasRight(
"adherent",
"read")) {
804 require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
806 $permission = $user->hasRight(
'adherent',
'creer');
807 $showclassifyform = $user->hasRight(
'adherent',
'creer');
809 $members =
$object->getObjectsInCateg($type, 0, $limit, $offset,
'lastname');
814 '@phan-var-force Adherent[] $members';
816 print
'<form method="post" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
817 print
'<input type="hidden" name="token" value="'.newToken().
'">';
818 print
'<input type="hidden" name="typeid" value="'.$typeid.
'">';
819 print
'<input type="hidden" name="type" value="'.$typeid.
'">';
820 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
821 print
'<input type="hidden" name="page_y" value="">';
822 print
'<input type="hidden" name="action" value="list">';
825 $param =
'&limit='.$limit.
'&id='.
$id.
'&type='.$type;
826 $num = count($members);
827 $nbtotalofrecords =
'';
828 $newcardbutton =
dolGetButtonTitle($langs->trans(
"AddMember"),
'',
'fa fa-plus-circle', DOL_URL_ROOT.
'/adherents/card.php?action=create&memcats[]='.
$object->id.
'&backtopage='.urlencode($_SERVER[
"PHP_SELF"].
'?id='.
$object->id),
'', $user->hasRight(
'adherent',
'creer'));
831 print_barre_liste($langs->trans(
"Member"), $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'members', 0, $newcardbutton,
'', $limit);
833 if ($showclassifyform) {
834 print
'<table class="noborder centpercent">';
835 print
'<tr class="liste_titre"><td>';
836 print $langs->trans(
"AssignCategoryTo").
' ';
837 print $form->selectMembers(
'',
'elemid');
838 print
'<input type="submit" class="button buttongen" value="'.$langs->trans(
"Save").
'"></td>';
843 print
'<table class="noborder centpercent">'.
"\n";
844 print
'<tr class="liste_titre"><td colspan="4">'.$langs->trans(
"Name").
'</td></tr>'.
"\n";
846 if (count($members) > 0) {
848 foreach ($members as $key => $member) {
854 print
"\t".
'<tr class="oddeven">'.
"\n";
855 print
'<td class="nowrap tdtop">';
856 $member->ref = $member->login;
857 print $member->getNomUrl(1, 0);
859 print
'<td class="tdtop">'.$member->lastname.
"</td>\n";
860 print
'<td class="tdtop">'.$member->firstname.
"</td>\n";
862 print
'<td class="right">';
864 print
"<a href= '".$_SERVER[
'PHP_SELF'].
"?".(empty($socid) ?
'id' :
'socid').
"=".
$object->id.
"&type=".urlencode($typeid).
"&action=unlink&token=".
newToken().
"&removeelem=".((int) $member->id).($limit ?
'&limit='.$limit :
'').
"'>";
866 print
img_picto($langs->trans(
"DeleteFromCat"),
'unlink',
'', 0, 0, 0,
'',
'paddingleft');
873 print
'<tr class="oddeven"><td colspan="4"><span class="opacitymedium">'.$langs->trans(
"ThisCategoryHasNoItems").
'</span></td></tr>';
880 print_barre_liste($langs->trans(
"Member"),
null, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', 0,
'',
'members');
886if ($type == Categorie::TYPE_CONTACT) {
887 if ($user->hasRight(
"societe",
"read")) {
888 $permission = $user->hasRight(
'societe',
'creer');
889 $showclassifyform = $user->hasRight(
'societe',
'creer');
891 $contacts =
$object->getObjectsInCateg($type, 0, $limit, $offset,
'lastname');
892 if (is_numeric($contacts) && $contacts < 0) {
896 '@phan-var-force Contact[] $contacts';
898 print
'<form method="post" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
899 print
'<input type="hidden" name="token" value="'.newToken().
'">';
900 print
'<input type="hidden" name="typeid" value="'.$typeid.
'">';
901 print
'<input type="hidden" name="type" value="'.$typeid.
'">';
902 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
903 print
'<input type="hidden" name="page_y" value="">';
904 print
'<input type="hidden" name="action" value="list">';
907 $param =
'&limit='.$limit.
'&id='.
$id.
'&type='.$type;
908 $num = count($contacts);
909 $nbtotalofrecords =
'';
910 $newcardbutton =
dolGetButtonTitle($langs->trans(
"AddContact"),
'',
'fa fa-plus-circle', DOL_URL_ROOT.
'/contact/card.php?action=create&contcats[]='.
$object->id.
'&backtopage='.urlencode($_SERVER[
"PHP_SELF"].
'?id='.
$object->id),
'', $user->hasRight(
'societe',
'creer'));
915 print_barre_liste($langs->trans(
"Contact"), $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'contact', 0, $newcardbutton,
'', $limit);
917 if ($showclassifyform) {
918 print
'<table class="noborder centpercent">';
919 print
'<tr class="liste_titre"><td>';
920 print $langs->trans(
"AssignCategoryTo").
' ';
921 print $form->select_contact(0,
'',
'elemid',
'',
'',
'', 0,
'maxwidth300 widthcentpercentminusx');
922 print
'<input type="submit" class="button buttongen" name="addintocategory" value="'.$langs->trans(
"ClassifyInCategory").
'"></td>';
927 print
'<table class="noborder centpercent">'.
"\n";
928 print
'<tr class="liste_titre"><td colspan="2">'.$langs->trans(
"Ref").
'</td></tr>'.
"\n";
930 if (is_array($contacts) && count($contacts) > 0) {
932 foreach ($contacts as $key => $contact) {
938 print
"\t".
'<tr class="oddeven">'.
"\n";
939 print
'<td class="nowrap tdtop">';
940 print $contact->getNomUrl(1,
'category');
941 if ($contact->socid > 0) {
942 $objsoc->fetch($contact->socid);
944 print $objsoc->getNomUrl(1,
'contact');
948 print
'<td class="right">';
950 print
"<a href= '".$_SERVER[
'PHP_SELF'].
"?".(empty($socid) ?
'id' :
'socid').
"=".
$object->id.
"&type=".urlencode($typeid).
"&action=unlink&token=".
newToken().
"&removeelem=".((int) $contact->id).($limit ?
'&limit='.$limit :
'').
"'>";
952 print
img_picto($langs->trans(
"DeleteFromCat"),
'unlink',
'', 0, 0, 0,
'',
'paddingleft');
959 print
'<tr class="oddeven"><td colspan="2"><span class="opacitymedium">'.$langs->trans(
"ThisCategoryHasNoItems").
'</span></td></tr>';
966 print_barre_liste($langs->trans(
"Contact"),
null, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', 0,
'',
'contact');
972if ($type == Categorie::TYPE_ACCOUNT) {
973 if ($user->hasRight(
"banque",
"read")) {
974 require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
976 $permission = $user->hasRight(
'banque',
'creer');
977 $showclassifyform = $user->hasRight(
'banque',
'creer');
979 $accounts =
$object->getObjectsInCateg($type, 0, $limit, $offset);
984 '@phan-var-force Account[] $accounts';
986 print
'<form method="post" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
987 print
'<input type="hidden" name="token" value="'.newToken().
'">';
988 print
'<input type="hidden" name="typeid" value="'.$typeid.
'">';
989 print
'<input type="hidden" name="type" value="'.$typeid.
'">';
990 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
991 print
'<input type="hidden" name="page_y" value="">';
992 print
'<input type="hidden" name="action" value="list">';
995 $param =
'&limit='.$limit.
'&id='.
$id.
'&type='.$type;
996 $num = count($accounts);
997 $nbtotalofrecords =
'';
1001 print_barre_liste($langs->trans(
"Account"), $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'bank_account', 0, $newcardbutton,
'', $limit);
1003 if ($showclassifyform) {
1004 print
'<table class="noborder centpercent">';
1005 print
'<tr class="liste_titre"><td>';
1006 print $langs->trans(
"AddObjectIntoCategory").
' ';
1007 print $form->select_comptes(
'',
'elemid', 0,
'', 0,
'', 0,
'', 1);
1008 print
'<input type="submit" class="button buttongen" name="addintocategory" value="'.$langs->trans(
"ClassifyInCategory").
'"></td>';
1013 print
'<table class="noborder centpercent">'.
"\n";
1014 print
'<tr class="liste_titre"><td colspan="4">'.$langs->trans(
"Ref").
'</td></tr>'.
"\n";
1016 if (count($accounts) > 0) {
1018 foreach ($accounts as $key => $account) {
1024 print
"\t".
'<tr class="oddeven">'.
"\n";
1025 print
'<td class="nowrap tdtop">';
1026 print $account->getNomUrl(1,
'0');
1028 print
'<td class="tdtop">'.$account->bank.
"</td>\n";
1029 print
'<td class="tdtop">'.$account->number.
"</td>\n";
1031 print
'<td class="right">';
1033 print
"<a href= '".$_SERVER[
'PHP_SELF'].
"?".(empty($socid) ?
'id' :
'socid').
"=".
$object->id.
"&type=".urlencode($typeid).
"&action=unlink&token=".
newToken().
"&removeelem=".((int) $account->id).($limit ?
'&limit='.$limit :
'').
"'>";
1035 print
img_picto($langs->trans(
"DeleteFromCat"),
'unlink',
'', 0, 0, 0,
'',
'paddingleft');
1042 print
'<tr class="oddeven"><td colspan="4"><span class="opacitymedium">'.$langs->trans(
"ThisCategoryHasNoItems").
'</span></td></tr>';
1049 print_barre_liste($langs->trans(
"Banque"),
null, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', 0,
'',
'bank');
1055if ($type == Categorie::TYPE_PROJECT) {
1056 if ($user->hasRight(
"project",
"read")) {
1057 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
1059 $permission = $user->hasRight(
'projet',
'creer');
1060 $showclassifyform = $user->hasRight(
'projet',
'creer');
1062 $objects =
$object->getObjectsInCateg($type, 0, $limit, $offset);
1067 '@phan-var-force Project[] $objects';
1069 print
'<form method="post" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
1070 print
'<input type="hidden" name="token" value="'.newToken().
'">';
1071 print
'<input type="hidden" name="typeid" value="'.$typeid.
'">';
1072 print
'<input type="hidden" name="type" value="'.$typeid.
'">';
1073 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
1074 print
'<input type="hidden" name="page_y" value="">';
1075 print
'<input type="hidden" name="action" value="list">';
1078 $param =
'&limit='.$limit.
'&id='.
$id.
'&type='.$type;
1079 $num = count($objects);
1080 $nbtotalofrecords =
'';
1081 $newcardbutton =
'';
1084 print_barre_liste($langs->trans(
"Project"), $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'project', 0, $newcardbutton,
'', $limit);
1086 if ($showclassifyform) {
1087 print
'<table class="noborder centpercent">';
1088 print
'<tr class="liste_titre"><td>';
1089 print $langs->trans(
"AddObjectIntoCategory").
' ';
1090 $form->selectProjects(
'',
'elemid');
1091 print
'<input type="submit" class="button buttongen" name="addintocategory" value="'.$langs->trans(
"ClassifyInCategory").
'"></td>';
1096 print
'<table class="noborder centpercent">'.
"\n";
1097 print
'<tr class="liste_titre"><td colspan="4">'.$langs->trans(
"Ref").
'</td></tr>'.
"\n";
1099 if (count($objects) > 0) {
1101 foreach ($objects as $key => $project) {
1107 print
"\t".
'<tr class="oddeven">'.
"\n";
1108 print
'<td class="nowrap tdtop">';
1109 print $project->getNomUrl(1);
1111 print
'<td class="tdtop">'.$project->title.
"</td>\n";
1113 print
'<td class="right">';
1115 print
"<a href= '".$_SERVER[
'PHP_SELF'].
"?".(empty($socid) ?
'id' :
'socid').
"=".
$object->id.
"&type=".urlencode($typeid).
"&action=unlink&token=".
newToken().
"&removeelem=".((int) $project->id).($limit ?
'&limit='.$limit :
'').
"'>";
1117 print
img_picto($langs->trans(
"DeleteFromCat"),
'unlink',
'', 0, 0, 0,
'',
'paddingleft');
1124 print
'<tr class="oddeven"><td colspan="4"><span class="opacitymedium">'.$langs->trans(
"ThisCategoryHasNoItems").
'</span></td></tr>';
1131 print_barre_liste($langs->trans(
"Project"),
null, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', 0,
'',
'project');
1137if ($type == Categorie::TYPE_USER) {
1138 if ($user->hasRight(
"user",
"user",
"read")) {
1139 require_once DOL_DOCUMENT_ROOT.
'/user/class/user.class.php';
1140 $showclassifyform = $user->hasRight(
"user",
"user",
"creer");
1142 $users =
$object->getObjectsInCateg($type, 0, 0, 0,
'lastname');
1147 '@phan-var-force User[] $users';
1150 print
'<form method="post" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
1151 print
'<input type="hidden" name="token" value="'.newToken().
'">';
1152 print
'<input type="hidden" name="typeid" value="'.$typeid.
'">';
1153 print
'<input type="hidden" name="type" value="'.$typeid.
'">';
1154 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
1155 print
'<input type="hidden" name="page_y" value="">';
1156 print
'<input type="hidden" name="action" value="list">';
1160 $param =
'&limit='.$limit.
'&id='.
$id.
'&type='.$type;
1161 $num = count($users);
1162 $nbtotalofrecords =
'';
1163 $newcardbutton =
'';
1166 print_barre_liste($langs->trans(
"Users"), $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'user', 0,
'',
'', $limit);
1168 if ($showclassifyform) {
1169 print
'<table class="noborder centpercent">';
1170 print
'<tr class="liste_titre"><td>';
1172 print
img_picto(
'', $type,
'class="pictofixedwidth"');
1173 print $form->select_dolusers(
'',
'elemid', 1,
null, 0,
'',
'', $force_entity);
1174 print
'<input type="submit" class="button buttongen" name="addintocategory" value="'.$langs->trans(
"ClassifyInCategory").
'"></td>';
1179 print
'<table class="noborder centpercent">'.
"\n";
1180 print
'<tr class="liste_titre"><td colspan="3">'.$langs->trans(
"Users").
' <span class="badge">'.$num.
'</span></td></tr>'.
"\n";
1182 if (count($users) > 0) {
1184 foreach ($users as $key => $userentry) {
1185 print
"\t".
'<tr class="oddeven">'.
"\n";
1186 print
'<td class="nowrap tdtop">';
1187 print $userentry->getNomUrl(-1);
1189 print
'<td class="tdtop">'.$userentry->job.
"</td>\n";
1192 print
'<td class="right">';
1193 if ($user->hasRight(
'user',
'user',
'creer')) {
1194 print
"<a href= '".$_SERVER[
'PHP_SELF'].
"?".(empty($socid) ?
'id' :
'socid').
"=".
$object->id.
"&type=".urlencode($typeid).
"&action=unlink&token=".
newToken().
"&removeelem=".((int) $userentry->id).($limit ?
'&limit='.$limit :
'').
"'>";
1196 print
img_picto($langs->trans(
"DeleteFromCat"),
'unlink',
'', 0, 0, 0,
'',
'paddingleft');
1203 print
'<tr class="oddeven"><td colspan="3"><span class="opacitymedium">'.$langs->trans(
"ThisCategoryHasNoItems").
'</span></td></tr>';
1210 print_barre_liste($langs->trans(
"Users"),
null, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', 0,
'',
'user');
1216if ($type == Categorie::TYPE_WAREHOUSE) {
1217 if ($user->hasRight(
"stock",
"read")) {
1218 $permission = $user->hasRight(
'stock',
'creer');
1219 $showclassifyform = $user->hasRight(
'stock',
'creer');
1221 require_once DOL_DOCUMENT_ROOT.
'/product/stock/class/entrepot.class.php';
1223 $objects =
$object->getObjectsInCateg($type, 0, $limit, $offset);
1228 '@phan-var-force Entrepot[] $objects';
1229 print
'<form method="post" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
1230 print
'<input type="hidden" name="token" value="'.newToken().
'">';
1231 print
'<input type="hidden" name="typeid" value="'.$typeid.
'">';
1232 print
'<input type="hidden" name="type" value="'.$typeid.
'">';
1233 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
1234 print
'<input type="hidden" name="page_y" value="">';
1235 print
'<input type="hidden" name="action" value="list">';
1238 $param =
'&limit='.$limit.
'&id='.
$id.
'&type='.$type;
1239 $num = count($objects);
1240 $nbtotalofrecords =
'';
1241 $newcardbutton =
'';
1244 print_barre_liste($langs->trans(
"Warehouses"), $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'stock', 0, $newcardbutton,
'', $limit);
1246 if ($showclassifyform) {
1247 print
'<table class="noborder centpercent">';
1248 print
'<tr class="liste_titre"><td>';
1249 print $langs->trans(
"AddTicketIntoCategory").
' ';
1250 print $form->selectForForms(
'Entrepot:product/stock/class/entrepot.class.php',
'elemid', 0, 1,
'',
'',
'maxwidth500');
1251 print
'<input type="submit" class="button buttongen" name="addintocategory" value="'.$langs->trans(
"ClassifyInCategory").
'"></td>';
1256 print
'<table class="noborder centpercent">'.
"\n";
1257 print
'<tr class="liste_titre"><td colspan="4">'.$langs->trans(
"Ref").
'</td></tr>'.
"\n";
1259 if (count($objects) > 0) {
1261 foreach ($objects as $key => $warehouse) {
1267 print
"\t".
'<tr class="oddeven">'.
"\n";
1268 print
'<td class="nowrap tdtop">';
1269 print $warehouse->getNomUrl(1);
1271 print
'<td class="tdtop">'.$warehouse->ref.
"</td>\n";
1272 print
'<td class="tdtop">'.$warehouse->lieu.
"</td>\n";
1274 print
'<td class="right">';
1276 print
"<a href= '".$_SERVER[
'PHP_SELF'].
"?".(empty($socid) ?
'id' :
'socid').
"=".
$object->id.
"&type=".urlencode($typeid).
"&action=unlink&token=".
newToken().
"&removeelem=".((int) $warehouse->id).($limit ?
'&limit='.$limit :
'').
"'>";
1278 print
img_picto($langs->trans(
"DeleteFromCat"),
'unlink',
'', 0, 0, 0,
'',
'paddingleft');
1285 print
'<tr class="oddeven"><td colspan="4"><span class="opacitymedium">'.$langs->trans(
"ThisCategoryHasNoItems").
'</span></td></tr>';
1292 print_barre_liste($langs->trans(
"Warehouse"),
null, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', 0,
'',
'stock');
1298if ($type == Categorie::TYPE_TICKET) {
1299 if ($user->hasRight(
"ticket",
"read")) {
1300 $permission = $user->hasRight(
'categorie',
'creer');
1301 $showclassifyform = $user->hasRight(
'categorie',
'creer');
1303 $tickets =
$object->getObjectsInCateg($type, 0, $limit, $offset);
1308 '@phan-var-force Ticket[] $tickets';
1310 print
'<form method="post" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
1311 print
'<input type="hidden" name="token" value="'.newToken().
'">';
1312 print
'<input type="hidden" name="typeid" value="'.$typeid.
'">';
1313 print
'<input type="hidden" name="type" value="'.$typeid.
'">';
1314 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
1315 print
'<input type="hidden" name="page_y" value="">';
1316 print
'<input type="hidden" name="action" value="list">';
1319 $param =
'&limit='.$limit.
'&id='.
$id.
'&type='.$type;
1320 $num = count($tickets);
1321 $nbtotalofrecords =
'';
1322 $newcardbutton =
'';
1325 print_barre_liste($langs->trans(
"Ticket"), $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'ticket', 0, $newcardbutton,
'', $limit);
1327 if ($showclassifyform) {
1328 print
'<table class="noborder centpercent">';
1329 print
'<tr class="liste_titre"><td>';
1330 print $langs->trans(
"AddTicketIntoCategory").
' ';
1331 $form->selectTickets(
'',
'elemid');
1332 print
'<input type="submit" class="button buttongen" name="addintocategory" value="'.$langs->trans(
"ClassifyInCategory").
'"></td>';
1337 print
'<table class="noborder centpercent">'.
"\n";
1338 print
'<tr class="liste_titre"><td colspan="3">'.$langs->trans(
"Ref").
'</td></tr>'.
"\n";
1340 if (count($tickets) > 0) {
1342 foreach ($tickets as $ticket) {
1348 print
"\t".
'<tr class="oddeven">'.
"\n";
1349 print
'<td class="nowrap tdtop">';
1350 print $ticket->getNomUrl(1);
1352 print
'<td class="tdtop">'.$ticket->track_id.
"</td>\n";
1354 print
'<td class="right">';
1356 print
"<a href= '".$_SERVER[
'PHP_SELF'].
"?".(empty($socid) ?
'id' :
'socid').
"=".
$object->id.
"&type=".urlencode($typeid).
"&action=unlink&token=".
newToken().
"&removeelem=".((int) $ticket->id).($limit ?
'&limit='.$limit :
'').
"'>";
1358 print
img_picto($langs->trans(
"DeleteFromCat"),
'unlink',
'', 0, 0, 0,
'',
'paddingleft');
1365 print
'<tr class="oddeven"><td colspan="2"><span class="opacitymedium">'.$langs->trans(
"ThisCategoryHasNoItems").
'</span></td></tr>';
1372 print_barre_liste($langs->trans(
"Ticket"),
null, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', 0,
'',
'ticket');
1378if ($type == Categorie::TYPE_FICHINTER) {
1379 if ($user->hasRight(
"fichinter",
"lire")) {
1380 $permission = $user->hasRight(
'categorie',
'creer');
1381 $showclassifyform = $user->hasRight(
'categorie',
'creer');
1383 $fichinters =
$object->getObjectsInCateg($type, 0, $limit, $offset);
1384 if ($fichinters < 0) {
1388 '@phan-var-force Fichinter[] $fichinters';
1391 if ($showclassifyform) {
1393 print
'<form method="post" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
1394 print
'<input type="hidden" name="token" value="'.newToken().
'">';
1395 print
'<input type="hidden" name="typeid" value="'.$typeid.
'">';
1396 print
'<input type="hidden" name="type" value="'.$typeid.
'">';
1397 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
1398 print
'<input type="hidden" name="action" value="addintocategory">';
1399 print
'<table class="noborder centpercent">';
1400 print
'<tr class="liste_titre"><td>';
1401 print $langs->trans(
"AddFichinterIntoCategory").
' ';
1402 print $form->selectForForms(
'Fichinter:fichinter/class/fichinter.class.php',
'elemid', 0, 1,
'',
'',
'maxwidth500');
1403 print
'<input type="submit" class="button buttongen" value="'.$langs->trans(
"ClassifyInCategory").
'"></td>';
1409 print
'<form method="post" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
1410 print
'<input type="hidden" name="token" value="'.newToken().
'">';
1411 print
'<input type="hidden" name="typeid" value="'.$typeid.
'">';
1412 print
'<input type="hidden" name="type" value="'.$typeid.
'">';
1413 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
1414 print
'<input type="hidden" name="action" value="list">';
1417 $param =
'&limit='.$limit.
'&id='.
$id.
'&type='.$type;
1418 $num = count($fichinters);
1419 $nbtotalofrecords =
'';
1420 $newcardbutton =
'';
1422 $langs->load(
'interventions');
1424 print_barre_liste($langs->trans(
"Intervention"), $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'object_intervention', 0, $newcardbutton,
'', $limit);
1425 print
'<table class="noborder centpercent">'.
"\n";
1426 print
'<tr class="liste_titre"><td colspan="3">'.$langs->trans(
"Ref").
'</td></tr>'.
"\n";
1428 if (count($fichinters) > 0) {
1430 foreach ($fichinters as $fichinter) {
1436 print
"\t".
'<tr class="oddeven">'.
"\n";
1437 print
'<td class="nowrap tdtop">';
1438 print $fichinter->getNomUrl(1);
1440 print
'<td class="tdtop">'.$fichinter->description.
"</td>\n";
1442 print
'<td class="right">';
1444 print
"<a href= '".$_SERVER[
'PHP_SELF'].
"?".(empty($socid) ?
'id' :
'socid').
"=".((
int)
$object->id).
"&type=".urlencode($typeid).
"&action=unlink&token=".
newToken().
"&removeelem=".((int) $fichinter->id).($limit ?
'&limit='.$limit :
'').
"'>";
1445 print $langs->trans(
"DeleteFromCat");
1446 print
img_picto($langs->trans(
"DeleteFromCat"),
'unlink',
'', 0, 0, 0,
'',
'paddingleft');
1453 print
'<tr class="oddeven"><td colspan="2"><span class="opacitymedium">'.$langs->trans(
"ThisCategoryHasNoItems").
'</span></td></tr>';
1459 print_barre_liste($langs->trans(
"Intervention"),
null, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', 0,
'',
'fichinter');
1465if ($type == Categorie::TYPE_ORDER) {
1466 require_once DOL_DOCUMENT_ROOT.
'/commande/class/commande.class.php';
1468 $permission = $user->hasRight(
'commande',
'creer');
1470 $objects =
$object->getObjectsInCateg($type, 0, $limit, $offset);
1475 '@phan-var-force Commande[] $objects';
1477 $showclassifyform = $user->hasRight(
'order',
'write');
1478 if ($showclassifyform) {
1480 print
'<form method="post" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
1481 print
'<input type="hidden" name="token" value="'.newToken().
'">';
1482 print
'<input type="hidden" name="typeid" value="'.$typeid.
'">';
1483 print
'<input type="hidden" name="type" value="'.$typeid.
'">';
1484 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
1485 print
'<input type="hidden" name="action" value="addintocategory">';
1486 print
'<table class="noborder centpercent">';
1487 print
'<tr class="liste_titre"><td>';
1488 print $langs->trans(
"AddOrderIntoCategory").
' ';
1489 print $form->selectForForms(
'Commande:commande/class/commande.class.php',
'elemid', 0, 1,
'',
'',
'maxwidth500');
1490 print
'<input type="submit" class="button buttongen" value="'.$langs->trans(
"ClassifyInCategory").
'"></td>';
1496 print
'<form method="post" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
1497 print
'<input type="hidden" name="token" value="'.newToken().
'">';
1498 print
'<input type="hidden" name="typeid" value="'.$typeid.
'">';
1499 print
'<input type="hidden" name="type" value="'.$typeid.
'">';
1500 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
1501 print
'<input type="hidden" name="action" value="list">';
1504 $param =
'&limit='.$limit.
'&id='.
$id.
'&type='.$type;
1505 $num = count($objects);
1506 $nbtotalofrecords =
'';
1507 $newcardbutton =
'';
1510 print_barre_liste($langs->trans(
"Orders"), $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'bill', 0, $newcardbutton,
'', $limit);
1512 print
"<table class='noborder centpercent'>\n";
1513 print
'<tr class="liste_titre"><td colspan="4">'.$langs->trans(
"Ref").
'</td></tr>'.
"\n";
1515 if (count($objects) > 0) {
1517 foreach ($objects as $key => $order) {
1523 print
"\t".
'<tr class="oddeven">'.
"\n";
1524 print
'<td class="nowrap tdtop">';
1525 print $order->getNomUrl(1);
1527 print
'<td class="tdtop">'.$order->ref.
"</td>\n";
1529 print
'<td class="right">';
1531 print
"<a href= '".$_SERVER[
'PHP_SELF'].
"?".(empty($socid) ?
'id' :
'socid').
"=".
$object->id.
"&type=".$typeid.
"&action=unlink&token=".
newToken().
"&removeelem=".$order->id.
"'>";
1532 print $langs->trans(
"DeleteFromCat");
1533 print
img_picto($langs->trans(
"DeleteFromCat"),
'unlink',
'', 0, 0, 0,
'',
'paddingleft');
1539 print
'<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans(
"ThisCategoryHasNoItems").
'</td></tr>';
1548if ($type == Categorie::TYPE_INVOICE) {
1549 require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
1551 $permission = $user->hasRight(
'facture',
'creer');
1553 $objects =
$object->getObjectsInCateg($type, 0, $limit, $offset);
1558 $showclassifyform = $user->hasRight(
'facture',
'write');
1559 if ($showclassifyform) {
1561 print
'<form method="post" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
1562 print
'<input type="hidden" name="token" value="'.newToken().
'">';
1563 print
'<input type="hidden" name="typeid" value="'.$typeid.
'">';
1564 print
'<input type="hidden" name="type" value="'.$typeid.
'">';
1565 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
1566 print
'<input type="hidden" name="action" value="addintocategory">';
1567 print
'<table class="noborder centpercent">';
1568 print
'<tr class="liste_titre"><td>';
1569 print $langs->trans(
"AddInvoiceIntoCategory").
' ';
1570 print $form->selectForForms(
'Facture:compta/facture/class/facture.class.php',
'elemid', 0, 1,
'',
'',
'maxwidth500');
1571 print
'<input type="submit" class="button buttongen" value="'.$langs->trans(
"ClassifyInCategory").
'"></td>';
1577 print
'<form method="post" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
1578 print
'<input type="hidden" name="token" value="'.newToken().
'">';
1579 print
'<input type="hidden" name="typeid" value="'.$typeid.
'">';
1580 print
'<input type="hidden" name="type" value="'.$typeid.
'">';
1581 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
1582 print
'<input type="hidden" name="action" value="list">';
1585 $param =
'&limit='.$limit.
'&id='.
$id.
'&type='.$type;
1586 $num = count($objects);
1587 $nbtotalofrecords =
'';
1588 $newcardbutton =
'';
1591 print_barre_liste($langs->trans(
"BillsCustomers"), $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'bill', 0, $newcardbutton,
'', $limit);
1593 print
"<table class='noborder centpercent'>\n";
1594 print
'<tr class="liste_titre"><td colspan="4">'.$langs->trans(
"Ref").
'</td></tr>'.
"\n";
1596 if (count($objects) > 0) {
1598 foreach ($objects as $key => $invoice) {
1604 print
"\t".
'<tr class="oddeven">'.
"\n";
1605 print
'<td class="nowrap tdtop">';
1606 print $invoice->getNomUrl(1);
1608 print
'<td class="tdtop">'.$invoice->ref.
"</td>\n";
1610 print
'<td class="right">';
1612 print
"<a href= '".$_SERVER[
'PHP_SELF'].
"?".(empty($socid) ?
'id' :
'socid').
"=".
$object->id.
"&type=".$typeid.
"&action=unlink&token=".
newToken().
"&removeelem=".$invoice->id.
"'>";
1613 print $langs->trans(
"DeleteFromCat");
1614 print
img_picto($langs->trans(
"DeleteFromCat"),
'unlink',
'', 0, 0, 0,
'',
'paddingleft');
1620 print
'<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans(
"ThisCategoryHasNoItems").
'</td></tr>';
1629if ($type == Categorie::TYPE_SUPPLIER_ORDER) {
1630 require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.commande.class.php';
1632 $permission = $user->hasRight(
'fournisseur',
'commande',
'creer');
1634 $objects =
$object->getObjectsInCateg($type, 0, $limit, $offset);
1639 $showclassifyform = $user->hasRight(
'fournisseur',
'commande',
'creer');
1641 if ($showclassifyform) {
1643 print
'<form method="post" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
1644 print
'<input type="hidden" name="token" value="'.newToken().
'">';
1645 print
'<input type="hidden" name="typeid" value="'.$typeid.
'">';
1646 print
'<input type="hidden" name="type" value="'.$typeid.
'">';
1647 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
1648 print
'<input type="hidden" name="action" value="addintocategory">';
1649 print
'<table class="noborder centpercent">';
1650 print
'<tr class="liste_titre"><td>';
1651 print $langs->trans(
"AddSupplierOrderIntoCategory").
' ';
1652 print $form->selectForForms(
'CommandeFournisseur:fourn/class/fournisseur.commande.class.php',
'elemid', 0, 1,
'',
'',
'maxwidth500');
1653 print
'<input type="submit" class="button buttongen" value="'.$langs->trans(
"ClassifyInCategory").
'"></td>';
1659 print
'<form method="post" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
1660 print
'<input type="hidden" name="token" value="'.newToken().
'">';
1661 print
'<input type="hidden" name="typeid" value="'.$typeid.
'">';
1662 print
'<input type="hidden" name="type" value="'.$typeid.
'">';
1663 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
1664 print
'<input type="hidden" name="action" value="list">';
1667 $param =
'&limit='.$limit.
'&id='.
$id.
'&type='.$type;
1668 $num = count($objects);
1669 $nbtotalofrecords =
'';
1670 $newcardbutton =
'';
1673 print_barre_liste($langs->trans(
"SuppliersOrders"), $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'supplier_order', 0, $newcardbutton,
'', $limit);
1675 print
"<table class='noborder centpercent'>\n";
1676 print
'<tr class="liste_titre"><td colspan="4">'.$langs->trans(
"Ref").
'</td></tr>'.
"\n";
1678 if (count($objects) > 0) {
1680 foreach ($objects as $key => $supplier_order) {
1686 print
"\t".
'<tr class="oddeven">'.
"\n";
1687 print
'<td class="nowrap tdtop">';
1688 print $supplier_order->getNomUrl(1);
1690 print
'<td class="tdtop">'.$supplier_order->ref.
"</td>\n";
1692 print
'<td class="right">';
1694 print
"<a href= '".$_SERVER[
'PHP_SELF'].
"?".(empty($socid) ?
'id' :
'socid').
"=".
$object->id.
"&type=".$typeid.
"&action=unlink&token=".
newToken().
"&removeelem=".$supplier_order->id.
"'>";
1695 print $langs->trans(
"DeleteFromCat");
1696 print
img_picto($langs->trans(
"DeleteFromCat"),
'unlink',
'', 0, 0, 0,
'',
'paddingleft');
1702 print
'<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans(
"ThisCategoryHasNoItems").
'</td></tr>';
1711if ($type == Categorie::TYPE_SUPPLIER_INVOICE) {
1712 require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.facture.class.php';
1714 $permission = $user->hasRight(
'fournisseur',
'facture',
'creer');
1716 $objects =
$object->getObjectsInCateg($type, 0, $limit, $offset);
1721 $showclassifyform = $user->hasRight(
'fournisseur',
'facture',
'creer');;
1722 if ($showclassifyform) {
1724 print
'<form method="post" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
1725 print
'<input type="hidden" name="token" value="'.newToken().
'">';
1726 print
'<input type="hidden" name="typeid" value="'.$typeid.
'">';
1727 print
'<input type="hidden" name="type" value="'.$typeid.
'">';
1728 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
1729 print
'<input type="hidden" name="action" value="addintocategory">';
1730 print
'<table class="noborder centpercent">';
1731 print
'<tr class="liste_titre"><td>';
1732 print $langs->trans(
"AddSupplierInvoiceIntoCategory").
' ';
1733 print $form->selectForForms(
'FactureFournisseur:fourn/class/fournisseur.facture.class.php',
'elemid', 0, 1,
'',
'',
'maxwidth500');
1734 print
'<input type="submit" class="button buttongen" value="'.$langs->trans(
"ClassifyInCategory").
'"></td>';
1740 print
'<form method="post" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
1741 print
'<input type="hidden" name="token" value="'.newToken().
'">';
1742 print
'<input type="hidden" name="typeid" value="'.$typeid.
'">';
1743 print
'<input type="hidden" name="type" value="'.$typeid.
'">';
1744 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
1745 print
'<input type="hidden" name="action" value="list">';
1748 $param =
'&limit='.$limit.
'&id='.
$id.
'&type='.$type; $num = count($objects); $nbtotalofrecords =
''; $newcardbutton =
'';
1751 print_barre_liste($langs->trans(
"SuppliersOrders"), $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'supplier_order', 0, $newcardbutton,
'', $limit);
1753 print
"<table class='noborder centpercent'>\n";
1754 print
'<tr class="liste_titre"><td colspan="4">'.$langs->trans(
"Ref").
'</td></tr>'.
"\n";
1756 if (count($objects) > 0) {
1758 foreach ($objects as $key => $supplier_invoice) {
1764 print
"\t".
'<tr class="oddeven">'.
"\n";
1765 print
'<td class="nowrap tdtop">';
1766 print $supplier_invoice->getNomUrl(1);
1768 print
'<td class="tdtop">'.$supplier_invoice->ref.
"</td>\n";
1770 print
'<td class="right">';
1772 print
"<a href= '".$_SERVER[
'PHP_SELF'].
"?".(empty($socid) ?
'id' :
'socid').
"=".
$object->id.
"&type=".$typeid.
"&action=unlink&token=".
newToken().
"&removeelem=".$supplier_invoice->id.
"'>";
1773 print $langs->trans(
"DeleteFromCat");
1774 print
img_picto($langs->trans(
"DeleteFromCat"),
'unlink',
'', 0, 0, 0,
'',
'paddingleft');
1780 print
'<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans(
"ThisCategoryHasNoItems").
'</td></tr>';
1789$parameters = array(
'type' => $type,
'id' => $id,
'label' => $label);
1790$reshook = $hookmanager->executeHooks(
'addMoreCategoriesList', $parameters, $object, $action);
$id
Support class for third parties, contacts, members, users or resources.
if(! $sortfield) if(! $sortorder) $object
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
categories_prepare_head(Categorie $object, $type)
Prepare array with list of tabs.
Class to manage bank accounts.
Class to manage members of a foundation.
Class to manage categories.
Class to manage predefined suppliers products.
Class to manage customers orders.
Class to manage suppliers invoices.
Class to manage invoices.
Class to manage products or services.
Class to manage projects.
Class to manage third parties objects (customers, suppliers, prospects...)
Class to manage Dolibarr users.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
print_barre_liste($title, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $selectlimitsuffix=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
img_delete($titlealt='default', $other='class="pictodelete"', $morecss='')
Show delete logo.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dolBuildUrl($url, $params=[], $addtoken=false)
Return path of url.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
dolGetButtonTitle($label, $helpText='', $iconClass='fa fa-file', $url='', $id='', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
img_view($titlealt='default', $float=0, $other='class="valignmiddle"')
Show logo view card.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
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...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
dol_htmlentitiesbr($stringtoencode, $nl2brmode=0, $pagecodefrom='UTF-8', $removelasteolbr=1)
This function is called to encode a string into a HTML string but differs from htmlentities because a...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
img_edit($titlealt='default', $float=0, $other='')
Show logo edit/modify fiche.
getEntity($element, $shared=1, $currentobject=null)
Get list of entity id to use.
Class to generate the form for creating a new ticket.
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.
tree_recur($tab, $pere, $rang, $iddivjstree='iddivjstree', $donoresetalreadyloaded=0, $showfk=0, $moreparam='')
Recursive function to output a tree.