dolibarr 21.0.0-beta
workstation_card.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
26// Load Dolibarr environment
27require '../main.inc.php';
28require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
29require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
30require_once DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php';
31require_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php';
32require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstation.class.php';
33require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstationusergroup.class.php';
34require_once DOL_DOCUMENT_ROOT.'/workstation/lib/workstation_workstation.lib.php';
35
44// Load translation files required by the page
45$langs->loadLangs(array('mrp', 'other'));
46
47// Get parameters
48$id = GETPOSTINT('id');
49$ref = GETPOST('ref', 'alpha');
50$action = GETPOST('action', 'aZ09');
51$confirm = GETPOST('confirm', 'alpha');
52$cancel = GETPOST('cancel', 'aZ09');
53$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search
54$backtopage = GETPOST('backtopage', 'alpha');
55$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
56$backtopagejsfields = GETPOST('backtopagejsfields', 'alpha');
57$dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09');
58
59if (!empty($backtopagejsfields)) {
60 $tmpbacktopagejsfields = explode(':', $backtopagejsfields);
61 $dol_openinpopup = preg_replace('/[^a-z0-9_]/i', '', $tmpbacktopagejsfields[0]);
62}
63
64$groups = GETPOST('groups', 'array:int');
65$resources = GETPOST('resources', 'array:int');
66//$lineid = GETPOST('lineid', 'int');
67
68// Initialize a technical objects
69$object = new Workstation($db);
70
71//$extrafields = new ExtraFields($db);
72$diroutputmassaction = $conf->workstation->dir_output.'/temp/massgeneration/'.$user->id;
73$hookmanager->initHooks(array($object->element.'card', 'globalcard')); // Note that conf->hooks_modules contains array
74
75// Fetch optionals attributes and labels
76$extrafields->fetch_name_optionals_label($object->table_element);
77
78$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
79
80// Initialize array of search criteria
81$search_all = trim(GETPOST("search_all", 'alpha'));
82$search = array();
83foreach ($object->fields as $key => $val) {
84 if (GETPOST('search_'.$key, 'alpha')) {
85 $search[$key] = GETPOST('search_'.$key, 'alpha');
86 }
87}
88
89if (empty($action) && empty($id) && empty($ref)) {
90 $action = 'view';
91}
92
93// Load object
94include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'.
95
96// Permissions
97$permissiontoread = $user->hasRight('workstation', 'workstation', 'read');
98$permissiontoadd = $user->hasRight('workstation', 'workstation', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
99$permissiontodelete = $user->hasRight('workstation', 'workstation', 'delete') || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DISABLED);
100$permissionnote = $user->hasRight('workstation', 'workstation', 'write'); // Used by the include of actions_setnotes.inc.php
101$permissiondellink = $user->hasRight('workstation', 'workstation', 'write'); // Used by the include of actions_dellink.inc.php
102
103$upload_dir = rtrim(getMultidirOutput($object, '', 1), '/');
104
105// Security check
106$isdraft = 0;
107restrictedArea($user, $object->element, $object->id, $object->table_element, 'workstation', 'fk_soc', 'rowid', $isdraft);
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('/workstation/workstation_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)) {
128 $backtopage = $backurlforlist;
129 } else {
130 $backtopage = dol_buildpath('/workstation/workstation_card.php', 1).'?id='.($id > 0 ? $id : '__ID__');
131 }
132 }
133 }
134
135 $triggermodname = 'WORKSTATION_WORKSTATION_MODIFY'; // Name of trigger action code to execute when we modify record
136
137 // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen
138 include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
139
140 // Actions when linking object each other
141 include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';
142
143 // Actions when printing a doc from card
144 include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
145
146 // Action to move up and down lines of object
147 //include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php';
148
149 // Action to build doc
150 include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
151
152 if ($action == 'confirm_enable' && $confirm == "yes" && $permissiontoadd) {
153 if (!empty($object->id)) {
154 $object->setStatus(1);
155 }
156 } elseif ($action == 'confirm_disable' && $confirm == "yes" && $permissiontoadd) {
157 if (!empty($object->id)) {
158 $object->setStatus(0);
159 }
160 }
161}
162
163
164
165/*
166 * View
167 */
168
169$form = new Form($db);
170$formfile = new FormFile($db);
171$formresource = new FormResource($db);
172
173$title = $langs->trans("Workstation")." - ".$langs->trans('Card');
174if ($action == 'create') {
175 $title = $langs->trans("NewObject", $langs->transnoentitiesnoconv("Workstation"));
176}
177$help_url = 'EN:Module_Workstation';
178
179llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-workstation page-workstation_card');
180
181// jquery code
182?>
183 <script>
184
185 jQuery(document).ready(function() {
186 jQuery("#type").change(function() {
187 if($(this).val() === 'MACHINE') {
188 $('#usergroups').hide();
189 $('#nb_operators_required').parent('td').parent('tr').hide();
190 $('#wsresources').show();
191 } else if($(this).val() === 'HUMAN') {
192 $('#wsresources').hide();
193 $('#nb_operators_required').parent('td').parent('tr').show();
194 $('#usergroups').show();
195 }
196 else {
197 $('#usergroups').show();
198 $('#wsresources').show();
199 $('#nb_operators_required').parent('td').parent('tr').show();
200 }
201 });
202 jQuery("#type").trigger('change');
203 });
204
205 </script>
206<?php
207
208// Part to create
209if ($action == 'create') {
210 if (empty($permissiontoadd)) {
211 accessforbidden('NotEnoughPermissions', 0, 1);
212 }
213
214 // Set default value of the property ref
215 $object->fields['ref']['default'] = $object->getNextNumRef();
216
217 print load_fiche_titre($title, '', 'object_'.$object->picto);
218
219 print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
220 print '<input type="hidden" name="token" value="'.newToken().'">';
221 print '<input type="hidden" name="action" value="add">';
222 if ($backtopage) {
223 print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
224 }
225 if ($backtopageforcancel) {
226 print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
227 }
228
229 print dol_get_fiche_head(array(), '');
230
231 print '<table class="border centpercent tableforfieldcreate">'."\n";
232
233 // Common attributes
234 include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php';
235
236 print '<tr id="usergroups"';
237 print ' ><td>';
238 print $langs->trans('Groups');
239 print '</td>';
240 print '<td>';
241 print img_picto('', 'group');
242 print $form->select_dolgroups($groups, 'groups', 1, '', 0, '', '', $object->entity, true, 'quatrevingtpercent widthcentpercentminusx');
243 print '</td></tr>';
244
245 print '<tr id="wsresources"><td>';
246 print $langs->trans('Machines');
247 print '</td>';
248 print '<td>';
249 print img_picto('', 'resource');
250 print $formresource->select_resource_list($resources, 'resources', [], '', 0, '', '', $object->entity, true, 0, 'quatrevingtpercent widthcentpercentminusx', true);
251 print '</td></tr>';
252
253 // Other attributes
254 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
255
256 print '</table>'."\n";
257
258 print dol_get_fiche_end();
259
260 print $form->buttonsSaveCancel("Create");
261
262 print '</form>';
263
264 //dol_set_focus('input[name="ref"]');
265}
266
267// Part to edit record
268if (($id || $ref) && $action == 'edit') {
269 print load_fiche_titre($langs->trans("Workstation"), '', 'object_'.$object->picto);
270
271 print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
272 print '<input type="hidden" name="token" value="'.newToken().'">';
273 print '<input type="hidden" name="action" value="update">';
274 print '<input type="hidden" name="id" value="'.$object->id.'">';
275 if ($backtopage) {
276 print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
277 }
278 if ($backtopageforcancel) {
279 print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
280 }
281
282 print dol_get_fiche_head();
283
284 print '<table class="border centpercent tableforfieldedit">'."\n";
285
286 // Common attributes
287 include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php';
288
289 print '<tr id="usergroups"';
290 print '><td>';
291 print $langs->trans('Groups');
292 print '</td>';
293 print '<td>';
294 print img_picto('', 'group');
295 print $form->select_dolgroups(empty($groups) ? $object->usergroups : $groups, 'groups', 1, '', 0, '', '', $object->entity, true, 'quatrevingtpercent widthcentpercentminusx');
296 print '</td></tr>';
297
298 print '<tr id="wsresources"><td>';
299 print $langs->trans('Machines');
300 print '</td>';
301 print '<td>';
302 print img_picto('', 'resource');
303 print $formresource->select_resource_list(empty($resources) ? $object->resources : $resources, 'resources', [], '', 0, '', '', $object->entity, true, 0, 'quatrevingtpercent widthcentpercentminusx', true);
304 print '</td></tr>';
305
306 // Other attributes
307 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php';
308
309 print '</table>';
310
311 print dol_get_fiche_end();
312
313 print $form->buttonsSaveCancel();
314
315 print '</form>';
316}
317
318// Part to show record
319if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) {
320 $head = workstationPrepareHead($object);
321
322 print dol_get_fiche_head($head, 'card', $langs->trans("Workstation"), -1, $object->picto);
323
324 $formconfirm = '';
325
326 // Confirmation to delete (using preloaded confirm popup)
327 if ($action == 'delete' || ($conf->use_javascript_ajax && empty($conf->dol_use_jmobile))) {
328 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteWorkstation'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 'action-delete');
329 }
330 // Clone confirmation
331 if ($action == 'clone') {
332 // Create an array for form
333 $formquestion = array();
334 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
335 }
336
337 // Confirmation of action xxxx
338 if ($action == 'enable') {
339 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('EnableAWorkstation'), $langs->trans("ConfirmEnableWorkstation", $object->ref), 'confirm_enable', $formquestion, 0, 1, 220);
340 } elseif ($action == 'disable') {
341 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DisableAWorkstation'), $langs->trans("ConfirmDisableWorkstation", $object->ref), 'confirm_disable', $formquestion, 0, 1, 220);
342 }
343
344 // Call Hook formConfirm
345 $parameters = array(
346 'formConfirm' => $formconfirm,
347 // 'lineid' => $lineid,
348 );
349 $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
350 if (empty($reshook)) {
351 $formconfirm .= $hookmanager->resPrint;
352 } elseif ($reshook > 0) {
353 $formconfirm = $hookmanager->resPrint;
354 }
355
356 // Print form confirm
357 print $formconfirm;
358
359
360 // Object card
361 // ------------------------------------------------------------
362 $linkback = '<a href="'.dol_buildpath('/workstation/workstation_list.php', 1).'?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
363
364 $morehtmlref = '<div class="refidno">';
365 /*
366 // Ref customer
367 $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
368 $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
369 // Thirdparty
370 $morehtmlref .= '<br>'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
371 // Project
372 if (isModEnabled('project')) {
373 $langs->load("projects");
374 $morehtmlref .= '<br>';
375 if ($permissiontoadd) {
376 $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
377 if ($action != 'classify') {
378 $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> ';
379 }
380 $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
381 } else {
382 if (!empty($object->fk_project)) {
383 $proj = new Project($db);
384 $proj->fetch($object->fk_project);
385 $morehtmlref .= $proj->getNomUrl(1);
386 if ($proj->title) {
387 $morehtmlref .= '<span class="opacitymedium"> - '.dol_escape_htmltag($proj->title).'</span>';
388 }
389 }
390 }
391 }
392 }
393 */
394 $morehtmlref .= '</div>';
395
396
397 dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
398
399
400 print '<div class="fichecenter">';
401 print '<div class="fichehalfleft">';
402 print '<div class="underbanner clearboth"></div>';
403 print '<table class="border centpercent tableforfield">'."\n";
404
405 // Common attributes
406 //$keyforbreak='fieldkeytoswitchonsecondcolumn'; // We change column just before this field
407 //unset($object->fields['fk_project']); // Hide field already shown in banner
408 //unset($object->fields['fk_soc']); // Hide field already shown in banner
409 if ($object->type === 'MACHINE') {
410 $object->fields['nb_operators_required']['visible'] = 0;
411 }
412
413 // Common attributes
414 //$keyforbreak='fieldkeytoswitchonsecondcolumn'; // We change column just before this field
415 //unset($object->fields['fk_project']); // Hide field already shown in banner
416 //unset($object->fields['fk_soc']); // Hide field already shown in banner
417 include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
418
419 // Groups
420 if ($object->type !== 'MACHINE') {
421 $toprint = array();
422 $g = new UserGroup($db);
423 foreach ($object->usergroups as $id_group) {
424 $g->fetch($id_group);
425 $toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories" style="background: #bbb">' . $g->getNomUrl(1, '', 0, 'categtextwhite') . '</li>';
426 }
427
428 print '<tr><td>' . $langs->trans('Groups') . '</td><td>';
429 print '<div class="select2-container-multi-dolibarr"><ul class="select2-choices-dolibarr">' . implode(' ', $toprint) . '</ul></div>';
430 print '</td></tr>';
431 }
432
433 // Resources
434 if ($object->type !== 'HUMAN') {
435 $toprint = array();
436 $r = new Dolresource($db);
437 foreach ($object->resources as $id_resource) {
438 $r->fetch($id_resource);
439 $toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories" style="background: #bbb">' . $r->getNomUrl(1, '', '', 0, 'categtextwhite') . '</li>';
440 }
441
442 print '<tr><td>' . $langs->trans('Machines') . '</td><td>';
443 print '<div class="select2-container-multi-dolibarr"><ul class="select2-choices-dolibarr">' . implode(' ', $toprint) . '</ul></div>';
444 print '</td></tr>';
445 }
446
447 // Other attributes. Fields from hook formObjectOptions and Extrafields.
448 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
449
450 print '</table>';
451 print '</div>';
452 print '</div>';
453
454 print '<div class="clearboth"></div>';
455
456 print dol_get_fiche_end();
457
458
459 // Buttons for actions
460
461 if ($action != 'presend' && $action != 'editline') {
462 print '<div class="tabsAction">'."\n";
463 $parameters = array();
464 $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
465 if ($reshook < 0) {
466 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
467 }
468
469 if (empty($reshook)) {
470 // Modify
471 print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd);
472
473 // Clone
474 if ($permissiontoadd) {
475 print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.(!empty($object->socid) ? '&socid='.$object->socid : '').'&action=clone&token='.newToken(), '', $permissiontoadd);
476 }
477
478 // Disable / Enable
479 if ($permissiontoadd) {
480 if ($object->status == $object::STATUS_ENABLED) {
481 print dolGetButtonAction('', $langs->trans('Disable'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=disable&token='.newToken(), '', $permissiontoadd);
482 } else {
483 print dolGetButtonAction('', $langs->trans('Enable'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=enable&token='.newToken(), '', $permissiontoadd);
484 }
485 }
486
487 // Delete (with preloaded confirm popup)
488 $deleteUrl = $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken();
489 $buttonId = 'action-delete-no-ajax';
490 if ($conf->use_javascript_ajax && empty($conf->dol_use_jmobile)) { // We can use preloaded confirm if not jmobile
491 $deleteUrl = '';
492 $buttonId = 'action-delete';
493 }
494 $params = array();
495 print dolGetButtonAction('', $langs->trans("Delete"), 'delete', $deleteUrl, $buttonId, $permissiontodelete, $params);
496 }
497 print '</div>'."\n";
498 }
499}
500
501// End of page
502llxFooter();
503$db->close();
$id
Definition account.php:48
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:66
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:71
DAO Resource object.
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 forms for the module resource.
Class to manage user groups.
Class for Workstation.
llxFooter()
Footer empty.
Definition document.php:107
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.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
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.
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.
if(!function_exists( 'utf8_encode')) if(!function_exists('utf8_decode')) if(!function_exists( 'str_starts_with')) if(!function_exists('str_ends_with')) if(!function_exists( 'str_contains')) getMultidirOutput($object, $module='', $forobject=0, $mode='output')
Return the full path of the directory where a module (or an object of a module) stores its files.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.
workstationPrepareHead($object)
Prepare array of tabs for Workstation.