29require
'../main.inc.php';
39require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
40require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
41require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
42require_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
43require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
44require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorbooth.class.php';
45require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorboothattendee.class.php';
46require_once DOL_DOCUMENT_ROOT.
'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
47require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
50$langs->loadLangs(array(
"eventorganization",
"other",
"projects",
"companies"));
53$action =
GETPOST(
'action',
'aZ09');
54$confirm =
GETPOST(
'confirm',
'alpha');
56$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'conferenceorboothattendeecard';
57$backtopage =
GETPOST(
'backtopage',
'alpha');
58$backtopageforcancel =
GETPOST(
'backtopageforcancel',
'alpha');
59$optioncss =
GETPOST(
'optioncss',
'aZ');
67$conf_or_booth_id =
GETPOSTINT(
'conforboothid');
69$withproject = GETPOSTISSET(
'withproject') ?
GETPOSTINT(
'withproject'): 1;
75$diroutputmassaction =
$conf->eventorganization->dir_output.
'/temp/massgeneration/'.$user->id;
76$hookmanager->initHooks(array($contextpage,
'globalcard'));
79if ($conf_or_booth_id > 0) {
81 $result = $confOrBooth->fetch($conf_or_booth_id);
85 $object->fk_actioncomm = $confOrBooth->id;
86 $object->fk_project = $confOrBooth->fk_project;
87 $fk_project =
$object->fk_project;
92$extrafields->fetch_name_optionals_label(
$object->table_element);
94$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element,
'',
'search_');
97$search_all =
GETPOST(
'search_all',
'alphanohtml');
99foreach (
$object->fields as $key => $val) {
100 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') {
101 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
103 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
110$fieldstosearchall = array();
111foreach (
$object->fields as $key => $val) {
112 if (!empty($val[
'searchall'])) {
113 $fieldstosearchall[
't.'.$key] = $val[
'label'];
117if (empty($action) && empty($id) && empty($ref)) {
122include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
126 $fk_project =
$object->fk_project;
130$permissiontoread = $user->hasRight(
'project',
'read');
131$permissiontoadd = $user->hasRight(
'project',
'write');
132$permissiontodelete = $user->hasRight(
'project',
'delete') || ($permissiontoadd && isset(
$object->status) &&
$object->status == $object::STATUS_DRAFT);
133$permissionnote = $user->hasRight(
'project',
'write');
134$permissiondellink = $user->hasRight(
'project',
'write');
135$upload_dir =
$conf->eventorganization->multidir_output[isset(
$object->entity) ?
$object->entity : 1];
138if ($user->socid > 0) {
149$parameters = array();
150$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
155if (empty($reshook)) {
157 $backurlforlist = DOL_URL_ROOT.
'/eventorganization/conferenceorboothattendee_list.php?withproject=1&fk_project='.((int) $fk_project);
162 if (empty($backtopage) || ($cancel && empty($id))) {
163 if (empty($backtopage) || ($cancel && strpos($backtopage,
'__ID__'))) {
164 if (empty($id) && (($action !=
'add' && $action !=
'create') || $cancel)) {
165 $backtopage = $backurlforlist;
167 $backtopage = DOL_URL_ROOT.
'/eventorganization/conferenceorboothattendee_card.php?fk_project='.((int) $fk_project).
'&id='.(
$id > 0 ?
$id :
'__ID__').
'&withproject=1';
173 if (!empty($backtopageforcancel)) {
174 header(
"Location: ".$backtopageforcancel);
176 } elseif (!empty($backtopage)) {
177 header(
"Location: ".$backtopage);
183 $triggermodname =
'EVENTORGANIZATION_CONFERENCEORBOOTHATTENDEE_MODIFY';
186 include DOL_DOCUMENT_ROOT.
'/core/actions_addupdatedelete.inc.php';
189 include DOL_DOCUMENT_ROOT.
'/core/actions_dellink.inc.php';
192 include DOL_DOCUMENT_ROOT.
'/core/actions_printing.inc.php';
198 include DOL_DOCUMENT_ROOT.
'/core/actions_builddoc.inc.php';
200 if ($action ==
'set_thirdparty' && $permissiontoadd) {
201 $object->setValueFrom(
'fk_soc',
GETPOSTINT(
'fk_soc'),
'',
null,
'date',
'', $user, $triggermodname);
203 if ($action ==
'classin' && $permissiontoadd) {
208 $triggersendname =
'EVENTORGANIZATION_CONFERENCEORBOOTHATTENDEE_SENTBYMAIL';
209 $autocopy =
'MAIN_MAIL_AUTOCOPY_CONFERENCEORBOOTHATTENDEE_TO';
210 $trackid =
'conferenceorboothattendee'.$object->id;
211 include DOL_DOCUMENT_ROOT.
'/core/actions_sendmails.inc.php';
225$title = $langs->trans(
"ConferenceOrBoothAttendee");
226$help_url =
'EN:Module_Event_Organization';
228llxHeader(
'', $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-eventorganization page-attendee-card');
230if ($action ==
'create') {
231 $result = $projectstatic->fetch(
GETPOSTINT(
'fk_project'));
233 $result = $projectstatic->fetch(($confOrBooth ===
null || empty($confOrBooth->fk_project)) ? $fk_project : $confOrBooth->fk_project);
235if (
getDolGlobalString(
'PROJECT_ALLOW_COMMENT_ON_PROJECT') && method_exists($projectstatic,
'fetchComments') && empty($projectstatic->comments)) {
236 $projectstatic->fetchComments();
238if (!empty($projectstatic->socid)) {
239 $projectstatic->fetch_thirdparty();
243$object->project = clone $projectstatic;
245if (!empty($withproject)) {
247 $tab =
'eventorganisation';
248 $withProjectUrl =
"&withproject=1";
252 print
dol_get_fiche_head($head, $tab, $langs->trans(
"Project"), -1, ($projectstatic->public ?
'projectpub' :
'project'), 0,
'',
'');
254 $param = ($mode ==
'mine' ?
'&mode=mine' :
'');
258 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
260 $morehtmlref =
'<div class="refidno">';
262 $morehtmlref .= $projectstatic->title;
264 if (isset($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
265 $morehtmlref .=
'<br>'.$projectstatic->thirdparty->getNomUrl(1,
'project');
267 $morehtmlref .=
'</div>';
270 if (!$user->hasRight(
'project',
'all',
'lire')) {
271 $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
272 $projectstatic->next_prev_filter =
"rowid:IN:".$db->sanitize(count($objectsListId) ? implode(
',', array_keys($objectsListId)) :
'0');
275 dol_banner_tab($projectstatic,
'project_ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
277 print
'<div class="fichecenter">';
278 print
'<div class="fichehalfleft">';
279 print
'<div class="underbanner clearboth"></div>';
281 print
'<table class="border tableforfield centpercent">';
285 print
'<tr><td class="tdtop">';
286 print $langs->trans(
"Usage");
290 print
'<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET(
'usage_opportunity') ? (
GETPOST(
'usage_opportunity',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_opportunity ?
' checked="checked"' :
'')).
'"> ';
291 $htmltext = $langs->trans(
"ProjectFollowOpportunity");
292 print $form->textwithpicto($langs->trans(
"ProjectFollowOpportunity"), $htmltext);
296 print
'<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET(
'usage_task') ? (
GETPOST(
'usage_task',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_task ?
' checked="checked"' :
'')).
'"> ';
297 $htmltext = $langs->trans(
"ProjectFollowTasks");
298 print $form->textwithpicto($langs->trans(
"ProjectFollowTasks"), $htmltext);
302 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"' :
'')).
'"> ';
303 $htmltext = $langs->trans(
"ProjectBillTimeDescription");
304 print $form->textwithpicto($langs->trans(
"BillTime"), $htmltext);
308 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"' :
'')).
'"> ';
309 $htmltext = $langs->trans(
"EventOrganizationDescriptionLong");
310 print $form->textwithpicto($langs->trans(
"ManageOrganizeEvent"), $htmltext);
316 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
317 if (strcmp($projectstatic->budget_amount,
'')) {
318 print
'<span class="amount">'.price($projectstatic->budget_amount, 0, $langs, 1, 0, 0,
$conf->currency).
'</span>';
323 print
'<tr><td>'.$langs->trans(
"Dates").
' ('.$langs->trans(
"Project").
')</td><td>';
325 print($start ? $start :
'?');
328 print($end ? $end :
'?');
329 if ($projectstatic->hasDelay()) {
335 print
'<tr><td>'.$langs->trans(
"Dates").
' ('.$langs->trans(
"Event").
')</td><td>';
337 print($start ? $start :
'?');
340 print($end ? $end :
'?');
341 if ($projectstatic->hasDelay()) {
347 print
'<tr><td class="titlefield">'.$langs->trans(
"Visibility").
'</td><td>';
348 if ($projectstatic->public == 0) {
349 print
img_picto($langs->trans(
'PrivateProject'),
'private',
'class="paddingrightonly"');
350 print $langs->trans(
"PrivateProject");
352 print
img_picto($langs->trans(
'SharedProject'),
'world',
'class="paddingrightonly"');
353 print $langs->trans(
"SharedProject");
358 print
'<tr><td>'.$langs->trans(
"Location").
'</td><td>';
359 print $projectstatic->location;
366 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
373 print
'<div class="fichehalfright">';
374 print
'<div class="underbanner clearboth"></div>';
376 print
'<table class="border tableforfield centpercent">';
380 print
'<tr><td class="titlefield valignmiddle">'.$langs->trans(
"Categories").
'</td><td class="valuefield">';
381 print $form->showCategories($projectstatic->id, Categorie::TYPE_PROJECT, 1);
386 print
'<td class="titlefield tdtop">'.$langs->trans(
"Description").
'</td><td>';
390 print
'<tr><td class="ntitlefield owrap">';
391 $typeofdata =
'checkbox:'.($projectstatic->accept_conference_suggestions ?
' checked="checked"' :
'');
392 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestConfHelp");
393 print $form->editfieldkey(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'', $projectstatic, 0, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
395 print $form->editfieldval(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'1', $projectstatic, 0, $typeofdata,
'',
null,
null,
'', 0,
'',
'projectid');
399 $typeofdata =
'checkbox:'.($projectstatic->accept_booth_suggestions ?
' checked="checked"' :
'');
400 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestBoothHelp");
401 print $form->editfieldkey(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'', $projectstatic, 0, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
403 print $form->editfieldval(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'1', $projectstatic, 0, $typeofdata,
'',
null,
null,
'', 0,
'',
'projectid');
407 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth',
'', $projectstatic, 0,
'amount',
'', 0, 0,
'projectid');
409 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth', $projectstatic->price_booth, $projectstatic, 0,
'amount',
'',
null,
null,
'', 0,
'',
'projectid');
413 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration',
'', $projectstatic, 0,
'amount',
'', 0, 0,
'projectid');
415 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration', $projectstatic->price_registration, $projectstatic, 0,
'amount',
'',
null,
null,
'', 0,
'',
'projectid');
418 print
'<tr><td class="titlefield">';
419 print $form->editfieldkey($form->textwithpicto($langs->trans(
'MaxNbOfAttendees'),
''),
'max_attendees',
'', $projectstatic, $permissiontoadd,
'integer:3',
'', 0, 0,
'projectid');
420 print
'</td><td class="valuefield">';
421 print $form->editfieldval($form->textwithpicto($langs->trans(
'MaxNbOfAttendees'),
''),
'max_attendees', $projectstatic->max_attendees, $projectstatic, $permissiontoadd,
'integer:3',
'',
null,
null,
'', 0,
'',
'projectid');
425 print
'<tr><td class="titlefield valignmiddle">'.$langs->trans(
"EventOrganizationICSLinkProject").
'</td><td class="valuefield">';
428 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
431 $message =
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/agenda/agendaexport.php?format=ical'.(
$conf->entity > 1 ?
"&entity=".$conf->entity :
"");
432 $message .=
'&exportkey='.urlencode(
getDolGlobalString(
'MAIN_AGENDA_XCAL_EXPORTKEY',
'...'));
433 $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>';
438 print
'<tr><td class="titlefield valignmiddle">'.$langs->trans(
"EventOrganizationICSLink").
'</td><td>';
441 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
444 $message =
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/agenda/agendaexport.php?format=ical'.(
$conf->entity > 1 ?
"&entity=".$conf->entity :
"");
445 $message .=
'&exportkey='.urlencode(
getDolGlobalString(
'MAIN_AGENDA_XCAL_EXPORTKEY',
'...'));
446 $message .=
"&project=".$projectstatic->id.
'&module='.urlencode(
'@eventorganization').
'&status='.ConferenceOrBooth::STATUS_CONFIRMED.
'">'.$langs->trans(
'DownloadICSLink').img_picto(
'',
'download',
'class="paddingleft"').
'</a>';
453 print $form->textwithpicto($langs->trans(
"SuggestOrVoteForConfOrBooth"), $langs->trans(
"EvntOrgRegistrationHelpMessage"));
457 $encodedsecurekey =
dol_hash(
getDolGlobalString(
"EVENTORGANIZATION_SECUREKEY").
'conferenceorbooth'.((
int) $projectstatic->id),
'md5');
458 $linksuggest .=
'&securekey='.urlencode($encodedsecurekey);
461 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$linksuggest.
'" class="quatrevingtpercent">'.$linksuggest.
'</a></div>';
462 print
'<a target="_blank" rel="noopener noreferrer" href="'.$linksuggest.
'">'.
img_picto(
'',
'globe').
'</a>';
470 print $langs->trans(
"PublicAttendeeSubscriptionGlobalPage");
473 $link_subscription =
$dolibarr_main_url_root.
'/public/eventorganization/attendee_new.php?id='.((int) $projectstatic->id).
'&type=global';
474 $encodedsecurekey =
dol_hash(
getDolGlobalString(
"EVENTORGANIZATION_SECUREKEY").
'conferenceorbooth'.((
int) $projectstatic->id),
'md5');
475 $link_subscription .=
'&securekey='.urlencode($encodedsecurekey);
478 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$link_subscription.
'" class="quatrevingtpercent">'.$link_subscription.
'</a></div>';
479 print
'<a target="_blank" rel="noopener noreferrer" href="'.$link_subscription.
'">'.
img_picto(
'',
'globe').
'</a>';
489 print
'<div class="clearboth"></div>';
497if ($action ==
'create' && $confOrBooth ===
null) {
498 print
load_fiche_titre($langs->trans(
"NewObject", $langs->transnoentitiesnoconv(
"ConferenceOrBoothAttendee")),
'',
'object_'.$object->picto);
501 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].(empty($withproject) ?
'' :
'?withproject=1').
'">';
502 print
'<input type="hidden" name="token" value="'.newToken().
'">';
503 print
'<input type="hidden" name="action" value="add">';
504 print
'<input type="hidden" name="withproject" value="'.$withproject.
'">';
506 if ($projectstatic->id > 0) {
507 print
'<input type="hidden" name="fk_project" value="'.$projectstatic->id.
'">';
508 print
'<input type="hidden" name="projectid" value="'.$projectstatic->id.
'">';
512 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
514 if ($backtopageforcancel) {
515 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
520 print
'<table class="border centpercent tableforfieldcreate">'.
"\n";
523 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_add.tpl.php';
526 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_add.tpl.php';
528 print
'</table>'.
"\n";
532 print $form->buttonsSaveCancel(
"Create");
540if (($id || $ref) && $action ==
'edit') {
541 print
load_fiche_titre($langs->trans(
"ConferenceOrBoothAttendee"),
'',
'object_'.$object->picto);
543 print
'<form method="POST" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
544 print
'<input type="hidden" name="token" value="'.newToken().
'">';
545 print
'<input type="hidden" name="action" value="update">';
546 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
547 if (is_object($confOrBooth) && $confOrBooth->id > 0) {
548 print
'<input type="hidden" name="conforboothid" value="'.$confOrBooth->id.
'">';
550 if (
$object->fk_actioncomm > 0) {
551 print
'<input type="hidden" name="fk_actioncomm" value="'.$object->fk_actioncomm.
'">';
554 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
556 if ($backtopageforcancel) {
557 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
559 if ($projectstatic->id > 0) {
560 print
'<input type="hidden" name="fk_project" value="'.$projectstatic->id.
'">';
565 print
'<table class="border centpercent tableforfieldedit">'.
"\n";
568 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_edit.tpl.php';
571 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_edit.tpl.php';
577 print $form->buttonsSaveCancel();
583if (
$object->id > 0 && (empty($action) || ($action !=
'edit' && $action !=
'create'))) {
588 $moreparam .=
'&withproject=1';
591 $moreparam .=
'&fk_project='.((int) $fk_project);
600 if ($action ==
'delete') {
601 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'DeleteConferenceOrBoothAttendee'), $langs->trans(
'ConfirmDeleteObject'),
'confirm_delete',
'', 0, 1);
604 if ($action ==
'deleteline') {
605 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&lineid='.$lineid, $langs->trans(
'DeleteLine'), $langs->trans(
'ConfirmDeleteLine'),
'confirm_deleteline',
'', 0, 1);
608 if ($action ==
'clone') {
610 $formquestion = array();
611 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneAsk',
$object->ref),
'confirm_clone', $formquestion,
'yes', 1);
615 $parameters = array(
'formConfirm' => $formconfirm,
'lineid' => $lineid);
616 $reshook = $hookmanager->executeHooks(
'formConfirm', $parameters, $object, $action);
617 if (empty($reshook)) {
618 $formconfirm .= $hookmanager->resPrint;
619 } elseif ($reshook > 0) {
620 $formconfirm = $hookmanager->resPrint;
628 $linkback =
'<a href="'.dol_buildpath(
'/eventorganization/conferenceorboothattendee_list.php', 1).
'?restore_lastsearch_values=1'.$moreparam.
'">'.$langs->trans(
"BackToList").
'</a>';
630 $morehtmlref =
'<div class="refidno">';
632 $morehtmlref .=
'</div>';
634 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref, $moreparam);
636 print
'<div class="fichecenter">';
637 print
'<div class="fichehalfleft">';
638 print
'<div class="underbanner clearboth"></div>';
639 print
'<table class="border centpercent tableforfield">'.
"\n";
645 $keyforbreak =
'num_vote';
647 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_view.tpl.php';
650 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
656 print
'<div class="clearboth"></div>';
662 if ($action !=
'presend' && $action !=
'editline') {
663 print
'<div class="tabsAction">'.
"\n";
664 $parameters = array();
665 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
670 if (empty($reshook)) {
672 if (empty($user->socid)) {
673 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');
675 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);
678 print dolGetButtonAction(
'', $langs->trans(
'ToClone'),
'clone', $_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=clone&token='.newToken().(!empty($projectstatic->id) ?
'&fk_project='.$projectstatic->id :
''),
'', $permissiontoadd);
681 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));
688 if (
GETPOST(
'modelselected')) {
692 if ($action !=
'presend') {
693 print
'<div class="fichecenter"><div class="fichehalfleft">';
694 print
'<a name="builddoc"></a>';
696 $includedocgeneration = 0;
699 if ($includedocgeneration) {
701 $relativepath = $objref.
'/'.$objref.
'.pdf';
702 $filedir =
$conf->eventorganization->dir_output.
'/'.
$object->element.
'/'.$objref;
703 $urlsource = $_SERVER[
"PHP_SELF"].
"?id=".
$object->id;
704 $genallowed = $user->hasRight(
'project',
'conferenceorboothattendee',
'read');
705 $delallowed = $user->hasRight(
'project',
'conferenceorboothattendee',
'write');
706 print $formfile->showdocuments(
'eventorganization:ConferenceOrBoothAttendee',
$object->element.
'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed, (
string)
$object->model_pdf, 1, 0, 0, 28, 0,
'',
'',
'', $langs->defaultlang);
710 $tmparray = $form->showLinkToObjectBlock($object, array(), array(
'conferenceorboothattendee'), 1);
711 $linktoelem = $tmparray[
'linktoelem'];
712 $htmltoenteralink = $tmparray[
'htmltoenteralink'];
713 print $htmltoenteralink;
715 $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
718 print
'</div><div class="fichehalfright">';
722 $morehtmlcenter =
'<div class="nowraponall">';
723 $morehtmlcenter .= dolGetButtonTitle($langs->trans(
'FullConversation'),
'',
'fa fa-comments imgforviewmode', DOL_URL_ROOT.
'/societe/messaging.php?socid='.
$object->id);
724 $morehtmlcenter .= dolGetButtonTitle($langs->trans(
'FullList'),
'',
'fa fa-bars imgforviewmode', DOL_URL_ROOT.
'/societe/agenda.php?socid='.
$object->id);
725 $morehtmlcenter .=
'</div>';
728 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formactions.class.php';
730 $somethingshown = $formactions->showactions($object,
'conferenceorboothattendee', 0, 1,
'', $MAXEVENT,
'', $morehtmlcenter);
732 print
'</div></div>';
736 if (
GETPOST(
'modelselected')) {
741 $modelmail =
'conferenceorboothattendee';
742 $defaulttopic =
'InformationMessage';
743 $diroutput =
$conf->eventorganization->dir_output;
744 $trackid =
'conferenceorboothattendee'.$object->id;
746 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 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.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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.
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.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
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.
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, $mode=0)
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.