28require
'../main.inc.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
35require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorbooth.class.php';
36require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorboothattendee.class.php';
37require_once DOL_DOCUMENT_ROOT.
'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
38require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
41$langs->loadLangs(array(
"eventorganization",
"other",
"projects",
"companies"));
46$action =
GETPOST(
'action',
'aZ09');
47$confirm =
GETPOST(
'confirm',
'alpha');
48$cancel =
GETPOST(
'cancel',
'aZ09');
49$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'conferenceorboothattendeecard';
50$backtopage =
GETPOST(
'backtopage',
'alpha');
51$backtopageforcancel =
GETPOST(
'backtopageforcancel',
'alpha');
53$mode =
GETPOST(
'mode',
'alpha');
55$conf_or_booth_id =
GETPOSTINT(
'conforboothid');
62$projectstatic =
new Project($db);
63$diroutputmassaction = $conf->eventorganization->dir_output.
'/temp/massgeneration/'.$user->id;
64$hookmanager->initHooks(array(
'conferenceorboothattendeecard',
'globalcard'));
67if ($conf_or_booth_id > 0) {
69 $result = $confOrBooth->fetch($id > 0 ? $id : $conf_or_booth_id);
73 $object->fk_actioncomm = $confOrBooth->id;
74 $object->fk_project = $confOrBooth->fk_project;
75 $fk_project =
$object->fk_project;
80$extrafields->fetch_name_optionals_label(
$object->table_element);
82$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element,
'',
'search_');
85$search_all =
GETPOST(
'search_all',
'alphanohtml');
87foreach (
$object->fields as $key => $val) {
88 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') {
89 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
91 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
98$fieldstosearchall = array();
99foreach (
$object->fields as $key => $val) {
100 if (!empty($val[
'searchall'])) {
101 $fieldstosearchall[
't.'.$key] = $val[
'label'];
105if (empty($action) && empty($id) && empty($ref)) {
110include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
114 $fk_project =
$object->fk_project;
118$permissiontoread = $user->hasRight(
'eventorganization',
'read');
119$permissiontoadd = $user->hasRight(
'eventorganization',
'write');
120$permissiontodelete = $user->hasRight(
'eventorganization',
'delete') || ($permissiontoadd && isset(
$object->status) &&
$object->status == $object::STATUS_DRAFT);
121$permissionnote = $user->hasRight(
'eventorganization',
'write');
122$permissiondellink = $user->hasRight(
'eventorganization',
'write');
123$upload_dir = $conf->eventorganization->multidir_output[isset(
$object->entity) ?
$object->entity : 1];
130$parameters = array();
131$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
136if (empty($reshook)) {
139 if (!empty($withproject)) {
140 $backurlforlist = DOL_URL_ROOT.
'/eventorganization/conferenceorboothattendee_list.php?withproject=1&fk_project='.((int) $fk_project);
142 $backurlforlist = DOL_URL_ROOT.
'/eventorganization/conferenceorboothattendee_list.php';
145 if (empty($backtopage) || ($cancel && empty($id))) {
146 if (empty($backtopage) || ($cancel && strpos($backtopage,
'__ID__'))) {
147 if (empty($id) && (($action !=
'add' && $action !=
'create') || $cancel)) {
148 $backtopage = $backurlforlist;
150 $backtopage = DOL_URL_ROOT.
'/eventorganization/conferenceorboothattendee_card.php?fk_project='.((int) $fk_project).
'&id='.(
$id > 0 ?
$id :
'__ID__');
156 if (!empty($backtopageforcancel)) {
157 header(
"Location: ".$backtopageforcancel);
159 } elseif (!empty($backtopage)) {
160 header(
"Location: ".$backtopage);
166 $triggermodname =
'EVENTORGANIZATION_CONFERENCEORBOOTHATTENDEE_MODIFY';
169 include DOL_DOCUMENT_ROOT.
'/core/actions_addupdatedelete.inc.php';
172 include DOL_DOCUMENT_ROOT.
'/core/actions_dellink.inc.php';
175 include DOL_DOCUMENT_ROOT.
'/core/actions_printing.inc.php';
181 include DOL_DOCUMENT_ROOT.
'/core/actions_builddoc.inc.php';
183 if ($action ==
'set_thirdparty' && $permissiontoadd) {
184 $object->setValueFrom(
'fk_soc',
GETPOSTINT(
'fk_soc'),
'',
null,
'date',
'', $user, $triggermodname);
186 if ($action ==
'classin' && $permissiontoadd) {
191 $triggersendname =
'EVENTORGANIZATION_CONFERENCEORBOOTHATTENDEE_SENTBYMAIL';
192 $autocopy =
'MAIN_MAIL_AUTOCOPY_CONFERENCEORBOOTHATTENDEE_TO';
193 $trackid =
'conferenceorboothattendee'.$object->id;
194 include DOL_DOCUMENT_ROOT.
'/core/actions_sendmails.inc.php';
204$form =
new Form($db);
208$title = $langs->trans(
"ConferenceOrBoothAttendee");
209$help_url =
'EN:Module_Event_Organization';
211llxHeader(
'', $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-eventorganization page-attendee-card');
213$result = $projectstatic->fetch(empty($confOrBooth->fk_project) ? $fk_project : $confOrBooth->fk_project);
214if (
getDolGlobalString(
'PROJECT_ALLOW_COMMENT_ON_PROJECT') && method_exists($projectstatic,
'fetchComments') && empty($projectstatic->comments)) {
215 $projectstatic->fetchComments();
217if (!empty($projectstatic->socid)) {
218 $projectstatic->fetch_thirdparty();
222$object->project = clone $projectstatic;
224if (!empty($withproject)) {
226 $tab =
'eventorganisation';
228 print
dol_get_fiche_head($head, $tab, $langs->trans(
"Project"), -1, ($projectstatic->public ?
'projectpub' :
'project'), 0,
'',
'');
230 $param = ($mode ==
'mine' ?
'&mode=mine' :
'');
234 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
236 $morehtmlref =
'<div class="refidno">';
238 $morehtmlref .= $projectstatic->title;
240 if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
241 $morehtmlref .=
'<br>'.$projectstatic->thirdparty->getNomUrl(1,
'project');
243 $morehtmlref .=
'</div>';
246 if (!$user->hasRight(
'projet',
'all',
'lire')) {
247 $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
248 $projectstatic->next_prev_filter =
"rowid IN (".$db->sanitize(count($objectsListId) ? implode(
',', array_keys($objectsListId)) :
'0').
")";
251 dol_banner_tab($projectstatic,
'project_ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
253 print
'<div class="fichecenter">';
254 print
'<div class="fichehalfleft">';
255 print
'<div class="underbanner clearboth"></div>';
257 print
'<table class="border tableforfield centpercent">';
261 print
'<tr><td class="tdtop">';
262 print $langs->trans(
"Usage");
266 print
'<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET(
'usage_opportunity') ? (
GETPOST(
'usage_opportunity',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_opportunity ?
' checked="checked"' :
'')).
'"> ';
267 $htmltext = $langs->trans(
"ProjectFollowOpportunity");
268 print $form->textwithpicto($langs->trans(
"ProjectFollowOpportunity"), $htmltext);
272 print
'<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET(
'usage_task') ? (
GETPOST(
'usage_task',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_task ?
' checked="checked"' :
'')).
'"> ';
273 $htmltext = $langs->trans(
"ProjectFollowTasks");
274 print $form->textwithpicto($langs->trans(
"ProjectFollowTasks"), $htmltext);
278 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"' :
'')).
'"> ';
279 $htmltext = $langs->trans(
"ProjectBillTimeDescription");
280 print $form->textwithpicto($langs->trans(
"BillTime"), $htmltext);
283 if (isModEnabled(
'eventorganization')) {
284 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"' :
'')).
'"> ';
285 $htmltext = $langs->trans(
"EventOrganizationDescriptionLong");
286 print $form->textwithpicto($langs->trans(
"ManageOrganizeEvent"), $htmltext);
292 print
'<tr><td class="titlefield">'.$langs->trans(
"Visibility").
'</td><td>';
293 if ($projectstatic->public) {
294 print $langs->trans(
'SharedProject');
296 print $langs->trans(
'PrivateProject');
301 print
'<tr><td>'.$langs->trans(
"DateStart").
' - '.$langs->trans(
"DateEnd").
'</td><td>';
303 print($start ? $start :
'?');
306 print($end ? $end :
'?');
307 if ($projectstatic->hasDelay()) {
313 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
314 if (strcmp($projectstatic->budget_amount,
'')) {
315 print
price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency);
327 print
'<div class="fichehalfright">';
328 print
'<div class="underbanner clearboth"></div>';
330 print
'<table class="border tableforfield centpercent">';
333 print
'<td class="titlefield tdtop">'.$langs->trans(
"Description").
'</td><td>';
334 print nl2br($projectstatic->description);
338 if (isModEnabled(
'category')) {
339 print
'<tr><td class="valignmiddle">'.$langs->trans(
"Categories").
'</td><td>';
340 print $form->showCategories($projectstatic->id,
'project', 1);
344 print
'<tr><td class="nowrap">';
345 $typeofdata =
'checkbox:'.($projectstatic->accept_conference_suggestions ?
' checked="checked"' :
'');
346 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestConfHelp");
347 print $form->editfieldkey(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'', $projectstatic, 0, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
349 print $form->editfieldval(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'1', $projectstatic, 0, $typeofdata,
'',
null, 0,
'', 0,
'',
'projectid');
353 $typeofdata =
'checkbox:'.($projectstatic->accept_booth_suggestions ?
' checked="checked"' :
'');
354 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestBoothHelp");
355 print $form->editfieldkey(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'', $projectstatic, 0, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
357 print $form->editfieldval(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'1', $projectstatic, 0, $typeofdata,
'',
null, 0,
'', 0,
'',
'projectid');
361 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth',
'', $projectstatic, 0,
'amount',
'', 0, 0,
'projectid');
363 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth', $projectstatic->price_booth, $projectstatic, 0,
'amount',
'',
null, 0,
'', 0,
'',
'projectid');
367 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration',
'', $projectstatic, 0,
'amount',
'', 0, 0,
'projectid');
369 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration', $projectstatic->price_registration, $projectstatic, 0,
'amount',
'',
null, 0,
'', 0,
'',
'projectid');
372 print
'<tr><td valign="middle">'.$langs->trans(
"EventOrganizationICSLink").
'</td><td>';
374 $urlwithouturlroot = preg_replace(
'/'.preg_quote(DOL_URL_ROOT,
'/').
'$/i',
'', trim($dolibarr_main_url_root));
375 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
378 $message =
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ?
"&entity=".$conf->entity :
"");
379 $message .=
'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(
getDolGlobalString(
'MAIN_AGENDA_XCAL_EXPORTKEY')) :
'...');
380 $message .=
"&project=".$projectstatic->id.
'&module='.urlencode(
'@eventorganization').
'&status='.ConferenceOrBooth::STATUS_CONFIRMED.
'">'.$langs->trans(
'DownloadICSLink').img_picto(
'',
'download',
'class="paddingleft"').
'</a>';
387 print $form->textwithpicto($langs->trans(
"SuggestOrVoteForConfOrBooth"), $langs->trans(
"EvntOrgRegistrationHelpMessage"));
390 $linksuggest = $dolibarr_main_url_root.
'/public/project/index.php?id='.$projectstatic->id;
391 $encodedsecurekey =
dol_hash(
getDolGlobalString(
"EVENTORGANIZATION_SECUREKEY").
'conferenceorbooth'.$projectstatic->id,
'md5');
392 $linksuggest .=
'&securekey='.urlencode($encodedsecurekey);
395 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$linksuggest.
'" class="quatrevingtpercent">'.$linksuggest.
'</a></div>';
396 print
'<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer" href="'.$linksuggest.
'">'.
img_picto(
'',
'globe').
'</a>';
404 print $langs->trans(
"PublicAttendeeSubscriptionGlobalPage");
407 $link_subscription = $dolibarr_main_url_root.
'/public/eventorganization/attendee_new.php?id='.$projectstatic->id.
'&type=global';
408 $encodedsecurekey =
dol_hash(
getDolGlobalString(
"EVENTORGANIZATION_SECUREKEY").
'conferenceorbooth'.$projectstatic->id,
'md5');
409 $link_subscription .=
'&securekey='.urlencode($encodedsecurekey);
412 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$link_subscription.
'" class="quatrevingtpercent">'.$link_subscription.
'</a></div>';
413 print
'<a target="_blank" rel="noopener noreferrer" href="'.$link_subscription.
'">'.
img_picto(
'',
'globe').
'</a>';
423 print
'<div class="clearboth"></div>';
431if ($action ==
'create') {
432 print
load_fiche_titre($langs->trans(
"NewObject", $langs->transnoentitiesnoconv(
"ConferenceOrBoothAttendee")),
'',
'object_'.$object->picto);
435 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].(empty($withproject) ?
'' :
'?withproject=1').
'">';
436 print
'<input type="hidden" name="token" value="'.newToken().
'">';
437 print
'<input type="hidden" name="action" value="add">';
439 if ($confOrBooth->id > 0) {
440 print
'<input type="hidden" name="conforboothid" value="'.$confOrBooth->id.
'">';
442 if ($projectstatic->id > 0) {
443 print
'<input type="hidden" name="fk_project" value="'.$projectstatic->id.
'">';
444 print
'<input type="hidden" name="projectid" value="'.$projectstatic->id.
'">';
448 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
450 if ($backtopageforcancel) {
451 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
456 print
'<table class="border centpercent tableforfieldcreate">'.
"\n";
459 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_add.tpl.php';
462 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_add.tpl.php';
464 print
'</table>'.
"\n";
468 print $form->buttonsSaveCancel(
"Create");
476if (($id || $ref) && $action ==
'edit') {
477 print
load_fiche_titre($langs->trans(
"ConferenceOrBoothAttendee"),
'',
'object_'.$object->picto);
479 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
480 print
'<input type="hidden" name="token" value="'.newToken().
'">';
481 print
'<input type="hidden" name="action" value="update">';
482 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
483 if ($confOrBooth->id > 0) {
484 print
'<input type="hidden" name="conforboothid" value="'.$confOrBooth->id.
'">';
486 if (
$object->fk_actioncomm > 0) {
487 print
'<input type="hidden" name="fk_actioncomm" value="'.$object->fk_actioncomm.
'">';
490 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
492 if ($backtopageforcancel) {
493 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
495 if ($projectstatic->id > 0) {
496 print
'<input type="hidden" name="fk_project" value="'.$projectstatic->id.
'">';
501 print
'<table class="border centpercent tableforfieldedit">'.
"\n";
504 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_edit.tpl.php';
507 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_edit.tpl.php';
513 print $form->buttonsSaveCancel();
519if (
$object->id > 0 && (empty($action) || ($action !=
'edit' && $action !=
'create'))) {
524 $moreparam .=
'&withproject=1';
527 $moreparam .=
'&fk_project='.((int) $fk_project);
536 if ($action ==
'delete') {
537 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'DeleteConferenceOrBoothAttendee'), $langs->trans(
'ConfirmDeleteObject'),
'confirm_delete',
'', 0, 1);
540 if ($action ==
'deleteline') {
541 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&lineid='.$lineid, $langs->trans(
'DeleteLine'), $langs->trans(
'ConfirmDeleteLine'),
'confirm_deleteline',
'', 0, 1);
544 if ($action ==
'clone') {
546 $formquestion = array();
547 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneAsk',
$object->ref),
'confirm_clone', $formquestion,
'yes', 1);
551 if ($action ==
'xxx') {
552 $formquestion = array();
553 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'XXX'), $text,
'confirm_xxx', $formquestion, 0, 1, 220);
557 $parameters = array(
'formConfirm' => $formconfirm,
'lineid' => $lineid);
558 $reshook = $hookmanager->executeHooks(
'formConfirm', $parameters, $object, $action);
559 if (empty($reshook)) {
560 $formconfirm .= $hookmanager->resPrint;
561 } elseif ($reshook > 0) {
562 $formconfirm = $hookmanager->resPrint;
570 $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>';
572 $morehtmlref =
'<div class="refidno">';
574 $morehtmlref .=
'</div>';
576 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref, $moreparam);
578 print
'<div class="fichecenter">';
579 print
'<div class="fichehalfleft">';
580 print
'<div class="underbanner clearboth"></div>';
581 print
'<table class="border centpercent tableforfield">'.
"\n";
583 $keyforbreak =
'note_public';
586 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_view.tpl.php';
589 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
595 print
'<div class="clearboth"></div>';
601 if ($action !=
'presend' && $action !=
'editline') {
602 print
'<div class="tabsAction">'.
"\n";
603 $parameters = array();
604 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
609 if (empty($reshook)) {
611 if (empty($user->socid)) {
612 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');
614 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);
617 print
dolGetButtonAction(
'', $langs->trans(
'ToClone'),
'default', $_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=clone&token='.
newToken().(!empty($projectstatic->id) ?
'&fk_project='.$projectstatic->id :
''),
'', $permissiontoadd);
620 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));
627 if (
GETPOST(
'modelselected')) {
631 if ($action !=
'presend') {
632 print
'<div class="fichecenter"><div class="fichehalfleft">';
633 print
'<a name="builddoc"></a>';
635 $includedocgeneration = 0;
638 if ($includedocgeneration) {
640 $relativepath = $objref.
'/'.$objref.
'.pdf';
641 $filedir = $conf->eventorganization->dir_output.
'/'.
$object->element.
'/'.$objref;
642 $urlsource = $_SERVER[
"PHP_SELF"].
"?id=".
$object->id;
643 $genallowed = $user->hasRight(
'eventorganization',
'conferenceorboothattendee',
'read');
644 $delallowed = $user->hasRight(
'eventorganization',
'conferenceorboothattendee',
'write');
645 print $formfile->showdocuments(
'eventorganization:ConferenceOrBoothAttendee',
$object->element.
'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed,
$object->model_pdf, 1, 0, 0, 28, 0,
'',
'',
'', $langs->defaultlang);
649 $tmparray = $form->showLinkToObjectBlock($object, array(), array(
'conferenceorboothattendee'), 1);
650 $linktoelem = $tmparray[
'linktoelem'];
651 $htmltoenteralink = $tmparray[
'htmltoenteralink'];
652 print $htmltoenteralink;
654 $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
657 print
'</div><div class="fichehalfright">';
659 print
'</div></div>';
663 if (
GETPOST(
'modelselected')) {
668 $modelmail =
'conferenceorboothattendee';
669 $defaulttopic =
'InformationMessage';
670 $diroutput = $conf->eventorganization->dir_output;
671 $trackid =
'conferenceorboothattendee'.$object->id;
673 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.
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.