29require
'../main.inc.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
35require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
36require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorbooth.class.php';
37require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorboothattendee.class.php';
38require_once DOL_DOCUMENT_ROOT.
'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
39require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
52$langs->loadLangs(array(
"eventorganization",
"other",
"projects",
"companies"));
55$action =
GETPOST(
'action',
'aZ09');
56$confirm =
GETPOST(
'confirm',
'alpha');
58$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'conferenceorboothattendeecard';
59$backtopage =
GETPOST(
'backtopage',
'alpha');
60$backtopageforcancel =
GETPOST(
'backtopageforcancel',
'alpha');
61$optioncss =
GETPOST(
'optioncss',
'aZ');
69$conf_or_booth_id =
GETPOSTINT(
'conforboothid');
76$projectstatic =
new Project($db);
77$diroutputmassaction =
$conf->eventorganization->dir_output.
'/temp/massgeneration/'.$user->id;
78$hookmanager->initHooks(array($contextpage,
'globalcard'));
81if ($conf_or_booth_id > 0) {
83 $result = $confOrBooth->fetch($conf_or_booth_id);
87 $object->fk_actioncomm = $confOrBooth->id;
88 $object->fk_project = $confOrBooth->fk_project;
89 $fk_project =
$object->fk_project;
94$extrafields->fetch_name_optionals_label(
$object->table_element);
96$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element,
'',
'search_');
99$search_all =
GETPOST(
'search_all',
'alphanohtml');
101foreach (
$object->fields as $key => $val) {
102 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') {
103 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
105 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
112$fieldstosearchall = array();
113foreach (
$object->fields as $key => $val) {
114 if (!empty($val[
'searchall'])) {
115 $fieldstosearchall[
't.'.$key] = $val[
'label'];
119if (empty($action) && empty($id) && empty($ref)) {
124include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
128 $fk_project =
$object->fk_project;
132$permissiontoread = $user->hasRight(
'eventorganization',
'read');
133$permissiontoadd = $user->hasRight(
'eventorganization',
'write');
134$permissiontodelete = $user->hasRight(
'eventorganization',
'delete') || ($permissiontoadd && isset(
$object->status) &&
$object->status == $object::STATUS_DRAFT);
135$permissionnote = $user->hasRight(
'eventorganization',
'write');
136$permissiondellink = $user->hasRight(
'eventorganization',
'write');
137$upload_dir =
$conf->eventorganization->multidir_output[isset(
$object->entity) ?
$object->entity : 1];
140if ($user->socid > 0) {
143$isdraft = ((
$object->status == $object::STATUS_DRAFT) ? 1 : 0);
146if (!$permissiontoread) {
155$parameters = array();
156$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
161if (empty($reshook)) {
163 $backurlforlist = DOL_URL_ROOT.
'/eventorganization/conferenceorboothattendee_list.php?withproject=1&fk_project='.((int) $fk_project);
168 if (empty($backtopage) || ($cancel && empty($id))) {
169 if (empty($backtopage) || ($cancel && strpos($backtopage,
'__ID__'))) {
170 if (empty($id) && (($action !=
'add' && $action !=
'create') || $cancel)) {
171 $backtopage = $backurlforlist;
173 $backtopage = DOL_URL_ROOT.
'/eventorganization/conferenceorboothattendee_card.php?fk_project='.((int) $fk_project).
'&id='.(
$id > 0 ?
$id :
'__ID__').
'&withproject=1';
179 if (!empty($backtopageforcancel)) {
180 header(
"Location: ".$backtopageforcancel);
182 } elseif (!empty($backtopage)) {
183 header(
"Location: ".$backtopage);
189 $triggermodname =
'EVENTORGANIZATION_CONFERENCEORBOOTHATTENDEE_MODIFY';
192 include DOL_DOCUMENT_ROOT.
'/core/actions_addupdatedelete.inc.php';
195 include DOL_DOCUMENT_ROOT.
'/core/actions_dellink.inc.php';
198 include DOL_DOCUMENT_ROOT.
'/core/actions_printing.inc.php';
204 include DOL_DOCUMENT_ROOT.
'/core/actions_builddoc.inc.php';
206 if ($action ==
'set_thirdparty' && $permissiontoadd) {
207 $object->setValueFrom(
'fk_soc',
GETPOSTINT(
'fk_soc'),
'',
null,
'date',
'', $user, $triggermodname);
209 if ($action ==
'classin' && $permissiontoadd) {
214 $triggersendname =
'EVENTORGANIZATION_CONFERENCEORBOOTHATTENDEE_SENTBYMAIL';
215 $autocopy =
'MAIN_MAIL_AUTOCOPY_CONFERENCEORBOOTHATTENDEE_TO';
216 $trackid =
'conferenceorboothattendee'.$object->id;
217 include DOL_DOCUMENT_ROOT.
'/core/actions_sendmails.inc.php';
227$form =
new Form($db);
231$title = $langs->trans(
"ConferenceOrBoothAttendee");
232$help_url =
'EN:Module_Event_Organization';
234llxHeader(
'', $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-eventorganization page-attendee-card');
236if ($action ==
'create') {
237 $result = $projectstatic->fetch(
GETPOSTINT(
'fk_project'));
239 $result = $projectstatic->fetch(($confOrBooth ===
null || empty($confOrBooth->fk_project)) ? $fk_project : $confOrBooth->fk_project);
241if (
getDolGlobalString(
'PROJECT_ALLOW_COMMENT_ON_PROJECT') && method_exists($projectstatic,
'fetchComments') && empty($projectstatic->comments)) {
242 $projectstatic->fetchComments();
244if (!empty($projectstatic->socid)) {
245 $projectstatic->fetch_thirdparty();
249$object->project = clone $projectstatic;
251if (!empty($withproject)) {
253 $tab =
'eventorganisation';
254 $withProjectUrl =
"&withproject=1";
258 print
dol_get_fiche_head($head, $tab, $langs->trans(
"Project"), -1, ($projectstatic->public ?
'projectpub' :
'project'), 0,
'',
'');
260 $param = ($mode ==
'mine' ?
'&mode=mine' :
'');
264 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
266 $morehtmlref =
'<div class="refidno">';
268 $morehtmlref .= $projectstatic->title;
270 if (isset($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
271 $morehtmlref .=
'<br>'.$projectstatic->thirdparty->getNomUrl(1,
'project');
273 $morehtmlref .=
'</div>';
276 if (!$user->hasRight(
'project',
'all',
'lire')) {
277 $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
278 $projectstatic->next_prev_filter =
"rowid:IN:".$db->sanitize(count($objectsListId) ? implode(
',', array_keys($objectsListId)) :
'0');
281 dol_banner_tab($projectstatic,
'project_ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
283 print
'<div class="fichecenter">';
284 print
'<div class="fichehalfleft">';
285 print
'<div class="underbanner clearboth"></div>';
287 print
'<table class="border tableforfield centpercent">';
291 print
'<tr><td class="tdtop">';
292 print $langs->trans(
"Usage");
296 print
'<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET(
'usage_opportunity') ? (
GETPOST(
'usage_opportunity',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_opportunity ?
' checked="checked"' :
'')).
'"> ';
297 $htmltext = $langs->trans(
"ProjectFollowOpportunity");
298 print $form->textwithpicto($langs->trans(
"ProjectFollowOpportunity"), $htmltext);
302 print
'<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET(
'usage_task') ? (
GETPOST(
'usage_task',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_task ?
' checked="checked"' :
'')).
'"> ';
303 $htmltext = $langs->trans(
"ProjectFollowTasks");
304 print $form->textwithpicto($langs->trans(
"ProjectFollowTasks"), $htmltext);
308 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"' :
'')).
'"> ';
309 $htmltext = $langs->trans(
"ProjectBillTimeDescription");
310 print $form->textwithpicto($langs->trans(
"BillTime"), $htmltext);
313 if (isModEnabled(
'eventorganization')) {
314 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"' :
'')).
'"> ';
315 $htmltext = $langs->trans(
"EventOrganizationDescriptionLong");
316 print $form->textwithpicto($langs->trans(
"ManageOrganizeEvent"), $htmltext);
322 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
323 if (strcmp($projectstatic->budget_amount,
'')) {
324 print
'<span class="amount">'.price($projectstatic->budget_amount, 0, $langs, 1, 0, 0,
$conf->currency).
'</span>';
329 print
'<tr><td>'.$langs->trans(
"Dates").
' ('.$langs->trans(
"Project").
')</td><td>';
331 print($start ? $start :
'?');
334 print($end ? $end :
'?');
335 if ($projectstatic->hasDelay()) {
341 print
'<tr><td>'.$langs->trans(
"Dates").
' ('.$langs->trans(
"Event").
')</td><td>';
343 print($start ? $start :
'?');
346 print($end ? $end :
'?');
347 if ($projectstatic->hasDelay()) {
353 print
'<tr><td class="titlefield">'.$langs->trans(
"Visibility").
'</td><td>';
354 if ($projectstatic->public == 0) {
355 print
img_picto($langs->trans(
'PrivateProject'),
'private',
'class="paddingrightonly"');
356 print $langs->trans(
"PrivateProject");
358 print
img_picto($langs->trans(
'SharedProject'),
'world',
'class="paddingrightonly"');
359 print $langs->trans(
"SharedProject");
364 print
'<tr><td>'.$langs->trans(
"Location").
'</td><td>';
365 print $projectstatic->location;
372 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
379 print
'<div class="fichehalfright">';
380 print
'<div class="underbanner clearboth"></div>';
382 print
'<table class="border tableforfield centpercent">';
385 if (isModEnabled(
'category')) {
386 print
'<tr><td class="titlefield valignmiddle">'.$langs->trans(
"Categories").
'</td><td class="valuefield">';
387 print $form->showCategories($projectstatic->id, Categorie::TYPE_PROJECT, 1);
392 print
'<td class="titlefield tdtop">'.$langs->trans(
"Description").
'</td><td>';
396 print
'<tr><td class="ntitlefield owrap">';
397 $typeofdata =
'checkbox:'.($projectstatic->accept_conference_suggestions ?
' checked="checked"' :
'');
398 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestConfHelp");
399 print $form->editfieldkey(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'', $projectstatic, 0, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
401 print $form->editfieldval(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'1', $projectstatic, 0, $typeofdata,
'',
null,
null,
'', 0,
'',
'projectid');
405 $typeofdata =
'checkbox:'.($projectstatic->accept_booth_suggestions ?
' checked="checked"' :
'');
406 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestBoothHelp");
407 print $form->editfieldkey(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'', $projectstatic, 0, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
409 print $form->editfieldval(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'1', $projectstatic, 0, $typeofdata,
'',
null,
null,
'', 0,
'',
'projectid');
413 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth',
'', $projectstatic, 0,
'amount',
'', 0, 0,
'projectid');
415 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth', $projectstatic->price_booth, $projectstatic, 0,
'amount',
'',
null,
null,
'', 0,
'',
'projectid');
419 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration',
'', $projectstatic, 0,
'amount',
'', 0, 0,
'projectid');
421 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration', $projectstatic->price_registration, $projectstatic, 0,
'amount',
'',
null,
null,
'', 0,
'',
'projectid');
424 print
'<tr><td class="titlefield">';
425 print $form->editfieldkey($form->textwithpicto($langs->trans(
'MaxNbOfAttendees'),
''),
'max_attendees',
'', $projectstatic, $permissiontoadd,
'integer:3',
'', 0, 0,
'projectid');
426 print
'</td><td class="valuefield">';
427 print $form->editfieldval($form->textwithpicto($langs->trans(
'MaxNbOfAttendees'),
''),
'max_attendees', $projectstatic->max_attendees, $projectstatic, $permissiontoadd,
'integer:3',
'',
null,
null,
'', 0,
'',
'projectid');
431 print
'<tr><td class="titlefield valignmiddle">'.$langs->trans(
"EventOrganizationICSLinkProject").
'</td><td class="valuefield">';
434 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
437 $message =
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/agenda/agendaexport.php?format=ical'.(
$conf->entity > 1 ?
"&entity=".$conf->entity :
"");
438 $message .=
'&exportkey='.urlencode(
getDolGlobalString(
'MAIN_AGENDA_XCAL_EXPORTKEY',
'...'));
439 $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>';
444 print
'<tr><td class="titlefield valignmiddle">'.$langs->trans(
"EventOrganizationICSLink").
'</td><td>';
447 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
450 $message =
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/agenda/agendaexport.php?format=ical'.(
$conf->entity > 1 ?
"&entity=".$conf->entity :
"");
451 $message .=
'&exportkey='.urlencode(
getDolGlobalString(
'MAIN_AGENDA_XCAL_EXPORTKEY',
'...'));
452 $message .=
"&project=".$projectstatic->id.
'&module='.urlencode(
'@eventorganization').
'&status='.ConferenceOrBooth::STATUS_CONFIRMED.
'">'.$langs->trans(
'DownloadICSLink').img_picto(
'',
'download',
'class="paddingleft"').
'</a>';
459 print $form->textwithpicto($langs->trans(
"SuggestOrVoteForConfOrBooth"), $langs->trans(
"EvntOrgRegistrationHelpMessage"));
463 $encodedsecurekey =
dol_hash(
getDolGlobalString(
"EVENTORGANIZATION_SECUREKEY").
'conferenceorbooth'.((
int) $projectstatic->id),
'md5');
464 $linksuggest .=
'&securekey='.urlencode($encodedsecurekey);
467 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$linksuggest.
'" class="quatrevingtpercent">'.$linksuggest.
'</a></div>';
468 print
'<a target="_blank" rel="noopener noreferrer" href="'.$linksuggest.
'">'.
img_picto(
'',
'globe').
'</a>';
476 print $langs->trans(
"PublicAttendeeSubscriptionGlobalPage");
479 $link_subscription =
$dolibarr_main_url_root.
'/public/eventorganization/attendee_new.php?id='.((int) $projectstatic->id).
'&type=global';
480 $encodedsecurekey =
dol_hash(
getDolGlobalString(
"EVENTORGANIZATION_SECUREKEY").
'conferenceorbooth'.((
int) $projectstatic->id),
'md5');
481 $link_subscription .=
'&securekey='.urlencode($encodedsecurekey);
484 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$link_subscription.
'" class="quatrevingtpercent">'.$link_subscription.
'</a></div>';
485 print
'<a target="_blank" rel="noopener noreferrer" href="'.$link_subscription.
'">'.
img_picto(
'',
'globe').
'</a>';
495 print
'<div class="clearboth"></div>';
503if ($action ==
'create' && $confOrBooth ===
null) {
504 print
load_fiche_titre($langs->trans(
"NewObject", $langs->transnoentitiesnoconv(
"ConferenceOrBoothAttendee")),
'',
'object_'.$object->picto);
507 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].(empty($withproject) ?
'' :
'?withproject=1').
'">';
508 print
'<input type="hidden" name="token" value="'.newToken().
'">';
509 print
'<input type="hidden" name="action" value="add">';
511 if ($projectstatic->id > 0) {
512 print
'<input type="hidden" name="fk_project" value="'.$projectstatic->id.
'">';
513 print
'<input type="hidden" name="projectid" value="'.$projectstatic->id.
'">';
517 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
519 if ($backtopageforcancel) {
520 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
525 print
'<table class="border centpercent tableforfieldcreate">'.
"\n";
528 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_add.tpl.php';
531 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_add.tpl.php';
533 print
'</table>'.
"\n";
537 print $form->buttonsSaveCancel(
"Create");
545if (($id || $ref) && $action ==
'edit') {
546 print
load_fiche_titre($langs->trans(
"ConferenceOrBoothAttendee"),
'',
'object_'.$object->picto);
548 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
549 print
'<input type="hidden" name="token" value="'.newToken().
'">';
550 print
'<input type="hidden" name="action" value="update">';
551 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
552 if (is_object($confOrBooth) && $confOrBooth->id > 0) {
553 print
'<input type="hidden" name="conforboothid" value="'.$confOrBooth->id.
'">';
555 if (
$object->fk_actioncomm > 0) {
556 print
'<input type="hidden" name="fk_actioncomm" value="'.$object->fk_actioncomm.
'">';
559 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
561 if ($backtopageforcancel) {
562 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
564 if ($projectstatic->id > 0) {
565 print
'<input type="hidden" name="fk_project" value="'.$projectstatic->id.
'">';
570 print
'<table class="border centpercent tableforfieldedit">'.
"\n";
573 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_edit.tpl.php';
576 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_edit.tpl.php';
582 print $form->buttonsSaveCancel();
588if (
$object->id > 0 && (empty($action) || ($action !=
'edit' && $action !=
'create'))) {
593 $moreparam .=
'&withproject=1';
596 $moreparam .=
'&fk_project='.((int) $fk_project);
605 if ($action ==
'delete') {
606 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'DeleteConferenceOrBoothAttendee'), $langs->trans(
'ConfirmDeleteObject'),
'confirm_delete',
'', 0, 1);
609 if ($action ==
'deleteline') {
610 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&lineid='.$lineid, $langs->trans(
'DeleteLine'), $langs->trans(
'ConfirmDeleteLine'),
'confirm_deleteline',
'', 0, 1);
613 if ($action ==
'clone') {
615 $formquestion = array();
616 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneAsk',
$object->ref),
'confirm_clone', $formquestion,
'yes', 1);
620 $parameters = array(
'formConfirm' => $formconfirm,
'lineid' => $lineid);
621 $reshook = $hookmanager->executeHooks(
'formConfirm', $parameters, $object, $action);
622 if (empty($reshook)) {
623 $formconfirm .= $hookmanager->resPrint;
624 } elseif ($reshook > 0) {
625 $formconfirm = $hookmanager->resPrint;
633 $linkback =
'<a href="'.dol_buildpath(
'/eventorganization/conferenceorboothattendee_list.php', 1).
'?restore_lastsearch_values=1'.$moreparam.
'">'.$langs->trans(
"BackToList").
'</a>';
635 $morehtmlref =
'<div class="refidno">';
637 $morehtmlref .=
'</div>';
639 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref, $moreparam);
641 print
'<div class="fichecenter">';
642 print
'<div class="fichehalfleft">';
643 print
'<div class="underbanner clearboth"></div>';
644 print
'<table class="border centpercent tableforfield">'.
"\n";
650 $keyforbreak =
'num_vote';
652 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_view.tpl.php';
655 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
661 print
'<div class="clearboth"></div>';
667 if ($action !=
'presend' && $action !=
'editline') {
668 print
'<div class="tabsAction">'.
"\n";
669 $parameters = array();
670 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
675 if (empty($reshook)) {
677 if (empty($user->socid)) {
678 print
dolGetButtonAction(
'', $langs->trans(
'SendMail'),
'default', $_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');
680 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);
683 print
dolGetButtonAction(
'', $langs->trans(
'ToClone'),
'default', $_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=clone&token='.
newToken().(!empty($projectstatic->id) ?
'&fk_project='.$projectstatic->id :
''),
'', $permissiontoadd);
686 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));
693 if (
GETPOST(
'modelselected')) {
697 if ($action !=
'presend') {
698 print
'<div class="fichecenter"><div class="fichehalfleft">';
699 print
'<a name="builddoc"></a>';
701 $includedocgeneration = 0;
704 if ($includedocgeneration) {
706 $relativepath = $objref.
'/'.$objref.
'.pdf';
707 $filedir =
$conf->eventorganization->dir_output.
'/'.
$object->element.
'/'.$objref;
708 $urlsource = $_SERVER[
"PHP_SELF"].
"?id=".
$object->id;
709 $genallowed = $user->hasRight(
'eventorganization',
'conferenceorboothattendee',
'read');
710 $delallowed = $user->hasRight(
'eventorganization',
'conferenceorboothattendee',
'write');
711 print $formfile->showdocuments(
'eventorganization:ConferenceOrBoothAttendee',
$object->element.
'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed,
$object->model_pdf, 1, 0, 0, 28, 0,
'',
'',
'', $langs->defaultlang);
715 $tmparray = $form->showLinkToObjectBlock($object, array(), array(
'conferenceorboothattendee'), 1);
716 $linktoelem = $tmparray[
'linktoelem'];
717 $htmltoenteralink = $tmparray[
'htmltoenteralink'];
718 print $htmltoenteralink;
720 $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
723 print
'</div><div class="fichehalfright">';
725 print
'</div></div>';
729 if (
GETPOST(
'modelselected')) {
734 $modelmail =
'conferenceorboothattendee';
735 $defaulttopic =
'InformationMessage';
736 $diroutput =
$conf->eventorganization->dir_output;
737 $trackid =
'conferenceorboothattendee'.$object->id;
739 include DOL_DOCUMENT_ROOT.
'/core/tpl/card_presend.tpl.php';
$id
Support class for third parties, contacts, members, users or resources.
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $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...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
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_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dolGetButtonAction($label, $text='', $actionType='default', $url='', $id='', $userRight=1, $params=array())
Function dolGetButtonAction.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
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...
dol_sanitizeFileName($str, $newstr='_', $unaccent=1, $includequotes=0)
Clean a string to use it as a file name.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
project_prepare_head(Project $project, $moreparam='')
Prepare array with list of tabs.
dol_hash($chain, $type='0', $nosalt=0, $mode=0)
Returns a hash (non reversible encryption) of a string.
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.