26 require
'../main.inc.php';
28 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
29 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
30 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
31 require_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
33 require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorbooth.class.php';
34 require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorboothattendee.class.php';
35 require_once DOL_DOCUMENT_ROOT.
'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
36 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
39 $langs->loadLangs(array(
"eventorganization",
"other",
"projects",
"companies"));
44 $action =
GETPOST(
'action',
'aZ09');
45 $confirm =
GETPOST(
'confirm',
'alpha');
46 $cancel =
GETPOST(
'cancel',
'aZ09');
47 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'conferenceorboothattendeecard';
48 $backtopage =
GETPOST(
'backtopage',
'alpha');
49 $backtopageforcancel =
GETPOST(
'backtopageforcancel',
'alpha');
52 $conf_or_booth_id =
GETPOST(
'conforboothid',
'int');
53 $fk_project =
GETPOST(
'fk_project',
'int');
59 $projectstatic =
new Project($db);
60 $diroutputmassaction = $conf->eventorganization->dir_output.
'/temp/massgeneration/'.$user->id;
61 $hookmanager->initHooks(array(
'conferenceorboothattendeecard',
'globalcard'));
64 if ($conf_or_booth_id > 0) {
66 $result = $confOrBooth->fetch($id > 0 ? $id : $conf_or_booth_id);
70 $object->fk_actioncomm = $confOrBooth->id;
71 $object->fk_project = $confOrBooth->fk_project;
72 $fk_project = $object->fk_project;
77 $extrafields->fetch_name_optionals_label($object->table_element);
79 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element,
'',
'search_');
82 $search_all =
GETPOST(
'search_all',
'alphanohtml');
84 foreach ($object->fields as $key => $val) {
85 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') {
86 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
88 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
89 $search[$key.
'_dtstart'] =
dol_mktime(0, 0, 0,
GETPOST(
'search_'.$key.
'_dtstartmonth',
'int'),
GETPOST(
'search_'.$key.
'_dtstartday',
'int'),
GETPOST(
'search_'.$key.
'_dtstartyear',
'int'));
90 $search[$key.
'_dtend'] =
dol_mktime(23, 59, 59,
GETPOST(
'search_'.$key.
'_dtendmonth',
'int'),
GETPOST(
'search_'.$key.
'_dtendday',
'int'),
GETPOST(
'search_'.$key.
'_dtendyear',
'int'));
95 $fieldstosearchall = array();
96 foreach ($object->fields as $key => $val) {
97 if (!empty($val[
'searchall'])) {
98 $fieldstosearchall[
't.'.$key] = $val[
'label'];
102 if (empty($action) && empty($id) && empty($ref)) {
107 include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
110 if ($object->fk_project > 0) {
111 $fk_project = $object->fk_project;
115 $permissiontoread = $user->rights->eventorganization->read;
116 $permissiontoadd = $user->rights->eventorganization->write;
117 $permissiontodelete = $user->rights->eventorganization->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
118 $permissionnote = $user->rights->eventorganization->write;
119 $permissiondellink = $user->rights->eventorganization->write;
120 $upload_dir = $conf->eventorganization->multidir_output[isset($object->entity) ? $object->entity : 1];
127 $parameters = array();
128 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
133 if (empty($reshook)) {
136 if (!empty($withproject)) {
137 $backurlforlist = DOL_URL_ROOT.
'/eventorganization/conferenceorboothattendee_list.php?withproject=1&fk_project='.((int) $fk_project);
139 $backurlforlist = DOL_URL_ROOT.
'/eventorganization/conferenceorboothattendee_list.php';
142 if (empty($backtopage) || ($cancel && empty($id))) {
143 if (empty($backtopage) || ($cancel && strpos($backtopage,
'__ID__'))) {
144 if (empty($id) && (($action !=
'add' && $action !=
'create') || $cancel)) {
145 $backtopage = $backurlforlist;
147 $backtopage = DOL_URL_ROOT.
'/eventorganization/conferenceorboothattendee_card.php?fk_project='.((int) $fk_project).
'&id='.($id > 0 ? $id :
'__ID__');
153 if (!empty($backtopageforcancel)) {
154 header(
"Location: ".$backtopageforcancel);
156 } elseif (!empty($backtopage)) {
157 header(
"Location: ".$backtopage);
163 $triggermodname =
'EVENTORGANIZATION_CONFERENCEORBOOTHATTENDEE_MODIFY';
166 include DOL_DOCUMENT_ROOT.
'/core/actions_addupdatedelete.inc.php';
169 include DOL_DOCUMENT_ROOT.
'/core/actions_dellink.inc.php';
172 include DOL_DOCUMENT_ROOT.
'/core/actions_printing.inc.php';
178 include DOL_DOCUMENT_ROOT.
'/core/actions_builddoc.inc.php';
180 if ($action ==
'set_thirdparty' && $permissiontoadd) {
181 $object->setValueFrom(
'fk_soc',
GETPOST(
'fk_soc',
'int'),
'',
'',
'date',
'', $user, $triggermodname);
183 if ($action ==
'classin' && $permissiontoadd) {
184 $object->setProject(
GETPOST(
'projectid',
'int'));
188 $triggersendname =
'EVENTORGANIZATION_CONFERENCEORBOOTHATTENDEE_SENTBYMAIL';
189 $autocopy =
'MAIN_MAIL_AUTOCOPY_CONFERENCEORBOOTHATTENDEE_TO';
190 $trackid =
'conferenceorboothattendee'.$object->id;
191 include DOL_DOCUMENT_ROOT.
'/core/actions_sendmails.inc.php';
205 $title = $langs->trans(
"ConferenceOrBoothAttendee");
209 $result = $projectstatic->fetch(empty($confOrBooth->fk_project) ? $fk_project : $confOrBooth->fk_project);
210 if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic,
'fetchComments') && empty($projectstatic->comments)) {
211 $projectstatic->fetchComments();
213 if (!empty($projectstatic->socid)) {
214 $projectstatic->fetch_thirdparty();
218 $object->project = clone $projectstatic;
220 if (!empty($withproject)) {
222 $tab =
'eventorganisation';
224 print
dol_get_fiche_head($head, $tab, $langs->trans(
"Project"), -1, ($projectstatic->public ?
'projectpub' :
'project'), 0,
'',
'');
226 $param = ($mode ==
'mine' ?
'&mode=mine' :
'');
230 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
232 $morehtmlref =
'<div class="refidno">';
234 $morehtmlref .= $projectstatic->title;
236 if ($projectstatic->thirdparty->id > 0) {
237 $morehtmlref .=
'<br>'.$projectstatic->thirdparty->getNomUrl(1,
'project');
239 $morehtmlref .=
'</div>';
242 if (empty($user->rights->projet->all->lire)) {
243 $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
244 $projectstatic->next_prev_filter =
" rowid IN (".$db->sanitize(count($objectsListId) ?join(
',', array_keys($objectsListId)) :
'0').
")";
247 dol_banner_tab($projectstatic,
'project_ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
249 print
'<div class="fichecenter">';
250 print
'<div class="fichehalfleft">';
251 print
'<div class="underbanner clearboth"></div>';
253 print
'<table class="border tableforfield centpercent">';
256 if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) ||
isModEnabled(
'eventorganization')) {
257 print
'<tr><td class="tdtop">';
258 print $langs->trans(
"Usage");
261 if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
262 print
'<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET(
'usage_opportunity') ? (
GETPOST(
'usage_opportunity',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_opportunity ?
' checked="checked"' :
'')).
'"> ';
263 $htmltext = $langs->trans(
"ProjectFollowOpportunity");
264 print
$form->textwithpicto($langs->trans(
"ProjectFollowOpportunity"), $htmltext);
267 if (empty($conf->global->PROJECT_HIDE_TASKS)) {
268 print
'<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET(
'usage_task') ? (
GETPOST(
'usage_task',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_task ?
' checked="checked"' :
'')).
'"> ';
269 $htmltext = $langs->trans(
"ProjectFollowTasks");
270 print
$form->textwithpicto($langs->trans(
"ProjectFollowTasks"), $htmltext);
273 if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) {
274 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"' :
'')).
'"> ';
275 $htmltext = $langs->trans(
"ProjectBillTimeDescription");
276 print
$form->textwithpicto($langs->trans(
"BillTime"), $htmltext);
280 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"' :
'')).
'"> ';
281 $htmltext = $langs->trans(
"EventOrganizationDescriptionLong");
282 print
$form->textwithpicto($langs->trans(
"ManageOrganizeEvent"), $htmltext);
288 print
'<tr><td class="titlefield">'.$langs->trans(
"Visibility").
'</td><td>';
289 if ($projectstatic->public) {
290 print $langs->trans(
'SharedProject');
292 print $langs->trans(
'PrivateProject');
297 print
'<tr><td>'.$langs->trans(
"DateStart").
' - '.$langs->trans(
"DateEnd").
'</td><td>';
299 print ($start ? $start :
'?');
302 print ($end ? $end :
'?');
303 if ($projectstatic->hasDelay()) {
309 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
310 if (strcmp($projectstatic->budget_amount,
'')) {
311 print
price($projectstatic->budget_amount,
'', $langs, 1, 0, 0, $conf->currency);
323 print
'<div class="fichehalfright">';
324 print
'<div class="underbanner clearboth"></div>';
326 print
'<table class="border tableforfield centpercent">';
329 print
'<td class="titlefield tdtop">'.$langs->trans(
"Description").
'</td><td>';
330 print nl2br($projectstatic->description);
335 print
'<tr><td class="valignmiddle">'.$langs->trans(
"Categories").
'</td><td>';
336 print
$form->showCategories($projectstatic->id,
'project', 1);
340 print
'<tr><td class="nowrap">';
341 $typeofdata =
'checkbox:'.($projectstatic->accept_conference_suggestions ?
' checked="checked"' :
'');
342 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestConfHelp");
343 print
$form->editfieldkey(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'', $projectstatic, 0, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
345 print
$form->editfieldval(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions',
'1', $projectstatic, 0, $typeofdata,
'', 0, 0,
'', 0,
'',
'projectid');
349 $typeofdata =
'checkbox:'.($projectstatic->accept_booth_suggestions ?
' checked="checked"' :
'');
350 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestBoothHelp");
351 print
$form->editfieldkey(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'', $projectstatic, 0, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
353 print
$form->editfieldval(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions',
'1', $projectstatic, 0, $typeofdata,
'', 0, 0,
'', 0,
'',
'projectid');
357 print
$form->editfieldkey(
$form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth',
'', $projectstatic, 0,
'amount',
'', 0, 0,
'projectid');
359 print
$form->editfieldval(
$form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth', $projectstatic->price_booth, $projectstatic, 0,
'amount',
'', 0, 0,
'', 0,
'',
'projectid');
363 print
$form->editfieldkey(
$form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration',
'', $projectstatic, 0,
'amount',
'', 0, 0,
'projectid');
365 print
$form->editfieldval(
$form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration', $projectstatic->price_registration, $projectstatic, 0,
'amount',
'', 0, 0,
'', 0,
'',
'projectid');
368 print
'<tr><td valign="middle">'.$langs->trans(
"EventOrganizationICSLink").
'</td><td>';
370 $urlwithouturlroot = preg_replace(
'/'.preg_quote(DOL_URL_ROOT,
'/').
'$/i',
'', trim($dolibarr_main_url_root));
371 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
374 $message =
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ?
"&entity=".$conf->entity :
"");
375 $message .=
'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) :
'...');
376 $message .=
"&project=".$projectstatic->id.
'&module='.urlencode(
'@eventorganization').
'&status='.ConferenceOrBooth::STATUS_CONFIRMED.
'">'.$langs->trans(
'DownloadICSLink').img_picto(
'',
'download',
'class="paddingleft"').
'</a>';
383 print
$form->textwithpicto($langs->trans(
"SuggestOrVoteForConfOrBooth"), $langs->trans(
"EvntOrgRegistrationHelpMessage"));
386 $linksuggest = $dolibarr_main_url_root.
'/public/project/index.php?id='.$projectstatic->id;
387 $encodedsecurekey =
dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.
'conferenceorbooth'.$projectstatic->id,
'md5');
388 $linksuggest .=
'&securekey='.urlencode($encodedsecurekey);
391 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$linksuggest.
'" class="quatrevingtpercent">'.$linksuggest.
'</a></div>';
392 print
'<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer" href="'.$linksuggest.
'">'.
img_picto(
'',
'globe').
'</a>';
400 print $langs->trans(
"PublicAttendeeSubscriptionGlobalPage");
403 $link_subscription = $dolibarr_main_url_root.
'/public/eventorganization/attendee_new.php?id='.$projectstatic->id.
'&type=global';
404 $encodedsecurekey =
dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.
'conferenceorbooth'.$projectstatic->id,
'md5');
405 $link_subscription .=
'&securekey='.urlencode($encodedsecurekey);
408 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$link_subscription.
'" class="quatrevingtpercent">'.$link_subscription.
'</a></div>';
409 print
'<a target="_blank" rel="noopener noreferrer" href="'.$link_subscription.
'">'.
img_picto(
'',
'globe').
'</a>';
419 print
'<div class="clearboth"></div>';
427 if ($action ==
'create') {
428 print
load_fiche_titre($langs->trans(
"NewObject", $langs->transnoentitiesnoconv(
"ConferenceOrBoothAttendee")),
'',
'object_'.$object->picto);
431 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].(empty($withproject) ?
'' :
'?withproject=1').
'">';
432 print
'<input type="hidden" name="token" value="'.newToken().
'">';
433 print
'<input type="hidden" name="action" value="add">';
435 if ($confOrBooth->id > 0) {
436 print
'<input type="hidden" name="conforboothid" value="'.$confOrBooth->id.
'">';
438 if ($projectstatic->id > 0) {
439 print
'<input type="hidden" name="fk_project" value="'.$projectstatic->id.
'">';
440 print
'<input type="hidden" name="projectid" value="'.$projectstatic->id.
'">';
444 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
446 if ($backtopageforcancel) {
447 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
452 print
'<table class="border centpercent tableforfieldcreate">'.
"\n";
455 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_add.tpl.php';
458 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_add.tpl.php';
460 print
'</table>'.
"\n";
464 print
$form->buttonsSaveCancel(
"Create");
472 if (($id || $ref) && $action ==
'edit') {
473 print
load_fiche_titre($langs->trans(
"ConferenceOrBoothAttendee"),
'',
'object_'.$object->picto);
475 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
476 print
'<input type="hidden" name="token" value="'.newToken().
'">';
477 print
'<input type="hidden" name="action" value="update">';
478 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
479 if ($confOrBooth->id > 0) {
480 print
'<input type="hidden" name="conforboothid" value="'.$confOrBooth->id.
'">';
482 if ($object->fk_actioncomm > 0) {
483 print
'<input type="hidden" name="fk_actioncomm" value="'.$object->fk_actioncomm.
'">';
486 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
488 if ($backtopageforcancel) {
489 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
491 if ($projectstatic->id > 0) {
492 print
'<input type="hidden" name="fk_project" value="'.$projectstatic->id.
'">';
497 print
'<table class="border centpercent tableforfieldedit">'.
"\n";
500 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_edit.tpl.php';
503 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_edit.tpl.php';
509 print
$form->buttonsSaveCancel();
515 if ($object->id > 0 && (empty($action) || ($action !=
'edit' && $action !=
'create'))) {
516 $object->fetch_optionals();
520 $moreparam .=
'&withproject=1';
523 $moreparam .=
'&fk_project='.((int) $fk_project);
527 print
dol_get_fiche_head($head,
'card', $langs->trans(
"ConferenceOrBoothAttendee"), -1, $object->picto);
532 if ($action ==
'delete') {
533 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'DeleteConferenceOrBoothAttendee'), $langs->trans(
'ConfirmDeleteObject'),
'confirm_delete',
'', 0, 1);
536 if ($action ==
'deleteline') {
537 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id.
'&lineid='.$lineid, $langs->trans(
'DeleteLine'), $langs->trans(
'ConfirmDeleteLine'),
'confirm_deleteline',
'', 0, 1);
540 if ($action ==
'clone') {
542 $formquestion = array();
543 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneAsk', $object->ref),
'confirm_clone', $formquestion,
'yes', 1);
547 if ($action ==
'xxx') {
548 $formquestion = array();
549 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'XXX'), $text,
'confirm_xxx', $formquestion, 0, 1, 220);
553 $parameters = array(
'formConfirm' =>
$formconfirm,
'lineid' => $lineid);
554 $reshook = $hookmanager->executeHooks(
'formConfirm', $parameters, $object, $action);
555 if (empty($reshook)) {
557 } elseif ($reshook > 0) {
566 $linkback =
'<a href="'.dol_buildpath(
'/eventorganization/conferenceorboothattendee_list.php', 1).
'?restore_lastsearch_values=1'.($confOrBooth->id > 0 ?
'&conforboothid='.((int) $confOrBooth->id) :
'').$moreparam.
'">'.$langs->trans(
"BackToList").
'</a>';
568 $morehtmlref =
'<div class="refidno">';
570 $morehtmlref .=
'</div>';
572 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref, $moreparam);
574 print
'<div class="fichecenter">';
575 print
'<div class="fichehalfleft">';
576 print
'<div class="underbanner clearboth"></div>';
577 print
'<table class="border centpercent tableforfield">'.
"\n";
579 $keyforbreak =
'note_public';
582 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_view.tpl.php';
585 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
591 print
'<div class="clearboth"></div>';
597 if ($action !=
'presend' && $action !=
'editline') {
598 print
'<div class="tabsAction">'.
"\n";
599 $parameters = array();
600 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
605 if (empty($reshook)) {
607 if (empty($user->socid)) {
608 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');
610 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);
613 print
dolGetButtonAction(
'', $langs->trans(
'ToClone'),
'default', $_SERVER[
'PHP_SELF'].
'?id='.$object->id.
'&socid='.$object->socid.
'&action=clone&token='.
newToken().(!empty($projectstatic->id)?
'&fk_project='.$projectstatic->id:
''),
'', $permissiontoadd);
616 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));
623 if (
GETPOST(
'modelselected')) {
627 if ($action !=
'presend') {
628 print
'<div class="fichecenter"><div class="fichehalfleft">';
629 print
'<a name="builddoc"></a>';
631 $includedocgeneration = 0;
634 if ($includedocgeneration) {
636 $relativepath = $objref.
'/'.$objref.
'.pdf';
637 $filedir = $conf->eventorganization->dir_output.
'/'.$object->element.
'/'.$objref;
638 $urlsource = $_SERVER[
"PHP_SELF"].
"?id=".$object->id;
639 $genallowed = $user->rights->eventorganization->conferenceorboothattendee->read;
640 $delallowed = $user->rights->eventorganization->conferenceorboothattendee->write;
641 print $formfile->showdocuments(
'eventorganization:ConferenceOrBoothAttendee', $object->element.
'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0,
'',
'',
'', $langs->defaultlang);
645 $linktoelem =
$form->showLinkToObjectBlock($object,
null, array(
'conferenceorboothattendee'));
646 $somethingshown =
$form->showLinkedObjectBlock($object, $linktoelem);
649 print
'</div><div class="fichehalfright">';
651 print
'</div></div>';
655 if (
GETPOST(
'modelselected')) {
660 $modelmail =
'conferenceorboothattendee';
661 $defaulttopic =
'InformationMessage';
662 $diroutput = $conf->eventorganization->dir_output;
663 $trackid =
'conferenceorboothattendee'.$object->id;
665 include DOL_DOCUMENT_ROOT.
'/core/tpl/card_presend.tpl.php';
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Class for ConferenceOrBoothAttendee.
Class for ConferenceOrBooth.
Class to manage projects.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
conferenceorboothAttendeePrepareHead($object)
Prepare array of tabs for ConferenceOrBoothAttendees.
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.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
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='', $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)
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.
isModEnabled($module)
Is Dolibarr module enabled.
$formconfirm
if ($action == 'delbookkeepingyear') {
project_prepare_head(Project $project, $moreparam='')
Prepare array with list of tabs.
dol_hash($chain, $type='0')
Returns a hash (non reversible encryption) of a string.