dolibarr 21.0.0-alpha
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 * Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
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';
28
29require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
30require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
31require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
32require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
33require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
34
35require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
36require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php';
37require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
38require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
39
40
41// Load translation files required by the page
42$langs->loadLangs(array("eventorganization", "projects", "companies", "other", "mails"));
43
44// Get Parameters
45$action = GETPOST('action', 'aZ09');
46$confirm = GETPOST('confirm');
47$cancel = GETPOST('cancel', 'aZ09');
48$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'conferenceorboothcard'; // To manage different context of search
49$backtopage = GETPOST('backtopage', 'alpha');
50$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
51
52$id = GETPOSTINT('id');
53$ref = GETPOST('ref', 'alpha');
54$withproject = GETPOSTINT('withproject');
55$project_ref = GETPOST('project_ref', 'alpha');
56
57$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
58$sortfield = GETPOST('sortfield', 'aZ09comma');
59$sortorder = GETPOST('sortorder', 'aZ09comma');
60$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT("page");
61if (empty($page) || $page == -1) {
62 $page = 0;
63} // If $page is not defined, or '' or -1
64$offset = $limit * $page;
65$pageprev = $page - 1;
66$pagenext = $page + 1;
67if (!$sortorder) {
68 $sortorder = "ASC";
69}
70if (!$sortfield) {
71 $sortfield = "name";
72}
73//if (! $sortfield) $sortfield="position_name";
74
75// Initialize a technical objects
76$object = new ConferenceOrBooth($db);
77$extrafields = new ExtraFields($db);
78$projectstatic = new Project($db);
79$diroutputmassaction = $conf->eventorganization->dir_output.'/temp/massgeneration/'.$user->id;
80$hookmanager->initHooks(array('conferenceorboothdocument', 'globalcard')); // Note that conf->hooks_modules contains array
81
82// Fetch optionals attributes and labels
83$extrafields->fetch_name_optionals_label($object->table_element);
84
85$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
86
87// Load object
88include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'.
89
90if ($id > 0 || !empty($ref)) {
91 $upload_dir = $conf->eventorganization->multidir_output[$object->entity ? $object->entity : $conf->entity]."/conferenceorbooth/".get_exdir(0, 0, 0, 1, $object);
92}
93
94// Permissions
95$permissiontoread = $user->hasRight('eventorganization', 'read');
96$permissiontoadd = $user->hasRight('eventorganization', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
97$permissiontodelete = $user->hasRight('eventorganization', 'delete') || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
98$permissionnote = $user->hasRight('eventorganization', 'write'); // Used by the include of actions_setnotes.inc.php
99$permissiondellink = $user->hasRight('eventorganization', 'write'); // Used by the include of actions_dellink.inc.php
100$upload_dir = $conf->eventorganization->multidir_output[isset($object->entity) ? $object->entity : 1];
101
102// Security check
103if ($user->socid > 0) {
105}
106$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
107$result = restrictedArea($user, 'eventorganization', $object->id, '', '', 'fk_soc', 'id', $isdraft);
108
109if (!$permissiontoread) {
111}
112
113
114/*
115 * Actions
116 */
117
118$parameters = array();
119$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
120if ($reshook < 0) {
121 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
122}
123
124include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
125
126
127/*
128 * View
129 */
130
131$form = new Form($db);
132
133$title = $langs->trans("ConferenceOrBooth").' - '.$langs->trans("Files");
134$help_url='EN:Module_Event_Organization';
135
136llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-eventorganization page-card_documents');
137
138$result = $projectstatic->fetch($object->fk_project);
139if (getDolGlobalString('PROJECT_ALLOW_COMMENT_ON_PROJECT') && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) {
140 $projectstatic->fetchComments();
141}
142if (!empty($projectstatic->socid)) {
143 $projectstatic->fetch_thirdparty();
144}
145
146$withProjectUrl = '';
147$object->project = clone $projectstatic;
148
149if (!empty($withproject)) {
150 // Tabs for project
151 $tab = 'eventorganisation';
152 $withProjectUrl = "&withproject=1";
153 $head = project_prepare_head($projectstatic);
154 print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public ? 'projectpub' : 'project'), 0, '', '');
155
156 // Project card
157
158 $linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
159
160 $morehtmlref = '<div class="refidno">';
161 // Title
162 $morehtmlref .= $projectstatic->title;
163 // Thirdparty
164 if (isset($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
165 $morehtmlref .= '<br>'.$projectstatic->thirdparty->getNomUrl(1, 'project');
166 }
167 $morehtmlref .= '</div>';
168
169 // Define a complementary filter for search of next/prev ref.
170 if (!$user->hasRight('project', 'all', 'lire')) {
171 $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
172 $projectstatic->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
173 }
174
175 dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
176
177 print '<div class="fichecenter">';
178 print '<div class="fichehalfleft">';
179 print '<div class="underbanner clearboth"></div>';
180
181 print '<table class="border tableforfield centpercent">';
182
183 // Usage
184 if (getDolGlobalString('PROJECT_USE_OPPORTUNITIES') || !getDolGlobalString('PROJECT_HIDE_TASKS') || isModEnabled('eventorganization')) {
185 print '<tr><td class="tdtop">';
186 print $langs->trans("Usage");
187 print '</td>';
188 print '<td>';
189 if (getDolGlobalString('PROJECT_USE_OPPORTUNITIES')) {
190 print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> ';
191 $htmltext = $langs->trans("ProjectFollowOpportunity");
192 print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
193 print '<br>';
194 }
195 if (!getDolGlobalString('PROJECT_HIDE_TASKS')) {
196 print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> ';
197 $htmltext = $langs->trans("ProjectFollowTasks");
198 print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
199 print '<br>';
200 }
201 if (!getDolGlobalString('PROJECT_HIDE_TASKS') && getDolGlobalString('PROJECT_BILL_TIME_SPENT')) {
202 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"' : '')).'"> ';
203 $htmltext = $langs->trans("ProjectBillTimeDescription");
204 print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
205 print '<br>';
206 }
207 if (isModEnabled('eventorganization')) {
208 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"' : '')).'"> ';
209 $htmltext = $langs->trans("EventOrganizationDescriptionLong");
210 print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
211 }
212 print '</td></tr>';
213 }
214
215 // Visibility
216 print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
217 if ($projectstatic->public) {
218 print $langs->trans('SharedProject');
219 } else {
220 print $langs->trans('PrivateProject');
221 }
222 print '</td></tr>';
223
224 // Date start - end
225 print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
226 $start = dol_print_date($projectstatic->date_start, 'day');
227 print($start ? $start : '?');
228 $end = dol_print_date($projectstatic->date_end, 'day');
229 print ' - ';
230 print($end ? $end : '?');
231 if ($projectstatic->hasDelay()) {
232 print img_warning("Late");
233 }
234 print '</td></tr>';
235
236 // Budget
237 print '<tr><td>'.$langs->trans("Budget").'</td><td>';
238 if (strcmp($projectstatic->budget_amount, '')) {
239 print price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency);
240 }
241 print '</td></tr>';
242
243 // Other attributes
244 $cols = 2;
245 $objectconf = $object;
246 $object = $projectstatic;
247 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
248 $object = $objectconf;
249
250 print '</table>';
251
252 print '</div>';
253
254 print '<div class="fichehalfright">';
255 print '<div class="underbanner clearboth"></div>';
256
257 print '<table class="border tableforfield centpercent">';
258
259 // Description
260 print '<td class="tdtop">'.$langs->trans("Description").'</td><td>';
261 print nl2br($projectstatic->description);
262 print '</td></tr>';
263
264 // Categories
265 if (isModEnabled('category')) {
266 print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
267 print $form->showCategories($projectstatic->id, Categorie::TYPE_PROJECT, 1);
268 print "</td></tr>";
269 }
270
271 print '<tr><td>';
272 $typeofdata = 'checkbox:'.($projectstatic->accept_conference_suggestions ? ' checked="checked"' : '');
273 $htmltext = $langs->trans("AllowUnknownPeopleSuggestConfHelp");
274 print $form->editfieldkey('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', '', $projectstatic, 0, $typeofdata, '', 0, 0, 'projectid', $htmltext);
275 print '</td><td>';
276 print $form->editfieldval('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', '1', $projectstatic, 0, $typeofdata, '', null, 0, '', 0, '', 'projectid');
277 print "</td></tr>";
278
279 print '<tr><td>';
280 $typeofdata = 'checkbox:'.($projectstatic->accept_booth_suggestions ? ' checked="checked"' : '');
281 $htmltext = $langs->trans("AllowUnknownPeopleSuggestBoothHelp");
282 print $form->editfieldkey('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', '', $projectstatic, 0, $typeofdata, '', 0, 0, 'projectid', $htmltext);
283 print '</td><td>';
284 print $form->editfieldval('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', '1', $projectstatic, 0, $typeofdata, '', null, 0, '', 0, '', 'projectid');
285 print "</td></tr>";
286
287 print '<tr><td>';
288 print $form->editfieldkey($form->textwithpicto($langs->trans('PriceOfBooth'), $langs->trans("PriceOfBoothHelp")), 'price_booth', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid');
289 print '</td><td>';
290 print $form->editfieldval($form->textwithpicto($langs->trans('PriceOfBooth'), $langs->trans("PriceOfBoothHelp")), 'price_booth', $projectstatic->price_booth, $projectstatic, 0, 'amount', '', null, 0, '', 0, '', 'projectid');
291 print "</td></tr>";
292
293 print '<tr><td>';
294 print $form->editfieldkey($form->textwithpicto($langs->trans('PriceOfRegistration'), $langs->trans("PriceOfRegistrationHelp")), 'price_registration', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid');
295 print '</td><td>';
296 print $form->editfieldval($form->textwithpicto($langs->trans('PriceOfRegistration'), $langs->trans("PriceOfRegistrationHelp")), 'price_registration', $projectstatic->price_registration, $projectstatic, 0, 'amount', '', null, 0, '', 0, '', 'projectid');
297 print "</td></tr>";
298
299 print '<tr><td valign="middle">'.$langs->trans("EventOrganizationICSLink").'</td><td>';
300 // Define $urlwithroot
301 $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
302 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
303
304 // Show message
305 $message = '<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ? "&entity=".$conf->entity : "");
306 $message .= '&exportkey='.urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY', '...'));
307 $message .= "&project=".$projectstatic->id.'&module='.urlencode('@eventorganization').'&status='.ConferenceOrBooth::STATUS_CONFIRMED.'">'.$langs->trans('DownloadICSLink').img_picto('', 'download', 'class="paddingleft"').'</a>';
308 print $message;
309 print "</td></tr>";
310
311 // Link to the submit vote/register page
312 print '<tr><td>';
313 //print '<span class="opacitymedium">';
314 print $form->textwithpicto($langs->trans("SuggestOrVoteForConfOrBooth"), $langs->trans("EvntOrgRegistrationHelpMessage"));
315 //print '</span>';
316 print '</td><td>';
317 $linksuggest = $dolibarr_main_url_root.'/public/project/index.php?id='.((int) $projectstatic->id);
318 $encodedsecurekey = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'conferenceorbooth'.((int) $projectstatic->id), 'md5');
319 $linksuggest .= '&securekey='.urlencode($encodedsecurekey);
320 //print '<div class="urllink">';
321 //print '<input type="text" value="'.$linksuggest.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
322 print '<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$linksuggest.'" class="quatrevingtpercent">'.$linksuggest.'</a></div>';
323 print '<a target="_blank" rel="noopener noreferrer" href="'.$linksuggest.'">'.img_picto('', 'globe').'</a>';
324 //print '</div>';
325 //print ajax_autoselect("linkregister");
326 print '</td></tr>';
327
328 // Link to the subscribe
329 print '<tr><td>';
330 //print '<span class="opacitymedium">';
331 print $langs->trans("PublicAttendeeSubscriptionGlobalPage");
332 //print '</span>';
333 print '</td><td>';
334 $link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_new.php?id='.((int) $projectstatic->id).'&type=global';
335 $encodedsecurekey = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'conferenceorbooth'.((int) $projectstatic->id), 'md5');
336 $link_subscription .= '&securekey='.urlencode($encodedsecurekey);
337 //print '<div class="urllink">';
338 //print '<input type="text" value="'.$linkregister.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
339 print '<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$link_subscription.'" class="quatrevingtpercent">'.$link_subscription.'</a></div>';
340 print '<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer" href="'.$link_subscription.'">'.img_picto('', 'globe').'</a>';
341 //print '</div>';
342 //print ajax_autoselect("linkregister");
343 print '</td></tr>';
344
345 print '</table>';
346
347 print '</div>';
348 print '</div>';
349
350 print '<div class="clearboth"></div>';
351
352 print dol_get_fiche_end();
353
354 print '<br>';
355}
356
357if ($object->id) {
358 /*
359 * Show tabs
360 */
361 $head = conferenceorboothPrepareHead($object, $withproject);
362
363 print dol_get_fiche_head($head, 'document', $langs->trans("ConferenceOrBooth"), -1, $object->picto);
364
365
366 // Build file list
367 $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC), 1);
368 $totalsize = 0;
369 foreach ($filearray as $key => $file) {
370 $totalsize += $file['size'];
371 }
372
373 // Object card
374 //-----------------------------------------------
375 $linkback = '<a href="'.dol_buildpath('/eventorganization/conferenceorbooth_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
376
377 $morehtmlref = '<div class="refidno">';
378 $morehtmlref .= '</div>';
379
380 dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
381
382 print '<div class="fichecenter">';
383
384 print '<div class="underbanner clearboth"></div>';
385 print '<table class="border centpercent tableforfield">';
386
387 // Number of files
388 print '<tr><td class="titlefield">'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
389
390 // Total size
391 print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
392
393 print '</table>';
394
395 print '</div>';
396
397 print dol_get_fiche_end();
398
399 $modulepart = 'eventorganization';
400 $param = '&id='.$object->id;
401 //$param = '';
402 if ($withproject) {
403 $param .= '&withproject=1';
404 }
405 //$relativepathwithnofile='conferenceorbooth/' . dol_sanitizeFileName($object->id).'/';
406 $relativepathwithnofile = 'conferenceorbooth/'.dol_sanitizeFileName($object->ref).'/';
407
408 include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
409} else {
410 accessforbidden('', 0, 1);
411}
412
413// End of page
414llxFooter();
415$db->close();
$id
Definition account.php:39
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:58
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: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.
llxFooter()
Footer empty.
Definition document.php:107
conferenceorboothPrepareHead($object, $with_project=0)
Prepare array of tabs for ConferenceOrBooth.
dol_dir_list($utf8_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:63
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
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.
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=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
getDolGlobalString($key, $default='')
Return a 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', $nosalt=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.