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';
50$langs->loadLangs(array(
"eventorganization",
"other",
"projects",
"companies"));
55$action =
GETPOST(
'action',
'aZ09');
56$confirm =
GETPOST(
'confirm',
'alpha');
57$cancel =
GETPOST(
'cancel',
'aZ09');
58$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'conferenceorboothattendeecard';
59$backtopage =
GETPOST(
'backtopage',
'alpha');
60$backtopageforcancel =
GETPOST(
'backtopageforcancel',
'alpha');
62$mode =
GETPOST(
'mode',
'alpha');
64$conf_or_booth_id =
GETPOSTINT(
'conforboothid');
71$projectstatic =
new Project($db);
72$diroutputmassaction =
$conf->eventorganization->dir_output.
'/temp/massgeneration/'.$user->id;
73$hookmanager->initHooks(array(
'conferenceorboothattendeecard',
'globalcard'));
76if ($conf_or_booth_id > 0) {
78 $result = $confOrBooth->fetch($id > 0 ? $id : $conf_or_booth_id);
82 $object->fk_actioncomm = $confOrBooth->id;
83 $object->fk_project = $confOrBooth->fk_project;
84 $fk_project =
$object->fk_project;
89$extrafields->fetch_name_optionals_label(
$object->table_element);
91$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element,
'',
'search_');
94$search_all =
GETPOST(
'search_all',
'alphanohtml');
96foreach (
$object->fields as $key => $val) {
97 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') {
98 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
100 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
107$fieldstosearchall = array();
108foreach (
$object->fields as $key => $val) {
109 if (!empty($val[
'searchall'])) {
110 $fieldstosearchall[
't.'.$key] = $val[
'label'];
114if (empty($action) && empty($id) && empty($ref)) {
119include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
123 $fk_project =
$object->fk_project;
127$permissiontoread = $user->hasRight(
'eventorganization',
'read');
128$permissiontoadd = $user->hasRight(
'eventorganization',
'write');
129$permissiontodelete = $user->hasRight(
'eventorganization',
'delete') || ($permissiontoadd && isset(
$object->status) &&
$object->status == $object::STATUS_DRAFT);
130$permissionnote = $user->hasRight(
'eventorganization',
'write');
131$permissiondellink = $user->hasRight(
'eventorganization',
'write');
132$upload_dir =
$conf->eventorganization->multidir_output[isset(
$object->entity) ?
$object->entity : 1];
139$parameters = array();
140$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
145if (empty($reshook)) {
148 if (!empty($withproject)) {
149 $backurlforlist = DOL_URL_ROOT.
'/eventorganization/conferenceorboothattendee_list.php?withproject=1&fk_project='.((int) $fk_project);
151 $backurlforlist = DOL_URL_ROOT.
'/eventorganization/conferenceorboothattendee_list.php';
154 if (empty($backtopage) || ($cancel && empty($id))) {
155 if (empty($backtopage) || ($cancel && strpos($backtopage,
'__ID__'))) {
156 if (empty($id) && (($action !=
'add' && $action !=
'create') || $cancel)) {
157 $backtopage = $backurlforlist;
159 $backtopage = DOL_URL_ROOT.
'/eventorganization/conferenceorboothattendee_card.php?fk_project='.((int) $fk_project).
'&id='.(
$id > 0 ?
$id :
'__ID__');
165 if (!empty($backtopageforcancel)) {
166 header(
"Location: ".$backtopageforcancel);
168 } elseif (!empty($backtopage)) {
169 header(
"Location: ".$backtopage);
175 $triggermodname =
'EVENTORGANIZATION_CONFERENCEORBOOTHATTENDEE_MODIFY';
178 include DOL_DOCUMENT_ROOT.
'/core/actions_addupdatedelete.inc.php';
181 include DOL_DOCUMENT_ROOT.
'/core/actions_dellink.inc.php';
184 include DOL_DOCUMENT_ROOT.
'/core/actions_printing.inc.php';
190 include DOL_DOCUMENT_ROOT.
'/core/actions_builddoc.inc.php';
192 if ($action ==
'set_thirdparty' && $permissiontoadd) {
193 $object->setValueFrom(
'fk_soc',
GETPOSTINT(
'fk_soc'),
'',
null,
'date',
'', $user, $triggermodname);
195 if ($action ==
'classin' && $permissiontoadd) {
200 $triggersendname =
'EVENTORGANIZATION_CONFERENCEORBOOTHATTENDEE_SENTBYMAIL';
201 $autocopy =
'MAIN_MAIL_AUTOCOPY_CONFERENCEORBOOTHATTENDEE_TO';
202 $trackid =
'conferenceorboothattendee'.$object->id;
203 include DOL_DOCUMENT_ROOT.
'/core/actions_sendmails.inc.php';
213$form =
new Form($db);
217$title = $langs->trans(
"ConferenceOrBoothAttendee");
218$help_url =
'EN:Module_Event_Organization';
220llxHeader(
'', $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-eventorganization page-attendee-card');
222$result = $projectstatic->fetch(empty($confOrBooth->fk_project) ? $fk_project : $confOrBooth->fk_project);
223if (
getDolGlobalString(
'PROJECT_ALLOW_COMMENT_ON_PROJECT') && method_exists($projectstatic,
'fetchComments') && empty($projectstatic->comments)) {
224 $projectstatic->fetchComments();
226if (!empty($projectstatic->socid)) {
227 $projectstatic->fetch_thirdparty();
231$object->project = clone $projectstatic;
233if (!empty($withproject)) {
235 $tab =
'eventorganisation';
237 print
dol_get_fiche_head($head, $tab, $langs->trans(
"Project"), -1, ($projectstatic->public ?
'projectpub' :
'project'), 0,
'',
'');
239 $param = ($mode ==
'mine' ?
'&mode=mine' :
'');
243 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
245 $morehtmlref =
'<div class="refidno">';
247 $morehtmlref .= $projectstatic->title;
249 if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
250 $morehtmlref .=
'<br>'.$projectstatic->thirdparty->getNomUrl(1,
'project');
252 $morehtmlref .=
'</div>';
255 if (!$user->hasRight(
'projet',
'all',
'lire')) {
256 $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
257 $projectstatic->next_prev_filter =
"rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(
',', array_keys($objectsListId)) :
'0').
")";
260 dol_banner_tab($projectstatic,
'project_ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
262 print
'<div class="fichecenter">';
263 print
'<div class="fichehalfleft">';
264 print
'<div class="underbanner clearboth"></div>';
266 print
'<table class="border tableforfield centpercent">';
270 print
'<tr><td class="tdtop">';
271 print $langs->trans(
"Usage");
275 print
'<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET(
'usage_opportunity') ? (
GETPOST(
'usage_opportunity',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_opportunity ?
' checked="checked"' :
'')).
'"> ';
276 $htmltext = $langs->trans(
"ProjectFollowOpportunity");
277 print $form->textwithpicto($langs->trans(
"ProjectFollowOpportunity"), $htmltext);
281 print
'<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET(
'usage_task') ? (
GETPOST(
'usage_task',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_task ?
' checked="checked"' :
'')).
'"> ';
282 $htmltext = $langs->trans(
"ProjectFollowTasks");
283 print $form->textwithpicto($langs->trans(
"ProjectFollowTasks"), $htmltext);
287 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"' :
'')).
'"> ';
288 $htmltext = $langs->trans(
"ProjectBillTimeDescription");
289 print $form->textwithpicto($langs->trans(
"BillTime"), $htmltext);
292 if (isModEnabled(
'eventorganization')) {
293 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"' :
'')).
'"> ';
294 $htmltext = $langs->trans(
"EventOrganizationDescriptionLong");
295 print $form->textwithpicto($langs->trans(
"ManageOrganizeEvent"), $htmltext);
301 print
'<tr><td class="titlefield">'.$langs->trans(
"Visibility").
'</td><td>';
302 if ($projectstatic->public) {
303 print $langs->trans(
'SharedProject');
305 print $langs->trans(
'PrivateProject');
310 print
'<tr><td>'.$langs->trans(
"DateStart").
' - '.$langs->trans(
"DateEnd").
'</td><td>';
312 print($start ? $start :
'?');
315 print($end ? $end :
'?');
316 if ($projectstatic->hasDelay()) {
322 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
323 if (strcmp($projectstatic->budget_amount,
'')) {
324 print
price($projectstatic->budget_amount, 0, $langs, 1, 0, 0,
$conf->currency);
336 print
'<div class="fichehalfright">';
337 print
'<div class="underbanner clearboth"></div>';
339 print
'<table class="border tableforfield centpercent">';
342 print
'<td class="titlefield tdtop">'.$langs->trans(
"Description").
'</td><td>';
343 print nl2br($projectstatic->description);
347 if (isModEnabled(
'category')) {
348 print
'<tr><td class="valignmiddle">'.$langs->trans(
"Categories").
'</td><td>';
349 print $form->showCategories($projectstatic->id,
'project', 1);
353 print
'<tr><td class="nowrap">';
354 $typeofdata =
'checkbox:'.($projectstatic->accept_conference_suggestions ?
' checked="checked"' :
'');
355 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestConfHelp");
356 print $form->editfieldkey(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'', $projectstatic, 0, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
358 print $form->editfieldval(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'1', $projectstatic, 0, $typeofdata,
'',
null, 0,
'', 0,
'',
'projectid');
362 $typeofdata =
'checkbox:'.($projectstatic->accept_booth_suggestions ?
' checked="checked"' :
'');
363 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestBoothHelp");
364 print $form->editfieldkey(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'', $projectstatic, 0, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
366 print $form->editfieldval(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'1', $projectstatic, 0, $typeofdata,
'',
null, 0,
'', 0,
'',
'projectid');
370 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth',
'', $projectstatic, 0,
'amount',
'', 0, 0,
'projectid');
372 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth', $projectstatic->price_booth, $projectstatic, 0,
'amount',
'',
null, 0,
'', 0,
'',
'projectid');
376 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration',
'', $projectstatic, 0,
'amount',
'', 0, 0,
'projectid');
378 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration', $projectstatic->price_registration, $projectstatic, 0,
'amount',
'',
null, 0,
'', 0,
'',
'projectid');
381 print
'<tr><td valign="middle">'.$langs->trans(
"EventOrganizationICSLink").
'</td><td>';
383 $urlwithouturlroot = preg_replace(
'/'.preg_quote(DOL_URL_ROOT,
'/').
'$/i',
'', trim($dolibarr_main_url_root));
384 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
387 $message =
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/agenda/agendaexport.php?format=ical'.(
$conf->entity > 1 ?
"&entity=".$conf->entity :
"");
388 $message .=
'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(
getDolGlobalString(
'MAIN_AGENDA_XCAL_EXPORTKEY')) :
'...');
389 $message .=
"&project=".$projectstatic->id.
'&module='.urlencode(
'@eventorganization').
'&status='.ConferenceOrBooth::STATUS_CONFIRMED.
'">'.$langs->trans(
'DownloadICSLink').img_picto(
'',
'download',
'class="paddingleft"').
'</a>';
396 print $form->textwithpicto($langs->trans(
"SuggestOrVoteForConfOrBooth"), $langs->trans(
"EvntOrgRegistrationHelpMessage"));
399 $linksuggest = $dolibarr_main_url_root.
'/public/project/index.php?id='.$projectstatic->id;
400 $encodedsecurekey =
dol_hash(
getDolGlobalString(
"EVENTORGANIZATION_SECUREKEY").
'conferenceorbooth'.$projectstatic->id,
'md5');
401 $linksuggest .=
'&securekey='.urlencode($encodedsecurekey);
404 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$linksuggest.
'" class="quatrevingtpercent">'.$linksuggest.
'</a></div>';
405 print
'<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer" href="'.$linksuggest.
'">'.
img_picto(
'',
'globe').
'</a>';
413 print $langs->trans(
"PublicAttendeeSubscriptionGlobalPage");
416 $link_subscription = $dolibarr_main_url_root.
'/public/eventorganization/attendee_new.php?id='.$projectstatic->id.
'&type=global';
417 $encodedsecurekey =
dol_hash(
getDolGlobalString(
"EVENTORGANIZATION_SECUREKEY").
'conferenceorbooth'.$projectstatic->id,
'md5');
418 $link_subscription .=
'&securekey='.urlencode($encodedsecurekey);
421 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$link_subscription.
'" class="quatrevingtpercent">'.$link_subscription.
'</a></div>';
422 print
'<a target="_blank" rel="noopener noreferrer" href="'.$link_subscription.
'">'.
img_picto(
'',
'globe').
'</a>';
432 print
'<div class="clearboth"></div>';
440if ($action ==
'create') {
441 print
load_fiche_titre($langs->trans(
"NewObject", $langs->transnoentitiesnoconv(
"ConferenceOrBoothAttendee")),
'',
'object_'.$object->picto);
444 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].(empty($withproject) ?
'' :
'?withproject=1').
'">';
445 print
'<input type="hidden" name="token" value="'.newToken().
'">';
446 print
'<input type="hidden" name="action" value="add">';
448 if ($confOrBooth->id > 0) {
449 print
'<input type="hidden" name="conforboothid" value="'.$confOrBooth->id.
'">';
451 if ($projectstatic->id > 0) {
452 print
'<input type="hidden" name="fk_project" value="'.$projectstatic->id.
'">';
453 print
'<input type="hidden" name="projectid" value="'.$projectstatic->id.
'">';
457 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
459 if ($backtopageforcancel) {
460 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
465 print
'<table class="border centpercent tableforfieldcreate">'.
"\n";
468 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_add.tpl.php';
471 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_add.tpl.php';
473 print
'</table>'.
"\n";
477 print $form->buttonsSaveCancel(
"Create");
485if (($id || $ref) && $action ==
'edit') {
486 print
load_fiche_titre($langs->trans(
"ConferenceOrBoothAttendee"),
'',
'object_'.$object->picto);
488 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
489 print
'<input type="hidden" name="token" value="'.newToken().
'">';
490 print
'<input type="hidden" name="action" value="update">';
491 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
492 if ($confOrBooth->id > 0) {
493 print
'<input type="hidden" name="conforboothid" value="'.$confOrBooth->id.
'">';
495 if (
$object->fk_actioncomm > 0) {
496 print
'<input type="hidden" name="fk_actioncomm" value="'.$object->fk_actioncomm.
'">';
499 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
501 if ($backtopageforcancel) {
502 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
504 if ($projectstatic->id > 0) {
505 print
'<input type="hidden" name="fk_project" value="'.$projectstatic->id.
'">';
510 print
'<table class="border centpercent tableforfieldedit">'.
"\n";
513 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_edit.tpl.php';
516 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_edit.tpl.php';
522 print $form->buttonsSaveCancel();
528if (
$object->id > 0 && (empty($action) || ($action !=
'edit' && $action !=
'create'))) {
533 $moreparam .=
'&withproject=1';
536 $moreparam .=
'&fk_project='.((int) $fk_project);
545 if ($action ==
'delete') {
546 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'DeleteConferenceOrBoothAttendee'), $langs->trans(
'ConfirmDeleteObject'),
'confirm_delete',
'', 0, 1);
549 if ($action ==
'deleteline') {
550 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&lineid='.$lineid, $langs->trans(
'DeleteLine'), $langs->trans(
'ConfirmDeleteLine'),
'confirm_deleteline',
'', 0, 1);
553 if ($action ==
'clone') {
555 $formquestion = array();
556 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneAsk',
$object->ref),
'confirm_clone', $formquestion,
'yes', 1);
560 if ($action ==
'xxx') {
561 $formquestion = array();
562 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'XXX'), $text,
'confirm_xxx', $formquestion, 0, 1, 220);
566 $parameters = array(
'formConfirm' => $formconfirm,
'lineid' => $lineid);
567 $reshook = $hookmanager->executeHooks(
'formConfirm', $parameters, $object, $action);
568 if (empty($reshook)) {
569 $formconfirm .= $hookmanager->resPrint;
570 } elseif ($reshook > 0) {
571 $formconfirm = $hookmanager->resPrint;
579 $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>';
581 $morehtmlref =
'<div class="refidno">';
583 $morehtmlref .=
'</div>';
585 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref, $moreparam);
587 print
'<div class="fichecenter">';
588 print
'<div class="fichehalfleft">';
589 print
'<div class="underbanner clearboth"></div>';
590 print
'<table class="border centpercent tableforfield">'.
"\n";
592 $keyforbreak =
'note_public';
595 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_view.tpl.php';
598 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
604 print
'<div class="clearboth"></div>';
610 if ($action !=
'presend' && $action !=
'editline') {
611 print
'<div class="tabsAction">'.
"\n";
612 $parameters = array();
613 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
618 if (empty($reshook)) {
620 if (empty($user->socid)) {
621 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');
623 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);
626 print
dolGetButtonAction(
'', $langs->trans(
'ToClone'),
'default', $_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=clone&token='.
newToken().(!empty($projectstatic->id) ?
'&fk_project='.$projectstatic->id :
''),
'', $permissiontoadd);
629 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));
636 if (
GETPOST(
'modelselected')) {
640 if ($action !=
'presend') {
641 print
'<div class="fichecenter"><div class="fichehalfleft">';
642 print
'<a name="builddoc"></a>';
644 $includedocgeneration = 0;
647 if ($includedocgeneration) {
649 $relativepath = $objref.
'/'.$objref.
'.pdf';
650 $filedir =
$conf->eventorganization->dir_output.
'/'.
$object->element.
'/'.$objref;
651 $urlsource = $_SERVER[
"PHP_SELF"].
"?id=".
$object->id;
652 $genallowed = $user->hasRight(
'eventorganization',
'conferenceorboothattendee',
'read');
653 $delallowed = $user->hasRight(
'eventorganization',
'conferenceorboothattendee',
'write');
654 print $formfile->showdocuments(
'eventorganization:ConferenceOrBoothAttendee',
$object->element.
'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed,
$object->model_pdf, 1, 0, 0, 28, 0,
'',
'',
'', $langs->defaultlang);
658 $tmparray = $form->showLinkToObjectBlock($object, array(), array(
'conferenceorboothattendee'), 1);
659 $linktoelem = $tmparray[
'linktoelem'];
660 $htmltoenteralink = $tmparray[
'htmltoenteralink'];
661 print $htmltoenteralink;
663 $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
666 print
'</div><div class="fichehalfright">';
668 print
'</div></div>';
672 if (
GETPOST(
'modelselected')) {
677 $modelmail =
'conferenceorboothattendee';
678 $defaulttopic =
'InformationMessage';
679 $diroutput =
$conf->eventorganization->dir_output;
680 $trackid =
'conferenceorboothattendee'.$object->id;
682 include DOL_DOCUMENT_ROOT.
'/core/tpl/card_presend.tpl.php';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
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.