28require
'../main.inc.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
33require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorbooth.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorboothattendee.class.php';
36require_once DOL_DOCUMENT_ROOT.
'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
37require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
39global $dolibarr_main_url_root;
42$langs->loadLangs(array(
"eventorganization",
"other",
"projects",
"companies"));
45$action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
46$massaction =
GETPOST(
'massaction',
'alpha');
47$show_files =
GETPOST(
'show_files',
'int');
48$confirm =
GETPOST(
'confirm',
'alpha');
49$cancel =
GETPOST(
'cancel',
'alpha');
50$toselect =
GETPOST(
'toselect',
'array');
51$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') : str_replace(
'_',
'', basename(dirname(__FILE__)).basename(__FILE__,
'.php'));
52$backtopage =
GETPOST(
'backtopage',
'alpha');
53$optioncss =
GETPOST(
'optioncss',
'aZ');
57$projectid =
GETPOST(
'projectid',
'int');
58$projectref =
GETPOST(
'ref',
'alpha');
61$limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
62$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
63$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
64$page = GETPOSTISSET(
'pageplusone') ? (
GETPOST(
'pageplusone') - 1) :
GETPOST(
"page",
'int');
65if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
69$offset = $limit * $page;
77$diroutputmassaction = $conf->eventorganization->dir_output.
'/temp/massgeneration/'.$user->id;
78$hookmanager->initHooks(array($contextpage));
81$extrafields->fetch_name_optionals_label($object->table_element);
84$search_array_options = $extrafields->getOptionalsFromPost($object->table_element,
'',
'search_');
88 reset($object->fields);
89 $sortfield =
"t.".key($object->fields);
96$search_all =
GETPOST(
'search_all',
'alphanohtml') ?
GETPOST(
'search_all',
'alphanohtml') :
GETPOST(
'sall',
'alphanohtml');
98foreach ($object->fields as $key => $val) {
99 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') {
100 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
102 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
103 $search[$key.
'_dtstart'] =
dol_mktime(0, 0, 0,
GETPOST(
'search_'.$key.
'_dtstartmonth',
'int'),
GETPOST(
'search_'.$key.
'_dtstartday',
'int'),
GETPOST(
'search_'.$key.
'_dtstartyear',
'int'));
104 $search[$key.
'_dtend'] =
dol_mktime(23, 59, 59,
GETPOST(
'search_'.$key.
'_dtendmonth',
'int'),
GETPOST(
'search_'.$key.
'_dtendday',
'int'),
GETPOST(
'search_'.$key.
'_dtendyear',
'int'));
109$fieldstosearchall = array();
110foreach ($object->fields as $key => $val) {
111 if (!empty($val[
'searchall'])) {
112 $fieldstosearchall[
't.'.$key] = $val[
'label'];
117$arrayfields = array();
118foreach ($object->fields as $key => $val) {
120 if (!empty($val[
'visible'])) {
121 $visible = (int)
dol_eval($val[
'visible'], 1);
122 $arrayfields[
't.'.$key] = array(
123 'label'=>$val[
'label'],
124 'checked'=>(($visible < 0) ? 0 : 1),
125 'enabled'=>(abs($visible) != 3 &&
dol_eval($val[
'enabled'], 1)),
126 'position'=>$val[
'position'],
127 'help'=> isset($val[
'help']) ? $val[
'help'] :
''
132include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
137$permissiontoread = $user->rights->eventorganization->read;
138$permissiontoadd = $user->rights->eventorganization->write;
139$permissiontodelete = $user->rights->eventorganization->delete;
142if (!isModEnabled(
'eventorganization')) {
146if ($user->socid > 0) {
158if (preg_match(
'/^set/', $action) && ($projectid > 0 || $projectref) && !empty($user->rights->eventorganization->write)) {
160 $project_attr=preg_replace(
'/^set/',
'', $action);
161 if (array_key_exists($project_attr, $project->fields)) {
162 $result = $project->fetch($projectid, $projectref);
166 $projectid = $project->id;
167 $project->{$project_attr}=
GETPOST($project_attr);
168 $result=$project->update($user);
179if (
GETPOST(
'cancel',
'alpha')) {
183if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend'
184 && $massaction !=
'presend_attendees'
185 && $massaction !=
'confirm_presend'
186 && $massaction !=
'confirm_presend_attendees') {
193$parameters = array();
194$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
199if (empty($reshook)) {
201 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
204 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
205 foreach ($object->fields as $key => $val) {
207 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
208 $search[$key.
'_dtstart'] =
'';
209 $search[$key.
'_dtend'] =
'';
213 $search_array_options = array();
215 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')
216 ||
GETPOST(
'button_search_x',
'alpha') ||
GETPOST(
'button_search.x',
'alpha') ||
GETPOST(
'button_search',
'alpha')) {
221 $objectclass =
'ConferenceOrBooth';
222 $objectlabel =
'ConferenceOrBooth';
223 $uploaddir = $conf->eventorganization->dir_output;
224 include DOL_DOCUMENT_ROOT.
'/eventorganization/core/actions_massactions_mail.inc.php';
225 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
233$form =
new Form($db);
236$title = $langs->trans(
"EventOrganizationConfOrBoothes");
237$help_url =
"EN:Module_Event_Organization";
242if ($projectid > 0 || $projectref) {
243 $result = $project->fetch($projectid, $projectref);
247 $projectid = $project->id;
249 $result = $project->fetch_thirdparty();
253 $result = $project->fetch_optionals();
258 $help_url =
"EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
259 $title = $langs->trans(
"Project") .
' - ' . $langs->trans(
"EventOrganizationConfOrBoothes") .
' - ' . $project->ref .
' ' . $project->name;
260 if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match(
'/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $project->name) {
261 $title = $project->ref .
' ' . $project->name .
' - ' . $langs->trans(
"ListOfConferencesOrBooths");
274 $userWrite = $project->restrictedProjectArea($user,
'write');
279 print
dol_get_fiche_head($head,
'eventorganisation', $langs->trans(
"ConferenceOrBoothTab"), -1, ($project->public ?
'projectpub' :
'project'));
282 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
284 $morehtmlref =
'<div class="refidno">';
286 $morehtmlref .= $project->title;
288 if (isset($project->thirdparty->id) && $project->thirdparty->id > 0) {
289 $morehtmlref .=
'<br>'.$project->thirdparty->getNomUrl(1,
'project');
291 $morehtmlref .=
'</div>';
294 if (empty($user->rights->project->all->lire)) {
295 $objectsListId = $project->getProjectsAuthorizedForUser($user, 0, 0);
296 $project->next_prev_filter =
"rowid IN (".$db->sanitize(count($objectsListId) ? join(
',', array_keys($objectsListId)) :
'0').
")";
299 dol_banner_tab($project,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
301 print
'<div class="fichecenter">';
302 print
'<div class="fichehalfleft">';
303 print
'<div class="underbanner clearboth"></div>';
305 print
'<table class="border tableforfield centpercent">';
308 if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled(
'eventorganization')) {
309 print
'<tr><td class="tdtop">';
310 print $langs->trans(
"Usage");
313 if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
314 print
'<input type="checkbox" disabled name="usage_opportunity"'.($project->usage_opportunity ?
' checked="checked"' :
'').
'"> ';
315 $htmltext = $langs->trans(
"ProjectFollowOpportunity");
316 print $form->textwithpicto($langs->trans(
"ProjectFollowOpportunity"), $htmltext);
319 if (empty($conf->global->PROJECT_HIDE_TASKS)) {
320 print
'<input type="checkbox" disabled name="usage_task"'.($project->usage_task ?
' checked="checked"' :
'').
'"> ';
321 $htmltext = $langs->trans(
"ProjectFollowTasks");
322 print $form->textwithpicto($langs->trans(
"ProjectFollowTasks"), $htmltext);
325 if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) {
326 print
'<input type="checkbox" disabled name="usage_bill_time"'.($project->usage_bill_time ?
' checked="checked"' :
'').
'"> ';
327 $htmltext = $langs->trans(
"ProjectBillTimeDescription");
328 print $form->textwithpicto($langs->trans(
"BillTime"), $htmltext);
331 if (isModEnabled(
'eventorganization')) {
332 print
'<input type="checkbox" disabled name="usage_organize_event"'.($project->usage_organize_event ?
' checked="checked"' :
'').
'"> ';
333 $htmltext = $langs->trans(
"EventOrganizationDescriptionLong");
334 print $form->textwithpicto($langs->trans(
"ManageOrganizeEvent"), $htmltext);
340 print
'<tr><td class="titlefield">'.$langs->trans(
"Visibility").
'</td><td>';
341 if ($project->public == 0) {
342 print
img_picto($langs->trans(
'PrivateProject'),
'private',
'class="paddingrightonly"');
343 print $langs->trans(
"PrivateProject");
345 print
img_picto($langs->trans(
'SharedProject'),
'world',
'class="paddingrightonly"');
346 print $langs->trans(
"SharedProject");
351 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
352 if (strcmp($project->budget_amount,
'')) {
353 print
'<span class="amount">'.price($project->budget_amount,
'', $langs, 1, 0, 0, $conf->currency).
'</span>';
358 print
'<tr><td>'.$langs->trans(
"Dates").
' ('.$langs->trans(
"Project").
')</td><td>';
360 print ($start ? $start :
'?');
363 print ($end ? $end :
'?');
364 if ($object->hasDelay()) {
370 print
'<tr><td>'.$langs->trans(
"Dates").
' ('.$langs->trans(
"Event").
')</td><td>';
372 print ($start ? $start :
'?');
375 print ($end ? $end :
'?');
376 if ($object->hasDelay()) {
382 print
'<tr><td>'.$langs->trans(
"Location").
'</td><td>';
383 print $project->location;
388 $objectconf = $object;
390 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
391 $object = $objectconf;
396 print
'<div class="fichehalfright">';
397 print
'<div class="underbanner clearboth"></div>';
399 print
'<table class="border tableforfield centpercent">';
402 print
'<tr><td class="titlefield tdtop">'.$langs->trans(
"Description").
'</td><td class="valuefield">';
407 if (isModEnabled(
'categorie')) {
408 print
'<tr><td class="titlefield valignmiddle">'.$langs->trans(
"Categories").
'</td><td class="valuefield">';
409 print $form->showCategories($project->id, Categorie::TYPE_PROJECT, 1);
413 print
'<tr><td class="titlefield">';
414 $typeofdata =
'checkbox:'.($project->accept_conference_suggestions ?
' checked="checked"' :
'');
415 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestConfHelp");
416 print $form->editfieldkey(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'', $project, $permissiontoadd, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
417 print
'</td><td class="valuefield">';
418 print $form->editfieldval(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'1', $project, $permissiontoadd, $typeofdata,
'', 0, 0,
'', 0,
'',
'projectid');
421 print
'<tr><td class="titlefield">';
422 $typeofdata =
'checkbox:'.($project->accept_booth_suggestions ?
' checked="checked"' :
'');
423 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestBoothHelp");
424 print $form->editfieldkey(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'', $project, $permissiontoadd, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
425 print
'</td><td class="valuefield">';
426 print $form->editfieldval(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'1', $project, $permissiontoadd, $typeofdata,
'', 0, 0,
'', 0,
'',
'projectid');
429 print
'<tr><td class="titlefield">';
430 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth',
'', $project, $permissiontoadd,
'amount',
'', 0, 0,
'projectid');
431 print
'</td><td class="valuefield">';
432 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth', $project->price_booth, $project, $permissiontoadd,
'amount',
'', 0, 0,
'', 0,
'',
'projectid');
435 print
'<tr><td class="titlefield">';
436 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration',
'', $project, $permissiontoadd,
'amount',
'', 0, 0,
'projectid');
437 print
'</td><td class="valuefield">';
438 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration', $project->price_registration, $project, $permissiontoadd,
'amount',
'', 0, 0,
'', 0,
'',
'projectid');
441 print
'<tr><td class="titlefield">';
442 print $form->editfieldkey($form->textwithpicto($langs->trans(
'MaxNbOfAttendees'),
''),
'max_attendees',
'', $project, $permissiontoadd,
'integer:3',
'', 0, 0,
'projectid');
443 print
'</td><td class="valuefield">';
444 print $form->editfieldval($form->textwithpicto($langs->trans(
'MaxNbOfAttendees'),
''),
'max_attendees', $project->max_attendees, $project, $permissiontoadd,
'integer:3',
'', 0, 0,
'', 0,
'',
'projectid');
447 print
'<tr><td class="titlefield valignmiddle">'.$langs->trans(
"EventOrganizationICSLink").
'</td><td class="valuefield">';
449 $urlwithouturlroot = preg_replace(
'/'.preg_quote(DOL_URL_ROOT,
'/').
'$/i',
'', trim($dolibarr_main_url_root));
450 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
453 $message =
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ?
"&entity=".$conf->entity :
"");
454 $message .=
'&exportkey='.urlencode(
getDolGlobalString(
'MAIN_AGENDA_XCAL_EXPORTKEY',
'...'));
455 $message .=
"&project=".$projectid.
'&module='.urlencode(
'@eventorganization').
'&status='.ConferenceOrBooth::STATUS_CONFIRMED.
'">'.$langs->trans(
'DownloadICSLink').img_picto(
'',
'download',
'class="paddingleft"').
'</a>';
460 print
'<tr><td class="titlefield">';
462 print $form->textwithpicto($langs->trans(
"SuggestOrVoteForConfOrBooth"), $langs->trans(
"EvntOrgRegistrationHelpMessage"));
464 print
'</td><td class="valuefield">';
465 $linksuggest = $dolibarr_main_url_root.
'/public/project/index.php?id='.((int) $project->id);
466 $encodedsecurekey =
dol_hash(
getDolGlobalString(
'EVENTORGANIZATION_SECUREKEY').
'conferenceorbooth'.((
int) $project->id),
'md5');
467 $linksuggest .=
'&securekey='.urlencode($encodedsecurekey);
470 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$linksuggest.
'" class="quatrevingtpercent">'.$linksuggest.
'</a></div>';
471 print
'<a target="_blank" rel="noopener noreferrer" href="'.$linksuggest.
'">'.
img_picto(
'',
'globe').
'</a>';
477 print
'<tr><td class="titlefield">';
479 print $langs->trans(
"PublicAttendeeSubscriptionGlobalPage");
481 print
'</td><td class="valuefield">';
482 $link_subscription = $dolibarr_main_url_root.
'/public/eventorganization/attendee_new.php?id='.((int) $project->id).
'&type=global';
483 $encodedsecurekey =
dol_hash(
getDolGlobalString(
'EVENTORGANIZATION_SECUREKEY').
'conferenceorbooth'.((
int) $project->id),
'md5');
484 $link_subscription .=
'&securekey='.urlencode($encodedsecurekey);
487 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$link_subscription.
'" class="quatrevingtpercent">'.$link_subscription.
'</a></div>';
488 print
'<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer" href="'.$link_subscription.
'">'.
img_picto(
'',
'globe').
'</a>';
498 print
'<div class="clearboth"></div>';
503if (!empty($project->id)) {
505 $tab =
'conferenceorbooth';
507 print
dol_get_fiche_head($head, $tab, $langs->trans(
"Project"), -1, ($project->public ?
'projectpub' :
'project'), 0,
'',
'reposition');
513$sql .= $object->getFieldList(
't');
516if (!empty($extrafields->attributes[$object->table_element][
'label'])) {
517 foreach ($extrafields->attributes[$object->table_element][
'label'] as $key => $val) {
518 $sql .= ($extrafields->attributes[$object->table_element][
'type'][$key] !=
'separate' ?
", ef.".$key.
" as options_".$key :
'');
522$parameters = array();
523$reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object, $action);
524$sql .= $hookmanager->resPrint;
525$sql = preg_replace(
'/,\s*$/',
'', $sql);
530$sql .=
" FROM ".MAIN_DB_PREFIX.$object->table_element.
" as t";
531if (isset($extrafields->attributes[$object->table_element][
'label']) && is_array($extrafields->attributes[$object->table_element][
'label']) && count($extrafields->attributes[$object->table_element][
'label'])) {
532 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (t.id = ef.fk_object)";
534$sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"c_actioncomm as cact ON cact.id=t.fk_action AND cact.module LIKE '%@eventorganization'";
536$parameters = array();
537$reshook = $hookmanager->executeHooks(
'printFieldListFrom', $parameters, $object, $action);
538$sql .= $hookmanager->resPrint;
539if ($object->ismultientitymanaged == 1) {
540 $sql .=
" WHERE t.entity IN (".getEntity($object->element, (
GETPOST(
'search_current_entity',
'int') ? 0 : 1)).
")";
542 $sql .=
" WHERE 1 = 1";
545 $sql .=
" AND t.fk_project = ".((int) $project->id);
547foreach ($search as $key => $val) {
548 if (array_key_exists($key, $object->fields)) {
549 if ($key ==
'status' && $search[$key] == -1) {
552 $mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0);
553 if ((strpos($object->fields[$key][
'type'],
'integer:') === 0) || (strpos($object->fields[$key][
'type'],
'sellist:') === 0) || !empty($object->fields[$key][
'arrayofkeyval'])) {
554 if ($search[$key] ==
'-1' || ($search[$key] ===
'0' && (empty($object->fields[$key][
'arrayofkeyval']) || !array_key_exists(
'0', $object->fields[$key][
'arrayofkeyval'])))) {
559 if ($search[$key] !=
'') {
560 $sql .=
natural_search(
"t.".$db->escape($key), $search[$key], (($key ==
'status') ? 2 : $mode_search));
563 if (preg_match(
'/(_dtstart|_dtend)$/', $key) && $search[$key] !=
'') {
564 $columnName = preg_replace(
'/(_dtstart|_dtend)$/',
'', $key);
565 if (preg_match(
'/^(date|timestamp|datetime)/', $object->fields[$columnName][
'type'])) {
566 if (preg_match(
'/_dtstart$/', $key)) {
567 $sql .=
" AND t.".$db->escape($columnName).
" >= '".$db->idate($search[$key]).
"'";
569 if (preg_match(
'/_dtend$/', $key)) {
570 $sql .=
" AND t.".$db->escape($columnName).
" <= '".$db->idate($search[$key]).
"'";
578 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
582include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
584$parameters = array();
585$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object, $action);
586$sql .= $hookmanager->resPrint;
589$nbtotalofrecords =
'';
592 $sqlforcount = preg_replace(
'/^'.preg_quote($sqlfields,
'/').
'/',
'SELECT COUNT(*) as nbtotalofrecords', $sql);
593 $sqlforcount = preg_replace(
'/GROUP BY .*$/',
'', $sqlforcount);
594 $resql = $db->query($sqlforcount);
596 $objforcount = $db->fetch_object($resql);
597 $nbtotalofrecords = $objforcount->nbtotalofrecords;
602 if (($page * $limit) > $nbtotalofrecords) {
610$sql .= $db->order($sortfield, $sortorder);
613 $sql .= $db->plimit($limit + 1, $offset);
616$resql = $db->query($sql);
622$num = $db->num_rows($resql);
625if ($num == 1 && !
getDolGlobalInt(
'MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) {
626 $obj = $db->fetch_object($resql);
628 header(
"Location: ".DOL_URL_ROOT.
'/eventorganization/conferenceorbooth_card.php?id='.((
int) $id));
632$arrayofselected = is_array($toselect) ? $toselect : array();
636 $param .=
'&mode='.urlencode($mode);
638if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
639 $param .=
'&contextpage='.urlencode($contextpage);
641if ($limit > 0 && $limit != $conf->liste_limit) {
642 $param .=
'&limit='.((int) $limit);
644if ($optioncss !=
'') {
645 $param .=
'&optioncss='.urlencode($optioncss);
647if ($project->id > 0) {
648 $param .=
'&projectid='.((int) $project->id);
650foreach ($search as $key => $val) {
651 if (is_array($search[$key])) {
652 foreach ($search[$key] as $skey) {
654 $param .=
'&search_'.$key.
'[]='.urlencode($skey);
657 } elseif (preg_match(
'/(_dtstart|_dtend)$/', $key) && !empty($val)) {
658 $param .=
'&search_'.$key.
'month='.((int)
GETPOST(
'search_'.$key.
'month',
'int'));
659 $param .=
'&search_'.$key.
'day='.((int)
GETPOST(
'search_'.$key.
'day',
'int'));
660 $param .=
'&search_'.$key.
'year='.((int)
GETPOST(
'search_'.$key.
'year',
'int'));
661 } elseif ($search[$key] !=
'') {
662 $param .=
'&search_'.$key.
'='.urlencode($search[$key]);
666include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
668$parameters = array();
669$reshook = $hookmanager->executeHooks(
'printFieldListSearchParam', $parameters, $object, $action);
670$param .= $hookmanager->resPrint;
673$arrayofmassactions = array(
677 'presend'=>
img_picto(
'',
'email',
'class="pictofixedwidth"').$langs->trans(
"SendByMail").
' ('.$langs->trans(
"ToSpeakers").
')',
680if (!empty($permissiontodelete)) {
681 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
683if (
GETPOST(
'nomassaction',
'int') || in_array($massaction, array(
'presend',
'predelete'))) {
684 $arrayofmassactions = array();
686$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
688print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].(!empty($projectid)?
'?projectid='.$projectid:
'').
'">'.
"\n";
689if ($optioncss !=
'') {
690 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
692print
'<input type="hidden" name="token" value="'.newToken().
'">';
693print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
694print
'<input type="hidden" name="action" value="list">';
695print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
696print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
697print
'<input type="hidden" name="page" value="'.$page.
'">';
698print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
699print
'<input type="hidden" name="page_y" value="">';
700print
'<input type="hidden" name="mode" value="'.$mode.
'">';
704$newcardbutton .=
dolGetButtonTitle($langs->trans(
'ViewList'),
'',
'fa fa-bars imgforviewmode', $_SERVER[
"PHP_SELF"].
'?mode=common'.(!empty($project->id)?
'&withproject=1&fk_project='.$project->id:
'').(!empty($project->socid)?
'&fk_soc='.$project->socid:
'').preg_replace(
'/(&|\?)*mode=[^&]+/',
'', $param),
'', ((empty($mode) || $mode ==
'common') ? 2 : 1), array(
'morecss'=>
'reposition'));
705$newcardbutton .=
dolGetButtonTitle($langs->trans(
'ViewKanban'),
'',
'fa fa-th-list imgforviewmode', $_SERVER[
"PHP_SELF"].
'?mode=kanban'.(!empty($project->id)?
'&withproject=1&fk_project='.$project->id:
'').(!empty($project->socid)?
'&fk_soc='.$project->socid:
'').preg_replace(
'/(&|\?)*mode=[^&]+/',
'', $param),
'', ($mode ==
'kanban' ? 2 : 1), array(
'morecss'=>
'reposition'));
707$newcardbutton .=
dolGetButtonTitle($langs->trans(
'New'),
'',
'fa fa-plus-circle', DOL_URL_ROOT.
'/eventorganization/conferenceorbooth_card.php?action=create'.(!empty($project->id)?
'&withproject=1&fk_project='.$project->id:
'').(!empty($project->socid)?
'&fk_soc='.$project->socid:
'').
'&backtopage='.urlencode($_SERVER[
'PHP_SELF']).(!empty($project->id)?
'?projectid='.$project->id:
''),
'', $permissiontoadd);
709print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $object->picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
714$modelmail =
"conferenceorbooth";
716$trackid =
'conferenceorbooth_'.$object->id;
717$withmaindocfilemail = 0;
718include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
723 foreach ($fieldstosearchall as $key => $val) {
724 $fieldstosearchall[$key] = $langs->trans($val);
725 $setupstring .= $key.
"=".$val.
";";
727 print
'<!-- Search done like if EVENTORGANIZATION_QUICKSEARCH_ON_FIELDS = '.$setupstring.
' -->'.
"\n";
728 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).join(
', ', $fieldstosearchall).
'</div>'.
"\n";
736$parameters = array();
737$reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object, $action);
738if (empty($reshook)) {
739 $moreforfilter .= $hookmanager->resPrint;
741 $moreforfilter = $hookmanager->resPrint;
744if (!empty($moreforfilter)) {
745 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
746 print $moreforfilter;
747 $parameters = array();
748 $reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object, $action);
749 print $hookmanager->resPrint;
753$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
754$selectedfields = ($mode !=
'kanban' ? $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN',
'')) :
'');
755$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
758print
'<div class="div-table-responsive">';
759print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
764print
'<tr class="liste_titre_filter">';
767 print
'<td class="liste_titre center maxwidthsearch">';
768 $searchpicto = $form->showFilterButtons(
'left');
772foreach ($object->fields as $key => $val) {
773 $searchkey = empty($search[$key]) ?
'' : $search[$key];
774 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
775 if ($key ==
'status') {
776 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
777 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
778 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
779 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
780 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
781 } elseif (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && !in_array($key, array(
'id',
'rowid',
'ref',
'status')) && $val[
'label'] !=
'TechnicalID' && empty($val[
'arrayofkeyval'])) {
782 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
784 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
785 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').($key ==
'status' ?
' parentonrightofpage' :
'').
'">';
786 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
787 print $form->selectarray(
'search_'.$key, $val[
'arrayofkeyval'], (isset($search[$key]) ? $search[$key] :
''), $val[
'notnull'], 0, 0,
'', 1, 0, 0,
'',
'maxwidth100'.($key ==
'status' ?
' search_status width100 onrightofpage' :
''), 1);
788 } elseif ((strpos($val[
'type'],
'integer:') === 0) || (strpos($val[
'type'],
'sellist:') === 0)) {
789 print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] :
''),
'',
'',
'search_', $cssforfield.
' maxwidth250', 1);
790 } elseif (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
791 print
'<div class="nowrap">';
792 print $form->selectDate($search[$key.
'_dtstart'] ? $search[$key.
'_dtstart'] :
'',
"search_".$key.
"_dtstart", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
794 print
'<div class="nowrap">';
795 print $form->selectDate($search[$key.
'_dtend'] ? $search[$key.
'_dtend'] :
'',
"search_".$key.
"_dtend", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
797 } elseif ($key ==
'lang') {
798 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
800 print $formadmin->select_language($search[$key],
'search_lang', 0,
null, 1, 0, 0,
'minwidth150 maxwidth200', 2);
802 print
'<input type="text" class="flat maxwidth75" name="search_'.$key.
'" value="'.
dol_escape_htmltag(isset($search[$key]) ? $search[$key] :
'').
'">';
808include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
811$parameters = array(
'arrayfields'=>$arrayfields);
812$reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters, $object, $action);
813print $hookmanager->resPrint;
816 print
'<td class="liste_titre center maxwidthsearch">';
817 $searchpicto = $form->showFilterButtons();
823$totalarray = array();
824$totalarray[
'nbfield'] = 0;
828print
'<tr class="liste_titre">';
831 print
getTitleFieldOfList($selectedfields, 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
832 $totalarray[
'nbfield']++;
834foreach ($object->fields as $key => $val) {
835 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
836 if ($key ==
'status') {
837 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
838 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
839 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
840 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
841 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
842 } elseif (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && !in_array($key, array(
'id',
'rowid',
'ref',
'status')) && $val[
'label'] !=
'TechnicalID' && empty($val[
'arrayofkeyval'])) {
843 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
845 $cssforfield = preg_replace(
'/small\s*/',
'', $cssforfield);
846 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
847 print
getTitleFieldOfList($arrayfields[
't.'.$key][
'label'], 0, $_SERVER[
'PHP_SELF'],
't.'.$key,
'', $param, ($cssforfield ?
'class="'.$cssforfield.
'"' :
''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.
' ' :
''), 0, (empty($val[
'helplist']) ?
'' : $val[
'helplist'])).
"\n";
848 $totalarray[
'nbfield']++;
852include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
854$parameters = array(
'arrayfields'=>$arrayfields,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder,
'totalarray'=>&$totalarray);
855$reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters, $object, $action);
856print $hookmanager->resPrint;
859 print
getTitleFieldOfList($selectedfields, 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
860 $totalarray[
'nbfield']++;
866$needToFetchEachLine = 0;
867if (isset($extrafields->attributes[$object->table_element][
'computed']) && is_array($extrafields->attributes[$object->table_element][
'computed']) && count($extrafields->attributes[$object->table_element][
'computed']) > 0) {
868 foreach ($extrafields->attributes[$object->table_element][
'computed'] as $key => $val) {
869 if (!is_null($val) && preg_match(
'/\$object/', $val)) {
870 $needToFetchEachLine++;
879$savnbfield = $totalarray[
'nbfield'];
880$totalarray = array();
881$totalarray[
'nbfield'] = 0;
882$imaxinloop = ($limit ? min($num, $limit) : $num);
883while ($i < $imaxinloop) {
884 $obj = $db->fetch_object($resql);
890 $object->setVarsFromFetchObj($obj);
892 if ($mode ==
'kanban') {
894 print
'<tr class="trkanban"><td colspan="'.$savnbfield.
'">';
895 print
'<div class="box-flex-container kanban">';
899 if ($massactionbutton || $massaction) {
901 if (in_array($object->id, $arrayofselected)) {
905 $thirdparty = $object->fetch_thirdparty();
906 print $object->getKanbanView(
'', array(
'selected' => $selected,
'thirdparty' => $thirdparty));
907 if ($i == ($imaxinloop - 1)) {
914 print
'<tr data-rowid="'.$object->id.
'" class="oddeven">';
917 print
'<td class="nowrap center">';
918 if ($massactionbutton || $massaction) {
920 if (in_array($object->id, $arrayofselected)) {
923 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
927 $totalarray[
'nbfield']++;
930 foreach ($object->fields as $key => $val) {
931 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
932 if (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
933 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
934 } elseif ($key ==
'status') {
935 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
938 if (in_array($val[
'type'], array(
'timestamp'))) {
939 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowraponall';
940 } elseif ($key ==
'ref') {
941 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowraponall';
944 if (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && !in_array($key, array(
'id',
'rowid',
'ref',
'status')) && empty($val[
'arrayofkeyval'])) {
945 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
949 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
950 print
'<td'.($cssforfield ?
' class="'.$cssforfield.(preg_match(
'/tdoverflow/', $cssforfield) ?
' classfortooltip' :
'').
'"' :
'');
951 if (preg_match(
'/tdoverflow/', $cssforfield) && !is_numeric($object->$key)) {
952 print
' title="'.dol_escape_htmltag($object->$key).
'"';
955 if ($key ==
'status') {
956 print $object->getLibStatut(5);
957 } elseif ($key ==
'ref') {
958 print $object->getNomUrl(1, 0,
'', (($projectid > 0)?
'withproject':
''));
960 print $object->showOutputField($val, $key, $object->$key,
'');
964 $totalarray[
'nbfield']++;
966 if (!empty($val[
'isameasure']) && $val[
'isameasure'] == 1) {
968 $totalarray[
'pos'][$totalarray[
'nbfield']] =
't.'.$key;
970 if (!isset($totalarray[
'val'])) {
971 $totalarray[
'val'] = array();
973 if (!isset($totalarray[
'val'][
't.'.$key])) {
974 $totalarray[
'val'][
't.'.$key] = 0;
976 $totalarray[
'val'][
't.'.$key] += $object->$key;
981 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
983 $parameters = array(
'arrayfields'=>$arrayfields,
'object'=>$object,
'obj'=>$obj,
'i'=>$i,
'totalarray'=>&$totalarray);
984 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $object, $action);
985 print $hookmanager->resPrint;
988 print
'<td class="nowrap center">';
989 if ($massactionbutton || $massaction) {
991 if (in_array($object->id, $arrayofselected)) {
994 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
998 $totalarray[
'nbfield']++;
1009include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
1014 foreach ($arrayfields as $key => $val) {
1015 if (!empty($val[
'checked'])) {
1019 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
1025$parameters = array(
'arrayfields'=>$arrayfields,
'sql'=>$sql);
1026$reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object, $action);
1027print $hookmanager->resPrint;
1029print
'</table>'.
"\n";
1032print
'</form>'.
"\n";
1034if (in_array(
'builddoc', array_keys($arrayofmassactions)) && ($nbtotalofrecords ===
'' || $nbtotalofrecords)) {
1035 $hidegeneratedfilelistifempty = 1;
1036 if ($massaction ==
'builddoc' || $action ==
'remove_file' || $show_files) {
1037 $hidegeneratedfilelistifempty = 0;
1040 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
1044 $urlsource = $_SERVER[
'PHP_SELF'].
'?sortfield='.$sortfield.
'&sortorder='.$sortorder;
1045 $urlsource .= str_replace(
'&',
'&', $param);
1047 $filedir = $diroutputmassaction;
1048 $genallowed = $permissiontoread;
1049 $delallowed = $permissiontoadd;
1051 print $formfile->showdocuments(
'massfilesarea_eventorganization',
'', $filedir, $urlsource, 0, $delallowed,
'', 1, 1, 0, 48, 1, $param, $title,
'',
'',
'',
null, $hidegeneratedfilelistifempty);
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Class for ConferenceOrBooth.
Class to manage projects.
conferenceorboothProjectPrepareHead($object)
Prepare array of tabs for ConferenceOrBooth Project tab.
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.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
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_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dolGetButtonTitle($label, $helpText='', $iconClass='fa fa-file', $url='', $id='', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
natural_search($fields, $value, $mode=0, $nofirstand=0)
Generate natural SQL search string for a criteria (this criteria can be tested on one or several fiel...
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_now($mode='auto')
Return date for now.
getDolGlobalInt($key, $default=0)
Return dolibarr global constant int value.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
dol_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by second index function, which produces ascending (default) or descending output...
dol_eval($s, $returnvalue=0, $hideerrors=1, $onlysimplestring='1')
Replace eval function to add more security.
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get title line of an array.
dolGetButtonTitleSeparator($moreClass="")
Add space between dolGetButtonTitle.
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.
print_barre_liste($titre, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $hideselectlimit=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
dol_htmlentitiesbr($stringtoencode, $nl2brmode=0, $pagecodefrom='UTF-8', $removelasteolbr=1)
This function is called to encode a string into a HTML string but differs from htmlentities because a...
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
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.