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