30require
'../main.inc.php';
40require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
41require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
42require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
43require_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
44require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
45require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorbooth.class.php';
46require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorboothattendee.class.php';
47require_once DOL_DOCUMENT_ROOT.
'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
48require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
51$langs->loadLangs(array(
"eventorganization",
"other",
"projects",
"companies"));
54$action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
55$massaction =
GETPOST(
'massaction',
'alpha');
57$confirm =
GETPOST(
'confirm',
'alpha');
58$cancel =
GETPOST(
'cancel',
'alpha');
59$toselect =
GETPOST(
'toselect',
'array:int');
60$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') : str_replace(
'_',
'', basename(dirname(__FILE__)).basename(__FILE__,
'.php'));
61$backtopage =
GETPOST(
'backtopage',
'alpha');
62$optioncss =
GETPOST(
'optioncss',
'aZ');
67$projectref =
GETPOST(
'ref',
'alpha');
70$withThirdpartyUrl =
'';
74$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
75$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
77if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
81$offset = $limit * $page;
89$diroutputmassaction =
$conf->eventorganization->dir_output.
'/temp/massgeneration/'.$user->id;
90if ($thirdpartyid > 0) {
91 $hookmanager->initHooks(array(
'thirdpartybooth',
'globalcard'));
93 $hookmanager->initHooks(array($contextpage));
97$extrafields->fetch_name_optionals_label(
$object->table_element);
100$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element,
'',
'search_');
105 $sortfield =
"t.".key(
$object->fields);
112$search_all =
GETPOST(
'search_all',
'alphanohtml');
114foreach (
$object->fields as $key => $val) {
115 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') {
116 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
118 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
125$fieldstosearchall = array();
126foreach (
$object->fields as $key => $val) {
127 if (!empty($val[
'searchall'])) {
128 $fieldstosearchall[
't.'.$key] = $val[
'label'];
133$arrayfields = array();
134foreach (
$object->fields as $key => $val) {
136 if (!empty($val[
'visible'])) {
137 $visible = (int)
dol_eval((
string) $val[
'visible'], 1);
138 $arrayfields[
't.'.$key] = array(
139 'label' => $val[
'label'],
140 'checked' => (($visible < 0) ? 0 : 1),
141 'enabled' => (abs($visible) != 3 && (bool)
dol_eval((
string) $val[
'enabled'], 1)),
142 'position' => $val[
'position'],
143 'help' => isset($val[
'help']) ? $val[
'help'] :
''
148include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
150$parameters = array(
'arrayfields' => &$arrayfields);
151$reshook = $hookmanager->executeHooks(
'completeArrayFields', $parameters, $object, $action);
157$permissiontoread = $user->hasRight(
'project',
'read');
158$permissiontoadd = $user->hasRight(
'project',
'write');
159$permissiontodelete = $user->hasRight(
'project',
'delete');
166if ($user->socid > 0) {
178if (preg_match(
'/^set/', $action) && ($projectid > 0 || $projectref) && $user->hasRight(
'project',
'write')) {
180 $project_attr = preg_replace(
'/^set/',
'', $action);
181 if (array_key_exists($project_attr, $project->fields)) {
182 $result = $project->fetch($projectid, $projectref);
186 $projectid = $project->id;
187 $project->{$project_attr} =
GETPOST($project_attr);
188 $result = $project->update($user);
196if (
GETPOST(
'cancel',
'alpha')) {
200if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend'
201 && $massaction !=
'presend_attendees'
202 && $massaction !=
'confirm_presend'
203 && $massaction !=
'confirm_presend_attendees') {
208$parameters = array();
209$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
214if (empty($reshook)) {
216 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
219 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
220 foreach (
$object->fields as $key => $val) {
222 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
223 $search[$key.
'_dtstart'] =
'';
224 $search[$key.
'_dtend'] =
'';
228 $search_array_options = array();
230 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')
231 ||
GETPOST(
'button_search_x',
'alpha') ||
GETPOST(
'button_search.x',
'alpha') ||
GETPOST(
'button_search',
'alpha')) {
236 $objectclass =
'ConferenceOrBooth';
237 $objectlabel =
'ConferenceOrBooth';
238 $uploaddir =
$conf->eventorganization->dir_output;
239 include DOL_DOCUMENT_ROOT.
'/eventorganization/core/actions_massactions_mail.inc.php';
240 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
242 if ($permissiontoadd && (($action ==
'setstatus' && $confirm ==
"yes") || $massaction ==
'setstatus')) {
246 $objecttmp =
new $objectclass(
$db);
247 foreach ($toselect as $key => $idselect) {
248 $result = $objecttmp->fetch($idselect);
250 $objecttmp->status =
GETPOSTINT(
"statusmassaction");
251 $result = $objecttmp->update($user);
268 } elseif ($nbok > 0) {
289$title = $langs->trans(
"EventOrganizationConfOrBoothes");
290$help_url =
"EN:Module_Event_Organization";
297if ($projectid > 0 || $projectref) {
298 $result = $project->fetch($projectid, $projectref);
302 $projectid = $project->id;
304 $result = $project->fetch_thirdparty();
308 $result = $project->fetch_optionals();
313 $help_url =
"EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
316 $title = $project->ref .
' ' . $project->name .
' - ' . $langs->trans(
"ListOfConferencesOrBooths");
323llxHeader(
'', $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-eventorganization page-list bodyforlist');
326if ($thirdpartyid > 0 && $user->hasRight(
'societe',
'lire')) {
327 $withThirdpartyUrl =
'';
329 if (!empty($withthirdparty)) {
331 $tab =
'eventorganisation';
332 $withThirdpartyUrl =
"&withthirdparty=1";
335 $res = $socstat->fetch($thirdpartyid);
342 print
dol_get_fiche_head($head,
'eventorganization', $langs->trans(
"ThirdParty"), -1,
'company');
344 dol_banner_tab($socstat,
'socid',
'', ($user->socid ? 0 : 1),
'rowid',
'nom');
346 print
'<div class="fichecenter">';
348 print
'<div class="underbanner clearboth"></div>';
349 print
'<table class="border centpercent tableforfield">';
352 print
'<tr><td class="titlefield">'.$langs->trans(
'NatureOfThirdParty').
'</td><td>';
353 print $socstat->getTypeUrl(1);
357 if ($socstat->client && !empty($socstat->code_client)) {
358 print
'<tr><td class="titlefield">';
359 print $langs->trans(
'CustomerCode').
'</td><td>';
361 $tmpcheck = $socstat->check_codeclient();
362 if ($tmpcheck != 0 && $tmpcheck != -5) {
363 print
' <span class="error">('.$langs->trans(
"WrongCustomerCode").
')</span>';
369 if ($socstat->fournisseur && !empty($socstat->code_fournisseur)) {
370 print
'<tr><td class="titlefield">';
371 print $langs->trans(
'SupplierCode').
'</td><td>';
373 $tmpcheck = $socstat->check_codefournisseur();
374 if ($tmpcheck != 0 && $tmpcheck != -5) {
375 print
' <span class="error">('.$langs->trans(
"WrongSupplierCode").
')</span>';
386 $tab =
'conferenceorbooth';
387 print
dol_get_fiche_head($head, $tab, $langs->trans(
"ThirdParty"), -1,
'company', 0,
'',
'reposition');
395 $userWrite = $project->restrictedProjectArea($user,
'write');
400 print
dol_get_fiche_head($head,
'eventorganisation', $langs->trans(
"ConferenceOrBoothTab"), -1, ($project->public ?
'projectpub' :
'project'));
403 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
405 $morehtmlref =
'<div class="refidno">';
407 $morehtmlref .= $project->title;
409 if (isset($project->thirdparty->id) && $project->thirdparty->id > 0) {
410 $morehtmlref .=
'<br>'.$project->thirdparty->getNomUrl(1,
'project');
412 $morehtmlref .=
'</div>';
415 if (!$user->hasRight(
'project',
'all',
'lire')) {
416 $objectsListId = $project->getProjectsAuthorizedForUser($user, 0, 0);
417 $project->next_prev_filter =
"rowid:IN:".$db->sanitize(count($objectsListId) ? implode(
',', array_keys($objectsListId)) :
'0');
420 dol_banner_tab($project,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
424 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
426 print
'<div class="fichecenter">';
427 print
'<div class="fichehalfleft">';
428 print
'<div class="underbanner clearboth"></div>';
430 print
'<table class="border tableforfield centpercent">';
434 print
'<tr><td class="tdtop">';
435 print $langs->trans(
"Usage");
439 print
'<input type="checkbox" disabled name="usage_opportunity"'.($project->usage_opportunity ?
' checked="checked"' :
'').
'"> ';
440 $htmltext = $langs->trans(
"ProjectFollowOpportunity");
441 print $form->textwithpicto($langs->trans(
"ProjectFollowOpportunity"), $htmltext);
445 print
'<input type="checkbox" disabled name="usage_task"'.($project->usage_task ?
' checked="checked"' :
'').
'"> ';
446 $htmltext = $langs->trans(
"ProjectFollowTasks");
447 print $form->textwithpicto($langs->trans(
"ProjectFollowTasks"), $htmltext);
451 print
'<input type="checkbox" disabled name="usage_bill_time"'.($project->usage_bill_time ?
' checked="checked"' :
'').
'"> ';
452 $htmltext = $langs->trans(
"ProjectBillTimeDescription");
453 print $form->textwithpicto($langs->trans(
"BillTime"), $htmltext);
457 print
'<input type="checkbox" disabled name="usage_organize_event"'.($project->usage_organize_event ?
' checked="checked"' :
'').
'"> ';
458 $htmltext = $langs->trans(
"EventOrganizationDescriptionLong");
459 print $form->textwithpicto($langs->trans(
"ManageOrganizeEvent"), $htmltext);
465 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
466 if (strcmp($project->budget_amount,
'')) {
467 print
'<span class="amount">'.price($project->budget_amount, 0, $langs, 1, 0, 0,
$conf->currency).
'</span>';
472 print
'<tr><td>'.$langs->trans(
"Dates").
' ('.$langs->trans(
"Project").
')</td><td>';
474 print($start ? $start :
'?');
477 print($end ? $end :
'?');
484 print
'<tr><td>'.$langs->trans(
"Dates").
' ('.$langs->trans(
"Event").
')</td><td>';
485 $dateformat = (
dol_print_date($project->date_start_event,
'%H:%M:%S',
'tzuserrel') ==
'00:00:00' ?
'day' :
'dayhour');
486 $start =
dol_print_date($project->date_start_event, $dateformat,
'tzuserrel');
487 print($start ?
'<span title="'.
dol_print_date($project->date_start_event,
'dayhour',
'tzuserrel').
'">'.$start.
'</span>' :
'?');
489 $dateformat = (
dol_print_date($project->date_end_event,
'%H:%M:%S',
'tzuserrel') ==
'00:00:00' ?
'day' :
'dayhour');
490 $end =
dol_print_date($project->date_end_event, $dateformat,
'tzuserrel');
491 print($end ?
'<span title="'.
dol_print_date($project->date_end_event,
'dayhour',
'tzuserrel').
'">'.$end.
'</span>' :
'?');
498 print
'<tr><td class="titlefield">'.$langs->trans(
"Visibility").
'</td><td>';
499 if ($project->public == 0) {
500 print
img_picto($langs->trans(
'PrivateProject'),
'private',
'class="paddingrightonly"');
501 print $langs->trans(
"PrivateProject");
503 print
img_picto($langs->trans(
'SharedProject'),
'world',
'class="paddingrightonly"');
504 print $langs->trans(
"SharedProject");
509 print
'<tr><td>'.$langs->trans(
"Location").
'</td><td>';
517 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
523 print
'<div class="fichehalfright">';
524 print
'<div class="underbanner clearboth"></div>';
526 print
'<table class="border tableforfield centpercent">';
530 print
'<tr><td class="titlefieldmiddle valignmiddle">'.$langs->trans(
"Categories").
'</td><td class="valuefield">';
531 print $form->showCategories($project->id, Categorie::TYPE_PROJECT, 1);
536 print
'<tr><td class="titlefield'.($project->description ?
' noborderbottom' :
'').
'" colspan="2">'.$langs->trans(
"Description").
'</td></tr>';
537 if ($project->description) {
538 print
'<tr><td class="nottitleforfield" colspan="2">';
539 print
'<div class="longmessagecut">';
545 print
'<tr><td class="titlefieldmiddle">';
546 $typeofdata =
'checkbox:'.($project->accept_conference_suggestions ?
' checked="checked"' :
'');
547 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestConfHelp");
548 print $form->editfieldkey(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions', ($project->accept_conference_suggestions ?
'1' :
'0'), $project, $permissiontoadd, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
549 print
'</td><td class="valuefield">';
550 print $form->editfieldval(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions', ($project->accept_conference_suggestions ?
'1' :
'0'), $project, $permissiontoadd, $typeofdata,
'', null, null,
'', 0,
'',
'projectid');
553 print
'<tr><td class="">';
554 $typeofdata =
'checkbox:'.($project->accept_booth_suggestions ?
' checked="checked"' :
'');
555 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestBoothHelp");
556 print $form->editfieldkey(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions', ($project->accept_booth_suggestions ?
'1' :
'0'), $project, $permissiontoadd, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
557 print
'</td><td class="valuefield">';
558 print $form->editfieldval(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions', ($project->accept_booth_suggestions ?
'1' :
'0'), $project, $permissiontoadd, $typeofdata,
'', null, null,
'', 0,
'',
'projectid');
561 print
'<tr><td class="">';
562 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth',
'', $project, $permissiontoadd,
'amount',
'', 0, 0,
'projectid');
563 print
'</td><td class="valuefield">';
564 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth', $project->price_booth, $project, $permissiontoadd,
'amount',
'',
null,
null,
'', 0,
'',
'projectid');
567 print
'<tr><td class="">';
568 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration',
'', $project, $permissiontoadd,
'amount',
'', 0, 0,
'projectid');
569 print
'</td><td class="valuefield">';
570 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration', $project->price_registration, $project, $permissiontoadd,
'amount',
'',
null,
null,
'', 0,
'',
'projectid');
573 print
'<tr><td class="">';
574 print $form->editfieldkey($form->textwithpicto($langs->trans(
'MaxNbOfAttendees'),
''),
'max_attendees',
'', $project, $permissiontoadd,
'integer:3',
'', 0, 0,
'projectid');
575 print
'</td><td class="valuefield">';
576 print $form->editfieldval($form->textwithpicto($langs->trans(
'MaxNbOfAttendees'),
''),
'max_attendees', $project->max_attendees, $project, $permissiontoadd,
'integer:3',
'',
null,
null,
'', 0,
'',
'projectid');
580 print
'<tr><td class="valignmiddle">'.$langs->trans(
"EventOrganizationICSLinkProject").
'</td><td class="valuefield">';
583 $message =
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/agenda/agendaexport.php?format=ical'.(
$conf->entity > 1 ?
"&entity=".$conf->entity :
"");
584 $message .=
'&exportkey='.urlencode(
getDolGlobalString(
'MAIN_AGENDA_XCAL_EXPORTKEY',
'...'));
585 $message .=
"&project=".$projectid.
'&module='.urlencode(
'project@eventorganization').
'&file='.urlencode(
'calendar-'.$project->ref.
'.ics').
'&output=file">'.$langs->trans(
'DownloadICSLink').img_picto(
'',
'download',
'class="paddingleft"').
'</a>';
587 if (empty($project->date_start_event) || empty($project->date_end_event)) {
588 print
img_warning($langs->trans(
"EventStartOrEndDateNotDefined"),
'',
'marginleftonlyshort');
593 print
'<tr><td class="valignmiddle">'.$langs->trans(
"EventOrganizationICSLink");
596 if ($nbofconfbooth > 0) {
597 print
'<span class="opacitymedium">('.$nbofconfbooth.
')</span>';
599 print
'</td><td class="valuefield">';
602 $message =
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/agenda/agendaexport.php?format=ical'.(
$conf->entity > 1 ?
"&entity=".$conf->entity :
"");
603 $message .=
'&exportkey='.urlencode(
getDolGlobalString(
'MAIN_AGENDA_XCAL_EXPORTKEY',
'...'));
604 $message .=
"&project=".$projectid.
'&module='.urlencode(
'conforbooth@eventorganization').
'&file='.urlencode(
'calendar-'.$project->ref.
'-conforbooth.ics').
'&status='.ConferenceOrBooth::STATUS_CONFIRMED.
'&output=file">'.$langs->trans(
'DownloadICSLink').img_picto(
'',
'download',
'class="paddingleft"').
'</a>';
609 print
'<tr><td class="">';
611 print $form->textwithpicto($langs->trans(
"SuggestOrVoteForConfOrBooth"), $langs->trans(
"EvntOrgRegistrationHelpMessage"));
613 print
'</td><td class="valuefield nowrap">';
615 $encodedsecurekey =
dol_hash(
getDolGlobalString(
'EVENTORGANIZATION_SECUREKEY').
'conferenceorbooth'.((
int) $project->id),
'md5');
616 $linksuggest .=
'&securekey='.urlencode($encodedsecurekey);
619 print
'<div class="tdoverflowmax150 inline-block valignmiddle"><a target="_blank" href="'.$linksuggest.
'" class="quatrevingtpercent">'.$linksuggest.
'</a></div>';
620 print
'<a target="_blank" rel="noopener noreferrer" href="'.$linksuggest.
'">'.
img_picto(
'',
'globe').
'</a>';
626 print
'<tr><td class="">';
628 print $langs->trans(
"PublicAttendeeSubscriptionGlobalPage");
630 print
'</td><td class="valuefield nowrap">';
631 $link_subscription =
$dolibarr_main_url_root.
'/public/eventorganization/attendee_new.php?id='.((int) $project->id).
'&type=global';
632 $encodedsecurekey =
dol_hash(
getDolGlobalString(
'EVENTORGANIZATION_SECUREKEY').
'conferenceorbooth'.((
int) $project->id),
'md5');
633 $link_subscription .=
'&securekey='.urlencode($encodedsecurekey);
636 print
'<div class="tdoverflowmax150 inline-block valignmiddle"><a target="_blank" href="'.$link_subscription.
'" class="quatrevingtpercent">'.$link_subscription.
'</a></div>';
637 print
'<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer" href="'.$link_subscription.
'">'.
img_picto(
'',
'globe').
'</a>';
647 print
'<div class="clearboth"></div>';
652if (!empty($project->id)) {
654 $tab =
'conferenceorbooth';
656 print
dol_get_fiche_head($head, $tab, $langs->trans(
"Project"), -1,
'', 0,
'',
'reposition');
662$sql .=
$object->getFieldList(
't');
665if (!empty($extrafields->attributes[
$object->table_element][
'label'])) {
666 foreach ($extrafields->attributes[
$object->table_element][
'label'] as $key => $val) {
667 $sql .= ($extrafields->attributes[
$object->table_element][
'type'][$key] !=
'separate' ?
", ef.".$key.
" as options_".$key :
'');
671$parameters = array();
672$reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object, $action);
673$sql .= $hookmanager->resPrint;
674$sql = preg_replace(
'/,\s*$/',
'', $sql);
679$sql .=
" FROM ".MAIN_DB_PREFIX.$object->table_element.
" as t";
680if (isset($extrafields->attributes[
$object->table_element][
'label']) && is_array($extrafields->attributes[
$object->table_element][
'label']) && count($extrafields->attributes[
$object->table_element][
'label'])) {
681 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (t.id = ef.fk_object)";
683$sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"c_actioncomm as cact ON cact.id=t.fk_action AND cact.module LIKE '%@eventorganization'";
685$parameters = array();
686$reshook = $hookmanager->executeHooks(
'printFieldListFrom', $parameters, $object, $action);
687$sql .= $hookmanager->resPrint;
688if (
$object->ismultientitymanaged == 1) {
689 $sql .=
" WHERE t.entity IN (".getEntity(
$object->element, (
GETPOSTINT(
'search_current_entity') ? 0 : 1)).
")";
691 $sql .=
" WHERE 1 = 1";
694 $sql .=
" AND t.fk_project = ".((int) $project->id);
696if (!empty($thirdpartyid)) {
697 $sql .=
" AND t.fk_soc = ".((int) $thirdpartyid);
699foreach ($search as $key => $val) {
700 if (array_key_exists($key,
$object->fields)) {
701 if ($key ==
'status' && $search[$key] == -1) {
705 if ((strpos(
$object->fields[$key][
'type'],
'integer:') === 0) || (strpos(
$object->fields[$key][
'type'],
'sellist:') === 0) || !empty(
$object->fields[$key][
'arrayofkeyval'])) {
706 if ($search[$key] ==
'-1' || ($search[$key] ===
'0' && (empty(
$object->fields[$key][
'arrayofkeyval']) || !array_key_exists(
'0',
$object->fields[$key][
'arrayofkeyval'])))) {
711 if ($search[$key] !=
'') {
712 $sql .=
natural_search(
"t.".
$db->sanitize($key), $search[$key], (($key ==
'status') ? 2 : $mode_search));
715 if (preg_match(
'/(_dtstart|_dtend)$/', $key) && $search[$key] !=
'') {
716 $columnName = preg_replace(
'/(_dtstart|_dtend)$/',
'', $key);
717 if (preg_match(
'/^(date|timestamp|datetime)/',
$object->fields[$columnName][
'type'])) {
718 if (preg_match(
'/_dtstart$/', $key)) {
719 $sql .=
" AND t.".$db->sanitize($columnName).
" >= '".
$db->idate($search[$key]).
"'";
721 if (preg_match(
'/_dtend$/', $key)) {
722 $sql .=
" AND t.".$db->sanitize($columnName).
" <= '".
$db->idate($search[$key]).
"'";
729 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
733include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
735$parameters = array();
736$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object, $action);
737$sql .= $hookmanager->resPrint;
740$nbtotalofrecords =
'';
743 $sqlforcount = preg_replace(
'/^'.preg_quote($sqlfields,
'/').
'/',
'SELECT COUNT(*) as nbtotalofrecords', $sql);
744 $sqlforcount = preg_replace(
'/GROUP BY .*$/',
'', $sqlforcount);
745 $resql =
$db->query($sqlforcount);
747 $objforcount =
$db->fetch_object($resql);
748 $nbtotalofrecords = $objforcount->nbtotalofrecords;
753 if (($page * $limit) > (
int) $nbtotalofrecords) {
761$sql .=
$db->order($sortfield, $sortorder);
763 $sql .=
$db->plimit($limit + 1, $offset);
766$resql =
$db->query($sql);
772$num =
$db->num_rows($resql);
775if ($num == 1 &&
getDolGlobalInt(
'MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) {
776 $obj =
$db->fetch_object($resql);
778 header(
"Location: ".DOL_URL_ROOT.
'/eventorganization/conferenceorbooth_card.php?id='.((
int) $id));
782$arrayofselected = is_array($toselect) ? $toselect : array();
786 $param .=
'&mode='.urlencode($mode);
788if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
789 $param .=
'&contextpage='.urlencode($contextpage);
791if ($limit > 0 && $limit !=
$conf->liste_limit) {
792 $param .=
'&limit='.((int) $limit);
794if ($optioncss !=
'') {
795 $param .=
'&optioncss='.urlencode($optioncss);
797if ($project->id > 0) {
798 $param .=
'&projectid='.((int) $project->id);
800foreach ($search as $key => $val) {
801 if (is_array($search[$key])) {
802 foreach ($search[$key] as $skey) {
804 $param .=
'&search_'.$key.
'[]='.urlencode($skey);
807 } elseif (preg_match(
'/(_dtstart|_dtend)$/', $key) && !empty($val)) {
808 $param .=
'&search_'.$key.
'month='.(
GETPOSTINT(
'search_'.$key.
'month'));
809 $param .=
'&search_'.$key.
'day='.(
GETPOSTINT(
'search_'.$key.
'day'));
810 $param .=
'&search_'.$key.
'year='.(
GETPOSTINT(
'search_'.$key.
'year'));
811 } elseif ($search[$key] !=
'') {
812 $param .=
'&search_'.$key.
'='.urlencode($search[$key]);
816include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
818$parameters = array(
'param' => &$param);
819$reshook = $hookmanager->executeHooks(
'printFieldListSearchParam', $parameters, $object, $action);
820$param .= $hookmanager->resPrint;
823$arrayofmassactions = array(
827 'presend' =>
img_picto(
'',
'email',
'class="pictofixedwidth"').$langs->trans(
"SendByMail").
' ('.$langs->trans(
"ToSpeakers").
')',
830if (!empty($permissiontodelete)) {
831 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
833if (!empty($permissiontoadd)) {
834 $arrayofmassactions[
'presetstatus'] =
img_picto(
'',
'edit',
'class="pictofixedwidth"').$langs->trans(
"ModifyStatus");
836if (
GETPOSTINT(
'nomassaction') || in_array($massaction, array(
'presend',
'predelete'))) {
837 $arrayofmassactions = array();
839$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
841print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].(!empty($projectid) ?
'?projectid='.$projectid :
'').
'">'.
"\n";
842if ($optioncss !=
'') {
843 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
845print
'<input type="hidden" name="token" value="'.newToken().
'">';
846print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
847print
'<input type="hidden" name="action" value="list">';
848print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
849print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
850print
'<input type="hidden" name="page" value="'.$page.
'">';
851print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
852print
'<input type="hidden" name="page_y" value="">';
853print
'<input type="hidden" name="mode" value="'.$mode.
'">';
857$newcardbutton .=
dolGetButtonTitle($langs->trans(
'ViewList'),
'',
'fa fa-bars imgforviewmode', $_SERVER[
"PHP_SELF"].
'?mode=common'.(!empty($project->id) ?
'&withproject=1&fk_project='.$project->id :
'').(!empty($project->socid) ?
'&fk_soc='.$project->socid :
'').preg_replace(
'/(&|\?)*mode=[^&]+/',
'', $param),
'', ((empty($mode) || $mode ==
'common') ? 2 : 1), array(
'morecss' =>
'reposition'));
858$newcardbutton .=
dolGetButtonTitle($langs->trans(
'ViewKanban'),
'',
'fa fa-th-list imgforviewmode', $_SERVER[
"PHP_SELF"].
'?mode=kanban'.(!empty($project->id) ?
'&withproject=1&fk_project='.$project->id :
'').(!empty($project->socid) ?
'&fk_soc='.$project->socid :
'').preg_replace(
'/(&|\?)*mode=[^&]+/',
'', $param),
'', ($mode ==
'kanban' ? 2 : 1), array(
'morecss' =>
'reposition'));
860$newcardbutton .=
dolGetButtonTitle($langs->trans(
'New'),
'',
'fa fa-plus-circle', DOL_URL_ROOT.
'/eventorganization/conferenceorbooth_card.php?action=create'.(!empty($project->id) ?
'&withproject=1&fk_project='.$project->id :
'').(!empty($project->socid) ?
'&fk_soc='.$project->socid :
'').
'&backtopage='.urlencode($_SERVER[
'PHP_SELF']).(!empty($project->id) ?
'?projectid='.$project->id :
''),
'', $permissiontoadd);
862print_barre_liste($subtitle, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
$object->picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
867$modelmail =
"conferenceorbooth";
869$trackid =
'conferenceorbooth_'.$object->id;
870$withmaindocfilemail = 0;
871include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
873if ($massaction ==
'presetstatus') {
874 $formquestion = array();
875 $statuslist = array();
876 $statuslist[$objecttmp::STATUS_DRAFT] = $objecttmp->LibStatutEvent($objecttmp::STATUS_DRAFT);
877 $statuslist[$objecttmp::STATUS_SUGGESTED] = $objecttmp->LibStatutEvent($objecttmp::STATUS_SUGGESTED);
878 $statuslist[$objecttmp::STATUS_CONFIRMED] = $objecttmp->LibStatutEvent($objecttmp::STATUS_CONFIRMED);
879 $statuslist[$objecttmp::STATUS_NOT_QUALIFIED] = $objecttmp->LibStatutEvent($objecttmp::STATUS_NOT_QUALIFIED);
880 $statuslist[$objecttmp::STATUS_DONE] = $objecttmp->LibStatutEvent($objecttmp::STATUS_DONE);
881 $statuslist[$objecttmp::STATUS_CANCELED] = $objecttmp->LibStatutEvent($objecttmp::STATUS_CANCELED);
882 $formquestion[] = array(
'type' =>
'other',
883 'name' =>
'affectedcommercial',
884 'label' => $form->editfieldkey(
'ModifyStatus',
'status_id',
'', $object, 0),
885 'value' => $form->selectarray(
'statusmassaction', $statuslist,
GETPOST(
'statusmassaction')));
886 print $form->formconfirm($_SERVER[
"PHP_SELF"], $langs->trans(
"ConfirmModifyStatus"), $langs->trans(
"ConfirmModifyStatusQuestion", count($toselect)),
"setstatus", $formquestion, 1, 0, 200, 500, 1);
891 foreach ($fieldstosearchall as $key => $val) {
892 $fieldstosearchall[$key] = $langs->trans($val);
893 $setupstring .= $key.
"=".$val.
";";
895 print
'<!-- Search done like if EVENTORGANIZATION_QUICKSEARCH_ON_FIELDS = '.$setupstring.
' -->'.
"\n";
896 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).implode(
', ', $fieldstosearchall).
'</div>'.
"\n";
904$parameters = array();
905$reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object, $action);
906if (empty($reshook)) {
907 $moreforfilter .= $hookmanager->resPrint;
909 $moreforfilter = $hookmanager->resPrint;
912if (!empty($moreforfilter)) {
913 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
914 print $moreforfilter;
918$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
919$htmlofselectarray = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
$conf->main_checkbox_left_column);
920$selectedfields = ($mode !=
'kanban' ? $htmlofselectarray :
'');
921$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
924print
'<div class="div-table-responsive">';
925print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
930print
'<tr class="liste_titre_filter">';
932if (
$conf->main_checkbox_left_column) {
933 print
'<td class="liste_titre center maxwidthsearch">';
934 $searchpicto = $form->showFilterButtons(
'left');
938foreach (
$object->fields as $key => $val) {
939 $searchkey = empty($search[$key]) ?
'' : $search[$key];
940 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
941 if ($key ==
'status') {
942 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
943 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
944 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
945 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
946 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
947 } elseif (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && !in_array($key, array(
'id',
'rowid',
'ref',
'status')) && $val[
'label'] !=
'TechnicalID' && empty($val[
'arrayofkeyval'])) {
948 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
950 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
951 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').($key ==
'status' ?
' parentonrightofpage' :
'').
'">';
952 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
953 print $form->selectarray(
'search_'.$key, $val[
'arrayofkeyval'], (isset($search[$key]) ? $search[$key] :
''), $val[
'notnull'], 0, 0,
'', 1, 0, 0,
'',
'maxwidth100'.($key ==
'status' ?
' search_status width100 onrightofpage' :
''), 1);
954 } elseif ((strpos($val[
'type'],
'integer:') === 0) || (strpos($val[
'type'],
'sellist:') === 0)) {
955 print
$object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] :
''),
'',
'',
'search_', $cssforfield.
' maxwidth250', 1);
956 } elseif (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
957 print
'<div class="nowrap">';
958 print $form->selectDate($search[$key.
'_dtstart'] ? $search[$key.
'_dtstart'] :
'',
"search_".$key.
"_dtstart", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
960 print
'<div class="nowrap">';
961 print $form->selectDate($search[$key.
'_dtend'] ? $search[$key.
'_dtend'] :
'',
"search_".$key.
"_dtend", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
963 } elseif ($key ==
'lang') {
964 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
966 print $formadmin->select_language($search[$key],
'search_lang', 0, array(), 1, 0, 0,
'minwidth100imp maxwidth125', 2);
968 print
'<input type="text" class="flat maxwidth'.($val[
'type'] ==
'integer' ?
'50' :
'75').
'" name="search_'.$key.
'" value="'.
dol_escape_htmltag(isset($search[$key]) ? $search[$key] :
'').
'">';
974include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
977$parameters = array(
'arrayfields' => $arrayfields);
978$reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters, $object, $action);
979print $hookmanager->resPrint;
981if (!
$conf->main_checkbox_left_column) {
982 print
'<td class="liste_titre center maxwidthsearch">';
983 $searchpicto = $form->showFilterButtons();
994print
'<tr class="liste_titre">';
996if (
$conf->main_checkbox_left_column) {
997 print
getTitleFieldOfList($selectedfields, 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
1000foreach (
$object->fields as $key => $val) {
1001 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
1002 if ($key ==
'status') {
1003 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
1004 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
1005 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
1006 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
1007 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
1008 } elseif (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && !in_array($key, array(
'id',
'rowid',
'ref',
'status')) && $val[
'label'] !=
'TechnicalID' && empty($val[
'arrayofkeyval'])) {
1009 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
1011 $cssforfield = preg_replace(
'/small\s*/',
'', $cssforfield);
1012 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
1013 print
getTitleFieldOfList($arrayfields[
't.'.$key][
'label'], 0, $_SERVER[
'PHP_SELF'],
't.'.$key,
'', $param, ($cssforfield ?
'class="'.$cssforfield.
'"' :
''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.
' ' :
''), 0, (empty($val[
'helplist']) ?
'' : $val[
'helplist'])).
"\n";
1018include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
1020$parameters = array(
'arrayfields' => $arrayfields,
'param' => $param,
'sortfield' => $sortfield,
'sortorder' => $sortorder,
'totalarray' => &$totalarray);
1021$reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters, $object, $action);
1022print $hookmanager->resPrint;
1024if (!
$conf->main_checkbox_left_column) {
1025 print
getTitleFieldOfList($selectedfields, 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
1032$needToFetchEachLine = 0;
1033if (isset($extrafields->attributes[
$object->table_element][
'computed']) && is_array($extrafields->attributes[
$object->table_element][
'computed']) && count($extrafields->attributes[
$object->table_element][
'computed']) > 0) {
1034 foreach ($extrafields->attributes[
$object->table_element][
'computed'] as $key => $val) {
1035 if (!is_null($val) && preg_match(
'/\$object/', $val)) {
1036 $needToFetchEachLine++;
1048$imaxinloop = ($limit ? min($num, $limit) : $num);
1049while ($i < $imaxinloop) {
1050 $obj =
$db->fetch_object($resql);
1056 $object->setVarsFromFetchObj($obj);
1058 if ($mode ==
'kanban') {
1060 print
'<tr class="trkanban"><td colspan="'.$savnbfield.
'">';
1061 print
'<div class="box-flex-container kanban">';
1065 if ($massactionbutton || $massaction) {
1067 if (in_array(
$object->id, $arrayofselected)) {
1071 $thirdparty =
$object->fetch_thirdparty();
1072 print
$object->getKanbanView(
'', array(
'selected' => $selected,
'thirdparty' => $thirdparty));
1073 if ($i == ($imaxinloop - 1)) {
1080 print
'<tr data-rowid="'.$object->id.
'" class="oddeven row-with-select">';
1082 if (
$conf->main_checkbox_left_column) {
1083 print
'<td class="nowrap center">';
1084 if ($massactionbutton || $massaction) {
1086 if (in_array(
$object->id, $arrayofselected)) {
1089 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.
$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1096 foreach (
$object->fields as $key => $val) {
1097 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
1098 if (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
1099 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
1100 } elseif ($key ==
'status') {
1101 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
1104 if (in_array($val[
'type'], array(
'timestamp'))) {
1105 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowraponall';
1106 } elseif ($key ==
'ref') {
1107 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowraponall';
1110 if (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && !in_array($key, array(
'id',
'rowid',
'ref',
'status')) && empty($val[
'arrayofkeyval'])) {
1111 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
1115 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
1116 print
'<td'.($cssforfield ?
' class="'.$cssforfield.(preg_match(
'/tdoverflow/', $cssforfield) ?
' classfortooltip' :
'').
'"' :
'');
1117 if (preg_match(
'/tdoverflow/', $cssforfield) && !is_numeric(
$object->$key)) {
1118 print
' title="'.dol_escape_htmltag((
string)
$object->$key).
'"';
1121 if ($key ==
'status') {
1122 print
$object->getLibStatut(5);
1123 } elseif ($key ==
'ref') {
1124 print
$object->getNomUrl(1, 0,
'', (($projectid > 0) ?
'withproject' :
''));
1126 print
$object->showOutputField($val, $key, (
string)
$object->$key,
'');
1132 if (!empty($val[
'isameasure']) && $val[
'isameasure'] == 1) {
1136 if (!isset($totalarray[
'val'])) {
1139 if (!isset($totalarray[
'val'][
't.'.$key])) {
1147 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
1149 $parameters = array(
'arrayfields' => $arrayfields,
'object' => $object,
'obj' => $obj,
'i' => $i,
'totalarray' => &$totalarray);
1150 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $object, $action);
1151 print $hookmanager->resPrint;
1153 if (!
$conf->main_checkbox_left_column) {
1154 print
'<td class="nowrap center">';
1155 if ($massactionbutton || $massaction) {
1157 if (in_array(
$object->id, $arrayofselected)) {
1160 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.
$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1175include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
1180 foreach ($arrayfields as $key => $val) {
1181 if (!empty($val[
'checked'])) {
1185 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
1191$parameters = array(
'arrayfields' => $arrayfields,
'sql' => $sql);
1192$reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object, $action);
1193print $hookmanager->resPrint;
1195print
'</table>'.
"\n";
1198print
'</form>'.
"\n";
1200if (in_array(
'builddoc', array_keys($arrayofmassactions)) && ($nbtotalofrecords ===
'' || $nbtotalofrecords)) {
1201 $hidegeneratedfilelistifempty = 1;
1202 if ($massaction ==
'builddoc' || $action ==
'remove_file' || $show_files) {
1203 $hidegeneratedfilelistifempty = 0;
1206 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
1210 $urlsource = $_SERVER[
'PHP_SELF'].
'?sortfield='.$sortfield.
'&sortorder='.$sortorder;
1211 $urlsource .= str_replace(
'&',
'&', $param);
1213 $filedir = $diroutputmassaction;
1214 $genallowed = $permissiontoread;
1215 $delallowed = $permissiontoadd;
1217 print $formfile->showdocuments(
'massfilesarea_eventorganization',
'', $filedir, $urlsource, 0, $delallowed,
'', 1, 1, 0, 48, 1, $param, $title,
'',
'',
'',
null, $hidegeneratedfilelistifempty);
$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.
Class to manage third parties objects (customers, suppliers, prospects...)
societe_prepare_head(Societe $object, $subtabs='')
Return array of tabs to used on pages for third parties cards.
conferenceorboothThirdpartyPrepareHead($object)
Prepare array of tabs for ConferenceOrBooth Thirdparty tab.
conferenceorboothProjectPrepareHead($object)
Prepare array of tabs for ConferenceOrBooth Project tab.
dol_now($mode='gmt')
Return date for now.
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...
dol_eval($s, $returnvalue=1, $hideerrors=1, $onlysimplestring='1')
Replace eval function to add more security.
natural_search($fields, $value, $mode=0, $nofirstand=0, $sqltoadd='')
Generate natural SQL search string for a criteria (this criteria can be tested on one or several fiel...
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by the value of a given key, which produces ascending (default) or descending out...
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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).
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
print_barre_liste($title, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $selectlimitsuffix=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
showValueWithClipboardCPButton($valuetocopy, $showonlyonhover=1, $texttoshow='')
Create a button to copy $valuetocopy in the clipboard (for copy and paste feature).
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.
dolPrintHTML($s, $allowiframe=0, $moreallowedtags=array())
Return a string (that can be on several lines) ready to be output on a HTML page.
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.
dolGetButtonTitle($label, $helpText='', $iconClass='fa fa-file', $url='', $id='', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get title line of an array.
dolGetButtonTitleSeparator($moreClass="")
Add space between dolGetButtonTitle.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
print $langs trans("Show") . '< td style="' . $timeColor . '" align="center"> s</td > badge status0 badge status4 badge status3 Error badge status8< td align="center">< span class="badge ' . $badge . '"></span ></td >< td align="center">< a href="#" class="button button-small" onclick="openLogModal(this)" data-req="' . dol_escape_htmltag($reqSafe) . '" data-res="' . dol_escape_htmltag($resSafe) . '" data-err="' . dol_escape_htmltag($errSafe) . '">< span class="fa fa-search-plus"></span ></a ></td ></tr >< tr >< td colspan="' . $colspan . '" class="opacitymedium"></td ></tr ></table ></div ></form > logModal none logModal none s a JSON string
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.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.
dol_hash($chain, $type='0', $nosalt=0, $mode=0)
Returns a hash (non reversible encryption) of a string.