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