24 require
'../main.inc.php';
26 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
27 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
28 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
29 require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorbooth.class.php';
30 require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorboothattendee.class.php';
31 require_once DOL_DOCUMENT_ROOT.
'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
32 require_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
33 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
36 $langs->loadLangs(array(
"eventorganization",
"other",
"projects",
"companies"));
41 $action =
GETPOST(
'action',
'aZ09');
42 $confirm =
GETPOST(
'confirm',
'alpha');
43 $cancel =
GETPOST(
'cancel',
'aZ09');
44 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'conferenceorboothattendeecard';
45 $backtopage =
GETPOST(
'backtopage',
'alpha');
46 $backtopageforcancel =
GETPOST(
'backtopageforcancel',
'alpha');
49 $conf_or_booth_id =
GETPOST(
'conforboothid',
'int');
50 $fk_project =
GETPOST(
'fk_project',
'int');
56 $projectstatic =
new Project($db);
57 $diroutputmassaction = $conf->eventorganization->dir_output.
'/temp/massgeneration/'.$user->id;
58 $hookmanager->initHooks(array(
'conferenceorboothattendeecard',
'globalcard'));
61 if ($conf_or_booth_id > 0) {
63 $result = $confOrBooth->fetch($id > 0 ? $id : $conf_or_booth_id);
67 $object->fk_actioncomm = $confOrBooth->id;
68 $object->fk_project = $confOrBooth->fk_project;
69 $fk_project = $object->fk_project;
74 $extrafields->fetch_name_optionals_label($object->table_element);
76 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element,
'',
'search_');
79 $search_all =
GETPOST(
'search_all',
'alphanohtml');
81 foreach ($object->fields as $key => $val) {
82 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') {
83 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
85 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
86 $search[$key.
'_dtstart'] =
dol_mktime(0, 0, 0,
GETPOST(
'search_'.$key.
'_dtstartmonth',
'int'),
GETPOST(
'search_'.$key.
'_dtstartday',
'int'),
GETPOST(
'search_'.$key.
'_dtstartyear',
'int'));
87 $search[$key.
'_dtend'] =
dol_mktime(23, 59, 59,
GETPOST(
'search_'.$key.
'_dtendmonth',
'int'),
GETPOST(
'search_'.$key.
'_dtendday',
'int'),
GETPOST(
'search_'.$key.
'_dtendyear',
'int'));
92 $fieldstosearchall = array();
93 foreach ($object->fields as $key => $val) {
94 if (!empty($val[
'searchall'])) {
95 $fieldstosearchall[
't.'.$key] = $val[
'label'];
99 if (empty($action) && empty($id) && empty($ref)) {
104 include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
107 if ($object->fk_project > 0) {
108 $fk_project = $object->fk_project;
111 $permissiontoread = $user->rights->eventorganization->read;
112 $permissiontoadd = $user->rights->eventorganization->write;
113 $permissiontodelete = $user->rights->eventorganization->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
114 $permissionnote = $user->rights->eventorganization->write;
115 $permissiondellink = $user->rights->eventorganization->write;
116 $upload_dir = $conf->eventorganization->multidir_output[isset($object->entity) ? $object->entity : 1];
123 $parameters = array();
124 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
129 if (empty($reshook)) {
132 if (!empty($withproject)) {
133 $backurlforlist = DOL_URL_ROOT.
'/eventorganization/conferenceorboothattendee_list.php?withproject=1&fk_project='.((int) $fk_project);
135 $backurlforlist = DOL_URL_ROOT.
'/eventorganization/conferenceorboothattendee_list.php';
138 if (empty($backtopage) || ($cancel && empty($id))) {
139 if (empty($backtopage) || ($cancel && strpos($backtopage,
'__ID__'))) {
140 if (empty($id) && (($action !=
'add' && $action !=
'create') || $cancel)) {
141 $backtopage = $backurlforlist;
143 $backtopage = DOL_URL_ROOT.
'/eventorganization/conferenceorboothattendee_card.php?fk_project='.((int) $fk_project).
'&id='.($id > 0 ? $id :
'__ID__');
149 if (!empty($backtopageforcancel)) {
150 header(
"Location: ".$backtopageforcancel);
152 } elseif (!empty($backtopage)) {
153 header(
"Location: ".$backtopage);
159 $triggermodname =
'EVENTORGANIZATION_CONFERENCEORBOOTHATTENDEE_MODIFY';
162 include DOL_DOCUMENT_ROOT.
'/core/actions_addupdatedelete.inc.php';
165 include DOL_DOCUMENT_ROOT.
'/core/actions_dellink.inc.php';
168 include DOL_DOCUMENT_ROOT.
'/core/actions_printing.inc.php';
174 include DOL_DOCUMENT_ROOT.
'/core/actions_builddoc.inc.php';
176 if ($action ==
'set_thirdparty' && $permissiontoadd) {
177 $object->setValueFrom(
'fk_soc',
GETPOST(
'fk_soc',
'int'),
'',
'',
'date',
'', $user, $triggermodname);
179 if ($action ==
'classin' && $permissiontoadd) {
180 $object->setProject(
GETPOST(
'projectid',
'int'));
184 $triggersendname =
'EVENTORGANIZATION_CONFERENCEORBOOTHATTENDEE_SENTBYMAIL';
185 $autocopy =
'MAIN_MAIL_AUTOCOPY_CONFERENCEORBOOTHATTENDEE_TO';
186 $trackid =
'conferenceorboothattendee'.$object->id;
187 include DOL_DOCUMENT_ROOT.
'/core/actions_sendmails.inc.php';
201 $title = $langs->trans(
"ConferenceOrBoothAttendee");
205 $result = $projectstatic->fetch(empty($confOrBooth->fk_project) ? $fk_project : $confOrBooth->fk_project);
206 if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic,
'fetchComments') && empty($projectstatic->comments)) {
207 $projectstatic->fetchComments();
209 if (!empty($projectstatic->socid)) {
210 $projectstatic->fetch_thirdparty();
214 $object->project = clone $projectstatic;
216 if (!empty($withproject)) {
218 $tab =
'eventorganisation';
220 print
dol_get_fiche_head($head, $tab, $langs->trans(
"Project"), -1, ($projectstatic->public ?
'projectpub' :
'project'), 0,
'',
'');
222 $param = ($mode ==
'mine' ?
'&mode=mine' :
'');
226 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
228 $morehtmlref =
'<div class="refidno">';
230 $morehtmlref .= $projectstatic->title;
232 if ($projectstatic->thirdparty->id > 0) {
233 $morehtmlref .=
'<br>'.$langs->trans(
'ThirdParty').
' : '.$projectstatic->thirdparty->getNomUrl(1,
'project');
235 $morehtmlref .=
'</div>';
238 if (empty($user->rights->projet->all->lire)) {
239 $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
240 $projectstatic->next_prev_filter =
" rowid IN (".$db->sanitize(count($objectsListId) ?join(
',', array_keys($objectsListId)) :
'0').
")";
243 dol_banner_tab($projectstatic,
'project_ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
245 print
'<div class="fichecenter">';
246 print
'<div class="fichehalfleft">';
247 print
'<div class="underbanner clearboth"></div>';
249 print
'<table class="border tableforfield centpercent">';
252 if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) {
253 print
'<tr><td class="tdtop">';
254 print $langs->trans(
"Usage");
257 if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
258 print
'<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET(
'usage_opportunity') ? (
GETPOST(
'usage_opportunity',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_opportunity ?
' checked="checked"' :
'')).
'"> ';
259 $htmltext = $langs->trans(
"ProjectFollowOpportunity");
260 print
$form->textwithpicto($langs->trans(
"ProjectFollowOpportunity"), $htmltext);
263 if (empty($conf->global->PROJECT_HIDE_TASKS)) {
264 print
'<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET(
'usage_task') ? (
GETPOST(
'usage_task',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_task ?
' checked="checked"' :
'')).
'"> ';
265 $htmltext = $langs->trans(
"ProjectFollowTasks");
266 print
$form->textwithpicto($langs->trans(
"ProjectFollowTasks"), $htmltext);
269 if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) {
270 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"' :
'')).
'"> ';
271 $htmltext = $langs->trans(
"ProjectBillTimeDescription");
272 print
$form->textwithpicto($langs->trans(
"BillTime"), $htmltext);
275 if (!empty($conf->eventorganization->enabled)) {
276 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"' :
'')).
'"> ';
277 $htmltext = $langs->trans(
"EventOrganizationDescriptionLong");
278 print
$form->textwithpicto($langs->trans(
"ManageOrganizeEvent"), $htmltext);
284 print
'<tr><td class="titlefield">'.$langs->trans(
"Visibility").
'</td><td>';
285 if ($projectstatic->public) {
286 print $langs->trans(
'SharedProject');
288 print $langs->trans(
'PrivateProject');
293 print
'<tr><td>'.$langs->trans(
"DateStart").
' - '.$langs->trans(
"DateEnd").
'</td><td>';
295 print ($start ? $start :
'?');
298 print ($end ? $end :
'?');
299 if ($projectstatic->hasDelay()) {
305 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
306 if (strcmp($projectstatic->budget_amount,
'')) {
307 print
price($projectstatic->budget_amount,
'', $langs, 1, 0, 0, $conf->currency);
319 print
'<div class="fichehalfright">';
320 print
'<div class="underbanner clearboth"></div>';
322 print
'<table class="border tableforfield centpercent">';
325 print
'<td class="titlefield tdtop">'.$langs->trans(
"Description").
'</td><td>';
326 print nl2br($projectstatic->description);
331 print
'<tr><td class="valignmiddle">'.$langs->trans(
"Categories").
'</td><td>';
332 print
$form->showCategories($projectstatic->id,
'project', 1);
336 print
'<tr><td class="nowrap">';
337 $typeofdata =
'checkbox:'.($projectstatic->accept_conference_suggestions ?
' checked="checked"' :
'');
338 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestConfHelp");
339 print
$form->editfieldkey(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'', $projectstatic, 0, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
341 print
$form->editfieldval(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'1', $projectstatic, 0, $typeofdata,
'', 0, 0,
'', 0,
'',
'projectid');
345 $typeofdata =
'checkbox:'.($projectstatic->accept_booth_suggestions ?
' checked="checked"' :
'');
346 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestBoothHelp");
347 print
$form->editfieldkey(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'', $projectstatic, 0, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
349 print
$form->editfieldval(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'1', $projectstatic, 0, $typeofdata,
'', 0, 0,
'', 0,
'',
'projectid');
353 print
$form->editfieldkey(
$form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth',
'', $projectstatic, 0,
'amount',
'', 0, 0,
'projectid');
355 print
$form->editfieldval(
$form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth', $projectstatic->price_booth, $projectstatic, 0,
'amount',
'', 0, 0,
'', 0,
'',
'projectid');
359 print
$form->editfieldkey(
$form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration',
'', $projectstatic, 0,
'amount',
'', 0, 0,
'projectid');
361 print
$form->editfieldval(
$form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration', $projectstatic->price_registration, $projectstatic, 0,
'amount',
'', 0, 0,
'', 0,
'',
'projectid');
364 print
'<tr><td valign="middle">'.$langs->trans(
"EventOrganizationICSLink").
'</td><td>';
366 $urlwithouturlroot = preg_replace(
'/'.preg_quote(DOL_URL_ROOT,
'/').
'$/i',
'', trim($dolibarr_main_url_root));
367 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
370 $message =
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ?
"&entity=".$conf->entity :
"");
371 $message .=
'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) :
'...');
372 $message .=
"&project=".$projectstatic->id.
'&module='.urlencode(
'@eventorganization').
'&status='.ConferenceOrBooth::STATUS_CONFIRMED.
'">'.$langs->trans(
'DownloadICSLink').img_picto(
'',
'download',
'class="paddingleft"').
'</a>';
379 print
$form->textwithpicto($langs->trans(
"SuggestOrVoteForConfOrBooth"), $langs->trans(
"EvntOrgRegistrationHelpMessage"));
382 $linksuggest = $dolibarr_main_url_root.
'/public/project/index.php?id='.$projectstatic->id;
383 $encodedsecurekey =
dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.
'conferenceorbooth'.$projectstatic->id,
'md5');
384 $linksuggest .=
'&securekey='.urlencode($encodedsecurekey);
387 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$linksuggest.
'" class="quatrevingtpercent">'.$linksuggest.
'</a></div>';
388 print
'<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer" href="'.$linksuggest.
'">'.
img_picto(
'',
'globe').
'</a>';
396 print $langs->trans(
"PublicAttendeeSubscriptionGlobalPage");
399 $link_subscription = $dolibarr_main_url_root.
'/public/eventorganization/attendee_new.php?id='.$projectstatic->id.
'&type=global';
400 $encodedsecurekey =
dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.
'conferenceorbooth'.$projectstatic->id,
'md5');
401 $link_subscription .=
'&securekey='.urlencode($encodedsecurekey);
404 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$link_subscription.
'" class="quatrevingtpercent">'.$link_subscription.
'</a></div>';
405 print
'<a target="_blank" rel="noopener noreferrer" href="'.$link_subscription.
'">'.
img_picto(
'',
'globe').
'</a>';
415 print
'<div class="clearboth"></div>';
423 if ($action ==
'create') {
424 print
load_fiche_titre($langs->trans(
"NewObject", $langs->transnoentitiesnoconv(
"ConferenceOrBoothAttendee")),
'',
'object_'.$object->picto);
427 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].(empty($withproject) ?
'' :
'?withproject=1').
'">';
428 print
'<input type="hidden" name="token" value="'.newToken().
'">';
429 print
'<input type="hidden" name="action" value="add">';
431 if ($confOrBooth->id > 0) {
432 print
'<input type="hidden" name="conforboothid" value="'.$confOrBooth->id.
'">';
434 if ($projectstatic->id > 0) {
435 print
'<input type="hidden" name="fk_project" value="'.$projectstatic->id.
'">';
436 print
'<input type="hidden" name="projectid" value="'.$projectstatic->id.
'">';
440 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
442 if ($backtopageforcancel) {
443 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
448 print
'<table class="border centpercent tableforfieldcreate">'.
"\n";
451 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_add.tpl.php';
454 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_add.tpl.php';
456 print
'</table>'.
"\n";
460 print
$form->buttonsSaveCancel(
"Create");
468 if (($id || $ref) && $action ==
'edit') {
469 print
load_fiche_titre($langs->trans(
"ConferenceOrBoothAttendee"),
'',
'object_'.$object->picto);
471 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
472 print
'<input type="hidden" name="token" value="'.newToken().
'">';
473 print
'<input type="hidden" name="action" value="update">';
474 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
475 if ($confOrBooth->id > 0) {
476 print
'<input type="hidden" name="conforboothid" value="'.$confOrBooth->id.
'">';
478 if ($object->fk_actioncomm > 0) {
479 print
'<input type="hidden" name="fk_actioncomm" value="'.$object->fk_actioncomm.
'">';
482 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
484 if ($backtopageforcancel) {
485 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
487 if ($projectstatic->id > 0) {
488 print
'<input type="hidden" name="fk_project" value="'.$projectstatic->id.
'">';
493 print
'<table class="border centpercent tableforfieldedit">'.
"\n";
496 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_edit.tpl.php';
499 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_edit.tpl.php';
505 print
$form->buttonsSaveCancel();
511 if ($object->id > 0 && (empty($action) || ($action !=
'edit' && $action !=
'create'))) {
512 $object->fetch_optionals();
516 $moreparam .=
'&withproject=1';
519 $moreparam .=
'&fk_project='.((int) $fk_project);
523 print
dol_get_fiche_head($head,
'card', $langs->trans(
"ConferenceOrBoothAttendee"), -1, $object->picto);
528 if ($action ==
'delete') {
529 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'DeleteConferenceOrBoothAttendee'), $langs->trans(
'ConfirmDeleteObject'),
'confirm_delete',
'', 0, 1);
532 if ($action ==
'deleteline') {
533 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id.
'&lineid='.$lineid, $langs->trans(
'DeleteLine'), $langs->trans(
'ConfirmDeleteLine'),
'confirm_deleteline',
'', 0, 1);
536 if ($action ==
'clone') {
538 $formquestion = array();
539 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneAsk', $object->ref),
'confirm_clone', $formquestion,
'yes', 1);
543 if ($action ==
'xxx') {
544 $formquestion = array();
545 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'XXX'), $text,
'confirm_xxx', $formquestion, 0, 1, 220);
549 $parameters = array(
'formConfirm' =>
$formconfirm,
'lineid' => $lineid);
550 $reshook = $hookmanager->executeHooks(
'formConfirm', $parameters, $object, $action);
551 if (empty($reshook)) {
553 } elseif ($reshook > 0) {
562 $linkback =
'<a href="'.dol_buildpath(
'/eventorganization/conferenceorboothattendee_list.php', 1).
'?restore_lastsearch_values=1'.($confOrBooth->id > 0 ?
'&conforboothid='.((int) $confOrBooth->id) :
'').$moreparam.
'">'.$langs->trans(
"BackToList").
'</a>';
564 $morehtmlref =
'<div class="refidno">';
566 $morehtmlref .=
'</div>';
568 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref, $moreparam);
570 print
'<div class="fichecenter">';
571 print
'<div class="fichehalfleft">';
572 print
'<div class="underbanner clearboth"></div>';
573 print
'<table class="border centpercent tableforfield">'.
"\n";
575 $keyforbreak =
'note_public';
578 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_view.tpl.php';
581 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
587 print
'<div class="clearboth"></div>';
593 if ($action !=
'presend' && $action !=
'editline') {
594 print
'<div class="tabsAction">'.
"\n";
595 $parameters = array();
596 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
601 if (empty($reshook)) {
603 if (empty($user->socid)) {
604 print
dolGetButtonAction($langs->trans(
'SendMail'),
'',
'default', $_SERVER[
"PHP_SELF"].
'?id='.$object->id.(!empty($confOrBooth->id)?
'&conforboothid='.$confOrBooth->id:
'').(!empty($projectstatic->id)?
'&fk_project='.$projectstatic->id:
'').
'&action=presend&token='.
newToken().
'&mode=init#formmailbeforetitle');
606 print
dolGetButtonAction($langs->trans(
'Modify'),
'',
'default', $_SERVER[
"PHP_SELF"].
'?id='.$object->id.(!empty($confOrBooth->id)?
'&conforboothid='.$confOrBooth->id:
'').(!empty($projectstatic->id)?
'&fk_project='.$projectstatic->id:
'').
'&action=edit&token='.
newToken(),
'', $permissiontoadd);
609 print
dolGetButtonAction($langs->trans(
'ToClone'),
'',
'default', $_SERVER[
'PHP_SELF'].
'?id='.$object->id.
'&socid='.$object->socid.
'&action=clone&token='.
newToken().(!empty($projectstatic->id)?
'&fk_project='.$projectstatic->id:
''),
'', $permissiontoadd);
612 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));
619 if (
GETPOST(
'modelselected')) {
623 if ($action !=
'presend') {
624 print
'<div class="fichecenter"><div class="fichehalfleft">';
625 print
'<a name="builddoc"></a>';
627 $includedocgeneration = 0;
630 if ($includedocgeneration) {
632 $relativepath = $objref.
'/'.$objref.
'.pdf';
633 $filedir = $conf->eventorganization->dir_output.
'/'.$object->element.
'/'.$objref;
634 $urlsource = $_SERVER[
"PHP_SELF"].
"?id=".$object->id;
635 $genallowed = $user->rights->eventorganization->conferenceorboothattendee->read;
636 $delallowed = $user->rights->eventorganization->conferenceorboothattendee->write;
637 print $formfile->showdocuments(
'eventorganization:ConferenceOrBoothAttendee', $object->element.
'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0,
'',
'',
'', $langs->defaultlang);
641 $linktoelem =
$form->showLinkToObjectBlock($object,
null, array(
'conferenceorboothattendee'));
642 $somethingshown =
$form->showLinkedObjectBlock($object, $linktoelem);
645 print
'</div><div class="fichehalfright">';
647 print
'</div></div>';
651 if (
GETPOST(
'modelselected')) {
656 $modelmail =
'conferenceorboothattendee';
657 $defaulttopic =
'InformationMessage';
658 $diroutput = $conf->eventorganization->dir_output;
659 $trackid =
'conferenceorboothattendee'.$object->id;
661 include DOL_DOCUMENT_ROOT.
'/core/tpl/card_presend.tpl.php';