29require
'../main.inc.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
34require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorbooth.class.php';
36require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorboothattendee.class.php';
37require_once DOL_DOCUMENT_ROOT.
'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
38require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
51$langs->loadLangs(array(
"eventorganization",
"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');
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');
71$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
72$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
74if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
78$offset = $limit * $page;
86$diroutputmassaction =
$conf->eventorganization->dir_output.
'/temp/massgeneration/'.$user->id;
87$hookmanager->initHooks(array($contextpage));
90$extrafields->fetch_name_optionals_label(
$object->table_element);
93$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element,
'',
'search_');
98 $sortfield =
"t.".key(
$object->fields);
105$search_all =
GETPOST(
'search_all',
'alphanohtml');
107foreach (
$object->fields as $key => $val) {
108 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') {
109 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
111 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
118$fieldstosearchall = array();
119foreach (
$object->fields as $key => $val) {
120 if (!empty($val[
'searchall'])) {
121 $fieldstosearchall[
't.'.$key] = $val[
'label'];
126$arrayfields = array();
127foreach (
$object->fields as $key => $val) {
129 if (!empty($val[
'visible'])) {
130 $visible = (int)
dol_eval((
string) $val[
'visible'], 1);
131 $arrayfields[
't.'.$key] = array(
132 'label' => $val[
'label'],
133 'checked' => (($visible < 0) ? 0 : 1),
134 'enabled' => (abs($visible) != 3 && (bool)
dol_eval($val[
'enabled'], 1)),
135 'position' => $val[
'position'],
136 'help' => isset($val[
'help']) ? $val[
'help'] :
''
141include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
146$permissiontoread = $user->hasRight(
'eventorganization',
'read');
147$permissiontoadd = $user->hasRight(
'eventorganization',
'write');
148$permissiontodelete = $user->hasRight(
'eventorganization',
'delete');
151if (!isModEnabled(
'eventorganization')) {
155if ($user->socid > 0) {
160if (!$permissiontoread) {
169if (preg_match(
'/^set/', $action) && ($projectid > 0 || $projectref) && $user->hasRight(
'eventorganization',
'write')) {
171 $project_attr = preg_replace(
'/^set/',
'', $action);
172 if (array_key_exists($project_attr, $project->fields)) {
173 $result = $project->fetch($projectid, $projectref);
177 $projectid = $project->id;
178 $project->{$project_attr} =
GETPOST($project_attr);
179 $result = $project->update($user);
190if (
GETPOST(
'cancel',
'alpha')) {
194if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend'
195 && $massaction !=
'presend_attendees'
196 && $massaction !=
'confirm_presend'
197 && $massaction !=
'confirm_presend_attendees') {
204$parameters = array();
205$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
210if (empty($reshook)) {
212 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
215 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
216 foreach (
$object->fields as $key => $val) {
218 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
219 $search[$key.
'_dtstart'] =
'';
220 $search[$key.
'_dtend'] =
'';
224 $search_array_options = array();
226 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')
227 ||
GETPOST(
'button_search_x',
'alpha') ||
GETPOST(
'button_search.x',
'alpha') ||
GETPOST(
'button_search',
'alpha')) {
232 $objectclass =
'ConferenceOrBooth';
233 $objectlabel =
'ConferenceOrBooth';
234 $uploaddir =
$conf->eventorganization->dir_output;
235 include DOL_DOCUMENT_ROOT.
'/eventorganization/core/actions_massactions_mail.inc.php';
236 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
238 if ($permissiontoadd && (($action ==
'setstatus' && $confirm ==
"yes") || $massaction ==
'setstatus')) {
242 $objecttmp =
new $objectclass($db);
243 foreach ($toselect as $key => $idselect) {
244 $result = $objecttmp->fetch($idselect);
246 $objecttmp->status =
GETPOSTINT(
"statusmassaction");
247 $result = $objecttmp->update($user);
264 } elseif ($nbok > 0) {
282$form =
new Form($db);
285$title = $langs->trans(
"EventOrganizationConfOrBoothes");
286$help_url =
"EN:Module_Event_Organization";
291if ($projectid > 0 || $projectref) {
292 $result = $project->fetch($projectid, $projectref);
296 $projectid = $project->id;
298 $result = $project->fetch_thirdparty();
302 $result = $project->fetch_optionals();
307 $help_url =
"EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
308 $title = $langs->trans(
"Project") .
' - ' . $langs->trans(
"EventOrganizationConfOrBoothes") .
' - ' . $project->ref .
' ' . $project->name;
310 $title = $project->ref .
' ' . $project->name .
' - ' . $langs->trans(
"ListOfConferencesOrBooths");
317llxHeader(
'', $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-eventorganization page-list bodyforlist');
323 $userWrite = $project->restrictedProjectArea($user,
'write');
328 print
dol_get_fiche_head($head,
'eventorganisation', $langs->trans(
"ConferenceOrBoothTab"), -1, ($project->public ?
'projectpub' :
'project'));
331 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
333 $morehtmlref =
'<div class="refidno">';
335 $morehtmlref .= $project->title;
337 if (isset($project->thirdparty->id) && $project->thirdparty->id > 0) {
338 $morehtmlref .=
'<br>'.$project->thirdparty->getNomUrl(1,
'project');
340 $morehtmlref .=
'</div>';
343 if (!$user->hasRight(
'project',
'all',
'lire')) {
344 $objectsListId = $project->getProjectsAuthorizedForUser($user, 0, 0);
345 $project->next_prev_filter =
"rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(
',', array_keys($objectsListId)) :
'0').
")";
348 dol_banner_tab($project,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
350 print
'<div class="fichecenter">';
351 print
'<div class="fichehalfleft">';
352 print
'<div class="underbanner clearboth"></div>';
354 print
'<table class="border tableforfield centpercent">';
358 print
'<tr><td class="tdtop">';
359 print $langs->trans(
"Usage");
363 print
'<input type="checkbox" disabled name="usage_opportunity"'.($project->usage_opportunity ?
' checked="checked"' :
'').
'"> ';
364 $htmltext = $langs->trans(
"ProjectFollowOpportunity");
365 print $form->textwithpicto($langs->trans(
"ProjectFollowOpportunity"), $htmltext);
369 print
'<input type="checkbox" disabled name="usage_task"'.($project->usage_task ?
' checked="checked"' :
'').
'"> ';
370 $htmltext = $langs->trans(
"ProjectFollowTasks");
371 print $form->textwithpicto($langs->trans(
"ProjectFollowTasks"), $htmltext);
375 print
'<input type="checkbox" disabled name="usage_bill_time"'.($project->usage_bill_time ?
' checked="checked"' :
'').
'"> ';
376 $htmltext = $langs->trans(
"ProjectBillTimeDescription");
377 print $form->textwithpicto($langs->trans(
"BillTime"), $htmltext);
380 if (isModEnabled(
'eventorganization')) {
381 print
'<input type="checkbox" disabled name="usage_organize_event"'.($project->usage_organize_event ?
' checked="checked"' :
'').
'"> ';
382 $htmltext = $langs->trans(
"EventOrganizationDescriptionLong");
383 print $form->textwithpicto($langs->trans(
"ManageOrganizeEvent"), $htmltext);
389 print
'<tr><td class="titlefield">'.$langs->trans(
"Visibility").
'</td><td>';
390 if ($project->public == 0) {
391 print
img_picto($langs->trans(
'PrivateProject'),
'private',
'class="paddingrightonly"');
392 print $langs->trans(
"PrivateProject");
394 print
img_picto($langs->trans(
'SharedProject'),
'world',
'class="paddingrightonly"');
395 print $langs->trans(
"SharedProject");
400 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
401 if (strcmp($project->budget_amount,
'')) {
402 print
'<span class="amount">'.price($project->budget_amount, 0, $langs, 1, 0, 0,
$conf->currency).
'</span>';
407 print
'<tr><td>'.$langs->trans(
"Dates").
' ('.$langs->trans(
"Project").
')</td><td>';
409 print($start ? $start :
'?');
412 print($end ? $end :
'?');
419 print
'<tr><td>'.$langs->trans(
"Dates").
' ('.$langs->trans(
"Event").
')</td><td>';
420 $start =
dol_print_date($project->date_start_event,
'day',
'tzuserrel');
421 print($start ?
'<span title="'.
dol_print_date($project->date_start_event,
'dayhour',
'tzuserrel').
'">'.$start.
'</span>' :
'?');
422 $end =
dol_print_date($project->date_end_event,
'day',
'tzuserrel');
424 print($end ?
'<span title="'.
dol_print_date($project->date_end_event,
'dayhour',
'tzuserrel').
'">'.$end.
'</span>' :
'?');
431 print
'<tr><td>'.$langs->trans(
"Location").
'</td><td>';
432 print $project->location;
439 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
445 print
'<div class="fichehalfright">';
446 print
'<div class="underbanner clearboth"></div>';
448 print
'<table class="border tableforfield centpercent">';
451 print
'<tr><td class="titlefield tdtop">'.$langs->trans(
"Description").
'</td><td class="valuefield">';
456 if (isModEnabled(
'category')) {
457 print
'<tr><td class="titlefield valignmiddle">'.$langs->trans(
"Categories").
'</td><td class="valuefield">';
458 print $form->showCategories($project->id, Categorie::TYPE_PROJECT, 1);
462 print
'<tr><td class="titlefield">';
463 $typeofdata =
'checkbox:'.($project->accept_conference_suggestions ?
' checked="checked"' :
'');
464 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestConfHelp");
465 print $form->editfieldkey(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions', ($project->accept_conference_suggestions ? 1 : 0), $project, $permissiontoadd, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
466 print
'</td><td class="valuefield">';
467 print $form->editfieldval(
'AllowUnknownPeopleSuggestConf',
'accept_conference_suggestions', ($project->accept_conference_suggestions ? 1 : 0), $project, $permissiontoadd, $typeofdata,
'', null, 0,
'', 0,
'',
'projectid');
470 print
'<tr><td class="titlefield">';
471 $typeofdata =
'checkbox:'.($project->accept_booth_suggestions ?
' checked="checked"' :
'');
472 $htmltext = $langs->trans(
"AllowUnknownPeopleSuggestBoothHelp");
473 print $form->editfieldkey(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions', ($project->accept_booth_suggestions ? 1 : 0), $project, $permissiontoadd, $typeofdata,
'', 0, 0,
'projectid', $htmltext);
474 print
'</td><td class="valuefield">';
475 print $form->editfieldval(
'AllowUnknownPeopleSuggestBooth',
'accept_booth_suggestions', ($project->accept_booth_suggestions ? 1 : 0), $project, $permissiontoadd, $typeofdata,
'', null, 0,
'', 0,
'',
'projectid');
478 print
'<tr><td class="titlefield">';
479 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth',
'', $project, $permissiontoadd,
'amount',
'', 0, 0,
'projectid');
480 print
'</td><td class="valuefield">';
481 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfBooth'), $langs->trans(
"PriceOfBoothHelp")),
'price_booth', $project->price_booth, $project, $permissiontoadd,
'amount',
'',
null, 0,
'', 0,
'',
'projectid');
484 print
'<tr><td class="titlefield">';
485 print $form->editfieldkey($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration',
'', $project, $permissiontoadd,
'amount',
'', 0, 0,
'projectid');
486 print
'</td><td class="valuefield">';
487 print $form->editfieldval($form->textwithpicto($langs->trans(
'PriceOfRegistration'), $langs->trans(
"PriceOfRegistrationHelp")),
'price_registration', $project->price_registration, $project, $permissiontoadd,
'amount',
'',
null, 0,
'', 0,
'',
'projectid');
490 print
'<tr><td class="titlefield">';
491 print $form->editfieldkey($form->textwithpicto($langs->trans(
'MaxNbOfAttendees'),
''),
'max_attendees',
'', $project, $permissiontoadd,
'integer:3',
'', 0, 0,
'projectid');
492 print
'</td><td class="valuefield">';
493 print $form->editfieldval($form->textwithpicto($langs->trans(
'MaxNbOfAttendees'),
''),
'max_attendees', $project->max_attendees, $project, $permissiontoadd,
'integer:3',
'',
null, 0,
'', 0,
'',
'projectid');
497 print
'<tr><td class="titlefield valignmiddle">'.$langs->trans(
"EventOrganizationICSLinkProject").
'</td><td class="valuefield">';
499 $urlwithouturlroot = preg_replace(
'/'.preg_quote(DOL_URL_ROOT,
'/').
'$/i',
'', trim($dolibarr_main_url_root));
500 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
503 $message =
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/agenda/agendaexport.php?format=ical'.(
$conf->entity > 1 ?
"&entity=".$conf->entity :
"");
504 $message .=
'&exportkey='.urlencode(
getDolGlobalString(
'MAIN_AGENDA_XCAL_EXPORTKEY',
'...'));
505 $message .=
"&project=".$projectid.
'&module='.urlencode(
'project@eventorganization').
'&file='.urlencode(
'calendar-'.$project->ref.
'.ics').
'&output=file">'.$langs->trans(
'DownloadICSLink').img_picto(
'',
'download',
'class="paddingleft"').
'</a>';
510 print
'<tr><td class="titlefield valignmiddle">'.$langs->trans(
"EventOrganizationICSLink");
513 if ($nbofconfbooth > 0) {
514 print
'<span class="opacitymedium">('.$nbofconfbooth.
')</span>';
516 print
'</td><td class="valuefield">';
518 $urlwithouturlroot = preg_replace(
'/'.preg_quote(DOL_URL_ROOT,
'/').
'$/i',
'', trim($dolibarr_main_url_root));
519 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
522 $message =
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/agenda/agendaexport.php?format=ical'.(
$conf->entity > 1 ?
"&entity=".$conf->entity :
"");
523 $message .=
'&exportkey='.urlencode(
getDolGlobalString(
'MAIN_AGENDA_XCAL_EXPORTKEY',
'...'));
524 $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>';
529 print
'<tr><td class="titlefield">';
531 print $form->textwithpicto($langs->trans(
"SuggestOrVoteForConfOrBooth"), $langs->trans(
"EvntOrgRegistrationHelpMessage"));
533 print
'</td><td class="valuefield">';
534 $linksuggest = $dolibarr_main_url_root.
'/public/project/index.php?id='.((int) $project->id);
535 $encodedsecurekey =
dol_hash(
getDolGlobalString(
'EVENTORGANIZATION_SECUREKEY').
'conferenceorbooth'.((
int) $project->id),
'md5');
536 $linksuggest .=
'&securekey='.urlencode($encodedsecurekey);
539 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$linksuggest.
'" class="quatrevingtpercent">'.$linksuggest.
'</a></div>';
540 print
'<a target="_blank" rel="noopener noreferrer" href="'.$linksuggest.
'">'.
img_picto(
'',
'globe').
'</a>';
546 print
'<tr><td class="titlefield">';
548 print $langs->trans(
"PublicAttendeeSubscriptionGlobalPage");
550 print
'</td><td class="valuefield">';
551 $link_subscription = $dolibarr_main_url_root.
'/public/eventorganization/attendee_new.php?id='.((int) $project->id).
'&type=global';
552 $encodedsecurekey =
dol_hash(
getDolGlobalString(
'EVENTORGANIZATION_SECUREKEY').
'conferenceorbooth'.((
int) $project->id),
'md5');
553 $link_subscription .=
'&securekey='.urlencode($encodedsecurekey);
556 print
'<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$link_subscription.
'" class="quatrevingtpercent">'.$link_subscription.
'</a></div>';
557 print
'<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer" href="'.$link_subscription.
'">'.
img_picto(
'',
'globe').
'</a>';
567 print
'<div class="clearboth"></div>';
572if (!empty($project->id)) {
574 $tab =
'conferenceorbooth';
576 print
dol_get_fiche_head($head, $tab, $langs->trans(
"Project"), -1, ($project->public ?
'projectpub' :
'project'), 0,
'',
'reposition');
582$sql .=
$object->getFieldList(
't');
585if (!empty($extrafields->attributes[
$object->table_element][
'label'])) {
586 foreach ($extrafields->attributes[
$object->table_element][
'label'] as $key => $val) {
587 $sql .= ($extrafields->attributes[
$object->table_element][
'type'][$key] !=
'separate' ?
", ef.".$key.
" as options_".$key :
'');
591$parameters = array();
592$reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object, $action);
593$sql .= $hookmanager->resPrint;
594$sql = preg_replace(
'/,\s*$/',
'', $sql);
599$sql .=
" FROM ".MAIN_DB_PREFIX.$object->table_element.
" as t";
600if (isset($extrafields->attributes[
$object->table_element][
'label']) && is_array($extrafields->attributes[
$object->table_element][
'label']) && count($extrafields->attributes[
$object->table_element][
'label'])) {
601 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (t.id = ef.fk_object)";
603$sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"c_actioncomm as cact ON cact.id=t.fk_action AND cact.module LIKE '%@eventorganization'";
605$parameters = array();
606$reshook = $hookmanager->executeHooks(
'printFieldListFrom', $parameters, $object, $action);
607$sql .= $hookmanager->resPrint;
608if (
$object->ismultientitymanaged == 1) {
609 $sql .=
" WHERE t.entity IN (".getEntity(
$object->element, (
GETPOSTINT(
'search_current_entity') ? 0 : 1)).
")";
611 $sql .=
" WHERE 1 = 1";
614 $sql .=
" AND t.fk_project = ".((int) $project->id);
616foreach ($search as $key => $val) {
617 if (array_key_exists($key,
$object->fields)) {
618 if ($key ==
'status' && $search[$key] == -1) {
622 if ((strpos(
$object->fields[$key][
'type'],
'integer:') === 0) || (strpos(
$object->fields[$key][
'type'],
'sellist:') === 0) || !empty(
$object->fields[$key][
'arrayofkeyval'])) {
623 if ($search[$key] ==
'-1' || ($search[$key] ===
'0' && (empty(
$object->fields[$key][
'arrayofkeyval']) || !array_key_exists(
'0',
$object->fields[$key][
'arrayofkeyval'])))) {
628 if ($search[$key] !=
'') {
629 $sql .=
natural_search(
"t.".$db->sanitize($key), $search[$key], (($key ==
'status') ? 2 : $mode_search));
632 if (preg_match(
'/(_dtstart|_dtend)$/', $key) && $search[$key] !=
'') {
633 $columnName = preg_replace(
'/(_dtstart|_dtend)$/',
'', $key);
634 if (preg_match(
'/^(date|timestamp|datetime)/',
$object->fields[$columnName][
'type'])) {
635 if (preg_match(
'/_dtstart$/', $key)) {
636 $sql .=
" AND t.".$db->escape($columnName).
" >= '".$db->idate($search[$key]).
"'";
638 if (preg_match(
'/_dtend$/', $key)) {
639 $sql .=
" AND t.".$db->escape($columnName).
" <= '".$db->idate($search[$key]).
"'";
646 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
650include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
652$parameters = array();
653$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object, $action);
654$sql .= $hookmanager->resPrint;
657$nbtotalofrecords =
'';
660 $sqlforcount = preg_replace(
'/^'.preg_quote($sqlfields,
'/').
'/',
'SELECT COUNT(*) as nbtotalofrecords', $sql);
661 $sqlforcount = preg_replace(
'/GROUP BY .*$/',
'', $sqlforcount);
662 $resql = $db->query($sqlforcount);
664 $objforcount = $db->fetch_object($resql);
665 $nbtotalofrecords = $objforcount->nbtotalofrecords;
670 if (($page * $limit) > $nbtotalofrecords) {
678$sql .= $db->order($sortfield, $sortorder);
680 $sql .= $db->plimit($limit + 1, $offset);
683$resql = $db->query($sql);
689$num = $db->num_rows($resql);
692if ($num == 1 &&
getDolGlobalInt(
'MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) {
693 $obj = $db->fetch_object($resql);
695 header(
"Location: ".DOL_URL_ROOT.
'/eventorganization/conferenceorbooth_card.php?id='.((
int) $id));
699$arrayofselected = is_array($toselect) ? $toselect : array();
703 $param .=
'&mode='.urlencode($mode);
705if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
706 $param .=
'&contextpage='.urlencode($contextpage);
708if ($limit > 0 && $limit !=
$conf->liste_limit) {
709 $param .=
'&limit='.((int) $limit);
711if ($optioncss !=
'') {
712 $param .=
'&optioncss='.urlencode($optioncss);
714if ($project->id > 0) {
715 $param .=
'&projectid='.((int) $project->id);
717foreach ($search as $key => $val) {
718 if (is_array($search[$key])) {
719 foreach ($search[$key] as $skey) {
721 $param .=
'&search_'.$key.
'[]='.urlencode($skey);
724 } elseif (preg_match(
'/(_dtstart|_dtend)$/', $key) && !empty($val)) {
725 $param .=
'&search_'.$key.
'month='.(
GETPOSTINT(
'search_'.$key.
'month'));
726 $param .=
'&search_'.$key.
'day='.(
GETPOSTINT(
'search_'.$key.
'day'));
727 $param .=
'&search_'.$key.
'year='.(
GETPOSTINT(
'search_'.$key.
'year'));
728 } elseif ($search[$key] !=
'') {
729 $param .=
'&search_'.$key.
'='.urlencode($search[$key]);
733include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
735$parameters = array(
'param' => &$param);
736$reshook = $hookmanager->executeHooks(
'printFieldListSearchParam', $parameters, $object, $action);
737$param .= $hookmanager->resPrint;
740$arrayofmassactions = array(
744 'presend' =>
img_picto(
'',
'email',
'class="pictofixedwidth"').$langs->trans(
"SendByMail").
' ('.$langs->trans(
"ToSpeakers").
')',
747if (!empty($permissiontodelete)) {
748 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
750if (!empty($permissiontoadd)) {
751 $arrayofmassactions[
'presetstatus'] =
img_picto(
'',
'edit',
'class="pictofixedwidth"').$langs->trans(
"ModifyStatus");
753if (
GETPOSTINT(
'nomassaction') || in_array($massaction, array(
'presend',
'predelete'))) {
754 $arrayofmassactions = array();
756$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
758print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].(!empty($projectid) ?
'?projectid='.$projectid :
'').
'">'.
"\n";
759if ($optioncss !=
'') {
760 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
762print
'<input type="hidden" name="token" value="'.newToken().
'">';
763print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
764print
'<input type="hidden" name="action" value="list">';
765print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
766print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
767print
'<input type="hidden" name="page" value="'.$page.
'">';
768print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
769print
'<input type="hidden" name="page_y" value="">';
770print
'<input type="hidden" name="mode" value="'.$mode.
'">';
774$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'));
775$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'));
777$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);
779print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
$object->picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
784$modelmail =
"conferenceorbooth";
786$trackid =
'conferenceorbooth_'.$object->id;
787$withmaindocfilemail = 0;
788include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
790if ($massaction ==
'presetstatus') {
791 $formquestion = array();
792 $statuslist = array();
793 $statuslist[$objecttmp::STATUS_DRAFT] = $objecttmp->LibStatutEvent($objecttmp::STATUS_DRAFT);
794 $statuslist[$objecttmp::STATUS_SUGGESTED] = $objecttmp->LibStatutEvent($objecttmp::STATUS_SUGGESTED);
795 $statuslist[$objecttmp::STATUS_CONFIRMED] = $objecttmp->LibStatutEvent($objecttmp::STATUS_CONFIRMED);
796 $statuslist[$objecttmp::STATUS_NOT_QUALIFIED] = $objecttmp->LibStatutEvent($objecttmp::STATUS_NOT_QUALIFIED);
797 $statuslist[$objecttmp::STATUS_DONE] = $objecttmp->LibStatutEvent($objecttmp::STATUS_DONE);
798 $statuslist[$objecttmp::STATUS_CANCELED] = $objecttmp->LibStatutEvent($objecttmp::STATUS_CANCELED);
799 $formquestion[] = array(
'type' =>
'other',
800 'name' =>
'affectedcommercial',
801 'label' => $form->editfieldkey(
'ModifyStatus',
'status_id',
'', $object, 0),
802 'value' => $form->selectarray(
'statusmassaction', $statuslist,
GETPOST(
'statusmassaction')));
803 print $form->formconfirm($_SERVER[
"PHP_SELF"], $langs->trans(
"ConfirmModifyStatus"), $langs->trans(
"ConfirmModifyStatusQuestion", count($toselect)),
"setstatus", $formquestion, 1, 0, 200, 500, 1);
808 foreach ($fieldstosearchall as $key => $val) {
809 $fieldstosearchall[$key] = $langs->trans($val);
810 $setupstring .= $key.
"=".$val.
";";
812 print
'<!-- Search done like if EVENTORGANIZATION_QUICKSEARCH_ON_FIELDS = '.$setupstring.
' -->'.
"\n";
813 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).implode(
', ', $fieldstosearchall).
'</div>'.
"\n";
821$parameters = array();
822$reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object, $action);
823if (empty($reshook)) {
824 $moreforfilter .= $hookmanager->resPrint;
826 $moreforfilter = $hookmanager->resPrint;
829if (!empty($moreforfilter)) {
830 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
831 print $moreforfilter;
835$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
836$htmlofselectarray = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN'));
837$selectedfields = ($mode !=
'kanban' ? $htmlofselectarray :
'');
838$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
841print
'<div class="div-table-responsive">';
842print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
847print
'<tr class="liste_titre_filter">';
850 print
'<td class="liste_titre center maxwidthsearch">';
851 $searchpicto = $form->showFilterButtons(
'left');
855foreach (
$object->fields as $key => $val) {
856 $searchkey = empty($search[$key]) ?
'' : $search[$key];
857 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
858 if ($key ==
'status') {
859 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
860 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
861 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
862 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
863 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
864 } 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'])) {
865 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
867 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
868 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').($key ==
'status' ?
' parentonrightofpage' :
'').
'">';
869 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
870 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);
871 } elseif ((strpos($val[
'type'],
'integer:') === 0) || (strpos($val[
'type'],
'sellist:') === 0)) {
872 print
$object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] :
''),
'',
'',
'search_', $cssforfield.
' maxwidth250', 1);
873 } elseif (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
874 print
'<div class="nowrap">';
875 print $form->selectDate($search[$key.
'_dtstart'] ? $search[$key.
'_dtstart'] :
'',
"search_".$key.
"_dtstart", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
877 print
'<div class="nowrap">';
878 print $form->selectDate($search[$key.
'_dtend'] ? $search[$key.
'_dtend'] :
'',
"search_".$key.
"_dtend", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
880 } elseif ($key ==
'lang') {
881 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
883 print $formadmin->select_language($search[$key],
'search_lang', 0,
null, 1, 0, 0,
'minwidth100imp maxwidth125', 2);
885 print
'<input type="text" class="flat maxwidth'.($val[
'type'] ==
'integer' ?
'50' :
'75').
'" name="search_'.$key.
'" value="'.
dol_escape_htmltag(isset($search[$key]) ? $search[$key] :
'').
'">';
891include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
894$parameters = array(
'arrayfields' => $arrayfields);
895$reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters, $object, $action);
896print $hookmanager->resPrint;
899 print
'<td class="liste_titre center maxwidthsearch">';
900 $searchpicto = $form->showFilterButtons();
906$totalarray = array();
907$totalarray[
'nbfield'] = 0;
911print
'<tr class="liste_titre">';
914 print
getTitleFieldOfList($selectedfields, 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
915 $totalarray[
'nbfield']++;
917foreach (
$object->fields as $key => $val) {
918 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
919 if ($key ==
'status') {
920 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
921 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
922 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
923 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
924 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
925 } 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'])) {
926 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
928 $cssforfield = preg_replace(
'/small\s*/',
'', $cssforfield);
929 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
930 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";
931 $totalarray[
'nbfield']++;
935include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
937$parameters = array(
'arrayfields' => $arrayfields,
'param' => $param,
'sortfield' => $sortfield,
'sortorder' => $sortorder,
'totalarray' => &$totalarray);
938$reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters, $object, $action);
939print $hookmanager->resPrint;
942 print
getTitleFieldOfList($selectedfields, 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
943 $totalarray[
'nbfield']++;
949$needToFetchEachLine = 0;
950if (isset($extrafields->attributes[
$object->table_element][
'computed']) && is_array($extrafields->attributes[
$object->table_element][
'computed']) && count($extrafields->attributes[
$object->table_element][
'computed']) > 0) {
951 foreach ($extrafields->attributes[
$object->table_element][
'computed'] as $key => $val) {
952 if (!is_null($val) && preg_match(
'/\$object/', $val)) {
953 $needToFetchEachLine++;
962$savnbfield = $totalarray[
'nbfield'];
963$totalarray = array();
964$totalarray[
'nbfield'] = 0;
965$imaxinloop = ($limit ? min($num, $limit) : $num);
966while ($i < $imaxinloop) {
967 $obj = $db->fetch_object($resql);
973 $object->setVarsFromFetchObj($obj);
975 if ($mode ==
'kanban') {
977 print
'<tr class="trkanban"><td colspan="'.$savnbfield.
'">';
978 print
'<div class="box-flex-container kanban">';
982 if ($massactionbutton || $massaction) {
984 if (in_array(
$object->id, $arrayofselected)) {
988 $thirdparty =
$object->fetch_thirdparty();
989 print
$object->getKanbanView(
'', array(
'selected' => $selected,
'thirdparty' => $thirdparty));
990 if ($i == ($imaxinloop - 1)) {
997 print
'<tr data-rowid="'.$object->id.
'" class="oddeven">';
1000 print
'<td class="nowrap center">';
1001 if ($massactionbutton || $massaction) {
1003 if (in_array(
$object->id, $arrayofselected)) {
1006 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.
$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1010 $totalarray[
'nbfield']++;
1013 foreach (
$object->fields as $key => $val) {
1014 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
1015 if (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
1016 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
1017 } elseif ($key ==
'status') {
1018 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
1021 if (in_array($val[
'type'], array(
'timestamp'))) {
1022 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowraponall';
1023 } elseif ($key ==
'ref') {
1024 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowraponall';
1027 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'])) {
1028 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
1032 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
1033 print
'<td'.($cssforfield ?
' class="'.$cssforfield.(preg_match(
'/tdoverflow/', $cssforfield) ?
' classfortooltip' :
'').
'"' :
'');
1034 if (preg_match(
'/tdoverflow/', $cssforfield) && !is_numeric(
$object->$key)) {
1035 print
' title="'.dol_escape_htmltag(
$object->$key).
'"';
1038 if ($key ==
'status') {
1039 print
$object->getLibStatut(5);
1040 } elseif ($key ==
'ref') {
1041 print
$object->getNomUrl(1, 0,
'', (($projectid > 0) ?
'withproject' :
''));
1047 $totalarray[
'nbfield']++;
1049 if (!empty($val[
'isameasure']) && $val[
'isameasure'] == 1) {
1051 $totalarray[
'pos'][$totalarray[
'nbfield']] =
't.'.$key;
1053 if (!isset($totalarray[
'val'])) {
1054 $totalarray[
'val'] = array();
1056 if (!isset($totalarray[
'val'][
't.'.$key])) {
1057 $totalarray[
'val'][
't.'.$key] = 0;
1059 $totalarray[
'val'][
't.'.$key] +=
$object->$key;
1064 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
1066 $parameters = array(
'arrayfields' => $arrayfields,
'object' => $object,
'obj' => $obj,
'i' => $i,
'totalarray' => &$totalarray);
1067 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $object, $action);
1068 print $hookmanager->resPrint;
1071 print
'<td class="nowrap center">';
1072 if ($massactionbutton || $massaction) {
1074 if (in_array(
$object->id, $arrayofselected)) {
1077 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.
$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1081 $totalarray[
'nbfield']++;
1092include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
1097 foreach ($arrayfields as $key => $val) {
1098 if (!empty($val[
'checked'])) {
1102 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
1108$parameters = array(
'arrayfields' => $arrayfields,
'sql' => $sql);
1109$reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object, $action);
1110print $hookmanager->resPrint;
1112print
'</table>'.
"\n";
1115print
'</form>'.
"\n";
1117if (in_array(
'builddoc', array_keys($arrayofmassactions)) && ($nbtotalofrecords ===
'' || $nbtotalofrecords)) {
1118 $hidegeneratedfilelistifempty = 1;
1119 if ($massaction ==
'builddoc' || $action ==
'remove_file' || $show_files) {
1120 $hidegeneratedfilelistifempty = 0;
1123 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
1127 $urlsource = $_SERVER[
'PHP_SELF'].
'?sortfield='.$sortfield.
'&sortorder='.$sortorder;
1128 $urlsource .= str_replace(
'&',
'&', $param);
1130 $filedir = $diroutputmassaction;
1131 $genallowed = $permissiontoread;
1132 $delallowed = $permissiontoadd;
1134 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($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.
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...
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_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.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
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 a 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...
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
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.