27 require
'../main.inc.php';
29 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
30 require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
31 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
32 require_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
34 require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorbooth.class.php';
35 require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorboothattendee.class.php';
36 require_once DOL_DOCUMENT_ROOT.
'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
37 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
39 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
42 global $dolibarr_main_url_root;
48 $langs->loadLangs(array(
"eventorganization",
"other",
"projects"));
51 $action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
52 $massaction =
GETPOST(
'massaction',
'alpha');
53 $show_files =
GETPOST(
'show_files',
'int');
54 $confirm =
GETPOST(
'confirm',
'alpha');
55 $cancel =
GETPOST(
'cancel',
'alpha');
56 $toselect =
GETPOST(
'toselect',
'array');
57 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'conferenceorboothattendeelist';
58 $backtopage =
GETPOST(
'backtopage',
'alpha');
59 $optioncss =
GETPOST(
'optioncss',
'aZ');
62 $conf_or_booth_id =
GETPOST(
'conforboothid',
'int');
64 $withproject =
GETPOST(
'withproject',
'int');
65 $fk_project =
GETPOST(
'fk_project',
'int') ?
GETPOST(
'fk_project',
'int') :
GETPOST(
'projectid',
'int');
66 $projectid = $fk_project;
71 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
72 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
73 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
75 if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
78 $offset = $limit * $page;
79 $pageprev = $page - 1;
80 $pagenext = $page + 1;
85 $projectstatic =
new Project($db);
86 $diroutputmassaction = $conf->eventorganization->dir_output.
'/temp/massgeneration/'.$user->id;
87 $hookmanager->initHooks(array(
'conferenceorboothattendeelist'));
90 $extrafields->fetch_name_optionals_label($object->table_element);
93 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element,
'',
'search_');
97 reset($object->fields);
98 $sortfield =
"t.".key($object->fields);
105 $search_all =
GETPOST(
'search_all',
'alphanohtml');
107 foreach ($object->fields as $key => $val) {
108 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') {
109 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
111 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
112 $search[$key.
'_dtstart'] =
dol_mktime(0, 0, 0,
GETPOST(
'search_'.$key.
'_dtstartmonth',
'int'),
GETPOST(
'search_'.$key.
'_dtstartday',
'int'),
GETPOST(
'search_'.$key.
'_dtstartyear',
'int'));
113 $search[$key.
'_dtend'] =
dol_mktime(23, 59, 59,
GETPOST(
'search_'.$key.
'_dtendmonth',
'int'),
GETPOST(
'search_'.$key.
'_dtendday',
'int'),
GETPOST(
'search_'.$key.
'_dtendyear',
'int'));
118 $fieldstosearchall = array();
119 foreach ($object->fields as $key => $val) {
120 if (!empty($val[
'searchall'])) {
121 $fieldstosearchall[
't.'.$key] = $val[
'label'];
126 $arrayfields = array();
127 foreach ($object->fields as $key => $val) {
129 if (!empty($val[
'visible'])) {
130 $visible = (int)
dol_eval($val[
'visible'], 1, 1,
'1');
131 $arrayfields[
't.'.$key] = array(
132 'label'=>$val[
'label'],
133 'checked'=>(($visible < 0) ? 0 : 1),
134 'enabled'=>($visible != 3 &&
dol_eval($val[
'enabled'], 1, 1,
'1')),
135 'position'=>$val[
'position'],
136 'help'=> isset($val[
'help']) ? $val[
'help'] :
''
141 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
147 $permissiontoread = $user->rights->eventorganization->read;
148 $permissiontoadd = $user->rights->eventorganization->write;
149 $permissiontodelete = $user->rights->eventorganization->delete;
152 if (empty($conf->eventorganization->enabled)) {
156 if ($user->socid > 0) {
168 if (preg_match(
'/^set/', $action) && $projectid > 0 && !empty($user->rights->eventorganization->write)) {
171 $project_attr=preg_replace(
'/^set/',
'', $action);
172 if (array_key_exists($project_attr, $project->fields)) {
173 $result = $project->fetch($projectid);
177 $project->{$project_attr}=
GETPOST($project_attr);
178 $result=$project->update($user);
186 if (
GETPOST(
'cancel',
'alpha')) {
190 if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend'
191 && $massaction !=
'presend'
192 && $massaction !=
'confirm_presend') {
196 $parameters = array();
197 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
202 if (empty($reshook)) {
204 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
207 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
208 foreach ($object->fields as $key => $val) {
210 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
211 $search[$key.
'_dtstart'] =
'';
212 $search[$key.
'_dtend'] =
'';
216 $search_array_options = array();
218 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')
219 ||
GETPOST(
'button_search_x',
'alpha') ||
GETPOST(
'button_search.x',
'alpha') ||
GETPOST(
'button_search',
'alpha')) {
224 $objectclass =
'ConferenceOrBoothAttendee';
225 $objectlabel =
'ConferenceOrBoothAttendee';
226 $uploaddir = $conf->eventorganization->dir_output;
227 include DOL_DOCUMENT_ROOT.
'/eventorganization/core/actions_massactions_mail.inc.php';
228 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
242 if ($confOrBooth->id > 0) {
243 $title = $langs->trans(
'ListOfAttendeesPerConference');
245 $title = $langs->trans(
'ListOfAttendeesOfEvent');
251 if ($conf_or_booth_id > 0) {
252 $result = $confOrBooth->fetch($conf_or_booth_id);
256 $fk_project = $confOrBooth->fk_project;
260 if ($fk_project > 0) {
261 $result = $projectstatic->fetch($fk_project);
271 $sql .= $object->getFieldList(
't');
273 if (!empty($extrafields->attributes[$object->table_element][
'label'])) {
274 foreach ($extrafields->attributes[$object->table_element][
'label'] as $key => $val) {
275 $sql .= ($extrafields->attributes[$object->table_element][
'type'][$key] !=
'separate' ?
", ef.".$key.
" as options_".$key :
'');
279 $parameters = array();
280 $reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object);
281 $sql .= preg_replace(
'/^,/',
'', $hookmanager->resPrint);
282 $sql = preg_replace(
'/,\s*$/',
'', $sql);
283 $sql .=
" FROM ".MAIN_DB_PREFIX.$object->table_element.
" as t";
284 if (!empty($confOrBooth->id)) {
285 $sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"actioncomm as a on a.id=t.fk_actioncomm AND a.id=".((int) $confOrBooth->id);
287 if (isset($extrafields->attributes[$object->table_element][
'label']) && is_array($extrafields->attributes[$object->table_element][
'label']) && count($extrafields->attributes[$object->table_element][
'label'])) {
288 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (t.rowid = ef.fk_object)";
291 $parameters = array();
292 $reshook = $hookmanager->executeHooks(
'printFieldListFrom', $parameters, $object);
293 $sql .= $hookmanager->resPrint;
294 if ($object->ismultientitymanaged == 1) {
295 $sql .=
" WHERE t.entity IN (".getEntity($object->element).
")";
297 $sql .=
" WHERE 1 = 1";
299 if (!empty($projectstatic->id)) {
300 $sql .=
" AND t.fk_project=".((int) $projectstatic->id);
302 foreach ($search as $key => $val) {
303 if (array_key_exists($key, $object->fields)) {
304 if ($key ==
'status' && $search[$key] == -1) {
307 $mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0);
308 if ((strpos($object->fields[$key][
'type'],
'integer:') === 0) || (strpos($object->fields[$key][
'type'],
'sellist:') === 0) || !empty($object->fields[$key][
'arrayofkeyval'])) {
309 if ($search[$key] ==
'-1' || ($search[$key] ===
'0' && (empty($object->fields[$key][
'arrayofkeyval']) || !array_key_exists(
'0', $object->fields[$key][
'arrayofkeyval'])))) {
314 if ($search[$key] !=
'') {
315 $sql .=
natural_search($key, $search[$key], (($key ==
'status') ? 2 : $mode_search));
318 if (preg_match(
'/(_dtstart|_dtend)$/', $key) && $search[$key] !=
'') {
319 $columnName = preg_replace(
'/(_dtstart|_dtend)$/',
'', $key);
320 if (preg_match(
'/^(date|timestamp|datetime)/', $object->fields[$columnName][
'type'])) {
321 if (preg_match(
'/_dtstart$/', $key)) {
322 $sql .=
" AND t.".$columnName.
" >= '".$db->idate($search[$key]).
"'";
324 if (preg_match(
'/_dtend$/', $key)) {
325 $sql .=
" AND t." . $columnName .
" <= '" . $db->idate($search[$key]) .
"'";
332 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
336 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
338 $parameters = array();
339 $reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object);
340 $sql .= $hookmanager->resPrint;
343 $sql .= $db->order($sortfield, $sortorder);
347 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
348 $resql = $db->query($sql);
360 $sql .= $db->plimit($limit + 1, $offset);
363 $resql = $db->query($sql);
369 $num = $db->num_rows(
$resql);
373 if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) {
374 $obj = $db->fetch_object(
$resql);
376 header(
"Location: ".
dol_buildpath(
'/eventorganization/conferenceorboothattendee_card.php', 1).
'?id='.$id);
382 llxHeader(
'', $title,
$help_url,
'', 0, 0, $morejs, $morecss,
'',
'classforhorizontalscrolloftabs');
386 if ($projectstatic->id > 0 || $confOrBooth > 0) {
387 if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic,
'fetchComments') && empty($projectstatic->comments)) {
388 $projectstatic->fetchComments();
390 if (!empty($projectstatic->socid)) {
391 $projectstatic->fetch_thirdparty();
395 $object->project = clone $projectstatic;
397 if (!empty($withproject)) {
399 $tab =
'eventorganisation';
400 $withProjectUrl =
"&withproject=1";
403 print
dol_get_fiche_head($head, $tab, $langs->trans(
"Project"), -1, ($projectstatic->public ?
'projectpub' :
'project'), 0,
'',
'');
405 $param = ($mode ==
'mine' ?
'&mode=mine' :
'');
409 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
411 $morehtmlref =
'<div class="refidno">';
413 $morehtmlref .= $projectstatic->title;
415 if ($projectstatic->thirdparty->id > 0) {
416 $morehtmlref .=
'<br>'.$projectstatic->thirdparty->getNomUrl(1,
'project');
418 $morehtmlref .=
'</div>';
421 if (empty($user->rights->projet->all->lire)) {
422 $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
423 $projectstatic->next_prev_filter =
" rowid IN (".$db->sanitize(count($objectsListId) ?join(
',', array_keys($objectsListId)) :
'0').
")";
426 dol_banner_tab($projectstatic,
'project_ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
428 print
'<div class="fichecenter">';
429 print
'<div class="fichehalfleft">';
430 print
'<div class="underbanner clearboth"></div>';
432 print
'<table class="border tableforfield centpercent">';
435 if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) ||
isModEnabled(
'eventorganization')) {
436 print
'<tr><td class="tdtop">';
437 print $langs->trans(
"Usage");
440 if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
441 print
'<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET(
'usage_opportunity') ? (
GETPOST(
'usage_opportunity',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_opportunity ?
' checked="checked"' :
'')).
'"> ';
442 $htmltext = $langs->trans(
"ProjectFollowOpportunity");
443 print
$form->textwithpicto($langs->trans(
"ProjectFollowOpportunity"), $htmltext);
446 if (empty($conf->global->PROJECT_HIDE_TASKS)) {
447 print
'<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET(
'usage_task') ? (
GETPOST(
'usage_task',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_task ?
' checked="checked"' :
'')).
'"> ';
448 $htmltext = $langs->trans(
"ProjectFollowTasks");
449 print
$form->textwithpicto($langs->trans(
"ProjectFollowTasks"), $htmltext);
452 if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) {
453 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"' :
'')).
'"> ';
454 $htmltext = $langs->trans(
"ProjectBillTimeDescription");
455 print
$form->textwithpicto($langs->trans(
"BillTime"), $htmltext);
459 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"' :
'')).
'"> ';
460 $htmltext = $langs->trans(
"EventOrganizationDescriptionLong");
461 print
$form->textwithpicto($langs->trans(
"ManageOrganizeEvent"), $htmltext);
467 print
'<tr><td class="titlefield">'.$langs->trans(
"Visibility").
'</td><td>';
468 if ($projectstatic->public == 0) {
469 print
img_picto($langs->trans(
'PrivateProject'),
'private',
'class="paddingrightonly"');
470 print $langs->trans(
"PrivateProject");
472 print
img_picto($langs->trans(
'SharedProject'),
'world',
'class="paddingrightonly"');
473 print $langs->trans(
"SharedProject");
478 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
479 if (strcmp($projectstatic->budget_amount,
'')) {
480 print
'<span class="amount">'.price($projectstatic->budget_amount,
'', $langs, 1, 0, 0, $conf->currency).
'</span>';
485 print
'<tr><td>'.$langs->trans(
"Dates").
' ('.$langs->trans(
"Project").
')</td><td>';
487 print ($start ? $start :
'?');
490 print ($end ? $end :
'?');
491 if ($projectstatic->hasDelay()) {
497 print
'<tr><td>'.$langs->trans(
"Dates").
' ('.$langs->trans(
"Event").
')</td><td>';
499 print ($start ? $start :
'?');
502 print ($end ? $end :
'?');
503 if ($projectstatic->hasDelay()) {
509 print
'<tr><td>'.$langs->trans(
"Location").
'</td><td>';
510 print $projectstatic->location;
515 $objectconf = $object;
516 $object = $projectstatic;
517 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
518 $object = $objectconf;
524 print
'<div class="fichehalfright">';
525 print
'<div class="underbanner clearboth"></div>';
527 print
'<table class="border tableforfield centpercent">';
530 print
'<td class="titlefield tdtop">'.$langs->trans(
"Description").
'</td><td>';
531 print nl2br($projectstatic->description);
536 print
'<tr><td class="valignmiddle">'.$langs->trans(
"Categories").
'</td><td>';
537 print
$form->showCategories($projectstatic->id,
'project', 1);
541 print
'<tr><td class="nowrap">';
542 $typeofdata =
'checkbox:'.($projectstatic->accept_conference_suggestions ?
' checked="checked"' :
'');
543 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestConfHelp");
544 print
$form->editfieldkey(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'', $projectstatic, 0, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
546 print
$form->editfieldval(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'1', $projectstatic, 0, $typeofdata,
'', 0, 0,
'', 0,
'',
'projectid');
550 $typeofdata =
'checkbox:'.($projectstatic->accept_booth_suggestions ?
' checked="checked"' :
'');
551 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestBoothHelp");
552 print
$form->editfieldkey(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'', $projectstatic, 0, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
554 print
$form->editfieldval(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'1', $projectstatic, 0, $typeofdata,
'', 0, 0,
'', 0,
'',
'projectid');
558 print
$form->editfieldkey(
$form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth',
'', $projectstatic, 0,
'amount',
'', 0, 0,
'projectid');
560 print
$form->editfieldval(
$form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth', $projectstatic->price_booth, $projectstatic, 0,
'amount',
'', 0, 0,
'', 0,
'',
'projectid');
564 print
$form->editfieldkey(
$form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration',
'', $projectstatic, 0,
'amount',
'', 0, 0,
'projectid');
566 print
$form->editfieldval(
$form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration', $projectstatic->price_registration, $projectstatic, 0,
'amount',
'', 0, 0,
'', 0,
'',
'projectid');
569 print
'<tr><td class="titlefield">';
570 print
$form->editfieldkey(
$form->textwithpicto($langs->trans(
'MaxNbOfAttendees'),
''),
'max_attendees',
'', $projectstatic, $permissiontoadd,
'integer:3',
'&withproject=1', 0, 0,
'projectid');
571 print
'</td><td class="valuefield">';
572 print
$form->editfieldval(
$form->textwithpicto($langs->trans(
'MaxNbOfAttendees'),
''),
'max_attendees', $projectstatic->max_attendees, $projectstatic, $permissiontoadd,
'integer:3',
'', 0, 0,
'&withproject=1', 0,
'',
'projectid');
575 print
'<tr><td valign="middle">'.$langs->trans(
"EventOrganizationICSLink").
'</td><td>';
577 $urlwithouturlroot = preg_replace(
'/'.preg_quote(DOL_URL_ROOT,
'/').
'$/i',
'', trim($dolibarr_main_url_root));
578 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
581 $message =
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ?
"&entity=".$conf->entity :
"");
582 $message .=
'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) :
'...');
583 $message .=
"&project=".$projectstatic->id.
'&module='.urlencode(
'@eventorganization').
'&status='.ConferenceOrBooth::STATUS_CONFIRMED.
'">'.$langs->trans(
'DownloadICSLink').img_picto(
'',
'download',
'class="paddingleft"').
'</a>';
590 print
$form->textwithpicto($langs->trans(
"SuggestOrVoteForConfOrBooth"), $langs->trans(
"EvntOrgRegistrationHelpMessage"));
593 $linksuggest = $dolibarr_main_url_root.
'/public/project/index.php?id='.$projectstatic->id;
594 $encodedsecurekey =
dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.
'conferenceorbooth'.$projectstatic->id,
'md5');
595 $linksuggest .=
'&securekey='.urlencode($encodedsecurekey);
598 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" rel="noopener noreferrer" href="'.$linksuggest.
'" class="quatrevingtpercent">'.$linksuggest.
'</a></div>';
599 print
'<a target="_blank" rel="noopener noreferrer" href="'.$linksuggest.
'">'.
img_picto(
'',
'globe').
'</a>';
607 print $langs->trans(
"PublicAttendeeSubscriptionGlobalPage");
610 $link_subscription = $dolibarr_main_url_root.
'/public/eventorganization/attendee_new.php?id='.$projectstatic->id.
'&type=global';
611 $encodedsecurekey =
dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.
'conferenceorbooth'.$projectstatic->id,
'md5');
612 $link_subscription .=
'&securekey='.urlencode($encodedsecurekey);
615 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$link_subscription.
'" class="quatrevingtpercent">'.$link_subscription.
'</a></div>';
616 print
'<a target="_blank" rel="noopener noreferrer" href="'.$link_subscription.
'">'.
img_picto(
'',
'globe').
'</a>';
626 print
'<div class="clearboth"></div>';
630 if (empty($confOrBooth->id)) {
633 print
dol_get_fiche_head($head, $tab, $langs->trans(
"Project"), -1, ($project->public ?
'projectpub' :
'project'), 0,
'',
'reposition');
637 if ($confOrBooth->id > 0) {
640 print
dol_get_fiche_head($head,
'attendees', $langs->trans(
"ConferenceOrBooth"), -1, $object->picto);
642 $object_evt = $object;
643 $object = $confOrBooth;
647 print
'<div class="fichecenter">';
648 print
'<div class="fichehalfleft">';
649 print
'<div class="underbanner clearboth"></div>';
650 print
'<table class="border centpercent tableforfield">' .
"\n";
652 include DOL_DOCUMENT_ROOT .
'/core/tpl/commonfields_view.tpl.php';
655 include DOL_DOCUMENT_ROOT .
'/core/tpl/extrafields_view.tpl.php';
656 $object = $object_evt;
661 print
'<div class="clearboth"></div>';
667 $arrayofselected = is_array($toselect) ? $toselect : array();
670 if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
671 $param .=
'&contextpage='.urlencode($contextpage);
673 if ($limit > 0 && $limit != $conf->liste_limit) {
674 $param .=
'&limit='.urlencode($limit);
676 foreach ($search as $key => $val) {
677 if (is_array($search[$key]) && count($search[$key])) {
678 foreach ($search[$key] as $skey) {
680 $param .=
'&search_'.$key.
'[]='.urlencode($skey);
683 } elseif ($search[$key] !=
'') {
684 $param .=
'&search_'.$key.
'='.urlencode($search[$key]);
687 if ($confOrBooth->id > 0) {
688 $param .=
'&conforboothid='.urlencode($confOrBooth->id);
690 if ($projectstatic->id > 0) {
691 $param .=
'&fk_project='.urlencode($projectstatic->id);
693 $param .= $withProjectUrl;
694 if ($optioncss !=
'') {
695 $param .=
'&optioncss='.urlencode($optioncss);
699 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
701 $parameters = array();
702 $reshook = $hookmanager->executeHooks(
'printFieldListSearchParam', $parameters, $object);
703 $param .= $hookmanager->resPrint;
706 $arrayofmassactions = array(
710 'presend'=>
img_picto(
'',
'email',
'class="pictofixedwidth"').$langs->trans(
"SendByMail"),
712 if ($permissiontodelete) {
713 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
715 if (
GETPOST(
'nomassaction',
'int') || in_array($massaction, array(
'presend',
'predelete'))) {
716 $arrayofmassactions = array();
718 $massactionbutton =
$form->selectMassAction(
'', $arrayofmassactions);
720 print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].(!empty($conf_or_booth_id)?
'?conforboothid='.$conf_or_booth_id:
'').
'">'.
"\n";
721 if ($optioncss !=
'') {
722 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
724 print
'<input type="hidden" name="token" value="'.newToken().
'">';
725 print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
726 print
'<input type="hidden" name="action" value="list">';
727 print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
728 print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
729 print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
730 print
'<input type="hidden" name="withproject" value="'.$withproject.
'">';
731 print
'<input type="hidden" name="fk_project" value="'.$fk_project.
'">';
732 print
'<input type="hidden" name="page_y" value="">';
734 $params = array(
'morecss'=>
'reposition');
735 $newcardbutton =
dolGetButtonTitle($langs->trans(
'New'),
'',
'fa fa-plus-circle', DOL_URL_ROOT.
'/eventorganization/conferenceorboothattendee_card.php?action=create'.(!empty($confOrBooth->id)?
'&conforboothid='.$confOrBooth->id:
'').(!empty($projectstatic->id)?
'&fk_project='.$projectstatic->id:
'').$withProjectUrl.
'&backtopage='.urlencode($_SERVER[
'PHP_SELF'].
'?projectid='.$projectstatic->id.(empty($confOrBooth->id) ?
'' :
'&conforboothid='.$confOrBooth->id).$withProjectUrl),
'', $permissiontoadd, $params);
737 print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num,
$nbtotalofrecords, $object->picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
741 $topicmail = $projectstatic->title;
742 $modelmail =
"conferenceorbooth";
744 $trackid =
'conferenceorbooth_'.$object->id;
745 $withmaindocfilemail = 0;
746 include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
750 foreach ($fieldstosearchall as $key => $val) {
751 $fieldstosearchall[$key] = $langs->trans($val);
753 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).join(
', ', $fieldstosearchall).
'</div>';
761 $parameters = array();
762 $reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object);
763 if (empty($reshook)) {
764 $moreforfilter .= $hookmanager->resPrint;
766 $moreforfilter = $hookmanager->resPrint;
769 if (!empty($moreforfilter)) {
770 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
771 print $moreforfilter;
775 $varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
776 $selectedfields =
$form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage);
777 $selectedfields .= (count($arrayofmassactions) ?
$form->showCheckAddButtons(
'checkforselect', 1) :
'');
779 print
'<div class="div-table-responsive">';
780 print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
785 print
'<tr class="liste_titre">';
786 foreach ($object->fields as $key => $val) {
787 $cssforfield = (empty($val[
'css']) ?
'' : $val[
'css']);
788 if ($key ==
'status') {
789 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
790 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
791 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
792 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
793 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
794 } elseif (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && !in_array($key, array(
'rowid',
'ref')) && $val[
'label'] !=
'TechnicalID') {
795 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
797 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
798 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').
'">';
799 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
800 print
$form->selectarray(
'search_'.$key, $val[
'arrayofkeyval'], $search[$key], $val[
'notnull'], 0, 0,
'', 1, 0, 0,
'',
'maxwidth100', 1);
801 } elseif ((strpos($val[
'type'],
'integer:') === 0) || (strpos($val[
'type'],
'sellist:')=== 0)) {
802 print $object->showInputField($val, $key, $search[$key],
'',
'',
'search_',
'maxwidth125', 1);
803 } elseif (!preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
804 print
'<input type="text" class="flat maxwidth75" name="search_'.$key.
'" value="'.
dol_escape_htmltag($search[$key]).
'">';
805 } elseif (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
806 print
'<div class="nowrap">';
807 print
$form->selectDate($search[$key.
'_dtstart'] ? $search[$key.
'_dtstart'] :
'',
"search_".$key.
"_dtstart", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
809 print
'<div class="nowrap">';
810 print
$form->selectDate($search[$key.
'_dtend'] ? $search[$key.
'_dtend'] :
'',
"search_".$key.
"_dtend", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
817 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
820 $parameters = array(
'arrayfields'=>$arrayfields);
821 $reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters, $object);
822 print $hookmanager->resPrint;
824 print
'<td class="liste_titre maxwidthsearch">';
825 $searchpicto =
$form->showFilterButtons();
833 print
'<tr class="liste_titre">';
834 foreach ($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(
'rowid',
'ref')) && $val[
'label'] !=
'TechnicalID') {
843 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
845 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
846 print
getTitleFieldOfList($arrayfields[
't.'.$key][
'label'], 0, $_SERVER[
'PHP_SELF'],
't.'.$key,
'', $param, ($cssforfield ?
'class="'.$cssforfield.
'"' :
''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.
' ' :
'')).
"\n";
850 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
852 $parameters = array(
'arrayfields'=>$arrayfields,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder);
853 $reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters, $object);
854 print $hookmanager->resPrint;
856 print
getTitleFieldOfList($selectedfields, 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
861 $needToFetchEachLine = 0;
862 if (isset($extrafields->attributes[$object->table_element][
'computed']) && is_array($extrafields->attributes[$object->table_element][
'computed']) && count($extrafields->attributes[$object->table_element][
'computed']) > 0) {
863 foreach ($extrafields->attributes[$object->table_element][
'computed'] as $key => $val) {
864 if (preg_match(
'/\$object/', $val)) {
865 $needToFetchEachLine++;
874 $totalarray = array();
875 while ($i < ($limit ? min($num, $limit) : $num)) {
876 $obj = $db->fetch_object(
$resql);
882 $object->setVarsFromFetchObj($obj);
885 print
'<tr class="oddeven">';
886 foreach ($object->fields as $key => $val) {
887 $cssforfield = (empty($val[
'css']) ?
'' : $val[
'css']);
888 if (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
889 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
890 } elseif ($key ==
'status') {
891 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
894 if (in_array($val[
'type'], array(
'timestamp'))) {
895 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap left';
896 } elseif ($key ==
'ref') {
897 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
900 if (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && !in_array($key, array(
'rowid',
'ref',
'status'))) {
901 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
905 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
906 print
'<td'.($cssforfield ?
' class="'.$cssforfield.
'"' :
'').
'>';
907 if ($key ==
'status') {
908 print $object->getLibStatut(5);
909 } elseif ($key ==
'ref') {
910 $optionLink = (!empty($withproject)?
'conforboothidproject':
'conforboothid');
911 if (empty($confOrBooth->id)) {
912 $optionLink=
'projectid';
914 print $object->getNomUrl(1, $optionLink);
916 print $object->showOutputField($val, $key, $object->$key,
'');
920 $totalarray[
'nbfield']++;
922 if (!empty($val[
'isameasure']) && $val[
'isameasure'] == 1) {
924 $totalarray[
'pos'][$totalarray[
'nbfield']] =
't.'.$key;
926 if (!isset($totalarray[
'val'])) {
927 $totalarray[
'val'] = array();
929 if (!isset($totalarray[
'val'][
't.'.$key])) {
930 $totalarray[
'val'][
't.'.$key] = 0;
932 $totalarray[
'val'][
't.'.$key] += $object->$key;
937 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
939 $parameters = array(
'arrayfields'=>$arrayfields,
'object'=>$object,
'obj'=>$obj,
'i'=>$i,
'totalarray'=>&$totalarray);
940 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $object);
941 print $hookmanager->resPrint;
943 print
'<td class="nowrap center">';
944 if ($massactionbutton || $massaction) {
946 if (in_array($object->id, $arrayofselected)) {
949 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
953 $totalarray[
'nbfield']++;
962 include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
967 foreach ($arrayfields as $key => $val) {
968 if (!empty($val[
'checked'])) {
972 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
978 $parameters = array(
'arrayfields'=>$arrayfields,
'sql'=>$sql);
979 $reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object);
980 print $hookmanager->resPrint;
982 print
'</table>'.
"\n";
985 print
'</form>'.
"\n";
988 $hidegeneratedfilelistifempty = 1;
989 if ($massaction ==
'builddoc' || $action ==
'remove_file' || $show_files) {
990 $hidegeneratedfilelistifempty = 0;
993 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
997 $urlsource = $_SERVER[
'PHP_SELF'].
'?sortfield='.$sortfield.
'&sortorder='.$sortorder;
998 $urlsource .= str_replace(
'&',
'&', $param);
1000 $filedir = $diroutputmassaction;
1001 $genallowed = $permissiontoread;
1002 $delallowed = $permissiontoadd;
1004 print $formfile->showdocuments(
'massfilesarea_eventorganization',
'', $filedir, $urlsource, 0, $delallowed,
'', 1, 1, 0, 48, 1, $param, $title,
'',
'',
'',
null, $hidegeneratedfilelistifempty);
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Class for ConferenceOrBoothAttendee.
Class for ConferenceOrBooth.
Class to manage projects.
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("supplier_invoice", "lire"))) if(isModEnabled('don') &&!empty($user->rights->don->lire)) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->hasRight("commande", "lire") &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
conferenceorboothPrepareHead($object, $with_project=0)
Prepare array of tabs for ConferenceOrBooth.
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...
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields.
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...
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
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.
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.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
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_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
isModEnabled($module)
Is Dolibarr module enabled.
$nbtotalofrecords
Count total nb of records.
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.