29require
'../main.inc.php';
39require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
40require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
41require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
42require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
43require_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
44require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
45require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorbooth.class.php';
46require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorboothattendee.class.php';
47require_once DOL_DOCUMENT_ROOT.
'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
48require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
51$langs->loadLangs(array(
"eventorganization",
"other",
"projects",
"companies"));
54$action =
GETPOST(
'action',
'aZ09');
55$confirm =
GETPOST(
'confirm',
'alpha');
57$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'conferenceorboothattendeecard';
58$backtopage =
GETPOST(
'backtopage',
'alpha');
59$backtopageforcancel =
GETPOST(
'backtopageforcancel',
'alpha');
60$optioncss =
GETPOST(
'optioncss',
'aZ');
68$conf_or_booth_id =
GETPOSTINT(
'conforboothid');
76$diroutputmassaction =
$conf->eventorganization->dir_output.
'/temp/massgeneration/'.$user->id;
77$hookmanager->initHooks(array($contextpage,
'globalcard'));
80if ($conf_or_booth_id > 0) {
82 $result = $confOrBooth->fetch($conf_or_booth_id);
86 $object->fk_actioncomm = $confOrBooth->id;
87 $object->fk_project = $confOrBooth->fk_project;
88 $fk_project =
$object->fk_project;
93$extrafields->fetch_name_optionals_label(
$object->table_element);
95$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element,
'',
'search_');
98$search_all =
GETPOST(
'search_all',
'alphanohtml');
100foreach (
$object->fields as $key => $val) {
101 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') {
102 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
104 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
111$fieldstosearchall = array();
112foreach (
$object->fields as $key => $val) {
113 if (!empty($val[
'searchall'])) {
114 $fieldstosearchall[
't.'.$key] = $val[
'label'];
118if (empty($action) && empty($id) && empty($ref)) {
123include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
127 $fk_project =
$object->fk_project;
131$permissiontoread = $user->hasRight(
'project',
'read');
132$permissiontoadd = $user->hasRight(
'project',
'write');
133$permissiontodelete = $user->hasRight(
'project',
'delete') || ($permissiontoadd && isset(
$object->status) &&
$object->status == $object::STATUS_DRAFT);
134$permissionnote = $user->hasRight(
'project',
'write');
135$permissiondellink = $user->hasRight(
'project',
'write');
136$upload_dir =
$conf->eventorganization->multidir_output[isset(
$object->entity) ?
$object->entity : 1];
139if ($user->socid > 0) {
150$parameters = array();
151$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
156if (empty($reshook)) {
158 $backurlforlist = DOL_URL_ROOT.
'/eventorganization/conferenceorboothattendee_list.php?withproject=1&fk_project='.((int) $fk_project);
163 if (empty($backtopage) || ($cancel && empty($id))) {
164 if (empty($backtopage) || ($cancel && strpos($backtopage,
'__ID__'))) {
165 if (empty($id) && (($action !=
'add' && $action !=
'create') || $cancel)) {
166 $backtopage = $backurlforlist;
168 $backtopage = DOL_URL_ROOT.
'/eventorganization/conferenceorboothattendee_card.php?fk_project='.((int) $fk_project).
'&id='.(
$id > 0 ?
$id :
'__ID__').
'&withproject=1';
174 if (!empty($backtopageforcancel)) {
175 header(
"Location: ".$backtopageforcancel);
177 } elseif (!empty($backtopage)) {
178 header(
"Location: ".$backtopage);
184 $triggermodname =
'EVENTORGANIZATION_CONFERENCEORBOOTHATTENDEE_MODIFY';
187 include DOL_DOCUMENT_ROOT.
'/core/actions_addupdatedelete.inc.php';
190 include DOL_DOCUMENT_ROOT.
'/core/actions_dellink.inc.php';
193 include DOL_DOCUMENT_ROOT.
'/core/actions_printing.inc.php';
199 include DOL_DOCUMENT_ROOT.
'/core/actions_builddoc.inc.php';
201 if ($action ==
'set_thirdparty' && $permissiontoadd) {
202 $object->setValueFrom(
'fk_soc',
GETPOSTINT(
'fk_soc'),
'',
null,
'date',
'', $user, $triggermodname);
204 if ($action ==
'classin' && $permissiontoadd) {
209 $triggersendname =
'EVENTORGANIZATION_CONFERENCEORBOOTHATTENDEE_SENTBYMAIL';
210 $autocopy =
'MAIN_MAIL_AUTOCOPY_CONFERENCEORBOOTHATTENDEE_TO';
211 $trackid =
'conferenceorboothattendee'.$object->id;
212 include DOL_DOCUMENT_ROOT.
'/core/actions_sendmails.inc.php';
226$title = $langs->trans(
"ConferenceOrBoothAttendee");
227$help_url =
'EN:Module_Event_Organization';
229llxHeader(
'', $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-eventorganization page-attendee-card');
231if ($action ==
'create') {
232 $result = $projectstatic->fetch(
GETPOSTINT(
'fk_project'));
234 $result = $projectstatic->fetch(($confOrBooth ===
null || empty($confOrBooth->fk_project)) ? $fk_project : $confOrBooth->fk_project);
236if (
getDolGlobalString(
'PROJECT_ALLOW_COMMENT_ON_PROJECT') && method_exists($projectstatic,
'fetchComments') && empty($projectstatic->comments)) {
237 $projectstatic->fetchComments();
239if (!empty($projectstatic->socid)) {
240 $projectstatic->fetch_thirdparty();
244$object->project = clone $projectstatic;
246if (!empty($withproject)) {
248 $tab =
'eventorganisation';
249 $withProjectUrl =
"&withproject=1";
253 print
dol_get_fiche_head($head, $tab, $langs->trans(
"Project"), -1, ($projectstatic->public ?
'projectpub' :
'project'), 0,
'',
'');
255 $param = ($mode ==
'mine' ?
'&mode=mine' :
'');
259 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
261 $morehtmlref =
'<div class="refidno">';
263 $morehtmlref .= $projectstatic->title;
265 if (isset($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
266 $morehtmlref .=
'<br>'.$projectstatic->thirdparty->getNomUrl(1,
'project');
268 $morehtmlref .=
'</div>';
271 if (!$user->hasRight(
'project',
'all',
'lire')) {
272 $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
273 $projectstatic->next_prev_filter =
"rowid:IN:".$db->sanitize(count($objectsListId) ? implode(
',', array_keys($objectsListId)) :
'0');
276 dol_banner_tab($projectstatic,
'project_ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
278 print
'<div class="fichecenter">';
279 print
'<div class="fichehalfleft">';
280 print
'<div class="underbanner clearboth"></div>';
282 print
'<table class="border tableforfield centpercent">';
286 print
'<tr><td class="tdtop">';
287 print $langs->trans(
"Usage");
291 print
'<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET(
'usage_opportunity') ? (
GETPOST(
'usage_opportunity',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_opportunity ?
' checked="checked"' :
'')).
'"> ';
292 $htmltext = $langs->trans(
"ProjectFollowOpportunity");
293 print $form->textwithpicto($langs->trans(
"ProjectFollowOpportunity"), $htmltext);
297 print
'<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET(
'usage_task') ? (
GETPOST(
'usage_task',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_task ?
' checked="checked"' :
'')).
'"> ';
298 $htmltext = $langs->trans(
"ProjectFollowTasks");
299 print $form->textwithpicto($langs->trans(
"ProjectFollowTasks"), $htmltext);
303 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"' :
'')).
'"> ';
304 $htmltext = $langs->trans(
"ProjectBillTimeDescription");
305 print $form->textwithpicto($langs->trans(
"BillTime"), $htmltext);
309 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"' :
'')).
'"> ';
310 $htmltext = $langs->trans(
"EventOrganizationDescriptionLong");
311 print $form->textwithpicto($langs->trans(
"ManageOrganizeEvent"), $htmltext);
317 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
318 if (strcmp($projectstatic->budget_amount,
'')) {
319 print
'<span class="amount">'.price($projectstatic->budget_amount, 0, $langs, 1, 0, 0,
$conf->currency).
'</span>';
324 print
'<tr><td>'.$langs->trans(
"Dates").
' ('.$langs->trans(
"Project").
')</td><td>';
326 print($start ? $start :
'?');
329 print($end ? $end :
'?');
330 if ($projectstatic->hasDelay()) {
336 print
'<tr><td>'.$langs->trans(
"Dates").
' ('.$langs->trans(
"Event").
')</td><td>';
338 print($start ? $start :
'?');
341 print($end ? $end :
'?');
342 if ($projectstatic->hasDelay()) {
348 print
'<tr><td class="titlefield">'.$langs->trans(
"Visibility").
'</td><td>';
349 if ($projectstatic->public == 0) {
350 print
img_picto($langs->trans(
'PrivateProject'),
'private',
'class="paddingrightonly"');
351 print $langs->trans(
"PrivateProject");
353 print
img_picto($langs->trans(
'SharedProject'),
'world',
'class="paddingrightonly"');
354 print $langs->trans(
"SharedProject");
359 print
'<tr><td>'.$langs->trans(
"Location").
'</td><td>';
360 print $projectstatic->location;
367 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
374 print
'<div class="fichehalfright">';
375 print
'<div class="underbanner clearboth"></div>';
377 print
'<table class="border tableforfield centpercent">';
381 print
'<tr><td class="titlefield valignmiddle">'.$langs->trans(
"Categories").
'</td><td class="valuefield">';
382 print $form->showCategories($projectstatic->id, Categorie::TYPE_PROJECT, 1);
387 print
'<td class="titlefield tdtop">'.$langs->trans(
"Description").
'</td><td>';
391 print
'<tr><td class="titlefield nowrap">';
392 $typeofdata =
'checkbox:'.($projectstatic->accept_conference_suggestions ?
' checked="checked"' :
'');
393 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestConfHelp");
394 print $form->editfieldkey(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'', $projectstatic, 0, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
396 print $form->editfieldval(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'1', $projectstatic, 0, $typeofdata,
'',
null,
null,
'', 0,
'',
'projectid');
400 $typeofdata =
'checkbox:'.($projectstatic->accept_booth_suggestions ?
' checked="checked"' :
'');
401 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestBoothHelp");
402 print $form->editfieldkey(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'', $projectstatic, 0, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
404 print $form->editfieldval(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'1', $projectstatic, 0, $typeofdata,
'',
null,
null,
'', 0,
'',
'projectid');
408 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth',
'', $projectstatic, 0,
'amount',
'', 0, 0,
'projectid');
410 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth', $projectstatic->price_booth, $projectstatic, 0,
'amount',
'',
null,
null,
'', 0,
'',
'projectid');
414 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration',
'', $projectstatic, 0,
'amount',
'', 0, 0,
'projectid');
416 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration', $projectstatic->price_registration, $projectstatic, 0,
'amount',
'',
null,
null,
'', 0,
'',
'projectid');
419 print
'<tr><td class="titlefield">';
420 print $form->editfieldkey($form->textwithpicto($langs->trans(
'MaxNbOfAttendees'),
''),
'max_attendees',
'', $projectstatic, $permissiontoadd,
'integer:3',
'', 0, 0,
'projectid');
421 print
'</td><td class="valuefield">';
422 print $form->editfieldval($form->textwithpicto($langs->trans(
'MaxNbOfAttendees'),
''),
'max_attendees', $projectstatic->max_attendees, $projectstatic, $permissiontoadd,
'integer:3',
'',
null,
null,
'', 0,
'',
'projectid');
426 print
'<tr><td class="titlefield valignmiddle">'.$langs->trans(
"EventOrganizationICSLinkProject").
'</td><td class="valuefield">';
429 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
432 $message =
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/agenda/agendaexport.php?format=ical'.(
$conf->entity > 1 ?
"&entity=".$conf->entity :
"");
433 $message .=
'&exportkey='.urlencode(
getDolGlobalString(
'MAIN_AGENDA_XCAL_EXPORTKEY',
'...'));
434 $message .=
"&project=".$projectstatic->id.
'&module='.urlencode(
'project@eventorganization').
'&file='.urlencode(
'calendar-'.$projectstatic->ref.
'.ics').
'&output=file">'.$langs->trans(
'DownloadICSLink').img_picto(
'',
'download',
'class="paddingleft"').
'</a>';
439 print
'<tr><td class="titlefield valignmiddle">'.$langs->trans(
"EventOrganizationICSLink").
'</td><td>';
442 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
445 $message =
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/agenda/agendaexport.php?format=ical'.(
$conf->entity > 1 ?
"&entity=".$conf->entity :
"");
446 $message .=
'&exportkey='.urlencode(
getDolGlobalString(
'MAIN_AGENDA_XCAL_EXPORTKEY',
'...'));
447 $message .=
"&project=".$projectstatic->id.
'&module='.urlencode(
'@eventorganization').
'&status='.ConferenceOrBooth::STATUS_CONFIRMED.
'">'.$langs->trans(
'DownloadICSLink').img_picto(
'',
'download',
'class="paddingleft"').
'</a>';
454 print $form->textwithpicto($langs->trans(
"SuggestOrVoteForConfOrBooth"), $langs->trans(
"EvntOrgRegistrationHelpMessage"));
458 $encodedsecurekey =
dol_hash(
getDolGlobalString(
"EVENTORGANIZATION_SECUREKEY").
'conferenceorbooth'.((
int) $projectstatic->id),
'md5');
459 $linksuggest .=
'&securekey='.urlencode($encodedsecurekey);
462 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$linksuggest.
'" class="quatrevingtpercent">'.$linksuggest.
'</a></div>';
463 print
'<a target="_blank" rel="noopener noreferrer" href="'.$linksuggest.
'">'.
img_picto(
'',
'globe').
'</a>';
471 print $langs->trans(
"PublicAttendeeSubscriptionGlobalPage");
474 $link_subscription =
$dolibarr_main_url_root.
'/public/eventorganization/attendee_new.php?id='.((int) $projectstatic->id).
'&type=global';
475 $encodedsecurekey =
dol_hash(
getDolGlobalString(
"EVENTORGANIZATION_SECUREKEY").
'conferenceorbooth'.((
int) $projectstatic->id),
'md5');
476 $link_subscription .=
'&securekey='.urlencode($encodedsecurekey);
479 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$link_subscription.
'" class="quatrevingtpercent">'.$link_subscription.
'</a></div>';
480 print
'<a target="_blank" rel="noopener noreferrer" href="'.$link_subscription.
'">'.
img_picto(
'',
'globe').
'</a>';
490 print
'<div class="clearboth"></div>';
498if ($action ==
'create' && $confOrBooth ===
null) {
499 print
load_fiche_titre($langs->trans(
"NewObject", $langs->transnoentitiesnoconv(
"ConferenceOrBoothAttendee")),
'',
'object_'.$object->picto);
502 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].(empty($withproject) ?
'' :
'?withproject=1').
'">';
503 print
'<input type="hidden" name="token" value="'.newToken().
'">';
504 print
'<input type="hidden" name="action" value="add">';
505 print
'<input type="hidden" name="withproject" value="'.$withproject.
'">';
507 if ($projectstatic->id > 0) {
508 print
'<input type="hidden" name="fk_project" value="'.$projectstatic->id.
'">';
509 print
'<input type="hidden" name="projectid" value="'.$projectstatic->id.
'">';
513 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
515 if ($backtopageforcancel) {
516 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
521 print
'<table class="border centpercent tableforfieldcreate">'.
"\n";
524 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_add.tpl.php';
527 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_add.tpl.php';
529 print
'</table>'.
"\n";
533 print $form->buttonsSaveCancel(
"Create");
541if (($id || $ref) && $action ==
'edit') {
545 $result = $invoice->fetch(
$object->fk_invoice);
547 $object->amount = $invoice->total_ttc;
551 print
load_fiche_titre($langs->trans(
"ConferenceOrBoothAttendee"),
'',
'object_'.$object->picto);
553 print
'<form method="POST" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
554 print
'<input type="hidden" name="token" value="'.newToken().
'">';
555 print
'<input type="hidden" name="action" value="update">';
556 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
557 if (is_object($confOrBooth) && $confOrBooth->id > 0) {
558 print
'<input type="hidden" name="conforboothid" value="'.$confOrBooth->id.
'">';
560 if (
$object->fk_actioncomm > 0) {
561 print
'<input type="hidden" name="fk_actioncomm" value="'.$object->fk_actioncomm.
'">';
564 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
566 if ($backtopageforcancel) {
567 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
569 if ($projectstatic->id > 0) {
570 print
'<input type="hidden" name="fk_project" value="'.$projectstatic->id.
'">';
575 print
'<table class="border centpercent tableforfieldedit">'.
"\n";
578 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_edit.tpl.php';
581 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_edit.tpl.php';
587 print $form->buttonsSaveCancel();
593if (
$object->id > 0 && (empty($action) || ($action !=
'edit' && $action !=
'create'))) {
598 $moreparam .=
'&withproject=1';
601 $moreparam .=
'&fk_project='.((int) $fk_project);
605 print
dol_get_fiche_head($head,
'card', $langs->trans(
"ConferenceOrBoothAttendee"), -1,
$object->picto, 0,
'',
'reposition');
610 if ($action ==
'delete') {
611 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'DeleteConferenceOrBoothAttendee'), $langs->trans(
'ConfirmDeleteObject'),
'confirm_delete',
'', 0, 1);
614 if ($action ==
'deleteline') {
615 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&lineid='.$lineid, $langs->trans(
'DeleteLine'), $langs->trans(
'ConfirmDeleteLine'),
'confirm_deleteline',
'', 0, 1);
618 if ($action ==
'clone') {
620 $formquestion = array();
621 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneAsk',
$object->ref),
'confirm_clone', $formquestion,
'yes', 1);
625 $parameters = array(
'formConfirm' => $formconfirm,
'lineid' => $lineid);
626 $reshook = $hookmanager->executeHooks(
'formConfirm', $parameters, $object, $action);
627 if (empty($reshook)) {
628 $formconfirm .= $hookmanager->resPrint;
629 } elseif ($reshook > 0) {
630 $formconfirm = $hookmanager->resPrint;
638 $linkback =
'<a href="'.dol_buildpath(
'/eventorganization/conferenceorboothattendee_list.php', 1).
'?restore_lastsearch_values=1'.$moreparam.
'">'.$langs->trans(
"BackToList").
'</a>';
640 $morehtmlref =
'<div class="refidno">';
642 $morehtmlref .=
'</div>';
644 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref, $moreparam);
646 print
'<div class="fichecenter">';
647 print
'<div class="fichehalfleft">';
648 print
'<div class="underbanner clearboth"></div>';
649 print
'<table class="border centpercent tableforfield">'.
"\n";
655 $keyforbreak =
'num_vote';
657 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_view.tpl.php';
660 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
666 print
'<div class="clearboth"></div>';
672 if ($action !=
'presend' && $action !=
'editline') {
673 print
'<div class="tabsAction">'.
"\n";
674 $parameters = array();
675 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
680 if (empty($reshook)) {
682 if (empty($user->socid)) {
683 print
dolGetButtonAction(
'', $langs->trans(
'SendMail'),
'email', $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.(is_object($confOrBooth) && !empty($confOrBooth->id) ?
'&conforboothid='.$confOrBooth->id :
'').(!empty($projectstatic->id) ?
'&fk_project='.$projectstatic->id :
'').
'&action=presend&token='.
newToken().
'&mode=init#formmailbeforetitle');
685 print
dolGetButtonAction(
'', $langs->trans(
'Modify'),
'default', $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.(is_object($confOrBooth) && !empty($confOrBooth->id) ?
'&conforboothid='.$confOrBooth->id :
'').(!empty($projectstatic->id) ?
'&fk_project='.$projectstatic->id :
'').
'&action=edit&token='.
newToken(),
'', $permissiontoadd);
688 print
dolGetButtonAction(
'', $langs->trans(
'ToClone'),
'clone', $_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=clone&token='.
newToken().(!empty($projectstatic->id) ?
'&fk_project='.$projectstatic->id :
''),
'', $permissiontoadd);
691 print
dolGetButtonAction(
'', $langs->trans(
'Delete'),
'delete', $_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=delete&token='.
newToken().(!empty($projectstatic->id) ?
'&fk_project='.$projectstatic->id :
''),
'', $permissiontodelete || (
$object->
status ==
$object::STATUS_DRAFT && $permissiontoadd));
698 if (
GETPOST(
'modelselected')) {
702 if ($action !=
'presend') {
703 print
'<div class="fichecenter"><div class="fichehalfleft">';
704 print
'<a name="builddoc"></a>';
706 $includedocgeneration = 0;
709 if ($includedocgeneration) {
711 $relativepath = $objref.
'/'.$objref.
'.pdf';
712 $filedir =
$conf->eventorganization->dir_output.
'/'.
$object->element.
'/'.$objref;
713 $urlsource = $_SERVER[
"PHP_SELF"].
"?id=".
$object->id;
714 $genallowed = $user->hasRight(
'project',
'conferenceorboothattendee',
'read');
715 $delallowed = $user->hasRight(
'project',
'conferenceorboothattendee',
'write');
716 print $formfile->showdocuments(
'eventorganization:ConferenceOrBoothAttendee',
$object->element.
'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed, (
string)
$object->model_pdf, 1, 0, 0, 28, 0,
'',
'',
'', $langs->defaultlang);
720 $tmparray = $form->showLinkToObjectBlock($object, array(), array(
'conferenceorboothattendee'), 1);
721 $linktoelem = $tmparray[
'linktoelem'];
722 $htmltoenteralink = $tmparray[
'htmltoenteralink'];
723 print $htmltoenteralink;
725 $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
728 print
'</div><div class="fichehalfright">';
732 $morehtmlcenter =
'<div class="nowraponall">';
733 $morehtmlcenter .=
dolGetButtonTitle($langs->trans(
'FullConversation'),
'',
'fa fa-comments imgforviewmode', DOL_URL_ROOT.
'/societe/messaging.php?socid='.
$object->id);
734 $morehtmlcenter .=
dolGetButtonTitle($langs->trans(
'FullList'),
'',
'fa fa-bars imgforviewmode', DOL_URL_ROOT.
'/societe/agenda.php?socid='.
$object->id);
735 $morehtmlcenter .=
'</div>';
738 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formactions.class.php';
740 $somethingshown = $formactions->showactions($object,
'conferenceorboothattendee', 0, 1,
'', $MAXEVENT,
'', $morehtmlcenter);
742 print
'</div></div>';
746 if (
GETPOST(
'modelselected')) {
751 $modelmail =
'conferenceorboothattendee';
752 $defaulttopic =
'InformationMessage';
753 $diroutput =
$conf->eventorganization->dir_output;
754 $trackid =
'conferenceorboothattendee'.$object->id;
756 include DOL_DOCUMENT_ROOT.
'/core/tpl/card_presend.tpl.php';
$id
Support class for third parties, contacts, members, users or resources.
if(! $sortfield) if(! $sortorder) $object
global $dolibarr_main_url_root
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Class for ConferenceOrBoothAttendee.
Class for ConferenceOrBooth.
Class to manage invoices.
Class to manage projects.
print $langs trans("Ref").' m titre as m m statut as status
Or an array listing all the potential status of the object: array: int of the status => translated la...
conferenceorboothAttendeePrepareHead($object)
Prepare array of tabs for ConferenceOrBoothAttendees.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed information (by default a local PHP server timestamp) Rep...
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
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, $morecssdiv='')
Show tabs of a record.
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.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1, $includequotes=0, $allowdash=0)
Clean a string to use it as a file name.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
dolGetButtonAction($label, $text='', $actionType='default', $url='', $id='', $userRight=1, $params=array())
Function dolGetButtonAction.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false, $decorate=0)
Output date in a string format according to outputlangs (or langs if not defined).
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
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 a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
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, $nodie=0, $mode='')
Check permissions of a user to show a page and an object.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.
dol_hash($chain, $type='0', $nosalt=0, $mode=0)
Returns a hash (non reversible encryption) of a string.