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