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';
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"));
57$action =
GETPOST(
'action',
'aZ09');
58$confirm =
GETPOST(
'confirm',
'alpha');
59$cancel =
GETPOST(
'cancel',
'aZ09');
60$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'conferenceorboothattendeecard';
61$backtopage =
GETPOST(
'backtopage',
'alpha');
62$backtopageforcancel =
GETPOST(
'backtopageforcancel',
'alpha');
64$mode =
GETPOST(
'mode',
'alpha');
66$conf_or_booth_id =
GETPOSTINT(
'conforboothid');
73$projectstatic =
new Project($db);
74$diroutputmassaction =
$conf->eventorganization->dir_output.
'/temp/massgeneration/'.$user->id;
75$hookmanager->initHooks(array(
'conferenceorboothattendeecard',
'globalcard'));
78if ($conf_or_booth_id > 0) {
80 $result = $confOrBooth->fetch($id > 0 ? $id : $conf_or_booth_id);
84 $object->fk_actioncomm = $confOrBooth->id;
85 $object->fk_project = $confOrBooth->fk_project;
86 $fk_project =
$object->fk_project;
91$extrafields->fetch_name_optionals_label(
$object->table_element);
93$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element,
'',
'search_');
96$search_all =
GETPOST(
'search_all',
'alphanohtml');
98foreach (
$object->fields as $key => $val) {
99 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') {
100 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
102 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
109$fieldstosearchall = array();
110foreach (
$object->fields as $key => $val) {
111 if (!empty($val[
'searchall'])) {
112 $fieldstosearchall[
't.'.$key] = $val[
'label'];
116if (empty($action) && empty($id) && empty($ref)) {
121include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
125 $fk_project =
$object->fk_project;
129$permissiontoread = $user->hasRight(
'eventorganization',
'read');
130$permissiontoadd = $user->hasRight(
'eventorganization',
'write');
131$permissiontodelete = $user->hasRight(
'eventorganization',
'delete') || ($permissiontoadd && isset(
$object->status) &&
$object->status == $object::STATUS_DRAFT);
132$permissionnote = $user->hasRight(
'eventorganization',
'write');
133$permissiondellink = $user->hasRight(
'eventorganization',
'write');
134$upload_dir =
$conf->eventorganization->multidir_output[isset(
$object->entity) ?
$object->entity : 1];
141$parameters = array();
142$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
147if (empty($reshook)) {
150 if (!empty($withproject)) {
151 $backurlforlist = DOL_URL_ROOT.
'/eventorganization/conferenceorboothattendee_list.php?withproject=1&fk_project='.((int) $fk_project);
153 $backurlforlist = DOL_URL_ROOT.
'/eventorganization/conferenceorboothattendee_list.php';
156 if (empty($backtopage) || ($cancel && empty($id))) {
157 if (empty($backtopage) || ($cancel && strpos($backtopage,
'__ID__'))) {
158 if (empty($id) && (($action !=
'add' && $action !=
'create') || $cancel)) {
159 $backtopage = $backurlforlist;
161 $backtopage = DOL_URL_ROOT.
'/eventorganization/conferenceorboothattendee_card.php?fk_project='.((int) $fk_project).
'&id='.(
$id > 0 ?
$id :
'__ID__');
167 if (!empty($backtopageforcancel)) {
168 header(
"Location: ".$backtopageforcancel);
170 } elseif (!empty($backtopage)) {
171 header(
"Location: ".$backtopage);
177 $triggermodname =
'EVENTORGANIZATION_CONFERENCEORBOOTHATTENDEE_MODIFY';
180 include DOL_DOCUMENT_ROOT.
'/core/actions_addupdatedelete.inc.php';
183 include DOL_DOCUMENT_ROOT.
'/core/actions_dellink.inc.php';
186 include DOL_DOCUMENT_ROOT.
'/core/actions_printing.inc.php';
192 include DOL_DOCUMENT_ROOT.
'/core/actions_builddoc.inc.php';
194 if ($action ==
'set_thirdparty' && $permissiontoadd) {
195 $object->setValueFrom(
'fk_soc',
GETPOSTINT(
'fk_soc'),
'',
null,
'date',
'', $user, $triggermodname);
197 if ($action ==
'classin' && $permissiontoadd) {
202 $triggersendname =
'EVENTORGANIZATION_CONFERENCEORBOOTHATTENDEE_SENTBYMAIL';
203 $autocopy =
'MAIN_MAIL_AUTOCOPY_CONFERENCEORBOOTHATTENDEE_TO';
204 $trackid =
'conferenceorboothattendee'.$object->id;
205 include DOL_DOCUMENT_ROOT.
'/core/actions_sendmails.inc.php';
215$form =
new Form($db);
219$title = $langs->trans(
"ConferenceOrBoothAttendee");
220$help_url =
'EN:Module_Event_Organization';
222llxHeader(
'', $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-eventorganization page-attendee-card');
224$result = $projectstatic->fetch(empty($confOrBooth->fk_project) ? $fk_project : $confOrBooth->fk_project);
225if (
getDolGlobalString(
'PROJECT_ALLOW_COMMENT_ON_PROJECT') && method_exists($projectstatic,
'fetchComments') && empty($projectstatic->comments)) {
226 $projectstatic->fetchComments();
228if (!empty($projectstatic->socid)) {
229 $projectstatic->fetch_thirdparty();
233$object->project = clone $projectstatic;
235if (!empty($withproject)) {
237 $tab =
'eventorganisation';
239 print
dol_get_fiche_head($head, $tab, $langs->trans(
"Project"), -1, ($projectstatic->public ?
'projectpub' :
'project'), 0,
'',
'');
241 $param = ($mode ==
'mine' ?
'&mode=mine' :
'');
245 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
247 $morehtmlref =
'<div class="refidno">';
249 $morehtmlref .= $projectstatic->title;
251 if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
252 $morehtmlref .=
'<br>'.$projectstatic->thirdparty->getNomUrl(1,
'project');
254 $morehtmlref .=
'</div>';
257 if (!$user->hasRight(
'projet',
'all',
'lire')) {
258 $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
259 $projectstatic->next_prev_filter =
"rowid:IN:".$db->sanitize(count($objectsListId) ? implode(
',', array_keys($objectsListId)) :
'0');
262 dol_banner_tab($projectstatic,
'project_ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
264 print
'<div class="fichecenter">';
265 print
'<div class="fichehalfleft">';
266 print
'<div class="underbanner clearboth"></div>';
268 print
'<table class="border tableforfield centpercent">';
272 print
'<tr><td class="tdtop">';
273 print $langs->trans(
"Usage");
277 print
'<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET(
'usage_opportunity') ? (
GETPOST(
'usage_opportunity',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_opportunity ?
' checked="checked"' :
'')).
'"> ';
278 $htmltext = $langs->trans(
"ProjectFollowOpportunity");
279 print $form->textwithpicto($langs->trans(
"ProjectFollowOpportunity"), $htmltext);
283 print
'<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET(
'usage_task') ? (
GETPOST(
'usage_task',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_task ?
' checked="checked"' :
'')).
'"> ';
284 $htmltext = $langs->trans(
"ProjectFollowTasks");
285 print $form->textwithpicto($langs->trans(
"ProjectFollowTasks"), $htmltext);
289 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"' :
'')).
'"> ';
290 $htmltext = $langs->trans(
"ProjectBillTimeDescription");
291 print $form->textwithpicto($langs->trans(
"BillTime"), $htmltext);
294 if (isModEnabled(
'eventorganization')) {
295 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"' :
'')).
'"> ';
296 $htmltext = $langs->trans(
"EventOrganizationDescriptionLong");
297 print $form->textwithpicto($langs->trans(
"ManageOrganizeEvent"), $htmltext);
303 print
'<tr><td class="titlefield">'.$langs->trans(
"Visibility").
'</td><td>';
304 if ($projectstatic->public) {
305 print $langs->trans(
'SharedProject');
307 print $langs->trans(
'PrivateProject');
312 print
'<tr><td>'.$langs->trans(
"DateStart").
' - '.$langs->trans(
"DateEnd").
'</td><td>';
314 print($start ? $start :
'?');
317 print($end ? $end :
'?');
318 if ($projectstatic->hasDelay()) {
324 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
325 if (strcmp($projectstatic->budget_amount,
'')) {
326 print
price($projectstatic->budget_amount, 0, $langs, 1, 0, 0,
$conf->currency);
338 print
'<div class="fichehalfright">';
339 print
'<div class="underbanner clearboth"></div>';
341 print
'<table class="border tableforfield centpercent">';
344 print
'<td class="titlefield tdtop">'.$langs->trans(
"Description").
'</td><td>';
345 print nl2br($projectstatic->description);
349 if (isModEnabled(
'category')) {
350 print
'<tr><td class="valignmiddle">'.$langs->trans(
"Categories").
'</td><td>';
351 print $form->showCategories($projectstatic->id,
'project', 1);
355 print
'<tr><td class="nowrap">';
356 $typeofdata =
'checkbox:'.($projectstatic->accept_conference_suggestions ?
' checked="checked"' :
'');
357 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestConfHelp");
358 print $form->editfieldkey(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'', $projectstatic, 0, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
360 print $form->editfieldval(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'1', $projectstatic, 0, $typeofdata,
'',
null, 0,
'', 0,
'',
'projectid');
364 $typeofdata =
'checkbox:'.($projectstatic->accept_booth_suggestions ?
' checked="checked"' :
'');
365 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestBoothHelp");
366 print $form->editfieldkey(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'', $projectstatic, 0, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
368 print $form->editfieldval(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'1', $projectstatic, 0, $typeofdata,
'',
null, 0,
'', 0,
'',
'projectid');
372 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth',
'', $projectstatic, 0,
'amount',
'', 0, 0,
'projectid');
374 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth', $projectstatic->price_booth, $projectstatic, 0,
'amount',
'',
null, 0,
'', 0,
'',
'projectid');
378 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration',
'', $projectstatic, 0,
'amount',
'', 0, 0,
'projectid');
380 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration', $projectstatic->price_registration, $projectstatic, 0,
'amount',
'',
null, 0,
'', 0,
'',
'projectid');
383 print
'<tr><td valign="middle">'.$langs->trans(
"EventOrganizationICSLink").
'</td><td>';
385 $urlwithouturlroot = preg_replace(
'/'.preg_quote(DOL_URL_ROOT,
'/').
'$/i',
'', trim($dolibarr_main_url_root));
386 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
389 $message =
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/agenda/agendaexport.php?format=ical'.(
$conf->entity > 1 ?
"&entity=".$conf->entity :
"");
390 $message .=
'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(
getDolGlobalString(
'MAIN_AGENDA_XCAL_EXPORTKEY')) :
'...');
391 $message .=
"&project=".$projectstatic->id.
'&module='.urlencode(
'@eventorganization').
'&status='.ConferenceOrBooth::STATUS_CONFIRMED.
'">'.$langs->trans(
'DownloadICSLink').img_picto(
'',
'download',
'class="paddingleft"').
'</a>';
398 print $form->textwithpicto($langs->trans(
"SuggestOrVoteForConfOrBooth"), $langs->trans(
"EvntOrgRegistrationHelpMessage"));
401 $linksuggest = $dolibarr_main_url_root.
'/public/project/index.php?id='.$projectstatic->id;
402 $encodedsecurekey =
dol_hash(
getDolGlobalString(
"EVENTORGANIZATION_SECUREKEY").
'conferenceorbooth'.$projectstatic->id,
'md5');
403 $linksuggest .=
'&securekey='.urlencode($encodedsecurekey);
406 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$linksuggest.
'" class="quatrevingtpercent">'.$linksuggest.
'</a></div>';
407 print
'<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer" href="'.$linksuggest.
'">'.
img_picto(
'',
'globe').
'</a>';
415 print $langs->trans(
"PublicAttendeeSubscriptionGlobalPage");
418 $link_subscription = $dolibarr_main_url_root.
'/public/eventorganization/attendee_new.php?id='.$projectstatic->id.
'&type=global';
419 $encodedsecurekey =
dol_hash(
getDolGlobalString(
"EVENTORGANIZATION_SECUREKEY").
'conferenceorbooth'.$projectstatic->id,
'md5');
420 $link_subscription .=
'&securekey='.urlencode($encodedsecurekey);
423 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$link_subscription.
'" class="quatrevingtpercent">'.$link_subscription.
'</a></div>';
424 print
'<a target="_blank" rel="noopener noreferrer" href="'.$link_subscription.
'">'.
img_picto(
'',
'globe').
'</a>';
434 print
'<div class="clearboth"></div>';
442if ($action ==
'create') {
443 print
load_fiche_titre($langs->trans(
"NewObject", $langs->transnoentitiesnoconv(
"ConferenceOrBoothAttendee")),
'',
'object_'.$object->picto);
446 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].(empty($withproject) ?
'' :
'?withproject=1').
'">';
447 print
'<input type="hidden" name="token" value="'.newToken().
'">';
448 print
'<input type="hidden" name="action" value="add">';
450 if ($confOrBooth->id > 0) {
451 print
'<input type="hidden" name="conforboothid" value="'.$confOrBooth->id.
'">';
453 if ($projectstatic->id > 0) {
454 print
'<input type="hidden" name="fk_project" value="'.$projectstatic->id.
'">';
455 print
'<input type="hidden" name="projectid" value="'.$projectstatic->id.
'">';
459 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
461 if ($backtopageforcancel) {
462 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
467 print
'<table class="border centpercent tableforfieldcreate">'.
"\n";
470 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_add.tpl.php';
473 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_add.tpl.php';
475 print
'</table>'.
"\n";
479 print $form->buttonsSaveCancel(
"Create");
487if (($id || $ref) && $action ==
'edit') {
488 print
load_fiche_titre($langs->trans(
"ConferenceOrBoothAttendee"),
'',
'object_'.$object->picto);
490 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
491 print
'<input type="hidden" name="token" value="'.newToken().
'">';
492 print
'<input type="hidden" name="action" value="update">';
493 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
494 if ($confOrBooth->id > 0) {
495 print
'<input type="hidden" name="conforboothid" value="'.$confOrBooth->id.
'">';
497 if (
$object->fk_actioncomm > 0) {
498 print
'<input type="hidden" name="fk_actioncomm" value="'.$object->fk_actioncomm.
'">';
501 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
503 if ($backtopageforcancel) {
504 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
506 if ($projectstatic->id > 0) {
507 print
'<input type="hidden" name="fk_project" value="'.$projectstatic->id.
'">';
512 print
'<table class="border centpercent tableforfieldedit">'.
"\n";
515 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_edit.tpl.php';
518 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_edit.tpl.php';
524 print $form->buttonsSaveCancel();
530if (
$object->id > 0 && (empty($action) || ($action !=
'edit' && $action !=
'create'))) {
535 $moreparam .=
'&withproject=1';
538 $moreparam .=
'&fk_project='.((int) $fk_project);
547 if ($action ==
'delete') {
548 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'DeleteConferenceOrBoothAttendee'), $langs->trans(
'ConfirmDeleteObject'),
'confirm_delete',
'', 0, 1);
551 if ($action ==
'deleteline') {
552 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&lineid='.$lineid, $langs->trans(
'DeleteLine'), $langs->trans(
'ConfirmDeleteLine'),
'confirm_deleteline',
'', 0, 1);
555 if ($action ==
'clone') {
557 $formquestion = array();
558 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneAsk',
$object->ref),
'confirm_clone', $formquestion,
'yes', 1);
562 if ($action ==
'xxx') {
563 $formquestion = array();
564 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'XXX'), $text,
'confirm_xxx', $formquestion, 0, 1, 220);
568 $parameters = array(
'formConfirm' => $formconfirm,
'lineid' => $lineid);
569 $reshook = $hookmanager->executeHooks(
'formConfirm', $parameters, $object, $action);
570 if (empty($reshook)) {
571 $formconfirm .= $hookmanager->resPrint;
572 } elseif ($reshook > 0) {
573 $formconfirm = $hookmanager->resPrint;
581 $linkback =
'<a href="'.dol_buildpath(
'/eventorganization/conferenceorboothattendee_list.php', 1).
'?restore_lastsearch_values=1'.(!empty($confOrBooth->id) && $confOrBooth->id > 0 ?
'&conforboothid='.((int) $confOrBooth->id) :
'').$moreparam.
'">'.$langs->trans(
"BackToList").
'</a>';
583 $morehtmlref =
'<div class="refidno">';
585 $morehtmlref .=
'</div>';
587 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref, $moreparam);
589 print
'<div class="fichecenter">';
590 print
'<div class="fichehalfleft">';
591 print
'<div class="underbanner clearboth"></div>';
592 print
'<table class="border centpercent tableforfield">'.
"\n";
594 $keyforbreak =
'note_public';
597 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_view.tpl.php';
600 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
606 print
'<div class="clearboth"></div>';
612 if ($action !=
'presend' && $action !=
'editline') {
613 print
'<div class="tabsAction">'.
"\n";
614 $parameters = array();
615 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
620 if (empty($reshook)) {
622 if (empty($user->socid)) {
623 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');
625 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);
628 print
dolGetButtonAction(
'', $langs->trans(
'ToClone'),
'default', $_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=clone&token='.
newToken().(!empty($projectstatic->id) ?
'&fk_project='.$projectstatic->id :
''),
'', $permissiontoadd);
631 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));
638 if (
GETPOST(
'modelselected')) {
642 if ($action !=
'presend') {
643 print
'<div class="fichecenter"><div class="fichehalfleft">';
644 print
'<a name="builddoc"></a>';
646 $includedocgeneration = 0;
649 if ($includedocgeneration) {
651 $relativepath = $objref.
'/'.$objref.
'.pdf';
652 $filedir =
$conf->eventorganization->dir_output.
'/'.
$object->element.
'/'.$objref;
653 $urlsource = $_SERVER[
"PHP_SELF"].
"?id=".
$object->id;
654 $genallowed = $user->hasRight(
'eventorganization',
'conferenceorboothattendee',
'read');
655 $delallowed = $user->hasRight(
'eventorganization',
'conferenceorboothattendee',
'write');
656 print $formfile->showdocuments(
'eventorganization:ConferenceOrBoothAttendee',
$object->element.
'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed,
$object->model_pdf, 1, 0, 0, 28, 0,
'',
'',
'', $langs->defaultlang);
660 $tmparray = $form->showLinkToObjectBlock($object, array(), array(
'conferenceorboothattendee'), 1);
661 $linktoelem = $tmparray[
'linktoelem'];
662 $htmltoenteralink = $tmparray[
'htmltoenteralink'];
663 print $htmltoenteralink;
665 $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
668 print
'</div><div class="fichehalfright">';
670 print
'</div></div>';
674 if (
GETPOST(
'modelselected')) {
679 $modelmail =
'conferenceorboothattendee';
680 $defaulttopic =
'InformationMessage';
681 $diroutput =
$conf->eventorganization->dir_output;
682 $trackid =
'conferenceorboothattendee'.$object->id;
684 include DOL_DOCUMENT_ROOT.
'/core/tpl/card_presend.tpl.php';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
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_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
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)
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
Function to format a value into an amount for visual output Function used into PDF and HTML pages.
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_sanitizeFileName($str, $newstr='_', $unaccent=1)
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)
Returns a hash (non reversible encryption) of a string.