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';
154$permissiontoread = $user->hasRight(
'project',
'read');
155$permissiontoadd = $user->hasRight(
'project',
'write');
156$permissiontodelete = $user->hasRight(
'project',
'delete');
163if ($user->socid > 0) {
175if (preg_match(
'/^set/', $action) && ($projectid > 0 || $projectref) && $user->hasRight(
'project',
'write')) {
177 $project_attr = preg_replace(
'/^set/',
'', $action);
178 if (array_key_exists($project_attr, $project->fields)) {
179 $result = $project->fetch($projectid, $projectref);
183 $projectid = $project->id;
184 $project->{$project_attr} =
GETPOST($project_attr);
185 $result = $project->update($user);
193if (
GETPOST(
'cancel',
'alpha')) {
197if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend'
198 && $massaction !=
'presend_attendees'
199 && $massaction !=
'confirm_presend'
200 && $massaction !=
'confirm_presend_attendees') {
205$parameters = array();
206$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
211if (empty($reshook)) {
213 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
216 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
217 foreach (
$object->fields as $key => $val) {
219 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
220 $search[$key.
'_dtstart'] =
'';
221 $search[$key.
'_dtend'] =
'';
225 $search_array_options = array();
227 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')
228 ||
GETPOST(
'button_search_x',
'alpha') ||
GETPOST(
'button_search.x',
'alpha') ||
GETPOST(
'button_search',
'alpha')) {
233 $objectclass =
'ConferenceOrBooth';
234 $objectlabel =
'ConferenceOrBooth';
235 $uploaddir =
$conf->eventorganization->dir_output;
236 include DOL_DOCUMENT_ROOT.
'/eventorganization/core/actions_massactions_mail.inc.php';
237 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
239 if ($permissiontoadd && (($action ==
'setstatus' && $confirm ==
"yes") || $massaction ==
'setstatus')) {
243 $objecttmp =
new $objectclass(
$db);
244 foreach ($toselect as $key => $idselect) {
245 $result = $objecttmp->fetch($idselect);
247 $objecttmp->status =
GETPOSTINT(
"statusmassaction");
248 $result = $objecttmp->update($user);
265 } elseif ($nbok > 0) {
286$title = $langs->trans(
"EventOrganizationConfOrBoothes");
287$help_url =
"EN:Module_Event_Organization";
294if ($projectid > 0 || $projectref) {
295 $result = $project->fetch($projectid, $projectref);
299 $projectid = $project->id;
301 $result = $project->fetch_thirdparty();
305 $result = $project->fetch_optionals();
310 $help_url =
"EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
313 $title = $project->ref .
' ' . $project->name .
' - ' . $langs->trans(
"ListOfConferencesOrBooths");
320llxHeader(
'', $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-eventorganization page-list bodyforlist');
323if ($thirdpartyid > 0 && $user->hasRight(
'societe',
'lire')) {
324 $withThirdpartyUrl =
'';
326 if (!empty($withthirdparty)) {
328 $tab =
'eventorganisation';
329 $withThirdpartyUrl =
"&withthirdparty=1";
332 $res = $socstat->fetch($thirdpartyid);
339 print
dol_get_fiche_head($head,
'eventorganization', $langs->trans(
"ThirdParty"), -1,
'company');
341 dol_banner_tab($socstat,
'socid',
'', ($user->socid ? 0 : 1),
'rowid',
'nom');
343 print
'<div class="fichecenter">';
345 print
'<div class="underbanner clearboth"></div>';
346 print
'<table class="border centpercent tableforfield">';
349 print
'<tr><td class="titlefield">'.$langs->trans(
'NatureOfThirdParty').
'</td><td>';
350 print $socstat->getTypeUrl(1);
354 if ($socstat->client && !empty($socstat->code_client)) {
355 print
'<tr><td class="titlefield">';
356 print $langs->trans(
'CustomerCode').
'</td><td>';
358 $tmpcheck = $socstat->check_codeclient();
359 if ($tmpcheck != 0 && $tmpcheck != -5) {
360 print
' <span class="error">('.$langs->trans(
"WrongCustomerCode").
')</span>';
366 if ($socstat->fournisseur && !empty($socstat->code_fournisseur)) {
367 print
'<tr><td class="titlefield">';
368 print $langs->trans(
'SupplierCode').
'</td><td>';
370 $tmpcheck = $socstat->check_codefournisseur();
371 if ($tmpcheck != 0 && $tmpcheck != -5) {
372 print
' <span class="error">('.$langs->trans(
"WrongSupplierCode").
')</span>';
383 $tab =
'conferenceorbooth';
384 print
dol_get_fiche_head($head, $tab, $langs->trans(
"ThirdParty"), -1,
'company', 0,
'',
'reposition');
392 $userWrite = $project->restrictedProjectArea($user,
'write');
397 print
dol_get_fiche_head($head,
'eventorganisation', $langs->trans(
"ConferenceOrBoothTab"), -1, ($project->public ?
'projectpub' :
'project'));
400 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
402 $morehtmlref =
'<div class="refidno">';
404 $morehtmlref .= $project->title;
406 if (isset($project->thirdparty->id) && $project->thirdparty->id > 0) {
407 $morehtmlref .=
'<br>'.$project->thirdparty->getNomUrl(1,
'project');
409 $morehtmlref .=
'</div>';
412 if (!$user->hasRight(
'project',
'all',
'lire')) {
413 $objectsListId = $project->getProjectsAuthorizedForUser($user, 0, 0);
414 $project->next_prev_filter =
"rowid:IN:".$db->sanitize(count($objectsListId) ? implode(
',', array_keys($objectsListId)) :
'0');
417 dol_banner_tab($project,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
421 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
423 print
'<div class="fichecenter">';
424 print
'<div class="fichehalfleft">';
425 print
'<div class="underbanner clearboth"></div>';
427 print
'<table class="border tableforfield centpercent">';
431 print
'<tr><td class="tdtop">';
432 print $langs->trans(
"Usage");
436 print
'<input type="checkbox" disabled name="usage_opportunity"'.($project->usage_opportunity ?
' checked="checked"' :
'').
'"> ';
437 $htmltext = $langs->trans(
"ProjectFollowOpportunity");
438 print $form->textwithpicto($langs->trans(
"ProjectFollowOpportunity"), $htmltext);
442 print
'<input type="checkbox" disabled name="usage_task"'.($project->usage_task ?
' checked="checked"' :
'').
'"> ';
443 $htmltext = $langs->trans(
"ProjectFollowTasks");
444 print $form->textwithpicto($langs->trans(
"ProjectFollowTasks"), $htmltext);
448 print
'<input type="checkbox" disabled name="usage_bill_time"'.($project->usage_bill_time ?
' checked="checked"' :
'').
'"> ';
449 $htmltext = $langs->trans(
"ProjectBillTimeDescription");
450 print $form->textwithpicto($langs->trans(
"BillTime"), $htmltext);
454 print
'<input type="checkbox" disabled name="usage_organize_event"'.($project->usage_organize_event ?
' checked="checked"' :
'').
'"> ';
455 $htmltext = $langs->trans(
"EventOrganizationDescriptionLong");
456 print $form->textwithpicto($langs->trans(
"ManageOrganizeEvent"), $htmltext);
462 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
463 if (strcmp($project->budget_amount,
'')) {
464 print
'<span class="amount">'.price($project->budget_amount, 0, $langs, 1, 0, 0,
$conf->currency).
'</span>';
469 print
'<tr><td>'.$langs->trans(
"Dates").
' ('.$langs->trans(
"Project").
')</td><td>';
471 print($start ? $start :
'?');
474 print($end ? $end :
'?');
481 print
'<tr><td>'.$langs->trans(
"Dates").
' ('.$langs->trans(
"Event").
')</td><td>';
482 $dateformat = (
dol_print_date($project->date_start_event,
'%H:%M:%S',
'tzuserrel') ==
'00:00:00' ?
'day' :
'dayhour');
483 $start =
dol_print_date($project->date_start_event, $dateformat,
'tzuserrel');
484 print($start ?
'<span title="'.
dol_print_date($project->date_start_event,
'dayhour',
'tzuserrel').
'">'.$start.
'</span>' :
'?');
486 $dateformat = (
dol_print_date($project->date_end_event,
'%H:%M:%S',
'tzuserrel') ==
'00:00:00' ?
'day' :
'dayhour');
487 $end =
dol_print_date($project->date_end_event, $dateformat,
'tzuserrel');
488 print($end ?
'<span title="'.
dol_print_date($project->date_end_event,
'dayhour',
'tzuserrel').
'">'.$end.
'</span>' :
'?');
495 print
'<tr><td class="titlefield">'.$langs->trans(
"Visibility").
'</td><td>';
496 if ($project->public == 0) {
497 print
img_picto($langs->trans(
'PrivateProject'),
'private',
'class="paddingrightonly"');
498 print $langs->trans(
"PrivateProject");
500 print
img_picto($langs->trans(
'SharedProject'),
'world',
'class="paddingrightonly"');
501 print $langs->trans(
"SharedProject");
506 print
'<tr><td>'.$langs->trans(
"Location").
'</td><td>';
514 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
520 print
'<div class="fichehalfright">';
521 print
'<div class="underbanner clearboth"></div>';
523 print
'<table class="border tableforfield centpercent">';
527 print
'<tr><td class="titlefieldmiddle valignmiddle">'.$langs->trans(
"Categories").
'</td><td class="valuefield">';
528 print $form->showCategories($project->id, Categorie::TYPE_PROJECT, 1);
533 print
'<tr><td class="titlefield'.($project->description ?
' noborderbottom' :
'').
'" colspan="2">'.$langs->trans(
"Description").
'</td></tr>';
534 if ($project->description) {
535 print
'<tr><td class="nottitleforfield" colspan="2">';
536 print
'<div class="longmessagecut">';
542 print
'<tr><td class="titlefieldmiddle">';
543 $typeofdata =
'checkbox:'.($project->accept_conference_suggestions ?
' checked="checked"' :
'');
544 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestConfHelp");
545 print $form->editfieldkey(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions', ($project->accept_conference_suggestions ?
'1' :
'0'), $project, $permissiontoadd, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
546 print
'</td><td class="valuefield">';
547 print $form->editfieldval(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions', ($project->accept_conference_suggestions ?
'1' :
'0'), $project, $permissiontoadd, $typeofdata,
'', null, null,
'', 0,
'',
'projectid');
550 print
'<tr><td class="">';
551 $typeofdata =
'checkbox:'.($project->accept_booth_suggestions ?
' checked="checked"' :
'');
552 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestBoothHelp");
553 print $form->editfieldkey(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions', ($project->accept_booth_suggestions ?
'1' :
'0'), $project, $permissiontoadd, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
554 print
'</td><td class="valuefield">';
555 print $form->editfieldval(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions', ($project->accept_booth_suggestions ?
'1' :
'0'), $project, $permissiontoadd, $typeofdata,
'', null, null,
'', 0,
'',
'projectid');
558 print
'<tr><td class="">';
559 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth',
'', $project, $permissiontoadd,
'amount',
'', 0, 0,
'projectid');
560 print
'</td><td class="valuefield">';
561 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth', $project->price_booth, $project, $permissiontoadd,
'amount',
'',
null,
null,
'', 0,
'',
'projectid');
564 print
'<tr><td class="">';
565 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration',
'', $project, $permissiontoadd,
'amount',
'', 0, 0,
'projectid');
566 print
'</td><td class="valuefield">';
567 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration', $project->price_registration, $project, $permissiontoadd,
'amount',
'',
null,
null,
'', 0,
'',
'projectid');
570 print
'<tr><td class="">';
571 print $form->editfieldkey($form->textwithpicto($langs->trans(
'MaxNbOfAttendees'),
''),
'max_attendees',
'', $project, $permissiontoadd,
'integer:3',
'', 0, 0,
'projectid');
572 print
'</td><td class="valuefield">';
573 print $form->editfieldval($form->textwithpicto($langs->trans(
'MaxNbOfAttendees'),
''),
'max_attendees', $project->max_attendees, $project, $permissiontoadd,
'integer:3',
'',
null,
null,
'', 0,
'',
'projectid');
577 print
'<tr><td class="valignmiddle">'.$langs->trans(
"EventOrganizationICSLinkProject").
'</td><td class="valuefield">';
580 $message =
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/agenda/agendaexport.php?format=ical'.(
$conf->entity > 1 ?
"&entity=".$conf->entity :
"");
581 $message .=
'&exportkey='.urlencode(
getDolGlobalString(
'MAIN_AGENDA_XCAL_EXPORTKEY',
'...'));
582 $message .=
"&project=".$projectid.
'&module='.urlencode(
'project@eventorganization').
'&file='.urlencode(
'calendar-'.$project->ref.
'.ics').
'&output=file">'.$langs->trans(
'DownloadICSLink').img_picto(
'',
'download',
'class="paddingleft"').
'</a>';
584 if (empty($project->date_start_event) || empty($project->date_end_event)) {
585 print
img_warning($langs->trans(
"EventStartOrEndDateNotDefined"),
'',
'marginleftonlyshort');
590 print
'<tr><td class="valignmiddle">'.$langs->trans(
"EventOrganizationICSLink");
593 if ($nbofconfbooth > 0) {
594 print
'<span class="opacitymedium">('.$nbofconfbooth.
')</span>';
596 print
'</td><td class="valuefield">';
599 $message =
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/agenda/agendaexport.php?format=ical'.(
$conf->entity > 1 ?
"&entity=".$conf->entity :
"");
600 $message .=
'&exportkey='.urlencode(
getDolGlobalString(
'MAIN_AGENDA_XCAL_EXPORTKEY',
'...'));
601 $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>';
606 print
'<tr><td class="">';
608 print $form->textwithpicto($langs->trans(
"SuggestOrVoteForConfOrBooth"), $langs->trans(
"EvntOrgRegistrationHelpMessage"));
610 print
'</td><td class="valuefield nowrap">';
612 $encodedsecurekey =
dol_hash(
getDolGlobalString(
'EVENTORGANIZATION_SECUREKEY').
'conferenceorbooth'.((
int) $project->id),
'md5');
613 $linksuggest .=
'&securekey='.urlencode($encodedsecurekey);
616 print
'<div class="tdoverflowmax150 inline-block valignmiddle"><a target="_blank" href="'.$linksuggest.
'" class="quatrevingtpercent">'.$linksuggest.
'</a></div>';
617 print
'<a target="_blank" rel="noopener noreferrer" href="'.$linksuggest.
'">'.
img_picto(
'',
'globe').
'</a>';
623 print
'<tr><td class="">';
625 print $langs->trans(
"PublicAttendeeSubscriptionGlobalPage");
627 print
'</td><td class="valuefield nowrap">';
628 $link_subscription =
$dolibarr_main_url_root.
'/public/eventorganization/attendee_new.php?id='.((int) $project->id).
'&type=global';
629 $encodedsecurekey =
dol_hash(
getDolGlobalString(
'EVENTORGANIZATION_SECUREKEY').
'conferenceorbooth'.((
int) $project->id),
'md5');
630 $link_subscription .=
'&securekey='.urlencode($encodedsecurekey);
633 print
'<div class="tdoverflowmax150 inline-block valignmiddle"><a target="_blank" href="'.$link_subscription.
'" class="quatrevingtpercent">'.$link_subscription.
'</a></div>';
634 print
'<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer" href="'.$link_subscription.
'">'.
img_picto(
'',
'globe').
'</a>';
644 print
'<div class="clearboth"></div>';
649if (!empty($project->id)) {
651 $tab =
'conferenceorbooth';
653 print
dol_get_fiche_head($head, $tab, $langs->trans(
"Project"), -1,
'', 0,
'',
'reposition');
659$sql .=
$object->getFieldList(
't');
662if (!empty($extrafields->attributes[
$object->table_element][
'label'])) {
663 foreach ($extrafields->attributes[
$object->table_element][
'label'] as $key => $val) {
664 $sql .= ($extrafields->attributes[
$object->table_element][
'type'][$key] !=
'separate' ?
", ef.".$key.
" as options_".$key :
'');
668$parameters = array();
669$reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object, $action);
670$sql .= $hookmanager->resPrint;
671$sql = preg_replace(
'/,\s*$/',
'', $sql);
676$sql .=
" FROM ".MAIN_DB_PREFIX.$object->table_element.
" as t";
677if (isset($extrafields->attributes[
$object->table_element][
'label']) && is_array($extrafields->attributes[
$object->table_element][
'label']) && count($extrafields->attributes[
$object->table_element][
'label'])) {
678 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (t.id = ef.fk_object)";
680$sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"c_actioncomm as cact ON cact.id=t.fk_action AND cact.module LIKE '%@eventorganization'";
682$parameters = array();
683$reshook = $hookmanager->executeHooks(
'printFieldListFrom', $parameters, $object, $action);
684$sql .= $hookmanager->resPrint;
685if (
$object->ismultientitymanaged == 1) {
686 $sql .=
" WHERE t.entity IN (".getEntity(
$object->element, (
GETPOSTINT(
'search_current_entity') ? 0 : 1)).
")";
688 $sql .=
" WHERE 1 = 1";
691 $sql .=
" AND t.fk_project = ".((int) $project->id);
693if (!empty($thirdpartyid)) {
694 $sql .=
" AND t.fk_soc = ".((int) $thirdpartyid);
696foreach ($search as $key => $val) {
697 if (array_key_exists($key,
$object->fields)) {
698 if ($key ==
'status' && $search[$key] == -1) {
702 if ((strpos(
$object->fields[$key][
'type'],
'integer:') === 0) || (strpos(
$object->fields[$key][
'type'],
'sellist:') === 0) || !empty(
$object->fields[$key][
'arrayofkeyval'])) {
703 if ($search[$key] ==
'-1' || ($search[$key] ===
'0' && (empty(
$object->fields[$key][
'arrayofkeyval']) || !array_key_exists(
'0',
$object->fields[$key][
'arrayofkeyval'])))) {
708 if ($search[$key] !=
'') {
709 $sql .=
natural_search(
"t.".
$db->sanitize($key), $search[$key], (($key ==
'status') ? 2 : $mode_search));
712 if (preg_match(
'/(_dtstart|_dtend)$/', $key) && $search[$key] !=
'') {
713 $columnName = preg_replace(
'/(_dtstart|_dtend)$/',
'', $key);
714 if (preg_match(
'/^(date|timestamp|datetime)/',
$object->fields[$columnName][
'type'])) {
715 if (preg_match(
'/_dtstart$/', $key)) {
716 $sql .=
" AND t.".$db->escape($columnName).
" >= '".
$db->idate($search[$key]).
"'";
718 if (preg_match(
'/_dtend$/', $key)) {
719 $sql .=
" AND t.".$db->escape($columnName).
" <= '".
$db->idate($search[$key]).
"'";
726 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
730include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
732$parameters = array();
733$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object, $action);
734$sql .= $hookmanager->resPrint;
737$nbtotalofrecords =
'';
740 $sqlforcount = preg_replace(
'/^'.preg_quote($sqlfields,
'/').
'/',
'SELECT COUNT(*) as nbtotalofrecords', $sql);
741 $sqlforcount = preg_replace(
'/GROUP BY .*$/',
'', $sqlforcount);
742 $resql =
$db->query($sqlforcount);
744 $objforcount =
$db->fetch_object($resql);
745 $nbtotalofrecords = $objforcount->nbtotalofrecords;
750 if (($page * $limit) > (
int) $nbtotalofrecords) {
758$sql .=
$db->order($sortfield, $sortorder);
760 $sql .=
$db->plimit($limit + 1, $offset);
763$resql =
$db->query($sql);
769$num =
$db->num_rows($resql);
772if ($num == 1 &&
getDolGlobalInt(
'MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) {
773 $obj =
$db->fetch_object($resql);
775 header(
"Location: ".DOL_URL_ROOT.
'/eventorganization/conferenceorbooth_card.php?id='.((
int) $id));
779$arrayofselected = is_array($toselect) ? $toselect : array();
783 $param .=
'&mode='.urlencode($mode);
785if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
786 $param .=
'&contextpage='.urlencode($contextpage);
788if ($limit > 0 && $limit !=
$conf->liste_limit) {
789 $param .=
'&limit='.((int) $limit);
791if ($optioncss !=
'') {
792 $param .=
'&optioncss='.urlencode($optioncss);
794if ($project->id > 0) {
795 $param .=
'&projectid='.((int) $project->id);
797foreach ($search as $key => $val) {
798 if (is_array($search[$key])) {
799 foreach ($search[$key] as $skey) {
801 $param .=
'&search_'.$key.
'[]='.urlencode($skey);
804 } elseif (preg_match(
'/(_dtstart|_dtend)$/', $key) && !empty($val)) {
805 $param .=
'&search_'.$key.
'month='.(
GETPOSTINT(
'search_'.$key.
'month'));
806 $param .=
'&search_'.$key.
'day='.(
GETPOSTINT(
'search_'.$key.
'day'));
807 $param .=
'&search_'.$key.
'year='.(
GETPOSTINT(
'search_'.$key.
'year'));
808 } elseif ($search[$key] !=
'') {
809 $param .=
'&search_'.$key.
'='.urlencode($search[$key]);
813include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
815$parameters = array(
'param' => &$param);
816$reshook = $hookmanager->executeHooks(
'printFieldListSearchParam', $parameters, $object, $action);
817$param .= $hookmanager->resPrint;
820$arrayofmassactions = array(
824 'presend' =>
img_picto(
'',
'email',
'class="pictofixedwidth"').$langs->trans(
"SendByMail").
' ('.$langs->trans(
"ToSpeakers").
')',
827if (!empty($permissiontodelete)) {
828 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
830if (!empty($permissiontoadd)) {
831 $arrayofmassactions[
'presetstatus'] =
img_picto(
'',
'edit',
'class="pictofixedwidth"').$langs->trans(
"ModifyStatus");
833if (
GETPOSTINT(
'nomassaction') || in_array($massaction, array(
'presend',
'predelete'))) {
834 $arrayofmassactions = array();
836$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
838print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].(!empty($projectid) ?
'?projectid='.$projectid :
'').
'">'.
"\n";
839if ($optioncss !=
'') {
840 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
842print
'<input type="hidden" name="token" value="'.newToken().
'">';
843print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
844print
'<input type="hidden" name="action" value="list">';
845print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
846print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
847print
'<input type="hidden" name="page" value="'.$page.
'">';
848print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
849print
'<input type="hidden" name="page_y" value="">';
850print
'<input type="hidden" name="mode" value="'.$mode.
'">';
854$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'));
855$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'));
856$newcardbutton .= dolGetButtonTitleSeparator();
857$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);
859print_barre_liste($subtitle, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
$object->picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
864$modelmail =
"conferenceorbooth";
866$trackid =
'conferenceorbooth_'.$object->id;
867$withmaindocfilemail = 0;
868include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
870if ($massaction ==
'presetstatus') {
871 $formquestion = array();
872 $statuslist = array();
873 $statuslist[$objecttmp::STATUS_DRAFT] = $objecttmp->LibStatutEvent($objecttmp::STATUS_DRAFT);
874 $statuslist[$objecttmp::STATUS_SUGGESTED] = $objecttmp->LibStatutEvent($objecttmp::STATUS_SUGGESTED);
875 $statuslist[$objecttmp::STATUS_CONFIRMED] = $objecttmp->LibStatutEvent($objecttmp::STATUS_CONFIRMED);
876 $statuslist[$objecttmp::STATUS_NOT_QUALIFIED] = $objecttmp->LibStatutEvent($objecttmp::STATUS_NOT_QUALIFIED);
877 $statuslist[$objecttmp::STATUS_DONE] = $objecttmp->LibStatutEvent($objecttmp::STATUS_DONE);
878 $statuslist[$objecttmp::STATUS_CANCELED] = $objecttmp->LibStatutEvent($objecttmp::STATUS_CANCELED);
879 $formquestion[] = array(
'type' =>
'other',
880 'name' =>
'affectedcommercial',
881 'label' => $form->editfieldkey(
'ModifyStatus',
'status_id',
'', $object, 0),
882 'value' => $form->selectarray(
'statusmassaction', $statuslist,
GETPOST(
'statusmassaction')));
883 print $form->formconfirm($_SERVER[
"PHP_SELF"], $langs->trans(
"ConfirmModifyStatus"), $langs->trans(
"ConfirmModifyStatusQuestion", count($toselect)),
"setstatus", $formquestion, 1, 0, 200, 500, 1);
888 foreach ($fieldstosearchall as $key => $val) {
889 $fieldstosearchall[$key] = $langs->trans($val);
890 $setupstring .= $key.
"=".$val.
";";
892 print
'<!-- Search done like if EVENTORGANIZATION_QUICKSEARCH_ON_FIELDS = '.$setupstring.
' -->'.
"\n";
893 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).implode(
', ', $fieldstosearchall).
'</div>'.
"\n";
901$parameters = array();
902$reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object, $action);
903if (empty($reshook)) {
904 $moreforfilter .= $hookmanager->resPrint;
906 $moreforfilter = $hookmanager->resPrint;
909if (!empty($moreforfilter)) {
910 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
911 print $moreforfilter;
915$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
916$htmlofselectarray = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
$conf->main_checkbox_left_column);
917$selectedfields = ($mode !=
'kanban' ? $htmlofselectarray :
'');
918$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
921print
'<div class="div-table-responsive">';
922print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
927print
'<tr class="liste_titre_filter">';
929if (
$conf->main_checkbox_left_column) {
930 print
'<td class="liste_titre center maxwidthsearch">';
931 $searchpicto = $form->showFilterButtons(
'left');
935foreach (
$object->fields as $key => $val) {
936 $searchkey = empty($search[$key]) ?
'' : $search[$key];
937 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
938 if ($key ==
'status') {
939 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
940 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
941 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
942 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
943 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
944 } 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'])) {
945 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
947 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
948 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').($key ==
'status' ?
' parentonrightofpage' :
'').
'">';
949 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
950 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);
951 } elseif ((strpos($val[
'type'],
'integer:') === 0) || (strpos($val[
'type'],
'sellist:') === 0)) {
952 print
$object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] :
''),
'',
'',
'search_', $cssforfield.
' maxwidth250', 1);
953 } elseif (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
954 print
'<div class="nowrap">';
955 print $form->selectDate($search[$key.
'_dtstart'] ? $search[$key.
'_dtstart'] :
'',
"search_".$key.
"_dtstart", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
957 print
'<div class="nowrap">';
958 print $form->selectDate($search[$key.
'_dtend'] ? $search[$key.
'_dtend'] :
'',
"search_".$key.
"_dtend", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
960 } elseif ($key ==
'lang') {
961 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
963 print $formadmin->select_language($search[$key],
'search_lang', 0, array(), 1, 0, 0,
'minwidth100imp maxwidth125', 2);
965 print
'<input type="text" class="flat maxwidth'.($val[
'type'] ==
'integer' ?
'50' :
'75').
'" name="search_'.$key.
'" value="'.
dol_escape_htmltag(isset($search[$key]) ? $search[$key] :
'').
'">';
971include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
974$parameters = array(
'arrayfields' => $arrayfields);
975$reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters, $object, $action);
976print $hookmanager->resPrint;
978if (!
$conf->main_checkbox_left_column) {
979 print
'<td class="liste_titre center maxwidthsearch">';
980 $searchpicto = $form->showFilterButtons();
991print
'<tr class="liste_titre">';
993if (
$conf->main_checkbox_left_column) {
994 print
getTitleFieldOfList($selectedfields, 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
997foreach (
$object->fields as $key => $val) {
998 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
999 if ($key ==
'status') {
1000 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
1001 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
1002 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
1003 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
1004 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
1005 } 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'])) {
1006 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
1008 $cssforfield = preg_replace(
'/small\s*/',
'', $cssforfield);
1009 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
1010 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";
1015include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
1017$parameters = array(
'arrayfields' => $arrayfields,
'param' => $param,
'sortfield' => $sortfield,
'sortorder' => $sortorder,
'totalarray' => &$totalarray);
1018$reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters, $object, $action);
1019print $hookmanager->resPrint;
1021if (!
$conf->main_checkbox_left_column) {
1022 print
getTitleFieldOfList($selectedfields, 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
1029$needToFetchEachLine = 0;
1030if (isset($extrafields->attributes[
$object->table_element][
'computed']) && is_array($extrafields->attributes[
$object->table_element][
'computed']) && count($extrafields->attributes[
$object->table_element][
'computed']) > 0) {
1031 foreach ($extrafields->attributes[
$object->table_element][
'computed'] as $key => $val) {
1032 if (!is_null($val) && preg_match(
'/\$object/', $val)) {
1033 $needToFetchEachLine++;
1045$imaxinloop = ($limit ? min($num, $limit) : $num);
1046while ($i < $imaxinloop) {
1047 $obj =
$db->fetch_object($resql);
1053 $object->setVarsFromFetchObj($obj);
1055 if ($mode ==
'kanban') {
1057 print
'<tr class="trkanban"><td colspan="'.$savnbfield.
'">';
1058 print
'<div class="box-flex-container kanban">';
1062 if ($massactionbutton || $massaction) {
1064 if (in_array(
$object->id, $arrayofselected)) {
1068 $thirdparty =
$object->fetch_thirdparty();
1069 print
$object->getKanbanView(
'', array(
'selected' => $selected,
'thirdparty' => $thirdparty));
1070 if ($i == ($imaxinloop - 1)) {
1077 print
'<tr data-rowid="'.$object->id.
'" class="oddeven row-with-select">';
1079 if (
$conf->main_checkbox_left_column) {
1080 print
'<td class="nowrap center">';
1081 if ($massactionbutton || $massaction) {
1083 if (in_array(
$object->id, $arrayofselected)) {
1086 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.
$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1093 foreach (
$object->fields as $key => $val) {
1094 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
1095 if (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
1096 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
1097 } elseif ($key ==
'status') {
1098 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
1101 if (in_array($val[
'type'], array(
'timestamp'))) {
1102 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowraponall';
1103 } elseif ($key ==
'ref') {
1104 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowraponall';
1107 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'])) {
1108 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
1112 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
1113 print
'<td'.($cssforfield ?
' class="'.$cssforfield.(preg_match(
'/tdoverflow/', $cssforfield) ?
' classfortooltip' :
'').
'"' :
'');
1114 if (preg_match(
'/tdoverflow/', $cssforfield) && !is_numeric(
$object->$key)) {
1115 print
' title="'.dol_escape_htmltag((
string)
$object->$key).
'"';
1118 if ($key ==
'status') {
1119 print
$object->getLibStatut(5);
1120 } elseif ($key ==
'ref') {
1121 print
$object->getNomUrl(1, 0,
'', (($projectid > 0) ?
'withproject' :
''));
1123 print
$object->showOutputField($val, $key, (
string)
$object->$key,
'');
1129 if (!empty($val[
'isameasure']) && $val[
'isameasure'] == 1) {
1133 if (!isset($totalarray[
'val'])) {
1136 if (!isset($totalarray[
'val'][
't.'.$key])) {
1144 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
1146 $parameters = array(
'arrayfields' => $arrayfields,
'object' => $object,
'obj' => $obj,
'i' => $i,
'totalarray' => &$totalarray);
1147 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $object, $action);
1148 print $hookmanager->resPrint;
1150 if (!
$conf->main_checkbox_left_column) {
1151 print
'<td class="nowrap center">';
1152 if ($massactionbutton || $massaction) {
1154 if (in_array(
$object->id, $arrayofselected)) {
1157 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.
$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1172include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
1177 foreach ($arrayfields as $key => $val) {
1178 if (!empty($val[
'checked'])) {
1182 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
1188$parameters = array(
'arrayfields' => $arrayfields,
'sql' => $sql);
1189$reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object, $action);
1190print $hookmanager->resPrint;
1192print
'</table>'.
"\n";
1195print
'</form>'.
"\n";
1197if (in_array(
'builddoc', array_keys($arrayofmassactions)) && ($nbtotalofrecords ===
'' || $nbtotalofrecords)) {
1198 $hidegeneratedfilelistifempty = 1;
1199 if ($massaction ==
'builddoc' || $action ==
'remove_file' || $show_files) {
1200 $hidegeneratedfilelistifempty = 0;
1203 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
1207 $urlsource = $_SERVER[
'PHP_SELF'].
'?sortfield='.$sortfield.
'&sortorder='.$sortorder;
1208 $urlsource .= str_replace(
'&',
'&', $param);
1210 $filedir = $diroutputmassaction;
1211 $genallowed = $permissiontoread;
1212 $delallowed = $permissiontoadd;
1214 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...
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.
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.
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.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
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...
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get title line of an array.
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).
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
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
buildzip.php
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.