dolibarr 22.0.5
job_card.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
4 * Copyright (C) 2021 Greg Rastklan <greg.rastklan@atm-consulting.fr>
5 * Copyright (C) 2021 Jean-Pascal BOUDET <jean-pascal.boudet@atm-consulting.fr>
6 * Copyright (C) 2021 Grégory BLEMAND <gregory.blemand@atm-consulting.fr>
7 * Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
8 * Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22 */
23
31// Load Dolibarr environment
32require '../main.inc.php';
33
34require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php';
35require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php';
36require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php';
37require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php';
38require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_job.lib.php';
39require_once DOL_DOCUMENT_ROOT . '/hrm/class/skillrank.class.php';
40
50// Load translation files required by the page
51$langs->loadLangs(array('hrm', 'other', 'products')); // why products?
52
53// Get parameters
54$id = GETPOSTINT('id');
55$ref = GETPOST('ref', 'alpha');
56$action = GETPOST('action', 'aZ09');
57$confirm = GETPOST('confirm', 'alpha');
58$cancel = GETPOST('cancel');
59$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'jobcard'; // To manage different context of search
60$backtopage = GETPOST('backtopage', 'alpha');
61$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
62$lineid = GETPOSTINT('lineid');
63
64// Initialize a technical objects
65$object = new Job($db);
66$extrafields = new ExtraFields($db);
67$diroutputmassaction = $conf->hrm->dir_output . '/temp/massgeneration/' . $user->id;
68$hookmanager->initHooks(array('jobcard', 'globalcard')); // Note that conf->hooks_modules contains array
69
70// Fetch optionals attributes and labels
71$extrafields->fetch_name_optionals_label($object->table_element);
72
73$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
74
75// Initialize array of search criteria
76$search_all = GETPOST("search_all", 'alpha');
77$search = array();
78foreach ($object->fields as $key => $val) {
79 if (GETPOST('search_' . $key, 'alpha')) {
80 $search[$key] = GETPOST('search_' . $key, 'alpha');
81 }
82}
83
84if (empty($action) && empty($id) && empty($ref)) {
85 $action = 'view';
86}
87
88// Load object
89include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'.
90
91// Permissions
92$permissiontoread = $user->hasRight('hrm', 'all', 'read');
93$permissiontoadd = $user->hasRight('hrm', 'all', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
94$permissiontodelete = $user->hasRight('hrm', 'all', 'delete');
95$upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->entity : 1] . '/job';
96
97// Security check (enable the most restrictive one)
98//if ($user->socid > 0) accessforbidden();
99//if ($user->socid > 0) $socid = $user->socid;
100//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
101//restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
102if (empty($conf->hrm->enabled)) {
104}
105if (!$permissiontoread || ($action === 'create' && !$permissiontoadd)) {
107}
108
109
110/*
111 * Actions
112 */
113
114$parameters = array();
115$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
116if ($reshook < 0) {
117 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
118}
119
120if (empty($reshook)) {
121 $error = 0;
122
123 $backurlforlist = dol_buildpath('/hrm/job_list.php', 1);
124
125 if (empty($backtopage) || ($cancel && empty($id))) {
126 if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
127 if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) { // Test on permission not required
128 $backtopage = $backurlforlist;
129 } else {
130 $backtopage = dol_buildpath('/hrm/job_card.php', 1) . '?id=' . ($id > 0 ? $id : '__ID__');
131 }
132 }
133 }
134
135 $triggermodname = 'HRM_JOB_MODIFY'; // Name of trigger action code to execute when we modify record
136
137
138 // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen
139 if ($action != 'confirm_clone') {
140 include DOL_DOCUMENT_ROOT . '/core/actions_addupdatedelete.inc.php';
141 }
142
143 // Actions when linking object each other
144 include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php';
145
146 // Actions when printing a doc from card
147 include DOL_DOCUMENT_ROOT . '/core/actions_printing.inc.php';
148
149 // Action to move up and down lines of object
150 //include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php';
151
152 // Action to build doc
153 include DOL_DOCUMENT_ROOT . '/core/actions_builddoc.inc.php';
154
155 if ($action == 'set_thirdparty' && $permissiontoadd) {
156 $object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', null, 'date', '', $user, $triggermodname);
157 }
158 if ($action == 'classin' && $permissiontoadd) {
159 $object->setProject(GETPOSTINT('projectid'));
160 }
161
162 // Actions to send emails
163 $triggersendname = 'HRM_JOB_SENTBYMAIL';
164 $autocopy = 'MAIN_MAIL_AUTOCOPY_JOB_TO';
165 $trackid = 'job' . $object->id;
166 include DOL_DOCUMENT_ROOT . '/core/actions_sendmails.inc.php';
167
168 if ($action == 'confirm_clone' && $confirm != 'yes') { // Test on permission not required
169 $action = '';
170 }
171
172 if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->hasRight('salaries', 'write'))) {
173 $db->begin();
174
175 $originalId = $id;
176
177 $object->fetch($id);
178 $skillRequire = $object->getSkillRankForJob($originalId);
179 if ($object->id > 0) {
180 $object->id = 0;
181 $object->ref = '';
182
183 if (GETPOST('clone_label', 'alphanohtml')) {
184 $object->label = GETPOST('clone_label', 'alphanohtml');
185 } else {
186 $object->label = $langs->trans("CopyOf").' '.$object->label;
187 }
188 if (GETPOST('clone_skills_required')) {
189 $cloneSkillRequired = GETPOST('clone_skills_required');
190 }
191
192 $id = $object->create($user);
193 if ($id > 0) {
194 if (!empty($cloneSkillRequired)) {
195 $i = 0;
196 while ($i < count($skillRequire)) {
197 $skillrank = new SkillRank($db);
198 $skillrank->createFromClone($user, $skillRequire[$i]->rowid, $id);
199 $i++;
200 }
201 }
202 $db->commit();
203 $db->close();
204
205 header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
206 exit;
207 } else {
208 $id = $originalId;
209 $db->rollback();
210
211 setEventMessages($object->error, $object->errors, 'errors');
212 }
213 } else {
214 $db->rollback();
215 dol_print_error($db, $object->error);
216 }
217 }
218}
219
220
221/*
222 * View
223 *
224 * Put here all code to build page
225 */
226
227$form = new Form($db);
228$formfile = new FormFile($db);
229$formproject = new FormProjets($db);
230
231$title = $langs->trans("Job");
232$help_url = '';
233llxHeader('', $title, $help_url);
234
235// Example : Adding jquery code
236// print '<script type="text/javascript" language="javascript">
237// jQuery(document).ready(function() {
238// function init_myfunc()
239// {
240// jQuery("#myid").removeAttr(\'disabled\');
241// jQuery("#myid").attr(\'disabled\',\'disabled\');
242// }
243// init_myfunc();
244// jQuery("#mybutton").click(function() {
245// init_myfunc();
246// });
247// });
248// </script>';
249
250
251// Part to create
252if ($action == 'create') {
253 print load_fiche_titre($langs->trans("NewJobProfile", $langs->transnoentities('Job')), '', 'object_' . $object->picto);
254
255 print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
256 print '<input type="hidden" name="token" value="' . newToken() . '">';
257 print '<input type="hidden" name="action" value="add">';
258 if ($backtopage) {
259 print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
260 }
261 if ($backtopageforcancel) {
262 print '<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel . '">';
263 }
264
265 print dol_get_fiche_head(array(), '');
266
267 print '<table class="border centpercent tableforfieldcreate">' . "\n";
268
269 // Common attributes
270 include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_add.tpl.php';
271
272 // Other attributes
273 include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_add.tpl.php';
274
275 print '</table>' . "\n";
276
277 print dol_get_fiche_end();
278
279 print '<div class="center">';
280 print '<input type="submit" class="button" name="add" value="' . dol_escape_htmltag($langs->trans("Create")) . '">';
281 print '&nbsp; ';
282 print '<input type="' . ($backtopage ? "submit" : "button") . '" class="button button-cancel" name="cancel" value="' . dol_escape_htmltag($langs->trans("Cancel")) . '"' . ($backtopage ? '' : ' onclick="history.go(-1)"') . '>'; // Cancel for create does not post form if we don't know the backtopage
283 print '</div>';
284
285 print '</form>';
286
287 //dol_set_focus('input[name="ref"]');
288}
289
290// Part to edit record
291if (($id || $ref) && $action == 'edit') {
292 print load_fiche_titre($langs->trans("JobProfile"), '', 'object_' . $object->picto);
293
294 print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
295 print '<input type="hidden" name="token" value="' . newToken() . '">';
296 print '<input type="hidden" name="action" value="update">';
297 print '<input type="hidden" name="id" value="' . $object->id . '">';
298 if ($backtopage) {
299 print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
300 }
301 if ($backtopageforcancel) {
302 print '<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel . '">';
303 }
304
305 print dol_get_fiche_head();
306
307 print '<table class="border centpercent tableforfieldedit">' . "\n";
308
309 // Common attributes
310 include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_edit.tpl.php';
311
312 // Other attributes
313 include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_edit.tpl.php';
314
315 print '</table>';
316
317 print dol_get_fiche_end();
318
319 print '<div class="center"><input type="submit" class="button button-save" name="save" value="' . $langs->trans("Save") . '">';
320 print ' &nbsp; <input type="submit" class="button button-cancel" name="cancel" value="' . $langs->trans("Cancel") . '">';
321 print '</div>';
322
323 print '</form>';
324}
325
326// Part to show record
327if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) {
328 $res = $object->fetch_optionals();
329
330 $head = jobPrepareHead($object);
331 $picto = 'company.png';
332 print dol_get_fiche_head($head, 'job_card', $langs->trans("Workstation"), -1, $object->picto);
333
334 $formconfirm = '';
335
336 // Confirmation to delete
337 if ($action == 'delete') {
338 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteJob'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1);
339 }
340 // Confirmation to delete line
341 if ($action == 'deleteline') {
342 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1);
343 }
344 // Clone confirmation
345 if ($action == 'clone') {
346 // Create an array for form
347 $formquestion = array(
348 array('type' => 'text', 'name' => 'clone_label', 'label' => $langs->trans("Label"), 'value' => $langs->trans("CopyOf").' '.$object->label),
349 array('type' => 'checkbox', 'name' => 'clone_skills_required', 'label' => $langs->trans("RequiredSkills"), 'value' => '',),
350
351 );
352 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->label), 'confirm_clone', $formquestion, 'yes', 1, 280);
353 }
354
355 // Call Hook formConfirm
356 $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid);
357 $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
358 if (empty($reshook)) {
359 $formconfirm .= $hookmanager->resPrint;
360 } elseif ($reshook > 0) {
361 $formconfirm = $hookmanager->resPrint;
362 }
363
364 // Print form confirm
365 print $formconfirm;
366
367
368 // Object card
369 // ------------------------------------------------------------
370 $linkback = '<a href="' . dol_buildpath('/hrm/job_list.php', 1) . '?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
371
372 $morehtmlref = '<div class="refid">';
373 $morehtmlref .= $object->label;
374 $morehtmlref .= '</div>';
375
376
377 dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'rowid', $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 $object->fields['label']['visible'] = 0; // Already in banner
390 include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_view.tpl.php';
391
392 // Other attributes. Fields from hook formObjectOptions and Extrafields.
393 include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
394
395 print '</table>';
396 print '</div>';
397 print '</div>';
398
399 print '<div class="clearboth"></div>';
400
401 print dol_get_fiche_end();
402
403
404 /*
405 * Lines
406 */
407
408 if (!empty($object->table_element_line)) {
409 // Show object lines
410 $result = $object->getLinesArray();
411
412 print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '' : '#line_' . GETPOSTINT('lineid')) . '" method="POST">
413 <input type="hidden" name="token" value="' . newToken() . '">
414 <input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '">
415 <input type="hidden" name="mode" value="">
416 <input type="hidden" name="page_y" value="">
417 <input type="hidden" name="id" value="' . $object->id . '">
418 ';
419
420 if (!empty($conf->use_javascript_ajax) && $object->status == 0) {
421 include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php';
422 }
423
424 print '<div class="div-table-responsive-no-min">';
425 if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) {
426 print '<table id="tablelines" class="noborder noshadow" width="100%">';
427 }
428
429 if (!empty($object->lines)) {
430 $object->printObjectLines($action, $mysoc, null, GETPOSTINT('lineid'), 1);
431 }
432
433 // Form to add new line
434 if ($object->status == 0 && $permissiontoadd && $action != 'selectlines') {
435 if ($action != 'editline') {
436 // Add products/services form
437
438 $parameters = array();
439 $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
440 if ($reshook < 0) {
441 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
442 }
443 if (empty($reshook)) {
444 $object->formAddObjectLine(1, $mysoc, $soc);
445 }
446 }
447 }
448
449 if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) {
450 print '</table>';
451 }
452 print '</div>';
453
454 print "</form>\n";
455 }
456
457
458 // Buttons for actions
459
460 if ($action != 'presend' && $action != 'editline') {
461 print '<div class="tabsAction">' . "\n";
462 $parameters = array();
463 $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
464 if ($reshook < 0) {
465 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
466 }
467
468 if (empty($reshook)) {
469 // Back to draft
470 if ($object->status == $object::STATUS_VALIDATED) {
471 print dolGetButtonAction($langs->trans('SetToDraft'), '', 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=confirm_setdraft&confirm=yes&token=' . newToken(), '', $permissiontoadd);
472 }
473
474 print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=edit&token=' . newToken(), '', $permissiontoadd);
475
476 print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=clone&token=' . newToken(), '', $permissiontoadd);
477
478 // Delete (need delete permission, or if draft, just need create/modify permission)
479 print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=delete&token=' . newToken(), '', $permissiontodelete);
480 }
481 print '</div>' . "\n";
482 }
483
484
485 // Select mail models is same action as presend
486 if (GETPOST('modelselected')) {
487 $action = 'presend';
488 }
489
490 if ($action != 'presend') {
491 print '<div class="fichecenter"><div class="fichehalfleft">';
492 print '<a name="builddoc"></a>'; // ancre
493
494 $includedocgeneration = 0;
495
496 // Documents
497 if ($includedocgeneration) {
498 $objref = dol_sanitizeFileName($object->ref);
499 $relativepath = $objref . '/' . $objref . '.pdf';
500 $filedir = $conf->hrm->dir_output . '/' . $object->element . '/' . $objref;
501 $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
502 $genallowed = $user->hasRight('hrm', 'job', 'read'); // If you can read, you can build the PDF to read content
503 $delallowed = $user->hasRight('hrm', 'job', 'write'); // If you can create/edit, you can remove a file on card
504 print $formfile->showdocuments('hrm:Job', $object->element . '/' . $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang);
505 }
506
507 // Show links to link elements
508 $tmparray = $form->showLinkToObjectBlock($object, array(), array('job'), 1);
509 $linktoelem = $tmparray['linktoelem'];
510 $htmltoenteralink = $tmparray['htmltoenteralink'];
511 print $htmltoenteralink;
512
513 $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
514
515 print '</div><div class="fichehalfright">';
516
517 $MAXEVENT = 10;
518
519 $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/hrm/job_agenda.php?id='.$object->id);
520
521 // List of actions on element
522 include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
523 $formactions = new FormActions($db);
524 $somethingshown = $formactions->showactions($object, $object->element . '@' . $object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlcenter);
525
526 print '</div></div>';
527 }
528
529 // Presend form
530 $modelmail = 'job';
531 $defaulttopic = 'InformationMessage';
532 $diroutput = $conf->hrm->dir_output;
533 $trackid = 'job' . $object->id;
534
535 include DOL_DOCUMENT_ROOT . '/core/tpl/card_presend.tpl.php';
536}
537
538// End of page
539llxFooter();
540$db->close();
$id
Support class for third parties, contacts, members, users or resources.
Definition account.php:48
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:67
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:91
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.
Definition wrapper.php:73
Class to manage standard extra fields.
Class to manage building of HTML components.
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 Job.
Definition job.class.php:38
Class for SkillRank.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $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.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
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.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dol_sanitizeFileName($str, $newstr='_', $unaccent=1, $includequotes=0)
Clean a string to use it as a file name.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
jobPrepareHead($object)
Prepare array of tabs for Job.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.