dolibarr 18.0.6
conferenceorbooth_document.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2021 Florian Henry <florian.henry@scopen.fr>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 */
18
25// Load Dolibarr environment
26require '../main.inc.php';
27
28require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
29require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
30require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
31require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
32require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
33
34require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
35require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php';
36require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
37require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
38
39
40// Load translation files required by the page
41$langs->loadLangs(array("eventorganization", "projects", "companies", "other", "mails"));
42
43// Get Parameters
44$action = GETPOST('action', 'aZ09');
45$confirm = GETPOST('confirm');
46$cancel = GETPOST('cancel', 'aZ09');
47$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'conferenceorboothcard'; // To manage different context of search
48$backtopage = GETPOST('backtopage', 'alpha');
49$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
50
51$id = GETPOST('id', 'int');
52$ref = GETPOST('ref', 'alpha');
53$withproject = GETPOST('withproject', 'int');
54$project_ref = GETPOST('project_ref', 'alpha');
55
56$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
57$sortfield = GETPOST('sortfield', 'aZ09comma');
58$sortorder = GETPOST('sortorder', 'aZ09comma');
59$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
60if (empty($page) || $page == -1) {
61 $page = 0;
62} // If $page is not defined, or '' or -1
63$offset = $limit * $page;
64$pageprev = $page - 1;
65$pagenext = $page + 1;
66if (!$sortorder) {
67 $sortorder = "ASC";
68}
69if (!$sortfield) {
70 $sortfield = "name";
71}
72//if (! $sortfield) $sortfield="position_name";
73
74// Initialize technical objects
75$object = new ConferenceOrBooth($db);
76$extrafields = new ExtraFields($db);
77$projectstatic = new Project($db);
78$diroutputmassaction = $conf->eventorganization->dir_output.'/temp/massgeneration/'.$user->id;
79$hookmanager->initHooks(array('conferenceorboothdocument', 'globalcard')); // Note that conf->hooks_modules contains array
80
81// Fetch optionals attributes and labels
82$extrafields->fetch_name_optionals_label($object->table_element);
83
84$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
85
86// Load object
87include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
88
89if ($id > 0 || !empty($ref)) {
90 $upload_dir = $conf->eventorganization->multidir_output[$object->entity ? $object->entity : $conf->entity]."/conferenceorbooth/".get_exdir(0, 0, 0, 1, $object);
91}
92
93// Permissions
94$permissiontoread = $user->rights->eventorganization->read;
95$permissiontoadd = $user->rights->eventorganization->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
96$permissiontodelete = $user->rights->eventorganization->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
97$permissionnote = $user->rights->eventorganization->write; // Used by the include of actions_setnotes.inc.php
98$permissiondellink = $user->rights->eventorganization->write; // Used by the include of actions_dellink.inc.php
99$upload_dir = $conf->eventorganization->multidir_output[isset($object->entity) ? $object->entity : 1];
100
101// Security check
102if ($user->socid > 0) {
104}
105$isdraft = (($object->status== $object::STATUS_DRAFT) ? 1 : 0);
106$result = restrictedArea($user, 'eventorganization', $object->id, '', '', 'fk_soc', 'id', $isdraft);
107
108if (!$permissiontoread) {
110}
111
112
113/*
114 * Actions
115 */
116
117$parameters = array();
118$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
119if ($reshook < 0) {
120 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
121}
122
123include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
124
125
126/*
127 * View
128 */
129
130$form = new Form($db);
131
132$title = $langs->trans("ConferenceOrBooth").' - '.$langs->trans("Files");
133$help_url = '';
134llxHeader('', $title, $help_url);
135
136$result = $projectstatic->fetch($object->fk_project);
137if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) {
138 $projectstatic->fetchComments();
139}
140if (!empty($projectstatic->socid)) {
141 $projectstatic->fetch_thirdparty();
142}
143
144$withProjectUrl='';
145$object->project = clone $projectstatic;
146
147if (!empty($withproject)) {
148 // Tabs for project
149 $tab = 'eventorganisation';
150 $withProjectUrl = "&withproject=1";
151 $head = project_prepare_head($projectstatic);
152 print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public ? 'projectpub' : 'project'), 0, '', '');
153
154 // Project card
155
156 $linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
157
158 $morehtmlref = '<div class="refidno">';
159 // Title
160 $morehtmlref .= $projectstatic->title;
161 // Thirdparty
162 if (isset($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
163 $morehtmlref .= '<br>'.$projectstatic->thirdparty->getNomUrl(1, 'project');
164 }
165 $morehtmlref .= '</div>';
166
167 // Define a complementary filter for search of next/prev ref.
168 if (empty($user->rights->project->all->lire)) {
169 $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
170 $projectstatic->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
171 }
172
173 dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
174
175 print '<div class="fichecenter">';
176 print '<div class="fichehalfleft">';
177 print '<div class="underbanner clearboth"></div>';
178
179 print '<table class="border tableforfield centpercent">';
180
181 // Usage
182 if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) {
183 print '<tr><td class="tdtop">';
184 print $langs->trans("Usage");
185 print '</td>';
186 print '<td>';
187 if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
188 print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> ';
189 $htmltext = $langs->trans("ProjectFollowOpportunity");
190 print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
191 print '<br>';
192 }
193 if (empty($conf->global->PROJECT_HIDE_TASKS)) {
194 print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> ';
195 $htmltext = $langs->trans("ProjectFollowTasks");
196 print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
197 print '<br>';
198 }
199 if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) {
200 print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> ';
201 $htmltext = $langs->trans("ProjectBillTimeDescription");
202 print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
203 print '<br>';
204 }
205 if (isModEnabled('eventorganization')) {
206 print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_organize_event ? ' checked="checked"' : '')).'"> ';
207 $htmltext = $langs->trans("EventOrganizationDescriptionLong");
208 print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
209 }
210 print '</td></tr>';
211 }
212
213 // Visibility
214 print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
215 if ($projectstatic->public) {
216 print $langs->trans('SharedProject');
217 } else {
218 print $langs->trans('PrivateProject');
219 }
220 print '</td></tr>';
221
222 // Date start - end
223 print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
224 $start = dol_print_date($projectstatic->date_start, 'day');
225 print ($start ? $start : '?');
226 $end = dol_print_date($projectstatic->date_end, 'day');
227 print ' - ';
228 print ($end ? $end : '?');
229 if ($projectstatic->hasDelay()) {
230 print img_warning("Late");
231 }
232 print '</td></tr>';
233
234 // Budget
235 print '<tr><td>'.$langs->trans("Budget").'</td><td>';
236 if (strcmp($projectstatic->budget_amount, '')) {
237 print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency);
238 }
239 print '</td></tr>';
240
241 // Other attributes
242 $cols = 2;
243 $objectconf = $object;
244 $object = $projectstatic;
245 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
246 $object = $objectconf;
247
248 print '</table>';
249
250 print '</div>';
251
252 print '<div class="fichehalfright">';
253 print '<div class="underbanner clearboth"></div>';
254
255 print '<table class="border tableforfield centpercent">';
256
257 // Description
258 print '<td class="tdtop">'.$langs->trans("Description").'</td><td>';
259 print nl2br($projectstatic->description);
260 print '</td></tr>';
261
262 // Categories
263 if (isModEnabled('categorie')) {
264 print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
265 print $form->showCategories($projectstatic->id, Categorie::TYPE_PROJECT, 1);
266 print "</td></tr>";
267 }
268
269 print '<tr><td>';
270 $typeofdata = 'checkbox:'.($projectstatic->accept_conference_suggestions ? ' checked="checked"' : '');
271 $htmltext = $langs->trans("AllowUnknownPeopleSuggestConfHelp");
272 print $form->editfieldkey('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', '', $projectstatic, 0, $typeofdata, '', 0, 0, 'projectid', $htmltext);
273 print '</td><td>';
274 print $form->editfieldval('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', '1', $projectstatic, 0, $typeofdata, '', 0, 0, '', 0, '', 'projectid');
275 print "</td></tr>";
276
277 print '<tr><td>';
278 $typeofdata = 'checkbox:'.($projectstatic->accept_booth_suggestions ? ' checked="checked"' : '');
279 $htmltext = $langs->trans("AllowUnknownPeopleSuggestBoothHelp");
280 print $form->editfieldkey('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', '', $projectstatic, 0, $typeofdata, '', 0, 0, 'projectid', $htmltext);
281 print '</td><td>';
282 print $form->editfieldval('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', '1', $projectstatic, 0, $typeofdata, '', 0, 0, '', 0, '', 'projectid');
283 print "</td></tr>";
284
285 print '<tr><td>';
286 print $form->editfieldkey($form->textwithpicto($langs->trans('PriceOfBooth'), $langs->trans("PriceOfBoothHelp")), 'price_booth', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid');
287 print '</td><td>';
288 print $form->editfieldval($form->textwithpicto($langs->trans('PriceOfBooth'), $langs->trans("PriceOfBoothHelp")), 'price_booth', $projectstatic->price_booth, $projectstatic, 0, 'amount', '', 0, 0, '', 0, '', 'projectid');
289 print "</td></tr>";
290
291 print '<tr><td>';
292 print $form->editfieldkey($form->textwithpicto($langs->trans('PriceOfRegistration'), $langs->trans("PriceOfRegistrationHelp")), 'price_registration', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid');
293 print '</td><td>';
294 print $form->editfieldval($form->textwithpicto($langs->trans('PriceOfRegistration'), $langs->trans("PriceOfRegistrationHelp")), 'price_registration', $projectstatic->price_registration, $projectstatic, 0, 'amount', '', 0, 0, '', 0, '', 'projectid');
295 print "</td></tr>";
296
297 print '<tr><td valign="middle">'.$langs->trans("EventOrganizationICSLink").'</td><td>';
298 // Define $urlwithroot
299 $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
300 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
301
302 // Show message
303 $message = '<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ? "&entity=".$conf->entity : "");
304 $message .= '&exportkey='.urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY', '...'));
305 $message .= "&project=".$projectstatic->id.'&module='.urlencode('@eventorganization').'&status='.ConferenceOrBooth::STATUS_CONFIRMED.'">'.$langs->trans('DownloadICSLink').img_picto('', 'download', 'class="paddingleft"').'</a>';
306 print $message;
307 print "</td></tr>";
308
309 // Link to the submit vote/register page
310 print '<tr><td>';
311 //print '<span class="opacitymedium">';
312 print $form->textwithpicto($langs->trans("SuggestOrVoteForConfOrBooth"), $langs->trans("EvntOrgRegistrationHelpMessage"));
313 //print '</span>';
314 print '</td><td>';
315 $linksuggest = $dolibarr_main_url_root.'/public/project/index.php?id='.((int) $projectstatic->id);
316 $encodedsecurekey = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'conferenceorbooth'.((int) $projectstatic->id), 'md5');
317 $linksuggest .= '&securekey='.urlencode($encodedsecurekey);
318 //print '<div class="urllink">';
319 //print '<input type="text" value="'.$linksuggest.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
320 print '<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$linksuggest.'" class="quatrevingtpercent">'.$linksuggest.'</a></div>';
321 print '<a target="_blank" rel="noopener noreferrer" href="'.$linksuggest.'">'.img_picto('', 'globe').'</a>';
322 //print '</div>';
323 //print ajax_autoselect("linkregister");
324 print '</td></tr>';
325
326 // Link to the subscribe
327 print '<tr><td>';
328 //print '<span class="opacitymedium">';
329 print $langs->trans("PublicAttendeeSubscriptionGlobalPage");
330 //print '</span>';
331 print '</td><td>';
332 $link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_new.php?id='.((int) $projectstatic->id).'&type=global';
333 $encodedsecurekey = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'conferenceorbooth'.((int) $projectstatic->id), 'md5');
334 $link_subscription .= '&securekey='.urlencode($encodedsecurekey);
335 //print '<div class="urllink">';
336 //print '<input type="text" value="'.$linkregister.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
337 print '<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$link_subscription.'" class="quatrevingtpercent">'.$link_subscription.'</a></div>';
338 print '<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer" href="'.$link_subscription.'">'.img_picto('', 'globe').'</a>';
339 //print '</div>';
340 //print ajax_autoselect("linkregister");
341 print '</td></tr>';
342
343 print '</table>';
344
345 print '</div>';
346 print '</div>';
347
348 print '<div class="clearboth"></div>';
349
350 print dol_get_fiche_end();
351
352 print '<br>';
353}
354
355if ($object->id) {
356 /*
357 * Show tabs
358 */
359 $head = conferenceorboothPrepareHead($object, $withproject);
360
361 print dol_get_fiche_head($head, 'document', $langs->trans("ConferenceOrBooth"), -1, $object->picto);
362
363
364 // Build file list
365 $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1);
366 $totalsize = 0;
367 foreach ($filearray as $key => $file) {
368 $totalsize += $file['size'];
369 }
370
371 // Object card
372 //-----------------------------------------------
373 $linkback = '<a href="'.dol_buildpath('/eventorganization/conferenceorbooth_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
374
375 $morehtmlref = '<div class="refidno">';
376 $morehtmlref .= '</div>';
377
378 dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
379
380 print '<div class="fichecenter">';
381
382 print '<div class="underbanner clearboth"></div>';
383 print '<table class="border centpercent tableforfield">';
384
385 // Number of files
386 print '<tr><td class="titlefield">'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
387
388 // Total size
389 print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
390
391 print '</table>';
392
393 print '</div>';
394
395 print dol_get_fiche_end();
396
397 $modulepart = 'eventorganization';
398 //$permission = $user->rights->eventorganization->conferenceorbooth->write;
399 $permission = 1;
400 //$permtoedit = $user->rights->eventorganization->conferenceorbooth->write;
401 $permtoedit = 1;
402 $param = '&id='.$object->id;
403 //$param = '';
404 if ($withproject) {
405 $param .= '&withproject=1';
406 }
407 //$relativepathwithnofile='conferenceorbooth/' . dol_sanitizeFileName($object->id).'/';
408 $relativepathwithnofile = 'conferenceorbooth/'.dol_sanitizeFileName($object->ref).'/';
409
410 include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
411} else {
412 accessforbidden('', 0, 1);
413}
414
415// End of page
416llxFooter();
417$db->close();
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Definition wrapper.php:56
llxFooter()
Empty footer.
Definition wrapper.php:70
Class for ConferenceOrBooth.
Class to manage standard extra fields.
Class to manage generation of HTML components Only common components must be here.
Class to manage projects.
conferenceorboothPrepareHead($object, $with_project=0)
Prepare array of tabs for ConferenceOrBooth.
dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0, $nbsecondsold=0)
Scan a directory and return a list of files/directories.
Definition files.lib.php:62
dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='')
Show tab footer of a card.
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
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.
price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
Function to format a value into an amount for visual output Function used into PDF and HTML pages.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
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.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart='')
Return a path to have a the directory according to object where files are stored.
project_prepare_head(Project $project, $moreparam='')
Prepare array with list of tabs.
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.
dol_hash($chain, $type='0')
Returns a hash (non reversible encryption) of a string.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.