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