28require
'../main.inc.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
33require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorbooth.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorboothattendee.class.php';
36require_once DOL_DOCUMENT_ROOT.
'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
37require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
39global $dolibarr_main_url_root;
42$langs->loadLangs(array(
"eventorganization",
"other",
"projects",
"companies"));
45$action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
46$massaction =
GETPOST(
'massaction',
'alpha');
48$confirm =
GETPOST(
'confirm',
'alpha');
49$cancel =
GETPOST(
'cancel',
'alpha');
50$toselect =
GETPOST(
'toselect',
'array');
51$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') : str_replace(
'_',
'', basename(dirname(__FILE__)).basename(__FILE__,
'.php'));
52$backtopage =
GETPOST(
'backtopage',
'alpha');
53$optioncss =
GETPOST(
'optioncss',
'aZ');
58$projectref =
GETPOST(
'ref',
'alpha');
62$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
63$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
65if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
69$offset = $limit * $page;
77$diroutputmassaction = $conf->eventorganization->dir_output.
'/temp/massgeneration/'.$user->id;
78$hookmanager->initHooks(array($contextpage));
81$extrafields->fetch_name_optionals_label(
$object->table_element);
84$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element,
'',
'search_');
89 $sortfield =
"t.".key(
$object->fields);
96$search_all =
GETPOST(
'search_all',
'alphanohtml') ?
GETPOST(
'search_all',
'alphanohtml') :
GETPOST(
'sall',
'alphanohtml');
98foreach (
$object->fields as $key => $val) {
99 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') {
100 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
102 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
109$fieldstosearchall = array();
110foreach (
$object->fields as $key => $val) {
111 if (!empty($val[
'searchall'])) {
112 $fieldstosearchall[
't.'.$key] = $val[
'label'];
117$arrayfields = array();
118foreach (
$object->fields as $key => $val) {
120 if (!empty($val[
'visible'])) {
121 $visible = (int)
dol_eval($val[
'visible'], 1);
122 $arrayfields[
't.'.$key] = array(
123 'label' => $val[
'label'],
124 'checked' => (($visible < 0) ? 0 : 1),
125 'enabled' => (abs($visible) != 3 && (bool)
dol_eval($val[
'enabled'], 1)),
126 'position' => $val[
'position'],
127 'help' => isset($val[
'help']) ? $val[
'help'] :
''
132include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
137$permissiontoread = $user->hasRight(
'eventorganization',
'read');
138$permissiontoadd = $user->hasRight(
'eventorganization',
'write');
139$permissiontodelete = $user->hasRight(
'eventorganization',
'delete');
142if (!isModEnabled(
'eventorganization')) {
146if ($user->socid > 0) {
151if (!$permissiontoread) {
160if (preg_match(
'/^set/', $action) && ($projectid > 0 || $projectref) && $user->hasRight(
'eventorganization',
'write')) {
162 $project_attr = preg_replace(
'/^set/',
'', $action);
163 if (array_key_exists($project_attr, $project->fields)) {
164 $result = $project->fetch($projectid, $projectref);
168 $projectid = $project->id;
169 $project->{$project_attr} =
GETPOST($project_attr);
170 $result = $project->update($user);
181if (
GETPOST(
'cancel',
'alpha')) {
185if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend'
186 && $massaction !=
'presend_attendees'
187 && $massaction !=
'confirm_presend'
188 && $massaction !=
'confirm_presend_attendees') {
195$parameters = array();
196$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
201if (empty($reshook)) {
203 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
206 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
207 foreach (
$object->fields as $key => $val) {
209 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
210 $search[$key.
'_dtstart'] =
'';
211 $search[$key.
'_dtend'] =
'';
215 $search_array_options = array();
217 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')
218 ||
GETPOST(
'button_search_x',
'alpha') ||
GETPOST(
'button_search.x',
'alpha') ||
GETPOST(
'button_search',
'alpha')) {
223 $objectclass =
'ConferenceOrBooth';
224 $objectlabel =
'ConferenceOrBooth';
225 $uploaddir = $conf->eventorganization->dir_output;
226 include DOL_DOCUMENT_ROOT.
'/eventorganization/core/actions_massactions_mail.inc.php';
227 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
229 if ($permissiontoadd && (($action ==
'setstatus' && $confirm ==
"yes") || $massaction ==
'setstatus')) {
233 $objecttmp =
new $objectclass($db);
234 foreach ($toselect as $key => $idselect) {
235 $result = $objecttmp->fetch($idselect);
237 $objecttmp->status =
GETPOSTINT(
"statusmassaction");
238 $result = $objecttmp->update($user);
255 } elseif ($nbok > 0) {
273$form =
new Form($db);
276$title = $langs->trans(
"EventOrganizationConfOrBoothes");
277$help_url =
"EN:Module_Event_Organization";
282if ($projectid > 0 || $projectref) {
283 $result = $project->fetch($projectid, $projectref);
287 $projectid = $project->id;
289 $result = $project->fetch_thirdparty();
293 $result = $project->fetch_optionals();
298 $help_url =
"EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
299 $title = $langs->trans(
"Project") .
' - ' . $langs->trans(
"EventOrganizationConfOrBoothes") .
' - ' . $project->ref .
' ' . $project->name;
301 $title = $project->ref .
' ' . $project->name .
' - ' . $langs->trans(
"ListOfConferencesOrBooths");
308llxHeader(
'', $title, $help_url, 0, 0,
'',
'',
'',
'bodyforlist');
314 $userWrite = $project->restrictedProjectArea($user,
'write');
319 print
dol_get_fiche_head($head,
'eventorganisation', $langs->trans(
"ConferenceOrBoothTab"), -1, ($project->public ?
'projectpub' :
'project'));
322 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
324 $morehtmlref =
'<div class="refidno">';
326 $morehtmlref .= $project->title;
328 if (isset($project->thirdparty->id) && $project->thirdparty->id > 0) {
329 $morehtmlref .=
'<br>'.$project->thirdparty->getNomUrl(1,
'project');
331 $morehtmlref .=
'</div>';
334 if (!$user->hasRight(
'project',
'all',
'lire')) {
335 $objectsListId = $project->getProjectsAuthorizedForUser($user, 0, 0);
336 $project->next_prev_filter =
"rowid IN (".$db->sanitize(count($objectsListId) ? implode(
',', array_keys($objectsListId)) :
'0').
")";
339 dol_banner_tab($project,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
341 print
'<div class="fichecenter">';
342 print
'<div class="fichehalfleft">';
343 print
'<div class="underbanner clearboth"></div>';
345 print
'<table class="border tableforfield centpercent">';
349 print
'<tr><td class="tdtop">';
350 print $langs->trans(
"Usage");
354 print
'<input type="checkbox" disabled name="usage_opportunity"'.($project->usage_opportunity ?
' checked="checked"' :
'').
'"> ';
355 $htmltext = $langs->trans(
"ProjectFollowOpportunity");
356 print $form->textwithpicto($langs->trans(
"ProjectFollowOpportunity"), $htmltext);
360 print
'<input type="checkbox" disabled name="usage_task"'.($project->usage_task ?
' checked="checked"' :
'').
'"> ';
361 $htmltext = $langs->trans(
"ProjectFollowTasks");
362 print $form->textwithpicto($langs->trans(
"ProjectFollowTasks"), $htmltext);
366 print
'<input type="checkbox" disabled name="usage_bill_time"'.($project->usage_bill_time ?
' checked="checked"' :
'').
'"> ';
367 $htmltext = $langs->trans(
"ProjectBillTimeDescription");
368 print $form->textwithpicto($langs->trans(
"BillTime"), $htmltext);
371 if (isModEnabled(
'eventorganization')) {
372 print
'<input type="checkbox" disabled name="usage_organize_event"'.($project->usage_organize_event ?
' checked="checked"' :
'').
'"> ';
373 $htmltext = $langs->trans(
"EventOrganizationDescriptionLong");
374 print $form->textwithpicto($langs->trans(
"ManageOrganizeEvent"), $htmltext);
380 print
'<tr><td class="titlefield">'.$langs->trans(
"Visibility").
'</td><td>';
381 if ($project->public == 0) {
382 print
img_picto($langs->trans(
'PrivateProject'),
'private',
'class="paddingrightonly"');
383 print $langs->trans(
"PrivateProject");
385 print
img_picto($langs->trans(
'SharedProject'),
'world',
'class="paddingrightonly"');
386 print $langs->trans(
"SharedProject");
391 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
392 if (strcmp($project->budget_amount,
'')) {
393 print
'<span class="amount">'.price($project->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).
'</span>';
398 print
'<tr><td>'.$langs->trans(
"Dates").
' ('.$langs->trans(
"Project").
')</td><td>';
400 print($start ? $start :
'?');
403 print($end ? $end :
'?');
410 print
'<tr><td>'.$langs->trans(
"Dates").
' ('.$langs->trans(
"Event").
')</td><td>';
411 $start =
dol_print_date($project->date_start_event,
'day',
'tzuserrel');
412 print($start ?
'<span title="'.
dol_print_date($project->date_start_event,
'dayhour',
'tzuserrel').
'">'.$start.
'</span>' :
'?');
413 $end =
dol_print_date($project->date_end_event,
'day',
'tzuserrel');
415 print($end ?
'<span title="'.
dol_print_date($project->date_end_event,
'dayhour',
'tzuserrel').
'">'.$end.
'</span>' :
'?');
422 print
'<tr><td>'.$langs->trans(
"Location").
'</td><td>';
423 print $project->location;
430 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
436 print
'<div class="fichehalfright">';
437 print
'<div class="underbanner clearboth"></div>';
439 print
'<table class="border tableforfield centpercent">';
442 print
'<tr><td class="titlefield tdtop">'.$langs->trans(
"Description").
'</td><td class="valuefield">';
447 if (isModEnabled(
'category')) {
448 print
'<tr><td class="titlefield valignmiddle">'.$langs->trans(
"Categories").
'</td><td class="valuefield">';
449 print $form->showCategories($project->id, Categorie::TYPE_PROJECT, 1);
453 print
'<tr><td class="titlefield">';
454 $typeofdata =
'checkbox:'.($project->accept_conference_suggestions ?
' checked="checked"' :
'');
455 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestConfHelp");
456 print $form->editfieldkey(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions', ($project->accept_conference_suggestions ? 1 : 0), $project, $permissiontoadd, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
457 print
'</td><td class="valuefield">';
458 print $form->editfieldval(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions', ($project->accept_conference_suggestions ? 1 : 0), $project, $permissiontoadd, $typeofdata,
'', null, 0,
'', 0,
'',
'projectid');
461 print
'<tr><td class="titlefield">';
462 $typeofdata =
'checkbox:'.($project->accept_booth_suggestions ?
' checked="checked"' :
'');
463 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestBoothHelp");
464 print $form->editfieldkey(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions', ($project->accept_booth_suggestions ? 1 : 0), $project, $permissiontoadd, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
465 print
'</td><td class="valuefield">';
466 print $form->editfieldval(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions', ($project->accept_booth_suggestions ? 1 : 0), $project, $permissiontoadd, $typeofdata,
'', null, 0,
'', 0,
'',
'projectid');
469 print
'<tr><td class="titlefield">';
470 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth',
'', $project, $permissiontoadd,
'amount',
'', 0, 0,
'projectid');
471 print
'</td><td class="valuefield">';
472 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth', $project->price_booth, $project, $permissiontoadd,
'amount',
'',
null, 0,
'', 0,
'',
'projectid');
475 print
'<tr><td class="titlefield">';
476 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration',
'', $project, $permissiontoadd,
'amount',
'', 0, 0,
'projectid');
477 print
'</td><td class="valuefield">';
478 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration', $project->price_registration, $project, $permissiontoadd,
'amount',
'',
null, 0,
'', 0,
'',
'projectid');
481 print
'<tr><td class="titlefield">';
482 print $form->editfieldkey($form->textwithpicto($langs->trans(
'MaxNbOfAttendees'),
''),
'max_attendees',
'', $project, $permissiontoadd,
'integer:3',
'', 0, 0,
'projectid');
483 print
'</td><td class="valuefield">';
484 print $form->editfieldval($form->textwithpicto($langs->trans(
'MaxNbOfAttendees'),
''),
'max_attendees', $project->max_attendees, $project, $permissiontoadd,
'integer:3',
'',
null, 0,
'', 0,
'',
'projectid');
488 print
'<tr><td class="titlefield valignmiddle">'.$langs->trans(
"EventOrganizationICSLinkProject").
'</td><td class="valuefield">';
490 $urlwithouturlroot = preg_replace(
'/'.preg_quote(DOL_URL_ROOT,
'/').
'$/i',
'', trim($dolibarr_main_url_root));
491 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
494 $message =
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ?
"&entity=".$conf->entity :
"");
495 $message .=
'&exportkey='.urlencode(
getDolGlobalString(
'MAIN_AGENDA_XCAL_EXPORTKEY',
'...'));
496 $message .=
"&project=".$projectid.
'&module='.urlencode(
'project@eventorganization').
'&file='.urlencode(
'calendar-'.$project->ref.
'.ics').
'&output=file">'.$langs->trans(
'DownloadICSLink').img_picto(
'',
'download',
'class="paddingleft"').
'</a>';
501 print
'<tr><td class="titlefield valignmiddle">'.$langs->trans(
"EventOrganizationICSLink");
504 if ($nbofconfbooth > 0) {
505 print
'<span class="opacitymedium">('.$nbofconfbooth.
')</span>';
507 print
'</td><td class="valuefield">';
509 $urlwithouturlroot = preg_replace(
'/'.preg_quote(DOL_URL_ROOT,
'/').
'$/i',
'', trim($dolibarr_main_url_root));
510 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
513 $message =
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ?
"&entity=".$conf->entity :
"");
514 $message .=
'&exportkey='.urlencode(
getDolGlobalString(
'MAIN_AGENDA_XCAL_EXPORTKEY',
'...'));
515 $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>';
520 print
'<tr><td class="titlefield">';
522 print $form->textwithpicto($langs->trans(
"SuggestOrVoteForConfOrBooth"), $langs->trans(
"EvntOrgRegistrationHelpMessage"));
524 print
'</td><td class="valuefield">';
525 $linksuggest = $dolibarr_main_url_root.
'/public/project/index.php?id='.((int) $project->id);
526 $encodedsecurekey =
dol_hash(
getDolGlobalString(
'EVENTORGANIZATION_SECUREKEY').
'conferenceorbooth'.((
int) $project->id),
'md5');
527 $linksuggest .=
'&securekey='.urlencode($encodedsecurekey);
530 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$linksuggest.
'" class="quatrevingtpercent">'.$linksuggest.
'</a></div>';
531 print
'<a target="_blank" rel="noopener noreferrer" href="'.$linksuggest.
'">'.
img_picto(
'',
'globe').
'</a>';
537 print
'<tr><td class="titlefield">';
539 print $langs->trans(
"PublicAttendeeSubscriptionGlobalPage");
541 print
'</td><td class="valuefield">';
542 $link_subscription = $dolibarr_main_url_root.
'/public/eventorganization/attendee_new.php?id='.((int) $project->id).
'&type=global';
543 $encodedsecurekey =
dol_hash(
getDolGlobalString(
'EVENTORGANIZATION_SECUREKEY').
'conferenceorbooth'.((
int) $project->id),
'md5');
544 $link_subscription .=
'&securekey='.urlencode($encodedsecurekey);
547 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$link_subscription.
'" class="quatrevingtpercent">'.$link_subscription.
'</a></div>';
548 print
'<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer" href="'.$link_subscription.
'">'.
img_picto(
'',
'globe').
'</a>';
558 print
'<div class="clearboth"></div>';
563if (!empty($project->id)) {
565 $tab =
'conferenceorbooth';
567 print
dol_get_fiche_head($head, $tab, $langs->trans(
"Project"), -1, ($project->public ?
'projectpub' :
'project'), 0,
'',
'reposition');
573$sql .=
$object->getFieldList(
't');
576if (!empty($extrafields->attributes[
$object->table_element][
'label'])) {
577 foreach ($extrafields->attributes[
$object->table_element][
'label'] as $key => $val) {
578 $sql .= ($extrafields->attributes[
$object->table_element][
'type'][$key] !=
'separate' ?
", ef.".$key.
" as options_".$key :
'');
582$parameters = array();
583$reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object, $action);
584$sql .= $hookmanager->resPrint;
585$sql = preg_replace(
'/,\s*$/',
'', $sql);
590$sql .=
" FROM ".MAIN_DB_PREFIX.$object->table_element.
" as t";
591if (isset($extrafields->attributes[
$object->table_element][
'label']) && is_array($extrafields->attributes[
$object->table_element][
'label']) && count($extrafields->attributes[
$object->table_element][
'label'])) {
592 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (t.id = ef.fk_object)";
594$sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"c_actioncomm as cact ON cact.id=t.fk_action AND cact.module LIKE '%@eventorganization'";
596$parameters = array();
597$reshook = $hookmanager->executeHooks(
'printFieldListFrom', $parameters, $object, $action);
598$sql .= $hookmanager->resPrint;
599if (
$object->ismultientitymanaged == 1) {
600 $sql .=
" WHERE t.entity IN (".getEntity(
$object->element, (
GETPOSTINT(
'search_current_entity') ? 0 : 1)).
")";
602 $sql .=
" WHERE 1 = 1";
605 $sql .=
" AND t.fk_project = ".((int) $project->id);
607foreach ($search as $key => $val) {
608 if (array_key_exists($key,
$object->fields)) {
609 if ($key ==
'status' && $search[$key] == -1) {
613 if ((strpos(
$object->fields[$key][
'type'],
'integer:') === 0) || (strpos(
$object->fields[$key][
'type'],
'sellist:') === 0) || !empty(
$object->fields[$key][
'arrayofkeyval'])) {
614 if ($search[$key] ==
'-1' || ($search[$key] ===
'0' && (empty(
$object->fields[$key][
'arrayofkeyval']) || !array_key_exists(
'0',
$object->fields[$key][
'arrayofkeyval'])))) {
619 if ($search[$key] !=
'') {
620 $sql .=
natural_search(
"t.".$db->sanitize($key), $search[$key], (($key ==
'status') ? 2 : $mode_search));
623 if (preg_match(
'/(_dtstart|_dtend)$/', $key) && $search[$key] !=
'') {
624 $columnName = preg_replace(
'/(_dtstart|_dtend)$/',
'', $key);
625 if (preg_match(
'/^(date|timestamp|datetime)/',
$object->fields[$columnName][
'type'])) {
626 if (preg_match(
'/_dtstart$/', $key)) {
627 $sql .=
" AND t.".$db->escape($columnName).
" >= '".$db->idate($search[$key]).
"'";
629 if (preg_match(
'/_dtend$/', $key)) {
630 $sql .=
" AND t.".$db->escape($columnName).
" <= '".$db->idate($search[$key]).
"'";
637 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
641include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
643$parameters = array();
644$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object, $action);
645$sql .= $hookmanager->resPrint;
648$nbtotalofrecords =
'';
651 $sqlforcount = preg_replace(
'/^'.preg_quote($sqlfields,
'/').
'/',
'SELECT COUNT(*) as nbtotalofrecords', $sql);
652 $sqlforcount = preg_replace(
'/GROUP BY .*$/',
'', $sqlforcount);
653 $resql = $db->query($sqlforcount);
655 $objforcount = $db->fetch_object($resql);
656 $nbtotalofrecords = $objforcount->nbtotalofrecords;
661 if (($page * $limit) > $nbtotalofrecords) {
669$sql .= $db->order($sortfield, $sortorder);
671 $sql .= $db->plimit($limit + 1, $offset);
674$resql = $db->query($sql);
680$num = $db->num_rows($resql);
683if ($num == 1 &&
getDolGlobalInt(
'MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) {
684 $obj = $db->fetch_object($resql);
686 header(
"Location: ".DOL_URL_ROOT.
'/eventorganization/conferenceorbooth_card.php?id='.((
int) $id));
690$arrayofselected = is_array($toselect) ? $toselect : array();
694 $param .=
'&mode='.urlencode($mode);
696if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
697 $param .=
'&contextpage='.urlencode($contextpage);
699if ($limit > 0 && $limit != $conf->liste_limit) {
700 $param .=
'&limit='.((int) $limit);
702if ($optioncss !=
'') {
703 $param .=
'&optioncss='.urlencode($optioncss);
705if ($project->id > 0) {
706 $param .=
'&projectid='.((int) $project->id);
708foreach ($search as $key => $val) {
709 if (is_array($search[$key])) {
710 foreach ($search[$key] as $skey) {
712 $param .=
'&search_'.$key.
'[]='.urlencode($skey);
715 } elseif (preg_match(
'/(_dtstart|_dtend)$/', $key) && !empty($val)) {
716 $param .=
'&search_'.$key.
'month='.(
GETPOSTINT(
'search_'.$key.
'month'));
717 $param .=
'&search_'.$key.
'day='.(
GETPOSTINT(
'search_'.$key.
'day'));
718 $param .=
'&search_'.$key.
'year='.(
GETPOSTINT(
'search_'.$key.
'year'));
719 } elseif ($search[$key] !=
'') {
720 $param .=
'&search_'.$key.
'='.urlencode($search[$key]);
724include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
726$parameters = array(
'param' => &$param);
727$reshook = $hookmanager->executeHooks(
'printFieldListSearchParam', $parameters, $object, $action);
728$param .= $hookmanager->resPrint;
731$arrayofmassactions = array(
735 'presend' =>
img_picto(
'',
'email',
'class="pictofixedwidth"').$langs->trans(
"SendByMail").
' ('.$langs->trans(
"ToSpeakers").
')',
738if (!empty($permissiontodelete)) {
739 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
741if (!empty($permissiontoadd)) {
742 $arrayofmassactions[
'presetstatus'] =
img_picto(
'',
'edit',
'class="pictofixedwidth"').$langs->trans(
"ModifyStatus");
744if (
GETPOSTINT(
'nomassaction') || in_array($massaction, array(
'presend',
'predelete'))) {
745 $arrayofmassactions = array();
747$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
749print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].(!empty($projectid) ?
'?projectid='.$projectid :
'').
'">'.
"\n";
750if ($optioncss !=
'') {
751 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
753print
'<input type="hidden" name="token" value="'.newToken().
'">';
754print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
755print
'<input type="hidden" name="action" value="list">';
756print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
757print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
758print
'<input type="hidden" name="page" value="'.$page.
'">';
759print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
760print
'<input type="hidden" name="page_y" value="">';
761print
'<input type="hidden" name="mode" value="'.$mode.
'">';
765$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'));
766$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'));
768$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);
770print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
$object->picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
775$modelmail =
"conferenceorbooth";
777$trackid =
'conferenceorbooth_'.$object->id;
778$withmaindocfilemail = 0;
779include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
781if ($massaction ==
'presetstatus') {
782 $formquestion = array();
783 $statuslist = array();
784 $statuslist[$objecttmp::STATUS_DRAFT] = $objecttmp->LibStatutEvent($objecttmp::STATUS_DRAFT);
785 $statuslist[$objecttmp::STATUS_SUGGESTED] = $objecttmp->LibStatutEvent($objecttmp::STATUS_SUGGESTED);
786 $statuslist[$objecttmp::STATUS_CONFIRMED] = $objecttmp->LibStatutEvent($objecttmp::STATUS_CONFIRMED);
787 $statuslist[$objecttmp::STATUS_NOT_QUALIFIED] = $objecttmp->LibStatutEvent($objecttmp::STATUS_NOT_QUALIFIED);
788 $statuslist[$objecttmp::STATUS_DONE] = $objecttmp->LibStatutEvent($objecttmp::STATUS_DONE);
789 $statuslist[$objecttmp::STATUS_CANCELED] = $objecttmp->LibStatutEvent($objecttmp::STATUS_CANCELED);
790 $formquestion[] = array(
'type' =>
'other',
791 'name' =>
'affectedcommercial',
792 'label' => $form->editfieldkey(
'ModifyStatus',
'status_id',
'', $object, 0),
793 'value' => $form->selectarray(
'statusmassaction', $statuslist,
GETPOST(
'statusmassaction')));
794 print $form->formconfirm($_SERVER[
"PHP_SELF"], $langs->trans(
"ConfirmModifyStatus"), $langs->trans(
"ConfirmModifyStatusQuestion", count($toselect)),
"setstatus", $formquestion, 1, 0, 200, 500, 1);
799 foreach ($fieldstosearchall as $key => $val) {
800 $fieldstosearchall[$key] = $langs->trans($val);
801 $setupstring .= $key.
"=".$val.
";";
803 print
'<!-- Search done like if EVENTORGANIZATION_QUICKSEARCH_ON_FIELDS = '.$setupstring.
' -->'.
"\n";
804 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).implode(
', ', $fieldstosearchall).
'</div>'.
"\n";
812$parameters = array();
813$reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object, $action);
814if (empty($reshook)) {
815 $moreforfilter .= $hookmanager->resPrint;
817 $moreforfilter = $hookmanager->resPrint;
820if (!empty($moreforfilter)) {
821 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
822 print $moreforfilter;
826$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
827$htmlofselectarray = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN'));
828$selectedfields = ($mode !=
'kanban' ? $htmlofselectarray :
'');
829$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
832print
'<div class="div-table-responsive">';
833print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
838print
'<tr class="liste_titre_filter">';
841 print
'<td class="liste_titre center maxwidthsearch">';
842 $searchpicto = $form->showFilterButtons(
'left');
846foreach (
$object->fields as $key => $val) {
847 $searchkey = empty($search[$key]) ?
'' : $search[$key];
848 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
849 if ($key ==
'status') {
850 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
851 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
852 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
853 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
854 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
855 } 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'])) {
856 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
858 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
859 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').($key ==
'status' ?
' parentonrightofpage' :
'').
'">';
860 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
861 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);
862 } elseif ((strpos($val[
'type'],
'integer:') === 0) || (strpos($val[
'type'],
'sellist:') === 0)) {
863 print
$object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] :
''),
'',
'',
'search_', $cssforfield.
' maxwidth250', 1);
864 } elseif (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
865 print
'<div class="nowrap">';
866 print $form->selectDate($search[$key.
'_dtstart'] ? $search[$key.
'_dtstart'] :
'',
"search_".$key.
"_dtstart", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
868 print
'<div class="nowrap">';
869 print $form->selectDate($search[$key.
'_dtend'] ? $search[$key.
'_dtend'] :
'',
"search_".$key.
"_dtend", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
871 } elseif ($key ==
'lang') {
872 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
874 print $formadmin->select_language($search[$key],
'search_lang', 0,
null, 1, 0, 0,
'minwidth100imp maxwidth125', 2);
876 print
'<input type="text" class="flat maxwidth75" name="search_'.$key.
'" value="'.
dol_escape_htmltag(isset($search[$key]) ? $search[$key] :
'').
'">';
882include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
885$parameters = array(
'arrayfields' => $arrayfields);
886$reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters, $object, $action);
887print $hookmanager->resPrint;
890 print
'<td class="liste_titre center maxwidthsearch">';
891 $searchpicto = $form->showFilterButtons();
897$totalarray = array();
898$totalarray[
'nbfield'] = 0;
902print
'<tr class="liste_titre">';
905 print
getTitleFieldOfList($selectedfields, 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
906 $totalarray[
'nbfield']++;
908foreach (
$object->fields as $key => $val) {
909 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
910 if ($key ==
'status') {
911 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
912 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
913 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
914 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
915 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
916 } 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'])) {
917 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
919 $cssforfield = preg_replace(
'/small\s*/',
'', $cssforfield);
920 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
921 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";
922 $totalarray[
'nbfield']++;
926include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
928$parameters = array(
'arrayfields' => $arrayfields,
'param' => $param,
'sortfield' => $sortfield,
'sortorder' => $sortorder,
'totalarray' => &$totalarray);
929$reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters, $object, $action);
930print $hookmanager->resPrint;
933 print
getTitleFieldOfList($selectedfields, 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
934 $totalarray[
'nbfield']++;
940$needToFetchEachLine = 0;
941if (isset($extrafields->attributes[
$object->table_element][
'computed']) && is_array($extrafields->attributes[
$object->table_element][
'computed']) && count($extrafields->attributes[
$object->table_element][
'computed']) > 0) {
942 foreach ($extrafields->attributes[
$object->table_element][
'computed'] as $key => $val) {
943 if (!is_null($val) && preg_match(
'/\$object/', $val)) {
944 $needToFetchEachLine++;
953$savnbfield = $totalarray[
'nbfield'];
954$totalarray = array();
955$totalarray[
'nbfield'] = 0;
956$imaxinloop = ($limit ? min($num, $limit) : $num);
957while ($i < $imaxinloop) {
958 $obj = $db->fetch_object($resql);
964 $object->setVarsFromFetchObj($obj);
966 if ($mode ==
'kanban') {
968 print
'<tr class="trkanban"><td colspan="'.$savnbfield.
'">';
969 print
'<div class="box-flex-container kanban">';
973 if ($massactionbutton || $massaction) {
975 if (in_array(
$object->id, $arrayofselected)) {
979 $thirdparty =
$object->fetch_thirdparty();
980 print
$object->getKanbanView(
'', array(
'selected' => $selected,
'thirdparty' => $thirdparty));
981 if ($i == ($imaxinloop - 1)) {
988 print
'<tr data-rowid="'.$object->id.
'" class="oddeven">';
991 print
'<td class="nowrap center">';
992 if ($massactionbutton || $massaction) {
994 if (in_array(
$object->id, $arrayofselected)) {
997 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.
$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1001 $totalarray[
'nbfield']++;
1004 foreach (
$object->fields as $key => $val) {
1005 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
1006 if (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
1007 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
1008 } elseif ($key ==
'status') {
1009 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
1012 if (in_array($val[
'type'], array(
'timestamp'))) {
1013 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowraponall';
1014 } elseif ($key ==
'ref') {
1015 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowraponall';
1018 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'])) {
1019 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
1023 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
1024 print
'<td'.($cssforfield ?
' class="'.$cssforfield.(preg_match(
'/tdoverflow/', $cssforfield) ?
' classfortooltip' :
'').
'"' :
'');
1025 if (preg_match(
'/tdoverflow/', $cssforfield) && !is_numeric(
$object->$key)) {
1026 print
' title="'.dol_escape_htmltag(
$object->$key).
'"';
1029 if ($key ==
'status') {
1030 print
$object->getLibStatut(5);
1031 } elseif ($key ==
'ref') {
1032 print
$object->getNomUrl(1, 0,
'', (($projectid > 0) ?
'withproject' :
''));
1038 $totalarray[
'nbfield']++;
1040 if (!empty($val[
'isameasure']) && $val[
'isameasure'] == 1) {
1042 $totalarray[
'pos'][$totalarray[
'nbfield']] =
't.'.$key;
1044 if (!isset($totalarray[
'val'])) {
1045 $totalarray[
'val'] = array();
1047 if (!isset($totalarray[
'val'][
't.'.$key])) {
1048 $totalarray[
'val'][
't.'.$key] = 0;
1050 $totalarray[
'val'][
't.'.$key] +=
$object->$key;
1055 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
1057 $parameters = array(
'arrayfields' => $arrayfields,
'object' => $object,
'obj' => $obj,
'i' => $i,
'totalarray' => &$totalarray);
1058 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $object, $action);
1059 print $hookmanager->resPrint;
1062 print
'<td class="nowrap center">';
1063 if ($massactionbutton || $massaction) {
1065 if (in_array(
$object->id, $arrayofselected)) {
1068 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.
$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1072 $totalarray[
'nbfield']++;
1083include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
1088 foreach ($arrayfields as $key => $val) {
1089 if (!empty($val[
'checked'])) {
1093 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
1099$parameters = array(
'arrayfields' => $arrayfields,
'sql' => $sql);
1100$reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object, $action);
1101print $hookmanager->resPrint;
1103print
'</table>'.
"\n";
1106print
'</form>'.
"\n";
1108if (in_array(
'builddoc', array_keys($arrayofmassactions)) && ($nbtotalofrecords ===
'' || $nbtotalofrecords)) {
1109 $hidegeneratedfilelistifempty = 1;
1110 if ($massaction ==
'builddoc' || $action ==
'remove_file' || $show_files) {
1111 $hidegeneratedfilelistifempty = 0;
1114 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
1118 $urlsource = $_SERVER[
'PHP_SELF'].
'?sortfield='.$sortfield.
'&sortorder='.$sortorder;
1119 $urlsource .= str_replace(
'&',
'&', $param);
1121 $filedir = $diroutputmassaction;
1122 $genallowed = $permissiontoread;
1123 $delallowed = $permissiontoadd;
1125 print $formfile->showdocuments(
'massfilesarea_eventorganization',
'', $filedir, $urlsource, 0, $delallowed,
'', 1, 1, 0, 48, 1, $param, $title,
'',
'',
'',
null, $hidegeneratedfilelistifempty);
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Class for ConferenceOrBooth.
Class to manage projects.
conferenceorboothProjectPrepareHead($object)
Prepare array of tabs for ConferenceOrBooth Project tab.
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...
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
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.
dol_eval($s, $returnvalue=1, $hideerrors=1, $onlysimplestring='1')
Replace eval function to add more security.
natural_search($fields, $value, $mode=0, $nofirstand=0)
Generate natural SQL search string for a criteria (this criteria can be tested on one or several fiel...
dol_now($mode='auto')
Return date for now.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
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.
dolGetButtonTitleSeparator($moreClass="")
Add space between dolGetButtonTitle.
print_barre_liste($title, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $hideselectlimit=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dol_htmlentitiesbr($stringtoencode, $nl2brmode=0, $pagecodefrom='UTF-8', $removelasteolbr=1)
This function is called to encode a string into a HTML string but differs from htmlentities because a...
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
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...
project_prepare_head(Project $project, $moreparam='')
Prepare array with list of tabs.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.
dol_hash($chain, $type='0', $nosalt=0)
Returns a hash (non reversible encryption) of a string.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.