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;
45 $langs->loadLangs(array(
"eventorganization",
"other",
"projects",
"bills"));
48 $action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
49 $massaction =
GETPOST(
'massaction',
'alpha');
50 $show_files =
GETPOST(
'show_files',
'int');
51 $confirm =
GETPOST(
'confirm',
'alpha');
52 $cancel =
GETPOST(
'cancel',
'alpha');
53 $toselect =
GETPOST(
'toselect',
'array');
54 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'conferenceorboothattendeelist';
55 $backtopage =
GETPOST(
'backtopage',
'alpha');
56 $optioncss =
GETPOST(
'optioncss',
'aZ');
59 $conf_or_booth_id =
GETPOST(
'conforboothid',
'int');
61 $withproject =
GETPOST(
'withproject',
'int');
62 $fk_project =
GETPOST(
'fk_project',
'int') ?
GETPOST(
'fk_project',
'int') :
GETPOST(
'projectid',
'int');
63 $projectid = $fk_project;
68 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
69 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
70 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
72 if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
75 $offset = $limit * $page;
76 $pageprev = $page - 1;
77 $pagenext = $page + 1;
82 $projectstatic =
new Project($db);
83 $diroutputmassaction = $conf->eventorganization->dir_output.
'/temp/massgeneration/'.$user->id;
84 $hookmanager->initHooks(array(
'conferenceorboothattendeelist'));
87 $extrafields->fetch_name_optionals_label($object->table_element);
90 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element,
'',
'search_');
94 reset($object->fields);
95 $sortfield =
"t.".key($object->fields);
102 $search_all =
GETPOST(
'search_all',
'alphanohtml');
104 foreach ($object->fields as $key => $val) {
105 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') {
106 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
108 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
109 $search[$key.
'_dtstart'] =
dol_mktime(0, 0, 0,
GETPOST(
'search_'.$key.
'_dtstartmonth',
'int'),
GETPOST(
'search_'.$key.
'_dtstartday',
'int'),
GETPOST(
'search_'.$key.
'_dtstartyear',
'int'));
110 $search[$key.
'_dtend'] =
dol_mktime(23, 59, 59,
GETPOST(
'search_'.$key.
'_dtendmonth',
'int'),
GETPOST(
'search_'.$key.
'_dtendday',
'int'),
GETPOST(
'search_'.$key.
'_dtendyear',
'int'));
115 $fieldstosearchall = array();
116 foreach ($object->fields as $key => $val) {
117 if (!empty($val[
'searchall'])) {
118 $fieldstosearchall[
't.'.$key] = $val[
'label'];
123 $arrayfields = array();
124 foreach ($object->fields as $key => $val) {
126 if (!empty($val[
'visible'])) {
127 $visible = (int)
dol_eval($val[
'visible'], 1, 1,
'1');
128 $arrayfields[
't.'.$key] = array(
129 'label'=>$val[
'label'],
130 'checked'=>(($visible < 0) ? 0 : 1),
131 'enabled'=>($visible != 3 &&
dol_eval($val[
'enabled'], 1, 1,
'1')),
132 'position'=>$val[
'position'],
133 'help'=> isset($val[
'help']) ? $val[
'help'] :
''
138 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
144 $permissiontoread = $user->rights->eventorganization->read;
145 $permissiontoadd = $user->rights->eventorganization->write;
146 $permissiontodelete = $user->rights->eventorganization->delete;
149 if (empty($conf->eventorganization->enabled)) {
153 if ($user->socid > 0) {
165 if (preg_match(
'/^set/', $action) && $projectid > 0 && !empty($user->rights->eventorganization->write)) {
168 $project_attr=preg_replace(
'/^set/',
'', $action);
169 if (array_key_exists($project_attr, $project->fields)) {
170 $result = $project->fetch($projectid);
174 $project->{$project_attr}=
GETPOST($project_attr);
175 $result=$project->update($user);
183 if (
GETPOST(
'cancel',
'alpha')) {
187 if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend'
188 && $massaction !=
'presend'
189 && $massaction !=
'confirm_presend') {
193 $parameters = array();
194 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
199 if (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 =
'ConferenceOrBoothAttendee';
222 $objectlabel =
'ConferenceOrBoothAttendee';
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';
239 if ($confOrBooth->id > 0) {
240 $title = $langs->trans(
'ListOfAttendeesPerConference');
242 $title = $langs->trans(
'ListOfAttendeesOfEvent');
248 if ($conf_or_booth_id > 0) {
249 $result = $confOrBooth->fetch($conf_or_booth_id);
253 $fk_project = $confOrBooth->fk_project;
257 if ($fk_project > 0) {
258 $result = $projectstatic->fetch($fk_project);
268 $sql .= $object->getFieldList(
't');
270 if (!empty($extrafields->attributes[$object->table_element][
'label'])) {
271 foreach ($extrafields->attributes[$object->table_element][
'label'] as $key => $val) {
272 $sql .= ($extrafields->attributes[$object->table_element][
'type'][$key] !=
'separate' ?
", ef.".$key.
" as options_".$key :
'');
276 $parameters = array();
277 $reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object);
278 $sql .= preg_replace(
'/^,/',
'', $hookmanager->resPrint);
279 $sql = preg_replace(
'/,\s*$/',
'', $sql);
280 $sql .=
" FROM ".MAIN_DB_PREFIX.$object->table_element.
" as t";
281 if (!empty($confOrBooth->id)) {
282 $sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"actioncomm as a on a.id=t.fk_actioncomm AND a.id=".((int) $confOrBooth->id);
284 if (isset($extrafields->attributes[$object->table_element][
'label']) && is_array($extrafields->attributes[$object->table_element][
'label']) && count($extrafields->attributes[$object->table_element][
'label'])) {
285 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (t.rowid = ef.fk_object)";
288 $parameters = array();
289 $reshook = $hookmanager->executeHooks(
'printFieldListFrom', $parameters, $object);
290 $sql .= $hookmanager->resPrint;
291 if ($object->ismultientitymanaged == 1) {
292 $sql .=
" WHERE t.entity IN (".getEntity($object->element).
")";
294 $sql .=
" WHERE 1 = 1";
296 if (!empty($projectstatic->id)) {
297 $sql .=
" AND t.fk_project=".((int) $projectstatic->id);
299 foreach ($search as $key => $val) {
300 if (array_key_exists($key, $object->fields)) {
301 if ($key ==
'status' && $search[$key] == -1) {
304 $mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0);
305 if ((strpos($object->fields[$key][
'type'],
'integer:') === 0) || (strpos($object->fields[$key][
'type'],
'sellist:') === 0) || !empty($object->fields[$key][
'arrayofkeyval'])) {
306 if ($search[$key] ==
'-1' || ($search[$key] ===
'0' && (empty($object->fields[$key][
'arrayofkeyval']) || !array_key_exists(
'0', $object->fields[$key][
'arrayofkeyval'])))) {
311 if ($search[$key] !=
'') {
312 $sql .=
natural_search($key, $search[$key], (($key ==
'status') ? 2 : $mode_search));
315 if (preg_match(
'/(_dtstart|_dtend)$/', $key) && $search[$key] !=
'') {
316 $columnName = preg_replace(
'/(_dtstart|_dtend)$/',
'', $key);
317 if (preg_match(
'/^(date|timestamp|datetime)/', $object->fields[$columnName][
'type'])) {
318 if (preg_match(
'/_dtstart$/', $key)) {
319 $sql .=
" AND t.".$columnName.
" >= '".$db->idate($search[$key]).
"'";
321 if (preg_match(
'/_dtend$/', $key)) {
322 $sql .=
" AND t." . $columnName .
" <= '" . $db->idate($search[$key]) .
"'";
329 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
333 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
335 $parameters = array();
336 $reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object);
337 $sql .= $hookmanager->resPrint;
340 $sql .= $db->order($sortfield, $sortorder);
344 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
345 $resql = $db->query($sql);
357 $sql .= $db->plimit($limit + 1, $offset);
360 $resql = $db->query($sql);
366 $num = $db->num_rows(
$resql);
370 if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) {
371 $obj = $db->fetch_object(
$resql);
373 header(
"Location: ".
dol_buildpath(
'/eventorganization/conferenceorboothattendee_card.php', 1).
'?id='.$id);
379 llxHeader(
'', $title,
$help_url,
'', 0, 0, $morejs, $morecss,
'',
'classforhorizontalscrolloftabs');
383 if ($projectstatic->id > 0 || $confOrBooth > 0) {
384 if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic,
'fetchComments') && empty($projectstatic->comments)) {
385 $projectstatic->fetchComments();
387 if (!empty($projectstatic->socid)) {
388 $projectstatic->fetch_thirdparty();
392 $object->project = clone $projectstatic;
394 if (!empty($withproject)) {
396 $tab =
'eventorganisation';
397 $withProjectUrl =
"&withproject=1";
400 print
dol_get_fiche_head($head, $tab, $langs->trans(
"Project"), -1, ($projectstatic->public ?
'projectpub' :
'project'), 0,
'',
'');
402 $param = ($mode ==
'mine' ?
'&mode=mine' :
'');
406 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
408 $morehtmlref =
'<div class="refidno">';
410 $morehtmlref .= $projectstatic->title;
412 if ($projectstatic->thirdparty->id > 0) {
413 $morehtmlref .=
'<br>'.$projectstatic->thirdparty->getNomUrl(1,
'project');
415 $morehtmlref .=
'</div>';
418 if (empty($user->rights->projet->all->lire)) {
419 $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
420 $projectstatic->next_prev_filter =
" rowid IN (".$db->sanitize(count($objectsListId) ?join(
',', array_keys($objectsListId)) :
'0').
")";
423 dol_banner_tab($projectstatic,
'project_ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
425 print
'<div class="fichecenter">';
426 print
'<div class="fichehalfleft">';
427 print
'<div class="underbanner clearboth"></div>';
429 print
'<table class="border tableforfield centpercent">';
432 if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) ||
isModEnabled(
'eventorganization')) {
433 print
'<tr><td class="tdtop">';
434 print $langs->trans(
"Usage");
437 if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
438 print
'<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET(
'usage_opportunity') ? (
GETPOST(
'usage_opportunity',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_opportunity ?
' checked="checked"' :
'')).
'"> ';
439 $htmltext = $langs->trans(
"ProjectFollowOpportunity");
440 print
$form->textwithpicto($langs->trans(
"ProjectFollowOpportunity"), $htmltext);
443 if (empty($conf->global->PROJECT_HIDE_TASKS)) {
444 print
'<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET(
'usage_task') ? (
GETPOST(
'usage_task',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_task ?
' checked="checked"' :
'')).
'"> ';
445 $htmltext = $langs->trans(
"ProjectFollowTasks");
446 print
$form->textwithpicto($langs->trans(
"ProjectFollowTasks"), $htmltext);
449 if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) {
450 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"' :
'')).
'"> ';
451 $htmltext = $langs->trans(
"ProjectBillTimeDescription");
452 print
$form->textwithpicto($langs->trans(
"BillTime"), $htmltext);
456 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"' :
'')).
'"> ';
457 $htmltext = $langs->trans(
"EventOrganizationDescriptionLong");
458 print
$form->textwithpicto($langs->trans(
"ManageOrganizeEvent"), $htmltext);
464 print
'<tr><td class="titlefield">'.$langs->trans(
"Visibility").
'</td><td>';
465 if ($projectstatic->public == 0) {
466 print
img_picto($langs->trans(
'PrivateProject'),
'private',
'class="paddingrightonly"');
467 print $langs->trans(
"PrivateProject");
469 print
img_picto($langs->trans(
'SharedProject'),
'world',
'class="paddingrightonly"');
470 print $langs->trans(
"SharedProject");
475 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
476 if (strcmp($projectstatic->budget_amount,
'')) {
477 print
'<span class="amount">'.price($projectstatic->budget_amount,
'', $langs, 1, 0, 0, $conf->currency).
'</span>';
482 print
'<tr><td>'.$langs->trans(
"Dates").
' ('.$langs->trans(
"Project").
')</td><td>';
484 print ($start ? $start :
'?');
487 print ($end ? $end :
'?');
488 if ($projectstatic->hasDelay()) {
494 print
'<tr><td>'.$langs->trans(
"Dates").
' ('.$langs->trans(
"Event").
')</td><td>';
496 print ($start ? $start :
'?');
499 print ($end ? $end :
'?');
500 if ($projectstatic->hasDelay()) {
506 print
'<tr><td>'.$langs->trans(
"Location").
'</td><td>';
507 print $projectstatic->location;
512 $objectconf = $object;
513 $object = $projectstatic;
514 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
515 $object = $objectconf;
521 print
'<div class="fichehalfright">';
522 print
'<div class="underbanner clearboth"></div>';
524 print
'<table class="border tableforfield centpercent">';
527 print
'<td class="titlefield tdtop">'.$langs->trans(
"Description").
'</td><td>';
528 print nl2br($projectstatic->description);
533 print
'<tr><td class="valignmiddle">'.$langs->trans(
"Categories").
'</td><td>';
534 print
$form->showCategories($projectstatic->id,
'project', 1);
538 print
'<tr><td class="nowrap">';
539 $typeofdata =
'checkbox:'.($projectstatic->accept_conference_suggestions ?
' checked="checked"' :
'');
540 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestConfHelp");
541 print
$form->editfieldkey(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'', $projectstatic, 0, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
543 print
$form->editfieldval(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'1', $projectstatic, 0, $typeofdata,
'', 0, 0,
'', 0,
'',
'projectid');
547 $typeofdata =
'checkbox:'.($projectstatic->accept_booth_suggestions ?
' checked="checked"' :
'');
548 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestBoothHelp");
549 print
$form->editfieldkey(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'', $projectstatic, 0, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
551 print
$form->editfieldval(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'1', $projectstatic, 0, $typeofdata,
'', 0, 0,
'', 0,
'',
'projectid');
555 print
$form->editfieldkey(
$form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth',
'', $projectstatic, 0,
'amount',
'', 0, 0,
'projectid');
557 print
$form->editfieldval(
$form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth', $projectstatic->price_booth, $projectstatic, 0,
'amount',
'', 0, 0,
'', 0,
'',
'projectid');
561 print
$form->editfieldkey(
$form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration',
'', $projectstatic, 0,
'amount',
'', 0, 0,
'projectid');
563 print
$form->editfieldval(
$form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration', $projectstatic->price_registration, $projectstatic, 0,
'amount',
'', 0, 0,
'', 0,
'',
'projectid');
566 print
'<tr><td class="titlefield">';
567 print
$form->editfieldkey(
$form->textwithpicto($langs->trans(
'MaxNbOfAttendees'),
''),
'max_attendees',
'', $projectstatic, $permissiontoadd,
'integer:3',
'&withproject=1', 0, 0,
'projectid');
568 print
'</td><td class="valuefield">';
569 print
$form->editfieldval(
$form->textwithpicto($langs->trans(
'MaxNbOfAttendees'),
''),
'max_attendees', $projectstatic->max_attendees, $projectstatic, $permissiontoadd,
'integer:3',
'', 0, 0,
'&withproject=1', 0,
'',
'projectid');
572 print
'<tr><td valign="middle">'.$langs->trans(
"EventOrganizationICSLink").
'</td><td>';
574 $urlwithouturlroot = preg_replace(
'/'.preg_quote(DOL_URL_ROOT,
'/').
'$/i',
'', trim($dolibarr_main_url_root));
575 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
578 $message =
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ?
"&entity=".$conf->entity :
"");
579 $message .=
'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) :
'...');
580 $message .=
"&project=".$projectstatic->id.
'&module='.urlencode(
'@eventorganization').
'&status='.ConferenceOrBooth::STATUS_CONFIRMED.
'">'.$langs->trans(
'DownloadICSLink').img_picto(
'',
'download',
'class="paddingleft"').
'</a>';
587 print
$form->textwithpicto($langs->trans(
"SuggestOrVoteForConfOrBooth"), $langs->trans(
"EvntOrgRegistrationHelpMessage"));
590 $linksuggest = $dolibarr_main_url_root.
'/public/project/index.php?id='.$projectstatic->id;
591 $encodedsecurekey =
dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.
'conferenceorbooth'.$projectstatic->id,
'md5');
592 $linksuggest .=
'&securekey='.urlencode($encodedsecurekey);
595 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" rel="noopener noreferrer" href="'.$linksuggest.
'" class="quatrevingtpercent">'.$linksuggest.
'</a></div>';
596 print
'<a target="_blank" rel="noopener noreferrer" href="'.$linksuggest.
'">'.
img_picto(
'',
'globe').
'</a>';
604 print $langs->trans(
"PublicAttendeeSubscriptionGlobalPage");
607 $link_subscription = $dolibarr_main_url_root.
'/public/eventorganization/attendee_new.php?id='.$projectstatic->id.
'&type=global';
608 $encodedsecurekey =
dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.
'conferenceorbooth'.$projectstatic->id,
'md5');
609 $link_subscription .=
'&securekey='.urlencode($encodedsecurekey);
612 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$link_subscription.
'" class="quatrevingtpercent">'.$link_subscription.
'</a></div>';
613 print
'<a target="_blank" rel="noopener noreferrer" href="'.$link_subscription.
'">'.
img_picto(
'',
'globe').
'</a>';
623 print
'<div class="clearboth"></div>';
627 if (empty($confOrBooth->id)) {
630 print
dol_get_fiche_head($head, $tab, $langs->trans(
"Project"), -1, ($project->public ?
'projectpub' :
'project'), 0,
'',
'reposition');
634 if ($confOrBooth->id > 0) {
637 print
dol_get_fiche_head($head,
'attendees', $langs->trans(
"ConferenceOrBooth"), -1, $object->picto);
639 $object_evt = $object;
640 $object = $confOrBooth;
644 print
'<div class="fichecenter">';
645 print
'<div class="fichehalfleft">';
646 print
'<div class="underbanner clearboth"></div>';
647 print
'<table class="border centpercent tableforfield">' .
"\n";
649 include DOL_DOCUMENT_ROOT .
'/core/tpl/commonfields_view.tpl.php';
652 include DOL_DOCUMENT_ROOT .
'/core/tpl/extrafields_view.tpl.php';
653 $object = $object_evt;
658 print
'<div class="clearboth"></div>';
664 $arrayofselected = is_array($toselect) ? $toselect : array();
667 if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
668 $param .=
'&contextpage='.urlencode($contextpage);
670 if ($limit > 0 && $limit != $conf->liste_limit) {
671 $param .=
'&limit='.urlencode($limit);
673 foreach ($search as $key => $val) {
674 if (is_array($search[$key]) && count($search[$key])) {
675 foreach ($search[$key] as $skey) {
677 $param .=
'&search_'.$key.
'[]='.urlencode($skey);
680 } elseif ($search[$key] !=
'') {
681 $param .=
'&search_'.$key.
'='.urlencode($search[$key]);
684 if ($confOrBooth->id > 0) {
685 $param .=
'&conforboothid='.urlencode($confOrBooth->id);
687 if ($projectstatic->id > 0) {
688 $param .=
'&fk_project='.urlencode($projectstatic->id);
690 $param .= $withProjectUrl;
691 if ($optioncss !=
'') {
692 $param .=
'&optioncss='.urlencode($optioncss);
696 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
698 $parameters = array();
699 $reshook = $hookmanager->executeHooks(
'printFieldListSearchParam', $parameters, $object);
700 $param .= $hookmanager->resPrint;
703 $arrayofmassactions = array(
707 'presend'=>
img_picto(
'',
'email',
'class="pictofixedwidth"').$langs->trans(
"SendByMail"),
709 if ($permissiontodelete) {
710 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
712 if (
GETPOST(
'nomassaction',
'int') || in_array($massaction, array(
'presend',
'predelete'))) {
713 $arrayofmassactions = array();
715 $massactionbutton =
$form->selectMassAction(
'', $arrayofmassactions);
717 print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].(!empty($conf_or_booth_id)?
'?conforboothid='.$conf_or_booth_id:
'').
'">'.
"\n";
718 if ($optioncss !=
'') {
719 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
721 print
'<input type="hidden" name="token" value="'.newToken().
'">';
722 print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
723 print
'<input type="hidden" name="action" value="list">';
724 print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
725 print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
726 print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
727 print
'<input type="hidden" name="withproject" value="'.$withproject.
'">';
728 print
'<input type="hidden" name="fk_project" value="'.$fk_project.
'">';
729 print
'<input type="hidden" name="page_y" value="">';
731 $params = array(
'morecss'=>
'reposition');
732 $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);
734 print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num,
$nbtotalofrecords, $object->picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
738 $topicmail = $projectstatic->title;
739 $modelmail =
"conferenceorbooth";
741 $trackid =
'conferenceorbooth_'.$object->id;
742 $withmaindocfilemail = 0;
743 include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
747 foreach ($fieldstosearchall as $key => $val) {
748 $fieldstosearchall[$key] = $langs->trans($val);
750 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).join(
', ', $fieldstosearchall).
'</div>';
758 $parameters = array();
759 $reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object);
760 if (empty($reshook)) {
761 $moreforfilter .= $hookmanager->resPrint;
763 $moreforfilter = $hookmanager->resPrint;
766 if (!empty($moreforfilter)) {
767 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
768 print $moreforfilter;
772 $varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
773 $selectedfields =
$form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage);
774 $selectedfields .= (count($arrayofmassactions) ?
$form->showCheckAddButtons(
'checkforselect', 1) :
'');
776 print
'<div class="div-table-responsive">';
777 print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
782 print
'<tr class="liste_titre">';
783 foreach ($object->fields as $key => $val) {
784 $cssforfield = (empty($val[
'css']) ?
'' : $val[
'css']);
785 if ($key ==
'status') {
786 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
787 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
788 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
789 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
790 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
791 } elseif (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && !in_array($key, array(
'rowid',
'ref')) && $val[
'label'] !=
'TechnicalID') {
792 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
794 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
795 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').
'">';
796 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
797 print
$form->selectarray(
'search_'.$key, $val[
'arrayofkeyval'], $search[$key], $val[
'notnull'], 0, 0,
'', 1, 0, 0,
'',
'maxwidth100', 1);
798 } elseif ((strpos($val[
'type'],
'integer:') === 0) || (strpos($val[
'type'],
'sellist:')=== 0)) {
799 print $object->showInputField($val, $key, $search[$key],
'',
'',
'search_',
'maxwidth125', 1);
800 } elseif (!preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
801 print
'<input type="text" class="flat maxwidth75" name="search_'.$key.
'" value="'.
dol_escape_htmltag($search[$key]).
'">';
802 } elseif (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
803 print
'<div class="nowrap">';
804 print
$form->selectDate($search[$key.
'_dtstart'] ? $search[$key.
'_dtstart'] :
'',
"search_".$key.
"_dtstart", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
806 print
'<div class="nowrap">';
807 print
$form->selectDate($search[$key.
'_dtend'] ? $search[$key.
'_dtend'] :
'',
"search_".$key.
"_dtend", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
814 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
817 $parameters = array(
'arrayfields'=>$arrayfields);
818 $reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters, $object);
819 print $hookmanager->resPrint;
821 print
'<td class="liste_titre maxwidthsearch">';
822 $searchpicto =
$form->showFilterButtons();
830 print
'<tr class="liste_titre">';
831 foreach ($object->fields as $key => $val) {
832 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
833 if ($key ==
'status') {
834 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
835 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
836 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
837 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
838 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
839 } elseif (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && !in_array($key, array(
'rowid',
'ref')) && $val[
'label'] !=
'TechnicalID') {
840 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
842 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
843 print
getTitleFieldOfList($arrayfields[
't.'.$key][
'label'], 0, $_SERVER[
'PHP_SELF'],
't.'.$key,
'', $param, ($cssforfield ?
'class="'.$cssforfield.
'"' :
''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.
' ' :
'')).
"\n";
847 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
849 $parameters = array(
'arrayfields'=>$arrayfields,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder);
850 $reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters, $object);
851 print $hookmanager->resPrint;
853 print
getTitleFieldOfList($selectedfields, 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
858 $needToFetchEachLine = 0;
859 if (isset($extrafields->attributes[$object->table_element][
'computed']) && is_array($extrafields->attributes[$object->table_element][
'computed']) && count($extrafields->attributes[$object->table_element][
'computed']) > 0) {
860 foreach ($extrafields->attributes[$object->table_element][
'computed'] as $key => $val) {
861 if (preg_match(
'/\$object/', $val)) {
862 $needToFetchEachLine++;
871 $totalarray = array();
872 while ($i < ($limit ? min($num, $limit) : $num)) {
873 $obj = $db->fetch_object(
$resql);
879 $object->setVarsFromFetchObj($obj);
882 print
'<tr class="oddeven">';
883 foreach ($object->fields as $key => $val) {
884 $cssforfield = (empty($val[
'css']) ?
'' : $val[
'css']);
885 if (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
886 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
887 } elseif ($key ==
'status') {
888 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
891 if (in_array($val[
'type'], array(
'timestamp'))) {
892 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap left';
893 } elseif ($key ==
'ref') {
894 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
897 if (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && !in_array($key, array(
'rowid',
'ref',
'status'))) {
898 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
902 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
903 print
'<td'.($cssforfield ?
' class="'.$cssforfield.
'"' :
'').
'>';
904 if ($key ==
'status') {
905 print $object->getLibStatut(5);
906 } elseif ($key ==
'ref') {
907 $optionLink = (!empty($withproject)?
'conforboothidproject':
'conforboothid');
908 if (empty($confOrBooth->id)) {
909 $optionLink=
'projectid';
911 print $object->getNomUrl(1, $optionLink);
913 print $object->showOutputField($val, $key, $object->$key,
'');
917 $totalarray[
'nbfield']++;
919 if (!empty($val[
'isameasure']) && $val[
'isameasure'] == 1) {
921 $totalarray[
'pos'][$totalarray[
'nbfield']] =
't.'.$key;
923 if (!isset($totalarray[
'val'])) {
924 $totalarray[
'val'] = array();
926 if (!isset($totalarray[
'val'][
't.'.$key])) {
927 $totalarray[
'val'][
't.'.$key] = 0;
929 $totalarray[
'val'][
't.'.$key] += $object->$key;
934 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
936 $parameters = array(
'arrayfields'=>$arrayfields,
'object'=>$object,
'obj'=>$obj,
'i'=>$i,
'totalarray'=>&$totalarray);
937 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $object);
938 print $hookmanager->resPrint;
940 print
'<td class="nowrap center">';
941 if ($massactionbutton || $massaction) {
943 if (in_array($object->id, $arrayofselected)) {
946 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
950 $totalarray[
'nbfield']++;
959 include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
964 foreach ($arrayfields as $key => $val) {
965 if (!empty($val[
'checked'])) {
969 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
975 $parameters = array(
'arrayfields'=>$arrayfields,
'sql'=>$sql);
976 $reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object);
977 print $hookmanager->resPrint;
979 print
'</table>'.
"\n";
982 print
'</form>'.
"\n";
985 $hidegeneratedfilelistifempty = 1;
986 if ($massaction ==
'builddoc' || $action ==
'remove_file' || $show_files) {
987 $hidegeneratedfilelistifempty = 0;
990 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
994 $urlsource = $_SERVER[
'PHP_SELF'].
'?sortfield='.$sortfield.
'&sortorder='.$sortorder;
995 $urlsource .= str_replace(
'&',
'&', $param);
997 $filedir = $diroutputmassaction;
998 $genallowed = $permissiontoread;
999 $delallowed = $permissiontoadd;
1001 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.