27require
'../main.inc.php';
28require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
32require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorbooth.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
35require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
37global $dolibarr_main_url_root;
40$langs->loadLangs(array(
'eventorganization',
'projects'));
43$action =
GETPOST(
'action',
'aZ09');
44$confirm =
GETPOST(
'confirm',
'alpha');
45$cancel =
GETPOST(
'cancel',
'aZ09');
46$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'conferenceorboothcard';
47$backtopage =
GETPOST(
'backtopage',
'alpha');
48$backtopageforcancel =
GETPOST(
'backtopageforcancel',
'alpha');
49$optioncss =
GETPOST(
'optioncss',
'aZ');
54$withproject =
GETPOST(
'withproject',
'int');
59$projectstatic =
new Project($db);
60$diroutputmassaction = $conf->eventorganization->dir_output.
'/temp/massgeneration/'.$user->id;
61$hookmanager->initHooks(array($contextpage,
'globalcard'));
64$extrafields->fetch_name_optionals_label($object->table_element);
66$search_array_options = $extrafields->getOptionalsFromPost($object->table_element,
'',
'search_');
69$search_all =
GETPOST(
"search_all",
'alpha');
71foreach ($object->fields as $key => $val) {
72 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') {
73 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
75 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
76 $search[$key.
'_dtstart'] =
dol_mktime(0, 0, 0,
GETPOST(
'search_'.$key.
'_dtstartmonth',
'int'),
GETPOST(
'search_'.$key.
'_dtstartday',
'int'),
GETPOST(
'search_'.$key.
'_dtstartyear',
'int'));
77 $search[$key.
'_dtend'] =
dol_mktime(23, 59, 59,
GETPOST(
'search_'.$key.
'_dtendmonth',
'int'),
GETPOST(
'search_'.$key.
'_dtendday',
'int'),
GETPOST(
'search_'.$key.
'_dtendyear',
'int'));
81if (empty($action) && empty($id) && empty($ref)) {
86include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
89$permissiontoread = $user->rights->eventorganization->read;
90$permissiontoadd = $user->rights->eventorganization->write;
91$permissiontodelete = $user->rights->eventorganization->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
92$permissionnote = $user->rights->eventorganization->write;
93$permissiondellink = $user->rights->eventorganization->write;
94$upload_dir = $conf->eventorganization->multidir_output[isset($object->entity) ? $object->entity : 1];
97if ($user->socid > 0) {
100$isdraft = (($object->status== $object::STATUS_DRAFT) ? 1 : 0);
101$result =
restrictedArea($user,
'eventorganization', $object->id,
'',
'',
'fk_soc',
'id', $isdraft);
103if (!$permissiontoread) {
112$parameters = array();
113$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
118if (empty($reshook)) {
121 $backurlforlist =
dol_buildpath(
'/eventorganization/conferenceorbooth_list.php', 1);
123 if (empty($backtopage) || ($cancel && empty($id))) {
124 if (empty($backtopage) || ($cancel && strpos($backtopage,
'__ID__'))) {
125 if (empty($id) && (($action !=
'add' && $action !=
'create') || $cancel)) {
126 $backtopage = $backurlforlist;
128 $backtopage =
dol_buildpath(
'/eventorganization/conferenceorbooth_card.php', 1).
'?id='.($id > 0 ? $id :
'__ID__').($withproject ?
'&withproject=1' :
'');
133 $triggermodname =
'EVENTORGANIZATION_CONFERENCEORBOOTH_MODIFY';
136 include DOL_DOCUMENT_ROOT.
'/core/actions_addupdatedelete.inc.php';
139 include DOL_DOCUMENT_ROOT.
'/core/actions_dellink.inc.php';
142 include DOL_DOCUMENT_ROOT.
'/core/actions_printing.inc.php';
148 include DOL_DOCUMENT_ROOT.
'/core/actions_builddoc.inc.php';
150 if ($action ==
'set_thirdparty' && $permissiontoadd) {
151 $object->setValueFrom(
'fk_soc',
GETPOST(
'fk_soc',
'int'),
'',
'',
'date',
'', $user, $triggermodname);
153 if ($action ==
'classin' && $permissiontoadd) {
154 $object->setProject(
GETPOST(
'projectid',
'int'));
158 $triggersendname =
'EVENTORGANIZATION_CONFERENCEORBOOTH_SENTBYMAIL';
159 $autocopy =
'MAIN_MAIL_AUTOCOPY_CONFERENCEORBOOTH_TO';
160 $trackid =
'conferenceorbooth'.$object->id;
161 include DOL_DOCUMENT_ROOT.
'/core/actions_sendmails.inc.php';
169$form =
new Form($db);
173$title = $langs->trans(
"ConferenceOrBooth");
177if ($action ==
'create') {
178 $result = $projectstatic->fetch(
GETPOST(
'fk_project'));
180 $result = $projectstatic->fetch($object->fk_project);
182if (
getDolGlobalString(
'PROJECT_ALLOW_COMMENT_ON_PROJECT') && method_exists($projectstatic,
'fetchComments') && empty($projectstatic->comments)) {
183 $projectstatic->fetchComments();
185if (!empty($projectstatic->socid)) {
186 $projectstatic->fetch_thirdparty();
190$object->project = clone $projectstatic;
192if (!empty($withproject)) {
194 $tab =
'eventorganisation';
195 $withProjectUrl =
"&withproject=1";
199 print
dol_get_fiche_head($head, $tab, $langs->trans(
"Project"), -1, ($projectstatic->public ?
'projectpub' :
'project'), 0,
'',
'');
201 $param = ($mode ==
'mine' ?
'&mode=mine' :
'');
205 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
207 $morehtmlref =
'<div class="refidno">';
209 $morehtmlref .= $projectstatic->title;
211 if (isset($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
212 $morehtmlref .=
'<br>'.$projectstatic->thirdparty->getNomUrl(1,
'project');
214 $morehtmlref .=
'</div>';
217 if (!$user->hasRight(
'project',
'all',
'lire')) {
218 $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
219 $projectstatic->next_prev_filter =
"rowid IN (".$db->sanitize(count($objectsListId) ? join(
',', array_keys($objectsListId)) :
'0').
")";
222 dol_banner_tab($projectstatic,
'project_ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
224 print
'<div class="fichecenter">';
225 print
'<div class="fichehalfleft">';
226 print
'<div class="underbanner clearboth"></div>';
228 print
'<table class="border tableforfield centpercent">';
232 print
'<tr><td class="tdtop">';
233 print $langs->trans(
"Usage");
237 print
'<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET(
'usage_opportunity') ? (
GETPOST(
'usage_opportunity',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_opportunity ?
' checked="checked"' :
'')).
'"> ';
238 $htmltext = $langs->trans(
"ProjectFollowOpportunity");
239 print $form->textwithpicto($langs->trans(
"ProjectFollowOpportunity"), $htmltext);
243 print
'<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET(
'usage_task') ? (
GETPOST(
'usage_task',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_task ?
' checked="checked"' :
'')).
'"> ';
244 $htmltext = $langs->trans(
"ProjectFollowTasks");
245 print $form->textwithpicto($langs->trans(
"ProjectFollowTasks"), $htmltext);
249 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"' :
'')).
'"> ';
250 $htmltext = $langs->trans(
"ProjectBillTimeDescription");
251 print $form->textwithpicto($langs->trans(
"BillTime"), $htmltext);
254 if (isModEnabled(
'eventorganization')) {
255 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"' :
'')).
'"> ';
256 $htmltext = $langs->trans(
"EventOrganizationDescriptionLong");
257 print $form->textwithpicto($langs->trans(
"ManageOrganizeEvent"), $htmltext);
263 print
'<tr><td class="titlefield">'.$langs->trans(
"Visibility").
'</td><td>';
264 if ($projectstatic->public == 0) {
265 print
img_picto($langs->trans(
'PrivateProject'),
'private',
'class="paddingrightonly"');
266 print $langs->trans(
"PrivateProject");
268 print
img_picto($langs->trans(
'SharedProject'),
'world',
'class="paddingrightonly"');
269 print $langs->trans(
"SharedProject");
274 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
275 if (strcmp($projectstatic->budget_amount,
'')) {
276 print
'<span class="amount">'.price($projectstatic->budget_amount,
'', $langs, 1, 0, 0, $conf->currency).
'</span>';
281 print
'<tr><td>'.$langs->trans(
"Dates").
' ('.$langs->trans(
"Project").
')</td><td>';
283 print($start ? $start :
'?');
286 print($end ? $end :
'?');
287 if ($object->hasDelay()) {
293 print
'<tr><td>'.$langs->trans(
"Dates").
' ('.$langs->trans(
"Event").
')</td><td>';
295 print($start ? $start :
'?');
298 print($end ? $end :
'?');
299 if ($object->hasDelay()) {
305 print
'<tr><td>'.$langs->trans(
"Location").
'</td><td>';
306 print $projectstatic->location;
311 $objectconf = $object;
312 $object = $projectstatic;
313 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
314 $object = $objectconf;
320 print
'<div class="fichehalfright">';
321 print
'<div class="underbanner clearboth"></div>';
323 print
'<table class="border tableforfield centpercent">';
326 print
'<tr><td class="titlefield tdtop">'.$langs->trans(
"Description").
'</td><td class="valuefield">';
331 if (isModEnabled(
'categorie')) {
332 print
'<tr><td class="titlefield valignmiddle">'.$langs->trans(
"Categories").
'</td><td class="valuefield">';
333 print $form->showCategories($projectstatic->id, Categorie::TYPE_PROJECT, 1);
337 print
'<tr><td class="titlefield nowrap">';
338 $typeofdata =
'checkbox:'.($projectstatic->accept_conference_suggestions ?
' checked="checked"' :
'');
339 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestConfHelp");
340 print $form->editfieldkey(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'', $projectstatic, 0, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
341 print
'</td><td class="valuefield">';
342 print $form->editfieldval(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'1', $projectstatic, 0, $typeofdata,
'', 0, 0,
'', 0,
'',
'projectid');
345 print
'<tr><td class="valuefield">';
346 $typeofdata =
'checkbox:'.($projectstatic->accept_booth_suggestions ?
' checked="checked"' :
'');
347 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestBoothHelp");
348 print $form->editfieldkey(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'', $projectstatic, 0, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
349 print
'</td><td class="valuefield">';
350 print $form->editfieldval(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'1', $projectstatic, 0, $typeofdata,
'', 0, 0,
'', 0,
'',
'projectid');
353 print
'<tr><td class="valuefield">';
354 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth',
'', $projectstatic, 0,
'amount',
'', 0, 0,
'projectid');
355 print
'</td><td class="valuefield">';
356 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth', $projectstatic->price_booth, $projectstatic, 0,
'amount',
'', 0, 0,
'', 0,
'',
'projectid');
359 print
'<tr><td class="valuefield">';
360 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration',
'', $projectstatic, 0,
'amount',
'', 0, 0,
'projectid');
361 print
'</td><td class="valuefield">';
362 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration', $projectstatic->price_registration, $projectstatic, 0,
'amount',
'', 0, 0,
'', 0,
'',
'projectid');
365 print
'<tr><td class="titlefield">';
366 print $form->editfieldkey($form->textwithpicto($langs->trans(
'MaxNbOfAttendees'),
''),
'max_attendees',
'', $projectstatic, $permissiontoadd,
'integer:3',
'', 0, 0,
'projectid');
367 print
'</td><td class="valuefield">';
368 print $form->editfieldval($form->textwithpicto($langs->trans(
'MaxNbOfAttendees'),
''),
'max_attendees', $projectstatic->max_attendees, $projectstatic, $permissiontoadd,
'integer:3',
'', 0, 0,
'', 0,
'',
'projectid');
371 print
'<tr><td class="titlefield valignmiddle">'.$langs->trans(
"EventOrganizationICSLink").
'</td><td>';
373 $urlwithouturlroot = preg_replace(
'/'.preg_quote(DOL_URL_ROOT,
'/').
'$/i',
'', trim($dolibarr_main_url_root));
374 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
377 $message =
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ?
"&entity=".$conf->entity :
"");
378 $message .=
'&exportkey='.urlencode(
getDolGlobalString(
'MAIN_AGENDA_XCAL_EXPORTKEY',
'...'));
379 $message .=
"&project=".$projectstatic->id.
'&module='.urlencode(
'@eventorganization').
'&status='.ConferenceOrBooth::STATUS_CONFIRMED.
'">'.$langs->trans(
'DownloadICSLink').img_picto(
'',
'download',
'class="paddingleft"').
'</a>';
386 print $form->textwithpicto($langs->trans(
"SuggestOrVoteForConfOrBooth"), $langs->trans(
"EvntOrgRegistrationHelpMessage"));
389 $linksuggest = $dolibarr_main_url_root.
'/public/project/index.php?id='.((int) $projectstatic->id);
390 $encodedsecurekey =
dol_hash(
getDolGlobalString(
'EVENTORGANIZATION_SECUREKEY').
'conferenceorbooth'.((
int) $projectstatic->id),
'md5');
391 $linksuggest .=
'&securekey='.urlencode($encodedsecurekey);
394 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$linksuggest.
'" class="quatrevingtpercent">'.$linksuggest.
'</a></div>';
395 print
'<a target="_blank" rel="noopener noreferrer" href="'.$linksuggest.
'">'.
img_picto(
'',
'globe').
'</a>';
403 print $langs->trans(
"PublicAttendeeSubscriptionGlobalPage");
406 $link_subscription = $dolibarr_main_url_root.
'/public/eventorganization/attendee_new.php?id='.((int) $projectstatic->id).
'&type=global';
407 $encodedsecurekey =
dol_hash(
getDolGlobalString(
'EVENTORGANIZATION_SECUREKEY').
'conferenceorbooth'.((
int) $projectstatic->id),
'md5');
408 $link_subscription .=
'&securekey='.urlencode($encodedsecurekey);
411 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$link_subscription.
'" class="quatrevingtpercent">'.$link_subscription.
'</a></div>';
412 print
'<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer" href="'.$link_subscription.
'">'.
img_picto(
'',
'globe').
'</a>';
422 print
'<div class="clearboth"></div>';
430if ($action ==
'create') {
431 print
load_fiche_titre($langs->trans(
"NewObject", $langs->transnoentitiesnoconv(
"ConferenceOrBooth")),
'',
'object_'.$object->picto);
433 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
434 print
'<input type="hidden" name="token" value="'.newToken().
'">';
435 print
'<input type="hidden" name="action" value="add">';
437 print
'<input type="hidden" name="withproject" value="'.$withproject.
'">';
438 print
'<input type="hidden" name="fk_project" value="'.GETPOST(
'fk_project',
'int').
'">';
441 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
443 if ($backtopageforcancel) {
444 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
449 print
'<table class="border centpercent tableforfieldcreate">'.
"\n";
452 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_add.tpl.php';
455 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_add.tpl.php';
457 print
'</table>'.
"\n";
461 print $form->buttonsSaveCancel(
"Create");
469if (($id || $ref) && $action ==
'edit') {
470 print
load_fiche_titre($langs->trans(
"ConferenceOrBooth"),
'',
'object_'.$object->picto);
472 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
473 print
'<input type="hidden" name="token" value="'.newToken().
'">';
474 if (!empty($withProjectUrl)) {
475 print
'<input type="hidden" name="withproject" value="1">';
477 print
'<input type="hidden" name="action" value="update">';
478 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
480 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
482 if ($backtopageforcancel) {
483 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
488 print
'<table class="border centpercent tableforfieldedit">'.
"\n";
491 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_edit.tpl.php';
494 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_edit.tpl.php';
500 print $form->buttonsSaveCancel();
506if ($object->id > 0 && (empty($action) || ($action !=
'edit' && $action !=
'create'))) {
507 $res = $object->fetch_optionals();
511 print
dol_get_fiche_head($head,
'card', $langs->trans(
"ConferenceOrBooth"), -1, $object->picto);
516 if ($action ==
'delete') {
517 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id.$withProjectUrl, $langs->trans(
'DeleteConferenceOrBooth'), $langs->trans(
'ConfirmDeleteObject'),
'confirm_delete',
'', 0, 1);
520 if ($action ==
'clone') {
522 $formquestion = array();
523 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id.$withProjectUrl, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneAsk', $object->ref),
'confirm_clone', $formquestion,
'yes', 1);
528 if ($action ==
'xxx') {
529 $formquestion = array();
540 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'XXX'), $text,
'confirm_xxx', $formquestion, 0, 1, 220);
544 $parameters = array(
'formConfirm' => $formconfirm);
545 $reshook = $hookmanager->executeHooks(
'formConfirm', $parameters, $object, $action);
546 if (empty($reshook)) {
547 $formconfirm .= $hookmanager->resPrint;
548 } elseif ($reshook > 0) {
549 $formconfirm = $hookmanager->resPrint;
557 $linkback =
'<a href="'.dol_buildpath(
'/eventorganization/conferenceorbooth_list.php', 1).
'?projectid='.$object->fk_project.$withProjectUrl.
'">'.$langs->trans(
"BackToList").
'</a>';
559 $morehtmlref =
'<div class="refidno">';
560 $morehtmlref .=
'</div>';
563 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
565 print
'<div class="fichecenter">';
566 print
'<div class="fichehalfleft">';
567 print
'<div class="underbanner clearboth"></div>';
568 print
'<table class="border centpercent tableforfield">'.
"\n";
574 $keyforbreak=
'num_vote';
576 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_view.tpl.php';
580 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
586 print
'<div class="clearboth"></div>';
592 if ($action !=
'presend' && $action !=
'editline') {
593 print
'<div class="tabsAction">'.
"\n";
594 $parameters = array();
595 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
600 if (empty($reshook)) {
602 if (empty($user->socid)) {
603 print
dolGetButtonAction(
'', $langs->trans(
'SendMail'),
'default', $_SERVER[
"PHP_SELF"].
'?id='.$object->id.$withProjectUrl.
'&action=presend&token='.newToken().
'&mode=init#formmailbeforetitle');
606 print
dolGetButtonAction(
'', $langs->trans(
'Modify'),
'default', $_SERVER[
"PHP_SELF"].
'?id='.$object->id.$withProjectUrl.
'&action=edit&token='.newToken(),
'', $permissiontoadd);
609 print
dolGetButtonAction(
'', $langs->trans(
'ToClone'),
'default', $_SERVER[
'PHP_SELF'].
'?id='.$object->id.$withProjectUrl.
'&socid='.$object->socid.
'&action=clone&token='.newToken().
'&object=scrumsprint',
'', $permissiontoadd);
612 print
dolGetButtonAction($langs->trans(
'Delete'),
'',
'delete', $_SERVER[
'PHP_SELF'].
'?id='.$object->id.$withProjectUrl.
'&action=delete&token='.newToken(),
'', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd));
619 if (
GETPOST(
'modelselected')) {
623 if ($action !=
'presend') {
624 print
'<div class="fichecenter"><div class="fichehalfleft">';
625 print
'<a name="builddoc"></a>';
627 $includedocgeneration = 1;
630 if ($includedocgeneration) {
632 $relativepath = $objref.
'/'.$objref.
'.pdf';
633 $filedir = $conf->eventorganization->dir_output.
'/'.$object->element.
'/'.$objref;
634 $urlsource = $_SERVER[
"PHP_SELF"].
"?id=".$object->id;
635 $genallowed = $user->rights->eventorganization->read;
636 $delallowed = $user->rights->eventorganization->write;
637 print $formfile->showdocuments(
'eventorganization', $object->element.
'/'.$objref, $filedir, $urlsource, 0, $delallowed, $object->model_pdf, 0, 0, 0, 28, 0,
'',
'',
'', $langs->defaultlang);
644 $object->fetchObjectLinked();
646 if (is_array($object->linkedObjects) && count($object->linkedObjects)>0 && array_key_exists(
"facture", $object->linkedObjects)) {
647 foreach ($object->linkedObjects[
"facture"] as $fac) {
648 if (empty($fac->paye)) {
649 $key =
'paymentlink_'.$fac->id;
651 print
img_picto(
'',
'globe').
' <span class="opacitymedium">'.$langs->trans(
"ToOfferALinkForOnlinePayment", $langs->transnoentitiesnoconv(
'Online')) .
' '. $fac->ref.
'</span><br>';
653 $sourcetouse =
'boothlocation';
654 $reftouse = $fac->id;
656 $url = getOnlinePaymentUrl(0, $sourcetouse, $reftouse);
657 $url .=
'&booth='.$object->id;
659 print
'<div class="urllink"><input type="text" id="onlinepaymenturl" class="quatrevingtpercent" value="'.$url.
'">';
660 print
'<a href="'.$url.
'" target="_blank" rel="noopener noreferrer">'.
img_picto(
'',
'globe',
'class="paddingleft"').
'</a></div>';
665 print
'</div><div class="fichehalfright">';
666 print
'</div></div>';
670 if (
GETPOST(
'modelselected')) {
675 $modelmail =
'conferenceorbooth';
676 $defaulttopic =
'InformationMessage';
677 $diroutput = $conf->eventorganization->dir_output;
678 $trackid =
'conferenceorbooth'.$object->id;
680 include DOL_DOCUMENT_ROOT.
'/core/tpl/card_presend.tpl.php';
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Class for ConferenceOrBooth.
Class to manage projects.
conferenceorboothPrepareHead($object, $with_project=0)
Prepare array of tabs for ConferenceOrBooth.
dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='')
Show tab footer of a card.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
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.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
dol_htmlentitiesbr($stringtoencode, $nl2brmode=0, $pagecodefrom='UTF-8', $removelasteolbr=1)
This function is called to encode a string into a HTML string but differs from htmlentities because a...
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
project_prepare_head(Project $project, $moreparam='')
Prepare array with list of tabs.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.
dol_hash($chain, $type='0', $nosalt=0)
Returns a hash (non reversible encryption) of a string.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.