30require
'../main.inc.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
35require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
36require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorbooth.class.php';
37require_once DOL_DOCUMENT_ROOT.
'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
38require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
51$langs->loadLangs(array(
'eventorganization',
'projects'));
54$action =
GETPOST(
'action',
'aZ09');
55$confirm =
GETPOST(
'confirm',
'alpha');
57$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'conferenceorboothcard';
58$backtopage =
GETPOST(
'backtopage',
'alpha');
59$backtopageforcancel =
GETPOST(
'backtopageforcancel',
'alpha');
60$optioncss =
GETPOST(
'optioncss',
'aZ');
70$projectstatic =
new Project($db);
71$diroutputmassaction = $conf->eventorganization->dir_output.
'/temp/massgeneration/'.$user->id;
72$hookmanager->initHooks(array($contextpage,
'globalcard'));
75$extrafields->fetch_name_optionals_label(
$object->table_element);
77$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element,
'',
'search_');
80$search_all =
GETPOST(
'search_all',
'alphanohtml');
82foreach (
$object->fields as $key => $val) {
83 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') {
84 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
86 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
92if (empty($action) && empty($id) && empty($ref)) {
97include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
100$permissiontoread = $user->hasRight(
'project',
'read');
101$permissiontoadd = $user->hasRight(
'project',
'write');
102$permissiontodelete = $user->hasRight(
'project',
'delete') || ($permissiontoadd && isset(
$object->status) &&
$object->status == $object::STATUS_DRAFT);
103$permissionnote = $user->hasRight(
'project',
'write');
104$permissiondellink = $user->hasRight(
'project',
'write');
105$upload_dir = $conf->eventorganization->multidir_output[isset(
$object->entity) ?
$object->entity : 1];
108if ($user->socid > 0) {
120$parameters = array();
121$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
126if (empty($reshook)) {
129 if (!empty($withproject)) {
130 $backurlforlist = DOL_URL_ROOT.
'/eventorganization/conferenceorbooth_list.php?withproject=1&fk_project='.((int)
$object->id);
132 $backurlforlist = DOL_URL_ROOT.
'/eventorganization/conferenceorbooth_list.php';
135 if (empty($backtopage) || ($cancel && empty($id))) {
136 if (empty($backtopage) || ($cancel && strpos($backtopage,
'__ID__'))) {
137 if (empty($id) && (($action !=
'add' && $action !=
'create') || $cancel)) {
138 $backtopage = $backurlforlist;
140 $backtopage = DOL_URL_ROOT.
'/eventorganization/conferenceorbooth_card.php?fk_project='.((int)
$object->id).
'&id='.(
$id > 0 ?
$id :
'__ID__').($withproject ?
'&withproject=1' :
'');
145 $triggermodname =
'EVENTORGANIZATION_CONFERENCEORBOOTH_MODIFY';
148 include DOL_DOCUMENT_ROOT.
'/core/actions_addupdatedelete.inc.php';
151 include DOL_DOCUMENT_ROOT.
'/core/actions_dellink.inc.php';
154 include DOL_DOCUMENT_ROOT.
'/core/actions_printing.inc.php';
160 include DOL_DOCUMENT_ROOT.
'/core/actions_builddoc.inc.php';
162 if ($action ==
'set_thirdparty' && $permissiontoadd) {
163 $object->setValueFrom(
'fk_soc',
GETPOSTINT(
'fk_soc'),
'',
null,
'date',
'', $user, $triggermodname);
165 if ($action ==
'classin' && $permissiontoadd) {
170 $triggersendname =
'EVENTORGANIZATION_CONFERENCEORBOOTH_SENTBYMAIL';
171 $autocopy =
'MAIN_MAIL_AUTOCOPY_CONFERENCEORBOOTH_TO';
172 $trackid =
'conferenceorbooth'.$object->id;
173 include DOL_DOCUMENT_ROOT.
'/core/actions_sendmails.inc.php';
181$form =
new Form($db);
185$title = $langs->trans(
"ConferenceOrBooth");
186$help_url =
'EN:Module_Event_Organization';
188llxHeader(
'', $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-eventorganization page-card');
190if ($action ==
'create') {
191 $result = $projectstatic->fetch(
GETPOSTINT(
'fk_project'));
193 $result = $projectstatic->fetch(
$object->fk_project);
195if (
getDolGlobalString(
'PROJECT_ALLOW_COMMENT_ON_PROJECT') && method_exists($projectstatic,
'fetchComments') && empty($projectstatic->comments)) {
196 $projectstatic->fetchComments();
198if (!empty($projectstatic->socid)) {
199 $projectstatic->fetch_thirdparty();
203$object->project = clone $projectstatic;
205if (!empty($withproject)) {
207 $tab =
'eventorganisation';
208 $withProjectUrl =
"&withproject=1";
212 print
dol_get_fiche_head($head, $tab, $langs->trans(
"Project"), -1, ($projectstatic->public ?
'projectpub' :
'project'), 0,
'',
'');
214 $param = ($mode ==
'mine' ?
'&mode=mine' :
'');
218 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
220 $morehtmlref =
'<div class="refidno">';
222 $morehtmlref .= $projectstatic->title;
224 if (isset($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
225 $morehtmlref .=
'<br>'.$projectstatic->thirdparty->getNomUrl(1,
'project');
227 $morehtmlref .=
'</div>';
230 if (!$user->hasRight(
'project',
'all',
'lire')) {
231 $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
232 $projectstatic->next_prev_filter =
"rowid:IN:".$db->sanitize(count($objectsListId) ? implode(
',', array_keys($objectsListId)) :
'0');
235 dol_banner_tab($projectstatic,
'project_ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
237 print
'<div class="fichecenter">';
238 print
'<div class="fichehalfleft">';
239 print
'<div class="underbanner clearboth"></div>';
241 print
'<table class="border tableforfield centpercent">';
245 print
'<tr><td class="tdtop">';
246 print $langs->trans(
"Usage");
250 print
'<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET(
'usage_opportunity') ? (
GETPOST(
'usage_opportunity',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_opportunity ?
' checked="checked"' :
'')).
'"> ';
251 $htmltext = $langs->trans(
"ProjectFollowOpportunity");
252 print $form->textwithpicto($langs->trans(
"ProjectFollowOpportunity"), $htmltext);
256 print
'<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET(
'usage_task') ? (
GETPOST(
'usage_task',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_task ?
' checked="checked"' :
'')).
'"> ';
257 $htmltext = $langs->trans(
"ProjectFollowTasks");
258 print $form->textwithpicto($langs->trans(
"ProjectFollowTasks"), $htmltext);
262 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"' :
'')).
'"> ';
263 $htmltext = $langs->trans(
"ProjectBillTimeDescription");
264 print $form->textwithpicto($langs->trans(
"BillTime"), $htmltext);
268 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"' :
'')).
'"> ';
269 $htmltext = $langs->trans(
"EventOrganizationDescriptionLong");
270 print $form->textwithpicto($langs->trans(
"ManageOrganizeEvent"), $htmltext);
276 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
277 if (strcmp($projectstatic->budget_amount,
'')) {
278 print
'<span class="amount">'.price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).
'</span>';
283 print
'<tr><td>'.$langs->trans(
"Dates").
' ('.$langs->trans(
"Project").
')</td><td>';
285 print($start ? $start :
'?');
288 print($end ? $end :
'?');
289 if ($projectstatic->hasDelay()) {
295 print
'<tr><td>'.$langs->trans(
"Dates").
' ('.$langs->trans(
"Event").
')</td><td>';
297 print($start ? $start :
'?');
300 print($end ? $end :
'?');
301 if ($projectstatic->hasDelay()) {
307 print
'<tr><td class="titlefield">'.$langs->trans(
"Visibility").
'</td><td>';
308 if ($projectstatic->public == 0) {
309 print
img_picto($langs->trans(
'PrivateProject'),
'private',
'class="paddingrightonly"');
310 print $langs->trans(
"PrivateProject");
312 print
img_picto($langs->trans(
'SharedProject'),
'world',
'class="paddingrightonly"');
313 print $langs->trans(
"SharedProject");
318 print
'<tr><td>'.$langs->trans(
"Location").
'</td><td>';
319 print $projectstatic->location;
326 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
333 print
'<div class="fichehalfright">';
334 print
'<div class="underbanner clearboth"></div>';
336 print
'<table class="border tableforfield centpercent">';
340 print
'<tr><td class="titlefield valignmiddle">'.$langs->trans(
"Categories").
'</td><td class="valuefield">';
341 print $form->showCategories($projectstatic->id, Categorie::TYPE_PROJECT, 1);
346 print
'<tr><td class="titlefield tdtop">'.$langs->trans(
"Description").
'</td><td class="valuefield">';
350 print
'<tr><td class="titlefield nowrap">';
351 $typeofdata =
'checkbox:'.($projectstatic->accept_conference_suggestions ?
' checked="checked"' :
'');
352 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestConfHelp");
353 print $form->editfieldkey(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'', $projectstatic, 0, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
354 print
'</td><td class="valuefield">';
355 print $form->editfieldval(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'1', $projectstatic, 0, $typeofdata,
'',
null,
null,
'', 0,
'',
'projectid');
358 print
'<tr><td class="valuefield">';
359 $typeofdata =
'checkbox:'.($projectstatic->accept_booth_suggestions ?
' checked="checked"' :
'');
360 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestBoothHelp");
361 print $form->editfieldkey(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'', $projectstatic, 0, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
362 print
'</td><td class="valuefield">';
363 print $form->editfieldval(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'1', $projectstatic, 0, $typeofdata,
'',
null,
null,
'', 0,
'',
'projectid');
366 print
'<tr><td class="valuefield">';
367 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth',
'', $projectstatic, 0,
'amount',
'', 0, 0,
'projectid');
368 print
'</td><td class="valuefield">';
369 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth', $projectstatic->price_booth, $projectstatic, 0,
'amount',
'',
null,
null,
'', 0,
'',
'projectid');
372 print
'<tr><td class="valuefield">';
373 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration',
'', $projectstatic, 0,
'amount',
'', 0, 0,
'projectid');
374 print
'</td><td class="valuefield">';
375 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration', $projectstatic->price_registration, $projectstatic, 0,
'amount',
'',
null,
null,
'', 0,
'',
'projectid');
378 print
'<tr><td class="titlefield">';
379 print $form->editfieldkey($form->textwithpicto($langs->trans(
'MaxNbOfAttendees'),
''),
'max_attendees',
'', $projectstatic, 0,
'integer:3',
'', 0, 0,
'projectid');
380 print
'</td><td class="valuefield">';
381 print $form->editfieldval($form->textwithpicto($langs->trans(
'MaxNbOfAttendees'),
''),
'max_attendees', $projectstatic->max_attendees, $projectstatic, 0,
'integer:3',
'',
null,
null,
'', 0,
'',
'projectid');
385 print
'<tr><td class="titlefield valignmiddle">'.$langs->trans(
"EventOrganizationICSLinkProject").
'</td><td class="valuefield">';
388 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
391 $message =
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ?
"&entity=".$conf->entity :
"");
392 $message .=
'&exportkey='.urlencode(
getDolGlobalString(
'MAIN_AGENDA_XCAL_EXPORTKEY',
'...'));
393 $message .=
"&project=".$projectstatic->id.
'&module='.urlencode(
'project@eventorganization').
'&file='.urlencode(
'calendar-'.$projectstatic->ref.
'.ics').
'&output=file">'.$langs->trans(
'DownloadICSLink').img_picto(
'',
'download',
'class="paddingleft"').
'</a>';
398 print
'<tr><td class="titlefield valignmiddle">'.$langs->trans(
"EventOrganizationICSLink").
'</td><td>';
401 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
404 $message =
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ?
"&entity=".$conf->entity :
"");
405 $message .=
'&exportkey='.urlencode(
getDolGlobalString(
'MAIN_AGENDA_XCAL_EXPORTKEY',
'...'));
406 $message .=
"&project=".$projectstatic->id.
'&module='.urlencode(
'@eventorganization').
'&status='.ConferenceOrBooth::STATUS_CONFIRMED.
'">'.$langs->trans(
'DownloadICSLink').img_picto(
'',
'download',
'class="paddingleft"').
'</a>';
413 print $form->textwithpicto($langs->trans(
"SuggestOrVoteForConfOrBooth"), $langs->trans(
"EvntOrgRegistrationHelpMessage"));
417 $encodedsecurekey =
dol_hash(
getDolGlobalString(
'EVENTORGANIZATION_SECUREKEY').
'conferenceorbooth'.((
int) $projectstatic->id),
'md5');
418 $linksuggest .=
'&securekey='.urlencode($encodedsecurekey);
421 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$linksuggest.
'" class="quatrevingtpercent">'.$linksuggest.
'</a></div>';
422 print
'<a target="_blank" rel="noopener noreferrer" href="'.$linksuggest.
'">'.
img_picto(
'',
'globe').
'</a>';
430 print $langs->trans(
"PublicAttendeeSubscriptionGlobalPage");
433 $link_subscription =
$dolibarr_main_url_root.
'/public/eventorganization/attendee_new.php?id='.((int) $projectstatic->id).
'&type=global';
434 $encodedsecurekey =
dol_hash(
getDolGlobalString(
'EVENTORGANIZATION_SECUREKEY').
'conferenceorbooth'.((
int) $projectstatic->id),
'md5');
435 $link_subscription .=
'&securekey='.urlencode($encodedsecurekey);
438 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$link_subscription.
'" class="quatrevingtpercent">'.$link_subscription.
'</a></div>';
439 print
'<a target="_blank" rel="noopener noreferrer" href="'.$link_subscription.
'">'.
img_picto(
'',
'globe').
'</a>';
449 print
'<div class="clearboth"></div>';
457if ($action ==
'create') {
458 print
load_fiche_titre($langs->trans(
"NewObject", $langs->transnoentitiesnoconv(
"ConferenceOrBooth")),
'',
'object_'.$object->picto);
460 print
'<form method="POST" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
461 print
'<input type="hidden" name="token" value="'.newToken().
'">';
462 print
'<input type="hidden" name="action" value="add">';
464 print
'<input type="hidden" name="withproject" value="'.$withproject.
'">';
465 print
'<input type="hidden" name="fk_project" value="'.GETPOSTINT(
'fk_project').
'">';
468 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
470 if ($backtopageforcancel) {
471 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
476 print
'<table class="border centpercent tableforfieldcreate">'.
"\n";
479 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_add.tpl.php';
482 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_add.tpl.php';
484 print
'</table>'.
"\n";
488 print $form->buttonsSaveCancel(
"Create");
496if (($id || $ref) && $action ==
'edit') {
497 print
load_fiche_titre($langs->trans(
"ConferenceOrBooth"),
'',
'object_'.$object->picto);
499 print
'<form method="POST" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
500 print
'<input type="hidden" name="token" value="'.newToken().
'">';
501 if (!empty($withProjectUrl)) {
502 print
'<input type="hidden" name="withproject" value="1">';
504 print
'<input type="hidden" name="action" value="update">';
505 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
507 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
509 if ($backtopageforcancel) {
510 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
515 print
'<table class="border centpercent tableforfieldedit">'.
"\n";
518 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_edit.tpl.php';
521 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_edit.tpl.php';
527 print $form->buttonsSaveCancel();
533if (
$object->id > 0 && (empty($action) || ($action !=
'edit' && $action !=
'create'))) {
534 $res =
$object->fetch_optionals();
543 if ($action ==
'delete') {
544 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id.$withProjectUrl, $langs->trans(
'DeleteConferenceOrBooth'), $langs->trans(
'ConfirmDeleteObject'),
'confirm_delete',
'', 0, 1);
547 if ($action ==
'clone') {
549 $formquestion = array();
550 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id.$withProjectUrl, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneAsk',
$object->ref),
'confirm_clone', $formquestion,
'yes', 1);
554 $parameters = array(
'formConfirm' => $formconfirm);
555 $reshook = $hookmanager->executeHooks(
'formConfirm', $parameters, $object, $action);
556 if (empty($reshook)) {
557 $formconfirm .= $hookmanager->resPrint;
558 } elseif ($reshook > 0) {
559 $formconfirm = $hookmanager->resPrint;
567 $linkback =
'<a href="'.dol_buildpath(
'/eventorganization/conferenceorbooth_list.php', 1).
'?projectid='.
$object->fk_project.$withProjectUrl.
'">'.$langs->trans(
"BackToList").
'</a>';
569 $morehtmlref =
'<div class="refidno">';
570 $morehtmlref .=
'</div>';
573 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
575 print
'<div class="fichecenter">';
576 print
'<div class="fichehalfleft">';
577 print
'<div class="underbanner clearboth"></div>';
578 print
'<table class="border centpercent tableforfield">'.
"\n";
584 $keyforbreak =
'num_vote';
586 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_view.tpl.php';
590 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
596 print
'<div class="clearboth"></div>';
602 if ($action !=
'presend' && $action !=
'editline') {
603 print
'<div class="tabsAction">'.
"\n";
604 $parameters = array();
605 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
610 if (empty($reshook)) {
612 if (empty($user->socid)) {
613 print
dolGetButtonAction(
'', $langs->trans(
'SendMail'),
'email', $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.$withProjectUrl.
'&action=presend&token='.
newToken().
'&mode=init#formmailbeforetitle');
616 print
dolGetButtonAction(
'', $langs->trans(
'Modify'),
'default', $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.$withProjectUrl.
'&action=edit&token='.
newToken(),
'', $permissiontoadd);
619 print
dolGetButtonAction(
'', $langs->trans(
'ToClone'),
'default', $_SERVER[
'PHP_SELF'].
'?id='.
$object->id.$withProjectUrl.
'&socid='.
$object->socid.
'&action=clone&token='.
newToken().
'&object=scrumsprint',
'', $permissiontoadd);
622 print
dolGetButtonAction($langs->trans(
'Delete'),
'',
'delete', $_SERVER[
'PHP_SELF'].
'?id='.
$object->id.$withProjectUrl.
'&action=delete&token='.
newToken(),
'', $permissiontodelete || (
$object->status == $object::STATUS_DRAFT && $permissiontoadd));
629 if (
GETPOST(
'modelselected')) {
633 if ($action !=
'presend') {
634 print
'<div class="fichecenter"><div class="fichehalfleft">';
635 print
'<a name="builddoc"></a>';
637 $includedocgeneration = 1;
640 if ($includedocgeneration) {
642 $relativepath = $objref.
'/'.$objref.
'.pdf';
643 $filedir = $conf->eventorganization->dir_output.
'/'.
$object->element.
'/'.$objref;
644 $urlsource = $_SERVER[
"PHP_SELF"].
"?id=".
$object->id;
645 $genallowed = $user->hasRight(
'project',
'read');
646 $delallowed = $user->hasRight(
'project',
'write');
647 print $formfile->showdocuments(
'eventorganization:ConferenceOrBooth',
$object->element.
'/'.$objref, $filedir, $urlsource, 0, $delallowed,
$object->model_pdf, 0, 0, 0, 28, 0,
'',
'',
'', $langs->defaultlang);
656 if (is_array(
$object->linkedObjects) && count(
$object->linkedObjects) > 0 && array_key_exists(
"facture",
$object->linkedObjects)) {
657 foreach (
$object->linkedObjects[
"facture"] as $fac) {
658 if (empty($fac->paye)) {
659 $key =
'paymentlink_'.$fac->id;
661 print
img_picto(
'',
'globe').
' <span class="opacitymedium">'.$langs->trans(
"ToOfferALinkForOnlinePayment", $langs->transnoentitiesnoconv(
'Online')) .
' '. $fac->ref.
'</span><br>';
663 $sourcetouse =
'boothlocation';
664 $reftouse = $fac->id;
666 $url = getOnlinePaymentUrl(0, $sourcetouse, (
string) $reftouse);
667 $url .=
'&booth='.$object->id;
669 print
'<div class="urllink"><input type="text" id="onlinepaymenturl" spellcheck="false" class="quatrevingtpercent" value="'.$url.
'">';
670 print
'<a href="'.$url.
'" target="_blank" rel="noopener noreferrer">'.
img_picto(
'',
'globe',
'class="paddingleft"').
'</a></div>';
675 print
'</div><div class="fichehalfright">';
676 print
'</div></div>';
680 if (
GETPOST(
'modelselected')) {
685 $modelmail =
'conferenceorbooth';
686 $defaulttopic =
'InformationMessage';
687 $diroutput = $conf->eventorganization->dir_output;
688 $trackid =
'conferenceorbooth'.$object->id;
690 include DOL_DOCUMENT_ROOT.
'/core/tpl/card_presend.tpl.php';
$id
Support class for third parties, contacts, members, users or resources.
if(! $sortfield) if(! $sortorder) $object
global $dolibarr_main_url_root
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Class for ConferenceOrBooth.
Class to manage projects.
conferenceorboothPrepareHead($object, $with_project=0)
Prepare array of tabs for ConferenceOrBooth.
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...
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1, $includequotes=0, $allowdash=0)
Clean a string to use it as a file name.
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_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false, $decorate=0)
Output date in a string format according to outputlangs (or langs if not defined).
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
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 a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
project_prepare_head(Project $project, $moreparam='')
Prepare array with list of tabs.
dol_hash($chain, $type='0', $nosalt=0, $mode=0)
Returns a hash (non reversible encryption) of a string.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.