dolibarr 18.0.6
target_card.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
24// Load Dolibarr environment
25require '../main.inc.php';
26require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
27require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
28require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
29dol_include_once('/webhook/class/target.class.php');
30dol_include_once('/webhook/lib/webhook_target.lib.php');
31
32// Load translation files required by the page
33$langs->loadLangs(array('other'));
34
35// Get parameters
36$id = GETPOST('id', 'int');
37$ref = GETPOST('ref', 'alpha');
38$action = GETPOST('action', 'aZ09');
39$confirm = GETPOST('confirm', 'alpha');
40$cancel = GETPOST('cancel', 'aZ09');
41$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'targetcard'; // To manage different context of search
42$backtopage = GETPOST('backtopage', 'alpha');
43$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
44$lineid = GETPOST('lineid', 'int');
45
46// Initialize technical objects
47$object = new Target($db);
48$extrafields = new ExtraFields($db);
49$diroutputmassaction = $conf->webhook->dir_output.'/temp/massgeneration/'.$user->id;
50$hookmanager->initHooks(array('targetcard', 'globalcard')); // Note that conf->hooks_modules contains array
51
52// Fetch optionals attributes and labels
53$extrafields->fetch_name_optionals_label($object->table_element);
54
55$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
56
57// Initialize array of search criterias
58$search_all = GETPOST("search_all", 'alpha');
59$search = array();
60foreach ($object->fields as $key => $val) {
61 if (GETPOST('search_'.$key, 'alpha')) {
62 $search[$key] = GETPOST('search_'.$key, 'alpha');
63 }
64}
65
66if (empty($action) && empty($id) && empty($ref)) {
67 $action = 'view';
68}
69
70// Load object
71include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
72
73// Permissions
74// There is several ways to check permission.
75// Set $enablepermissioncheck to 1 to enable a minimum low level of checks
76$enablepermissioncheck = 0;
77if ($enablepermissioncheck) {
78 $permissiontoread = $user->rights->webhook->target->read;
79 $permissiontoadd = $user->rights->webhook->target->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
80 $permissiontodelete = $user->rights->webhook->target->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
81 $permissionnote = $user->rights->webhook->target->write; // Used by the include of actions_setnotes.inc.php
82 $permissiondellink = $user->rights->webhook->target->write; // Used by the include of actions_dellink.inc.php
83} else {
84 $permissiontoread = 1;
85 $permissiontoadd = 1; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
86 $permissiontodelete = 1;
87 $permissionnote = 1;
88 $permissiondellink = 1;
89}
90
91$upload_dir = $conf->webhook->multidir_output[isset($object->entity) ? $object->entity : 1].'/target';
92
93// Security check (enable the most restrictive one)
94//if ($user->socid > 0) accessforbidden();
95//if ($user->socid > 0) $socid = $user->socid;
96//$isdraft = (isset($object->status) && ($object->status == $object::STATUS_DRAFT) ? 1 : 0);
97//restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
98if (empty($conf->webhook->enabled)) accessforbidden();
99if (!$permissiontoread) accessforbidden();
100
101
102/*
103 * Actions
104 */
105
106$parameters = array();
107$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
108if ($reshook < 0) {
109 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
110}
111
112if (empty($reshook)) {
113 $error = 0;
114
115 $backurlforlist = dol_buildpath('/webhook/target_list.php?mode=modulesetup', 1);
116
117 if (empty($backtopage) || ($cancel && empty($id))) {
118 if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
119 if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
120 $backtopage = $backurlforlist;
121 } else {
122 $backtopage = dol_buildpath('/webhook/target_card.php', 1).'?id='.((!empty($id) && $id > 0) ? $id : '__ID__');
123 }
124 }
125 }
126
127 $triggermodname = 'WEBHOOK_TARGET_MODIFY'; // Name of trigger action code to execute when we modify record
128
129 // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen
130 include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
131
132 // Actions when linking object each other
133 include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';
134
135 // Actions when printing a doc from card
136 include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
137
138 // Action to move up and down lines of object
139 //include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php';
140
141 // Action to build doc
142 include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
143
144 if ($action == 'set_thirdparty' && $permissiontoadd) {
145 $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, $triggermodname);
146 }
147 if ($action == 'classin' && $permissiontoadd) {
148 $object->setProject(GETPOST('projectid', 'int'));
149 }
150
151 // Actions to send emails
152 $triggersendname = 'WEBHOOK_TARGET_SENTBYMAIL';
153 $autocopy = 'MAIN_MAIL_AUTOCOPY_TARGET_TO';
154 $trackid = 'target'.$object->id;
155 include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
156}
157
158
159
160
161/*
162 * View
163 */
164
165$form = new Form($db);
166$formfile = new FormFile($db);
167$formproject = new FormProjets($db);
168
169$title = $langs->trans("Target");
170$help_url = '';
171llxHeader('', $title, $help_url);
172
173// Example : Adding jquery code
174// print '<script type="text/javascript">
175// jQuery(document).ready(function() {
176// function init_myfunc()
177// {
178// jQuery("#myid").removeAttr(\'disabled\');
179// jQuery("#myid").attr(\'disabled\',\'disabled\');
180// }
181// init_myfunc();
182// jQuery("#mybutton").click(function() {
183// init_myfunc();
184// });
185// });
186// </script>';
187
188
189// Part to create
190if ($action == 'create') {
191 if (empty($permissiontoadd)) {
192 accessforbidden('NotEnoughPermissions', 0, 1);
193 exit;
194 }
195
196 print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("Target")), '', 'object_'.$object->picto);
197
198 print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
199 print '<input type="hidden" name="token" value="'.newToken().'">';
200 print '<input type="hidden" name="action" value="add">';
201 if ($backtopage) {
202 print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
203 }
204 if ($backtopageforcancel) {
205 print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
206 }
207
208 print dol_get_fiche_head(array(), '');
209
210 // Set some default values
211 //if (! GETPOSTISSET('fieldname')) $_POST['fieldname'] = 'myvalue';
212
213 print '<table class="border centpercent tableforfieldcreate">'."\n";
214
215 // Common attributes
216 include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php';
217
218 // Other attributes
219 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
220
221 print '</table>'."\n";
222
223 print dol_get_fiche_end();
224
225 print $form->buttonsSaveCancel("Create");
226
227 print '</form>';
228
229 //dol_set_focus('input[name="ref"]');
230}
231
232// Part to edit record
233if (($id || $ref) && $action == 'edit') {
234 print load_fiche_titre($langs->trans("Target"), '', 'object_'.$object->picto);
235
236 print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
237 print '<input type="hidden" name="token" value="'.newToken().'">';
238 print '<input type="hidden" name="action" value="update">';
239 print '<input type="hidden" name="id" value="'.$object->id.'">';
240 if ($backtopage) {
241 print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
242 }
243 if ($backtopageforcancel) {
244 print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
245 }
246
247 print dol_get_fiche_head();
248
249 print '<table class="border centpercent tableforfieldedit">'."\n";
250
251 // Common attributes
252 include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php';
253
254 // Other attributes
255 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php';
256
257 print '</table>';
258
259 print dol_get_fiche_end();
260
261 print $form->buttonsSaveCancel();
262
263 print '</form>';
264}
265
266// Part to show record
267if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) {
268 $res = $object->fetch_optionals();
269
270 $head = targetPrepareHead($object);
271 print dol_get_fiche_head($head, 'card', $langs->trans("Target"), -1, $object->picto);
272
273 $formconfirm = '';
274
275 // Confirmation to delete
276 if ($action == 'delete') {
277 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteTarget'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1);
278 }
279 // Confirmation to delete line
280 if ($action == 'deleteline') {
281 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1);
282 }
283
284 // Clone confirmation
285 if ($action == 'clone') {
286 // Create an array for form
287 $formquestion = array();
288 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
289 }
290
291 // Confirmation of action xxxx (You can use it for xxx = 'close', xxx = 'reopen', ...)
292 if ($action == 'xxx') {
293 $text = $langs->trans('ConfirmActionTarget', $object->ref);
294 /*if (isModEnabled('notification'))
295 {
296 require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
297 $notify = new Notify($db);
298 $text .= '<br>';
299 $text .= $notify->confirmMessage('TARGET_CLOSE', $object->socid, $object);
300 }*/
301
302 $formquestion = array();
303 /*
304 $forcecombo=0;
305 if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy
306 $formquestion = array(
307 // 'text' => $langs->trans("ConfirmClone"),
308 // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
309 // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
310 // array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1, 0, 0, '', 0, $forcecombo))
311 );
312 */
313 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220);
314 }
315
316 // Call Hook formConfirm
317 $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid);
318 $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
319 if (empty($reshook)) {
320 $formconfirm .= $hookmanager->resPrint;
321 } elseif ($reshook > 0) {
322 $formconfirm = $hookmanager->resPrint;
323 }
324
325 // Print form confirm
326 print $formconfirm;
327
328
329 // Object card
330 // ------------------------------------------------------------
331 $linkback = '<a href="'.dol_buildpath('/webhook/target_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
332
333 $morehtmlref = '<div class="refidno">';
334 /*
335 // Ref customer
336 $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
337 $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
338 // Thirdparty
339 $morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
340 // Project
341 if (isModEnabled('projet')) {
342 $langs->load("projects");
343 $morehtmlref .= '<br>'.$langs->trans('Project') . ' ';
344 if ($permissiontoadd) {
345 //if ($action != 'classify') $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&token='.newToken().'&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> ';
346 $morehtmlref .= ' : ';
347 if ($action == 'classify') {
348 //$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 0, 1, '', 'maxwidth300');
349 $morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
350 $morehtmlref .= '<input type="hidden" name="action" value="classin">';
351 $morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">';
352 $morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
353 $morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
354 $morehtmlref .= '</form>';
355 } else {
356 $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1, '', 'maxwidth300');
357 }
358 } else {
359 if (!empty($object->fk_project)) {
360 $proj = new Project($db);
361 $proj->fetch($object->fk_project);
362 $morehtmlref .= ': '.$proj->getNomUrl();
363 } else {
364 $morehtmlref .= '';
365 }
366 }
367 }*/
368 $morehtmlref .= '</div>';
369
370
371 dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
372
373
374 print '<div class="fichecenter">';
375 print '<div class="fichehalfleft">';
376 print '<div class="underbanner clearboth"></div>';
377 print '<table class="border centpercent tableforfield">'."\n";
378
379 // Common attributes
380 //$keyforbreak='fieldkeytoswitchonsecondcolumn'; // We change column just before this field
381 //unset($object->fields['fk_project']); // Hide field already shown in banner
382 //unset($object->fields['fk_soc']); // Hide field already shown in banner
383 include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
384
385 // Other attributes. Fields from hook formObjectOptions and Extrafields.
386 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
387
388 print '</table>';
389 print '</div>';
390 print '</div>';
391
392 print '<div class="clearboth"></div>';
393
394 print dol_get_fiche_end();
395
396
397 /*
398 * Lines
399 */
400
401 if (!empty($object->table_element_line)) {
402 // Show object lines
403 $result = $object->getLinesArray();
404
405 print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '' : '#line_'.GETPOST('lineid', 'int')).'" method="POST">
406 <input type="hidden" name="token" value="' . newToken().'">
407 <input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">
408 <input type="hidden" name="mode" value="">
409 <input type="hidden" name="page_y" value="">
410 <input type="hidden" name="id" value="' . $object->id.'">
411 ';
412
413 if (!empty($conf->use_javascript_ajax) && $object->status == 0) {
414 include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
415 }
416
417 print '<div class="div-table-responsive-no-min">';
418 if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) {
419 print '<table id="tablelines" class="noborder noshadow" width="100%">';
420 }
421
422 if (!empty($object->lines)) {
423 $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1);
424 }
425
426 // Form to add new line
427 if ($object->status == 0 && $permissiontoadd && $action != 'selectlines') {
428 if ($action != 'editline') {
429 // Add products/services form
430
431 $parameters = array();
432 $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
433 if ($reshook < 0) {
434 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
435 }
436 if (empty($reshook))
437 $object->formAddObjectLine(1, $mysoc, $soc);
438 }
439 }
440
441 if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) {
442 print '</table>';
443 }
444 print '</div>';
445
446 print "</form>\n";
447 }
448
449
450 // Buttons for actions
451
452 if ($action != 'presend' && $action != 'editline') {
453 print '<div class="tabsAction">'."\n";
454 $parameters = array();
455 $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
456 if ($reshook < 0) {
457 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
458 }
459
460 if (empty($reshook)) {
461 // Send
462 /*if (empty($user->socid)) {
463 print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init&token='.newToken().'#formmailbeforetitle');
464 }*/
465
466 print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd);
467
468 // Disable
469 if ($object->status == $object::STATUS_VALIDATED) {
470 print dolGetButtonAction('', $langs->trans('Disable'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes&token='.newToken(), '', $permissiontoadd);
471 }
472
473 // Enable
474 if ($object->status == $object::STATUS_DRAFT) {
475 print dolGetButtonAction('', $langs->trans('Enable'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes&token='.newToken(), '', $permissiontoadd);
476 }
477
478 // Clone
479 print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=clone&token='.newToken(), '', $permissiontoadd);
480
481 /*
482 if ($permissiontoadd) {
483 if ($object->status == $object::STATUS_ENABLED) {
484 print dolGetButtonAction($langs->trans('Disable'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=disable&token='.newToken(), '', $permissiontoadd);
485 } else {
486 print dolGetButtonAction($langs->trans('Enable'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=enable&token='.newToken(), '', $permissiontoadd);
487 }
488 }
489 if ($permissiontoadd) {
490 if ($object->status == $object::STATUS_VALIDATED) {
491 print dolGetButtonAction($langs->trans('Cancel'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=close&token='.newToken(), '', $permissiontoadd);
492 } else {
493 print dolGetButtonAction($langs->trans('Re-Open'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=reopen&token='.newToken(), '', $permissiontoadd);
494 }
495 }
496 */
497
498 // Delete (need delete permission, or if draft, just need create/modify permission)
499 print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken(), '', $permissiontodelete);
500 }
501 print '</div>'."\n";
502 }
503}
504
505// End of page
506llxFooter();
507$db->close();
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Definition wrapper.php:56
llxFooter()
Empty footer.
Definition wrapper.php:70
Class to manage standard extra fields.
Class to offer components to list and upload files.
Class to manage generation of HTML components Only common components must be here.
Class to manage building of HTML components.
Class for Target.
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.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
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.
if(!function_exists( 'dol_getprefix')) dol_include_once($relpath, $classname='')
Make an include_once using default root and alternate root if it fails.
dolGetButtonAction($label, $text='', $actionType='default', $url='', $id='', $userRight=1, $params=array())
Function dolGetButtonAction.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.
targetPrepareHead($object)
Prepare array of tabs for Target.