dolibarr 23.0.3
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], $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
236// Part to create
237if ($action == 'create') {
238 print load_fiche_titre($langs->trans("NewJobProfile", $langs->transnoentities('Job')), '', 'object_' . $object->picto);
239
240 print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
241 print '<input type="hidden" name="token" value="' . newToken() . '">';
242 print '<input type="hidden" name="action" value="add">';
243 if ($backtopage) {
244 print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
245 }
246 if ($backtopageforcancel) {
247 print '<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel . '">';
248 }
249
250 print dol_get_fiche_head(array(), '');
251
252 print '<table class="border centpercent tableforfieldcreate">' . "\n";
253
254 // Common attributes
255 include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_add.tpl.php';
256
257 // Other attributes
258 include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_add.tpl.php';
259
260 print '</table>' . "\n";
261
262 print dol_get_fiche_end();
263
264 print '<div class="center">';
265 print '<input type="submit" class="button" name="add" value="' . dol_escape_htmltag($langs->trans("Create")) . '">';
266 print '&nbsp; ';
267 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
268 print '</div>';
269
270 print '</form>';
271
272 //dol_set_focus('input[name="ref"]');
273}
274
275// Part to edit record
276if (($id || $ref) && $action == 'edit') {
277 print load_fiche_titre($langs->trans("JobProfile"), '', 'object_' . $object->picto);
278
279 print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
280 print '<input type="hidden" name="token" value="' . newToken() . '">';
281 print '<input type="hidden" name="action" value="update">';
282 print '<input type="hidden" name="id" value="' . $object->id . '">';
283 if ($backtopage) {
284 print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
285 }
286 if ($backtopageforcancel) {
287 print '<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel . '">';
288 }
289
290 print dol_get_fiche_head();
291
292 print '<table class="border centpercent tableforfieldedit">' . "\n";
293
294 // Common attributes
295 include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_edit.tpl.php';
296
297 // Other attributes
298 include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_edit.tpl.php';
299
300 print '</table>';
301
302 print dol_get_fiche_end();
303
304 print '<div class="center"><input type="submit" class="button button-save" name="save" value="' . $langs->trans("Save") . '">';
305 print ' &nbsp; <input type="submit" class="button button-cancel" name="cancel" value="' . $langs->trans("Cancel") . '">';
306 print '</div>';
307
308 print '</form>';
309}
310
311// Part to show record
312if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) {
313 $res = $object->fetch_optionals();
314
315 $head = jobPrepareHead($object);
316 $picto = 'company.png';
317 print dol_get_fiche_head($head, 'job_card', $langs->trans("Workstation"), -1, $object->picto);
318
319 $formconfirm = '';
320
321 // Confirmation to delete
322 if ($action == 'delete') {
323 $formconfirm = $form->formconfirm(dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id]), $langs->trans('DeleteJob'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1);
324 }
325 // Confirmation to delete line
326 if ($action == 'deleteline') {
327 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1);
328 }
329 // Clone confirmation
330 if ($action == 'clone') {
331 // Create an array for form
332 $formquestion = array(
333 array('type' => 'text', 'name' => 'clone_label', 'label' => $langs->trans("Label"), 'value' => $langs->trans("CopyOf").' '.$object->label),
334 array('type' => 'checkbox', 'name' => 'clone_skills_required', 'label' => $langs->trans("RequiredSkills"), 'value' => '',),
335
336 );
337 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->label), 'confirm_clone', $formquestion, 'yes', 1, 280);
338 }
339
340 // Call Hook formConfirm
341 $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid);
342 $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
343 if (empty($reshook)) {
344 $formconfirm .= $hookmanager->resPrint;
345 } elseif ($reshook > 0) {
346 $formconfirm = $hookmanager->resPrint;
347 }
348
349 // Print form confirm
350 print $formconfirm;
351
352
353 // Object card
354 // ------------------------------------------------------------
355 $linkback = '<a href="' . dol_buildpath('/hrm/job_list.php', 1) . '?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
356
357 $morehtmlref = '<div class="refid">';
358 $morehtmlref .= $object->label;
359 $morehtmlref .= '</div>';
360
361
362 dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'rowid', $morehtmlref);
363
364
365 print '<div class="fichecenter">';
366 print '<div class="fichehalfleft">';
367 print '<div class="underbanner clearboth"></div>';
368 print '<table class="border centpercent tableforfield">'."\n";
369
370 // Common attributes
371 //$keyforbreak='fieldkeytoswitchonsecondcolumn'; // We change column just before this field
372 //unset($object->fields['fk_project']); // Hide field already shown in banner
373 //unset($object->fields['fk_soc']); // Hide field already shown in banner
374 $object->fields['label']['visible'] = 0; // Already in banner
375 include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_view.tpl.php';
376
377 // Other attributes. Fields from hook formObjectOptions and Extrafields.
378 include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
379
380 print '</table>';
381 print '</div>';
382 print '</div>';
383
384 print '<div class="clearboth"></div>';
385
386 print dol_get_fiche_end();
387
388
389 /*
390 * Lines
391 */
392
393 if (!empty($object->table_element_line)) {
394 // Show object lines
395 $result = $object->getLinesArray();
396
397 print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '' : '#line_' . GETPOSTINT('lineid')) . '" method="POST">
398 <input type="hidden" name="token" value="' . newToken() . '">
399 <input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '">
400 <input type="hidden" name="mode" value="">
401 <input type="hidden" name="page_y" value="">
402 <input type="hidden" name="id" value="' . $object->id . '">
403 ';
404
405 if (!empty($conf->use_javascript_ajax) && $object->status == 0) {
406 include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php';
407 }
408
409 print '<div class="div-table-responsive-no-min">';
410 if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) {
411 print '<table id="tablelines" class="noborder noshadow" width="100%">';
412 }
413
414 if (!empty($object->lines)) {
415 $object->printObjectLines($action, $mysoc, null, GETPOSTINT('lineid'), 1);
416 }
417
418 // Form to add new line
419 if ($object->status == 0 && $permissiontoadd && $action != 'selectlines') {
420 if ($action != 'editline') {
421 // Add products/services form
422
423 $parameters = array();
424 $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
425 if ($reshook < 0) {
426 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
427 }
428 if (empty($reshook)) {
429 $object->formAddObjectLine(1, $mysoc, $soc);
430 }
431 }
432 }
433
434 if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) {
435 print '</table>';
436 }
437 print '</div>';
438
439 print "</form>\n";
440 }
441
442
443 // Buttons for actions
444
445 if ($action != 'presend' && $action != 'editline') {
446 print '<div class="tabsAction">' . "\n";
447 $parameters = array();
448 $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
449 if ($reshook < 0) {
450 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
451 }
452
453 if (empty($reshook)) {
454 // Back to draft
455 if ($object->status == $object::STATUS_VALIDATED) {
456 print dolGetButtonAction($langs->trans('SetToDraft'), '', 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=confirm_setdraft&confirm=yes&token=' . newToken(), '', $permissiontoadd);
457 }
458
459 print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=edit&token=' . newToken(), '', $permissiontoadd);
460
461 print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=clone&token=' . newToken(), '', $permissiontoadd);
462
463 // Delete (need delete permission, or if draft, just need create/modify permission)
464 print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=delete&token=' . newToken(), '', $permissiontodelete);
465 }
466 print '</div>' . "\n";
467 }
468
469
470 // Select mail models is same action as presend
471 if (GETPOST('modelselected')) {
472 $action = 'presend';
473 }
474
475 if ($action != 'presend') {
476 print '<div class="fichecenter"><div class="fichehalfleft">';
477 print '<a name="builddoc"></a>'; // ancre
478
479 $includedocgeneration = 0;
480
481 // Documents
482 if ($includedocgeneration) {
483 $objref = dol_sanitizeFileName($object->ref);
484 $relativepath = $objref . '/' . $objref . '.pdf';
485 $filedir = $conf->hrm->dir_output . '/' . $object->element . '/' . $objref;
486 $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
487 $genallowed = $user->hasRight('hrm', 'job', 'read'); // If you can read, you can build the PDF to read content
488 $delallowed = $user->hasRight('hrm', 'job', 'write'); // If you can create/edit, you can remove a file on card
489 print $formfile->showdocuments('hrm:Job', $object->element . '/' . $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang);
490 }
491
492 // Show links to link elements
493 $tmparray = $form->showLinkToObjectBlock($object, array(), array('job'), 1);
494 $linktoelem = $tmparray['linktoelem'];
495 $htmltoenteralink = $tmparray['htmltoenteralink'];
496 print $htmltoenteralink;
497
498 $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
499
500 print '</div><div class="fichehalfright">';
501
502 $MAXEVENT = 10;
503
504 $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/hrm/job_agenda.php?id='.$object->id);
505
506 // List of actions on element
507 include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
508 $formactions = new FormActions($db);
509 $somethingshown = $formactions->showactions($object, $object->element . '@' . $object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlcenter);
510
511 print '</div></div>';
512 }
513
514 // Presend form
515 $modelmail = 'job';
516 $defaulttopic = 'InformationMessage';
517 $diroutput = $conf->hrm->dir_output;
518 $trackid = 'job' . $object->id;
519
520 include DOL_DOCUMENT_ROOT . '/core/tpl/card_presend.tpl.php';
521}
522
523// End of page
524llxFooter();
525$db->close();
$id
Support class for third parties, contacts, members, users or resources.
Definition account.php:47
if(! $sortfield) if(! $sortorder) $object
Definition account.php:100
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.
global $mysoc
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.
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.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1, $includequotes=0, $allowdash=0)
Clean a string to use it as a file name.
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...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
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.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.