32require
'../main.inc.php';
33require_once DOL_DOCUMENT_ROOT.
'/ticket/class/actions_ticket.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formticket.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
37require_once DOL_DOCUMENT_ROOT.
'/user/class/user.class.php';
38include_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
39include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
40include_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
43$langs->loadLangs(array(
"ticket",
"companies",
"other",
"projects",
"contracts"));
46$action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
47$massaction =
GETPOST(
'massaction',
'alpha');
49$confirm =
GETPOST(
'confirm',
'alpha');
50$cancel =
GETPOST(
'cancel',
'alpha');
51$toselect =
GETPOST(
'toselect',
'array');
52$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'ticketlist';
53$backtopage =
GETPOST(
'backtopage',
'alpha');
54$optioncss =
GETPOST(
'optioncss',
'aZ');
55$mode =
GETPOST(
'mode',
'alpha');
62$project_ref =
GETPOST(
'project_ref',
'alpha');
63$search_societe =
GETPOST(
'search_societe',
'alpha');
77$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
78$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
80if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
84$offset = $limit * $page;
91$diroutputmassaction = $conf->ticket->dir_output.
'/temp/massgeneration/'.$user->id;
93 $hookmanager->initHooks(array(
'thirdpartyticket',
'globalcard'));
94} elseif ($projectid > 0) {
95 $hookmanager->initHooks(array(
'projectticket',
'globalcard'));
97 $hookmanager->initHooks(array(
'ticketlist'));
100$extrafields->fetch_name_optionals_label(
$object->table_element);
101$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element,
'',
'search_');
105 $sortfield =
"t.datec";
116$search_all = (GETPOSTISSET(
"search_all") ?
GETPOST(
"search_all",
'alpha') :
GETPOST(
'sall'));
118foreach (
$object->fields as $key => $val) {
119 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') {
120 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
124 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
131$fieldstosearchall = array();
132foreach (
$object->fields as $key => $val) {
133 if (!empty($val[
'searchall'])) {
134 $fieldstosearchall[
't.'.$key] = $val[
'label'];
137$fieldstosearchall[
's.name_alias'] =
"AliasNameShort";
138$fieldstosearchall[
's.zip'] =
"Zip";
139$fieldstosearchall[
's.town'] =
"Town";
142$arrayfields = array();
143foreach (
$object->fields as $key => $val) {
145 if (!empty($val[
'visible'])) {
146 $visible = (int)
dol_eval($val[
'visible'], 1);
147 $arrayfields[
't.'.$key] = array(
148 'label' => $val[
'label'],
149 'checked' => (($visible < 0) ? 0 : 1),
150 'enabled' => (abs($visible) != 3 && (bool)
dol_eval($val[
'enabled'], 1)),
151 'position' => $val[
'position'],
152 'help' => isset($val[
'help']) ? $val[
'help'] :
''
157include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
164if (!$user->hasRight(
'ticket',
'read')) {
168if ($user->socid > 0) {
169 $socid = $user->socid;
173$url_page_current = DOL_URL_ROOT.
'/ticket/list.php';
176 $tmpproject =
new Project($db);
177 $tmpproject->fetch(0, $project_ref);
178 $projectid = $tmpproject->id;
179 $search_fk_project = $projectid;
182$permissiontoread = $user->hasRight(
'ticket',
'read');
183$permissiontoadd = $user->hasRight(
'ticket',
'write');
184$permissiontodelete = $user->hasRight(
'ticket',
'delete');
193if (
GETPOST(
'cancel',
'alpha')) {
197if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend' && $massaction !=
'presendonclose' && $massaction !=
'close') {
201$parameters = array(
'arrayfields' => &$arrayfields);
203 $parameters[
'socid'] = $socid;
206 $parameters[
'projectid'] = $projectid;
208$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
213if (empty($reshook)) {
215 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
218 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
219 foreach (
$object->fields as $key => $val) {
221 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
222 $search[$key.
'_dtstart'] =
'';
223 $search[$key.
'_dtend'] =
'';
227 $search_array_options = array();
228 $search_date_start =
'';
229 $search_date_end =
'';
230 $search_dateread_start =
'';
231 $search_dateread_end =
'';
232 $search_dateclose_start =
'';
233 $search_dateclose_end =
'';
235 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')
236 ||
GETPOST(
'button_search_x',
'alpha') ||
GETPOST(
'button_search.x',
'alpha') ||
GETPOST(
'button_search',
'alpha')) {
241 $objectclass =
'Ticket';
242 $objectlabel =
'Ticket';
243 $uploaddir = $conf->ticket->dir_output;
244 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
247 if (!$error && $massaction ==
'close' && $permissiontoadd) {
248 $objecttmp =
new $objectclass($db);
253 foreach ($toselect as $toselectid) {
254 $result = $objecttmp->fetch($toselectid);
256 $result = $objecttmp->close($user);
282 if (!$error && $massaction ==
'reopen' && $permissiontoadd) {
283 $objecttmp =
new $objectclass($db);
288 foreach ($toselect as $toselectid) {
289 $result = $objecttmp->fetch($toselectid);
291 if ($objecttmp->status == Ticket::STATUS_CLOSED || $objecttmp->status == Ticket::STATUS_CANCELED) {
292 $result = $objecttmp->setStatut(Ticket::STATUS_ASSIGNED);
301 $langs->load(
"errors");
302 setEventMessages($langs->trans(
"ErrorObjectMustHaveStatusClosedToBeReOpened", $objecttmp->ref),
null,
'errors');
330$form =
new Form($db);
335$user_temp =
new User($db);
342 $socstatic->fetch($socid);
343 $moretitle = $langs->trans(
"ThirdParty") .
' - ';
344 if (
getDolGlobalString(
'MAIN_HTML_TITLE') && preg_match(
'/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $socstatic->name) {
345 $moretitle = $socstatic->name .
' - ';
349$title = $moretitle . $langs->trans(
'Tickets');
357$sql .=
$object->getFieldList(
't');
359if (!empty($extrafields->attributes[
$object->table_element][
'label'])) {
360 foreach ($extrafields->attributes[
$object->table_element][
'label'] as $key => $val) {
361 $sql .= ($extrafields->attributes[
$object->table_element][
'type'][$key] !=
'separate' ?
", ef.".$key.
" as options_".$key :
'');
365$parameters = array();
366$reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object, $action);
367$sql .= $hookmanager->resPrint;
368$sql = preg_replace(
'/,\s*$/',
'', $sql);
372$sql .=
" FROM ".MAIN_DB_PREFIX.$object->table_element.
" as t";
373if (isset($extrafields->attributes[
$object->table_element][
'label']) && is_array($extrafields->attributes[
$object->table_element][
'label']) && count($extrafields->attributes[
$object->table_element][
'label'])) {
374 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (t.rowid = ef.fk_object)";
377$parameters = array();
378$reshook = $hookmanager->executeHooks(
'printFieldListFrom', $parameters, $object);
379$sql .= $hookmanager->resPrint;
380$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"societe as s ON (t.fk_soc = s.rowid)";
381$sql .=
" WHERE t.entity IN (".getEntity(
$object->element).
")";
383 $sql .=
" AND t.fk_soc = ".((int) $socid);
386foreach ($search as $key => $val) {
387 $tmpkey =
't.' . $key;
388 if ($key ==
'fk_statut' && !empty($search[
'fk_statut'])) {
389 $newarrayofstatus = array();
390 if (is_array($search[
'fk_statut'])) {
391 foreach ($search[
'fk_statut'] as $key2 => $val2) {
392 if (in_array($val2, array(
'openall',
'closeall'))) {
395 $newarrayofstatus[] = $val2;
398 if ($search[
'fk_statut'] ==
'openall' || (is_array($search[
'fk_statut']) && in_array(
'openall', $search[
'fk_statut']))) {
400 $newarrayofstatus[] = Ticket::STATUS_READ;
401 $newarrayofstatus[] = Ticket::STATUS_ASSIGNED;
402 $newarrayofstatus[] = Ticket::STATUS_IN_PROGRESS;
403 $newarrayofstatus[] = Ticket::STATUS_NEED_MORE_INFO;
404 $newarrayofstatus[] = Ticket::STATUS_WAITING;
406 if ($search[
'fk_statut'] ==
'closeall' || (is_array($search[
'fk_statut']) && in_array(
'closeall', $search[
'fk_statut']))) {
407 $newarrayofstatus[] = Ticket::STATUS_CLOSED;
408 $newarrayofstatus[] = Ticket::STATUS_CANCELED;
410 if (count($newarrayofstatus)) {
411 $sql .=
natural_search($tmpkey, implode(
',', $newarrayofstatus), 2);
414 } elseif ($key ==
'fk_user_assign' || $key ==
'fk_user_create' || $key ==
'fk_project' || $key ==
'fk_contract') {
415 if ($search[$key] > 0) {
419 } elseif ($key ==
'type_code') {
420 $newarrayoftypecodes = is_array($search[$key]) ? $search[$key] : (!empty($search[$key]) ? explode(
',', $search[$key]) : array());
421 if (count($newarrayoftypecodes)) {
422 $sql .=
natural_search($tmpkey, implode(
',', $newarrayoftypecodes), 3);
429 if ((is_array($search[$key]) && !empty($search[$key])) || (!is_array($search[$key]) && $search[$key] !=
'')) {
434 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
436if ($search_societe) {
439if ($search_fk_project > 0) {
442if ($search_fk_contract > 0) {
445if ($search_date_start) {
446 $sql .=
" AND t.datec >= '".$db->idate($search_date_start).
"'";
448if ($search_date_end) {
449 $sql .=
" AND t.datec <= '".$db->idate($search_date_end).
"'";
451if ($search_dateread_start) {
452 $sql .=
" AND t.date_read >= '".$db->idate($search_dateread_start).
"'";
454if ($search_dateread_end) {
455 $sql .=
" AND t.date_read <= '".$db->idate($search_dateread_end).
"'";
457if ($search_dateclose_start) {
458 $sql .=
" AND t.date_close >= '".$db->idate($search_dateclose_start).
"'";
460if ($search_dateclose_end) {
461 $sql .=
" AND t.date_close <= '".$db->idate($search_dateclose_end).
"'";
464if (!$user->socid && ($mode ==
"mine" || (!$user->admin &&
getDolGlobalString(
'TICKET_LIMIT_VIEW_ASSIGNED_ONLY')))) {
465 $sql .=
" AND (t.fk_user_assign = ".((int) $user->id);
467 $sql .=
" OR t.fk_user_create = ".((int) $user->id);
473include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
475$parameters = array();
476$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object);
477$sql .= $hookmanager->resPrint;
480$nbtotalofrecords =
'';
483 $sqlforcount = preg_replace(
'/^'.preg_quote($sqlfields,
'/').
'/',
'SELECT COUNT(*) as nbtotalofrecords', $sql);
484 $sqlforcount = preg_replace(
'/GROUP BY .*$/',
'', $sqlforcount);
485 $resql = $db->query($sqlforcount);
487 $objforcount = $db->fetch_object($resql);
488 $nbtotalofrecords = $objforcount->nbtotalofrecords;
493 if (($page * $limit) > $nbtotalofrecords) {
501$sql .= $db->order($sortfield, $sortorder);
503 $sql .= $db->plimit($limit + 1, $offset);
506$resql = $db->query($sql);
512$num = $db->num_rows($resql);
515if ($num == 1 &&
getDolGlobalString(
'MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) {
516 $obj = $db->fetch_object($resql);
518 header(
"Location: ".DOL_URL_ROOT.
'/ticket/card.php?id='.$id);
526llxHeader(
'', $title, $help_url,
'', 0, 0, $morejs, $morecss,
'',
'mod-ticket page-list bodyforlist');
528if ($socid && !$projectid && !$project_ref && $user->hasRight(
'societe',
'lire')) {
530 $res = $socstat->fetch($socid);
537 print
dol_get_fiche_head($head,
'ticket', $langs->trans(
"ThirdParty"), -1,
'company');
539 dol_banner_tab($socstat,
'socid',
'', ($user->socid ? 0 : 1),
'rowid',
'nom');
541 print
'<div class="fichecenter">';
543 print
'<div class="underbanner clearboth"></div>';
544 print
'<table class="border centpercent tableforfield">';
547 print
'<tr><td class="titlefield">'.$langs->trans(
'NatureOfThirdParty').
'</td><td>';
548 print $socstat->getTypeUrl(1);
552 if ($socstat->client && !empty($socstat->code_client)) {
553 print
'<tr><td class="titlefield">';
554 print $langs->trans(
'CustomerCode').
'</td><td>';
556 $tmpcheck = $socstat->check_codeclient();
557 if ($tmpcheck != 0 && $tmpcheck != -5) {
558 print
' <span class="error">('.$langs->trans(
"WrongCustomerCode").
')</span>';
564 if ($socstat->fournisseur && !empty($socstat->code_fournisseur)) {
565 print
'<tr><td class="titlefield">';
566 print $langs->trans(
'SupplierCode').
'</td><td>';
568 $tmpcheck = $socstat->check_codefournisseur();
569 if ($tmpcheck != 0 && $tmpcheck != -5) {
570 print
' <span class="error">('.$langs->trans(
"WrongSupplierCode").
')</span>';
584if ($projectid > 0 || $project_ref) {
585 $projectstat =
new Project($db);
586 if ($projectstat->fetch($projectid, $project_ref) > 0) {
587 $projectid = $projectstat->id;
588 $projectstat->fetch_thirdparty();
595 $userWrite = $projectstat->restrictedProjectArea($user,
'write');
600 print
dol_get_fiche_head($head,
'ticket', $langs->trans(
"Project"), -1, ($projectstat->public ?
'projectpub' :
'project'));
604 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
606 $morehtmlref =
'<div class="refidno">';
608 $morehtmlref .=
$object->title;
610 if (!empty(
$object->thirdparty->id) &&
$object->thirdparty->id > 0) {
611 $morehtmlref .=
'<br>'.$object->thirdparty->getNomUrl(1,
'project');
613 $morehtmlref .=
'</div>';
616 if (!$user->hasRight(
'projet',
'all',
'lire')) {
617 $objectsListId =
$object->getProjectsAuthorizedForUser($user, 0, 0);
618 $object->next_prev_filter =
"rowid IN (".$db->sanitize(count($objectsListId) ? implode(
',', array_keys($objectsListId)) :
'0').
")";
621 dol_banner_tab($object,
'project_ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
623 print
'<div class="fichecenter">';
624 print
'<div class="underbanner clearboth"></div>';
626 print
'<table class="border tableforfield centpercent">';
629 print
'<tr><td class="titlefield">'.$langs->trans(
"Visibility").
'</td><td>';
630 if ($projectstat->public) {
631 print
img_picto($langs->trans(
'SharedProject'),
'world',
'class="paddingrightonly"');
632 print $langs->trans(
'SharedProject');
634 print
img_picto($langs->trans(
'PrivateProject'),
'private',
'class="paddingrightonly"');
635 print $langs->trans(
'PrivateProject');
648 print
"ErrorRecordNotFound";
652$arrayofselected = is_array($toselect) ? $toselect : array();
656 $param .=
'&mode='.urlencode($mode);
658if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
659 $param .=
'&contextpage='.urlencode($contextpage);
661if ($limit > 0 && $limit != $conf->liste_limit) {
662 $param .=
'&limit='.((int) $limit);
664foreach ($search as $key => $val) {
665 if (is_array($search[$key])) {
666 foreach ($search[$key] as $skey) {
668 $param .=
'&search_'.$key.
'[]='.urlencode($skey);
671 } elseif (preg_match(
'/(_dtstart|_dtend)$/', $key) && !empty($val)) {
672 $param .=
'&search_'.$key.
'month='.(
GETPOSTINT(
'search_'.$key.
'month'));
673 $param .=
'&search_'.$key.
'day='.(
GETPOSTINT(
'search_'.$key.
'day'));
674 $param .=
'&search_'.$key.
'year='.(
GETPOSTINT(
'search_'.$key.
'year'));
675 } elseif ($search[$key] !=
'') {
676 $param .=
'&search_'.$key.
'='.urlencode($search[$key]);
679if ($optioncss !=
'') {
680 $param .=
'&optioncss='.urlencode($optioncss);
683include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
685$parameters = array(
'param' => &$param);
686$reshook = $hookmanager->executeHooks(
'printFieldListSearchParam', $parameters, $object);
687$param .= $hookmanager->resPrint;
689 $param .=
'&socid='.urlencode((
string) ($socid));
691if ($search_societe) {
692 $param .=
'&search_societe='.urlencode($search_societe);
695 $param .=
'&projectid='.urlencode((
string) ($projectid));
697if ($contractid > 0) {
698 $param .=
'&contractid='.urlencode((
string) ($contractid));
700if ($search_date_start) {
702 $param .=
'&search_date_startday='.((int) $tmparray[
'mday']);
703 $param .=
'&search_date_startmonth='.((int) $tmparray[
'mon']);
704 $param .=
'&search_date_startyear='.((int) $tmparray[
'year']);
706if ($search_date_end) {
708 $param .=
'&search_date_endday='.((int) $tmparray[
'mday']);
709 $param .=
'&search_date_endmonth='.((int) $tmparray[
'mon']);
710 $param .=
'&search_date_endyear='.((int) $tmparray[
'year']);
712if ($search_dateread_start) {
714 $param .=
'&search_dateread_startday='.((int) $tmparray[
'mday']);
715 $param .=
'&search_dateread_startmonth='.((int) $tmparray[
'mon']);
716 $param .=
'&search_dateread_startyear='.((int) $tmparray[
'year']);
718if ($search_dateread_end) {
720 $param .=
'&search_dateread_endday='.((int) $tmparray[
'mday']);
721 $param .=
'&search_dateread_endmonth='.((int) $tmparray[
'mon']);
722 $param .=
'&search_dateread_endyear='.((int) $tmparray[
'year']);
724if ($search_dateclose_start) {
726 $param .=
'&search_dateclose_startday='.((int) $tmparray[
'mday']);
727 $param .=
'&search_dateclose_startmonth='.((int) $tmparray[
'mon']);
728 $param .=
'&search_dateclose_startyear='.((int) $tmparray[
'year']);
730if ($search_dateclose_end) {
732 $param .=
'&search_date_endday='.((int) $tmparray[
'mday']);
733 $param .=
'&search_date_endmonth='.((int) $tmparray[
'mon']);
734 $param .=
'&search_date_endyear='.((int) $tmparray[
'year']);
737$arrayofmassactions = array(
741if ($permissiontoadd) {
742 $arrayofmassactions[
'presendonclose'] =
img_picto(
'',
'close_title',
'class="pictofixedwidth"').$langs->trans(
"Close");
743 $arrayofmassactions[
'reopen'] =
img_picto(
'',
'folder-open',
'class="pictofixedwidth"').$langs->trans(
"ReOpen");
745if ($permissiontodelete) {
746 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
748if (
GETPOSTINT(
'nomassaction') || in_array($massaction, array(
'presend',
'predelete'))) {
749 $arrayofmassactions = array();
751$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
753print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">'.
"\n";
754if ($optioncss !=
'') {
755 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
757print
'<input type="hidden" name="token" value="'.newToken().
'">';
758print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
759print
'<input type="hidden" name="action" value="list">';
760print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
761print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
762print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
763print
'<input type="hidden" name="mode" value="'.$mode.
'" >';
766 print
'<input type="hidden" name="socid" value="'.$socid.
'" >';
769 print
'<input type="hidden" name="projectid" value="'.$projectid.
'" >';
772$url = DOL_URL_ROOT.
'/ticket/card.php?action=create'.($socid ?
'&socid='.$socid :
'').($projectid ?
'&origin=projet_project&originid='.$projectid :
'');
774 $url .=
'&socid='.$socid;
777$newcardbutton .=
dolGetButtonTitle($langs->trans(
'ViewList'),
'',
'fa fa-bars imgforviewmode', $_SERVER[
"PHP_SELF"].
'?mode=common'.preg_replace(
'/(&|\?)*mode=[^&]+/',
'', $param),
'', ((empty($mode) || $mode ==
'common') ? 2 : 1), array(
'morecss' =>
'reposition'));
778$newcardbutton .=
dolGetButtonTitle($langs->trans(
'ViewKanban'),
'',
'fa fa-th-list imgforviewmode', $_SERVER[
"PHP_SELF"].
'?mode=kanban'.preg_replace(
'/(&|\?)*mode=[^&]+/',
'', $param),
'', ($mode ==
'kanban' ? 2 : 1), array(
'morecss' =>
'reposition'));
780$newcardbutton .=
dolGetButtonTitle($langs->trans(
'NewTicket'),
'',
'fa fa-plus-circle', $url,
'', $user->hasRight(
'ticket',
'write'));
787print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
789if ($mode ==
'mine') {
790 print
'<div class="opacitymedium">'.$langs->trans(
'TicketAssignedToMeInfos').
'</div><br>';
793$topicmail =
"SendTicketRef";
794$modelmail =
"ticket";
795$objecttmp =
new Ticket($db);
796$trackid =
'tic'.$object->id;
797include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
800if ($massaction ==
'presendonclose') {
801 $hidden_form = array([
803 "name" =>
"massaction",
807 print $form->formconfirm($_SERVER[
"PHP_SELF"], $langs->trans(
"ConfirmMassTicketClosingSendEmail"), $langs->trans(
"ConfirmMassTicketClosingSendEmailQuestion"),
'confirm_send_close', $hidden_form, $selectedchoice, 0, 200, 500, 1);
812 foreach ($fieldstosearchall as $key => $val) {
813 $fieldstosearchall[$key] = $langs->trans($val);
814 $setupstring .= $key.
"=".$val.
";";
816 print
'<!-- Search done like if TICKET_QUICKSEARCH_ON_FIELDS = '.$setupstring.
' -->'.
"\n";
817 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).implode(
', ', $fieldstosearchall).
'</div>'.
"\n";
825$parameters = array();
826$reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object, $action);
827if (empty($reshook)) {
828 $moreforfilter .= $hookmanager->resPrint;
830 $moreforfilter = $hookmanager->resPrint;
833if (!empty($moreforfilter)) {
834 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
835 print $moreforfilter;
839$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
840$selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN'));
841$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
843print
'<div class="div-table-responsive">';
844print
'<div class="div-table-responsive-inside">';
845print
'<table class="tagtable noborder nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
850print
'<tr class="liste_titre_filter">';
853 print
'<td class="liste_titre maxwidthsearch center">';
854 $searchpicto = $form->showFilterButtons(
'left');
858foreach (
$object->fields as $key => $val) {
859 $searchkey = empty($search[$key]) ?
'' : $search[$key];
860 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
861 if ($key ==
'fk_statut') {
862 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
863 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
864 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
865 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
866 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
867 } 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'])) {
868 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
870 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
871 if ($key ==
'progress') {
872 print
'<td class="liste_titre right'.($cssforfield ?
' '.$cssforfield :
'').
'">';
873 print
'<input type="text" class="flat maxwidth50" name="search_'.$key.
'" value="'.
dol_escape_htmltag(empty($search[$key]) ?
'' : $search[$key]).
'">';
875 } elseif ($key ==
'type_code') {
876 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').
'">';
877 $formTicket->selectTypesTickets(empty($search[$key]) ?
'' : $search[$key],
'search_'.$key,
'', 2, 1, 1, 0, (!empty($val[
'css']) ? $val[
'css'] :
'maxwidth150'), 1);
879 } elseif ($key ==
'category_code') {
880 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').
'">';
881 $formTicket->selectGroupTickets(
dol_escape_htmltag(empty($search[$key]) ?
'' : $search[$key]),
'search_'.$key,
'', 2, 1, 1, 0, (!empty($val[
'css']) ? $val[
'css'] :
'maxwidth150'));
883 } elseif ($key ==
'severity_code') {
884 print
'<td class="liste_titre center'.($cssforfield ?
' '.$cssforfield :
'').
'">';
885 $formTicket->selectSeveritiesTickets(
dol_escape_htmltag(empty($search[$key]) ?
'' : $search[$key]),
'search_'.$key,
'', 2, 1, 1, 0, (!empty($val[
'css']) ? $val[
'css'] :
'maxwidth150'));
887 } elseif ($key ==
'fk_user_assign' || $key ==
'fk_user_create') {
888 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').
'">';
889 print $form->select_dolusers((empty($search[$key]) ?
'' : $search[$key]),
'search_'.$key, 1, null, 0,
'',
'',
'0', 0, 0,
'', 0,
'', (!empty($val[
'css']) ? $val[
'css'] :
'maxwidth100'));
891 } elseif ($key ==
'fk_statut') {
892 $arrayofstatus = array();
893 $arrayofstatus[
'openall'] =
'-- '.$langs->trans(
'OpenAll').
' --';
894 foreach (
$object->labelStatusShort as $key2 => $val2) {
895 if ($key2 == Ticket::STATUS_CLOSED) {
896 $arrayofstatus[
'closeall'] =
'-- '.$langs->trans(
'ClosedAll').
' --';
898 $arrayofstatus[$key2] = $val2;
900 print
'<td class="liste_titre center parentonrightofpage'.($cssforfield ?
' '.$cssforfield :
'').
'">';
904 $selectedarray =
null;
905 if (!empty($search[$key])) {
906 if (is_array($search[$key])) {
907 $selectedarray = array_values($search[$key]);
909 $selectedarray = array($search[$key]);
912 print
Form::multiselectarray(
'search_fk_statut', $arrayofstatus, $selectedarray, 0, 0,
'search_status width150 onrightofpage', 1, 0,
'',
'',
'');
914 } elseif ($key ==
"fk_soc") {
915 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').
'"><input type="text" class="flat maxwidth75" name="search_societe" value="'.
dol_escape_htmltag($search_societe).
'"></td>';
916 } elseif ($key ==
"datec" || $key ==
'date_read' || $key ==
'date_close') {
917 print
'<td class="liste_titre center">';
918 print
'<div class="nowrap">';
921 print $form->selectDate($search_date_start ?: -1,
'search_date_start', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
"From"));
924 print $form->selectDate($search_dateread_start ?: -1,
'search_dateread_start', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
"From"));
927 print $form->selectDate($search_dateclose_start ?: -1,
'search_dateclose_start', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
"From"));
930 print
'<div class="nowrap">';
933 print $form->selectDate($search_date_end ?: -1,
'search_date_end', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
"to"));
936 print $form->selectDate($search_dateread_end ?: -1,
'search_dateread_end', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
"to"));
939 print $form->selectDate($search_dateclose_end ?: -1,
'search_dateclose_end', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
"to"));
944 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').
'">';
945 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
946 print $form->selectarray(
'search_'.$key, $val[
'arrayofkeyval'], $search[$key], $val[
'notnull'], 0, 0,
'', 1, 0, 0,
'',
'maxwidth100', 1);
947 } elseif (strpos($val[
'type'],
'integer:') === 0) {
948 print
$object->showInputField($val, $key, !empty($search[$key]) ? $search[$key] :
"",
'',
'',
'search_',
'maxwidth150', 1);
949 } elseif (!preg_match(
'/^(date|timestamp)/', $val[
'type'])) {
950 print
'<input type="text" class="flat maxwidth75" name="search_'.$key.
'" value="'.
dol_escape_htmltag(empty($search[$key]) ?
'' : $search[$key]).
'">';
957include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
960$parameters = array(
'arrayfields' => $arrayfields);
961$reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters, $object, $action);
962print $hookmanager->resPrint;
965 print
'<td class="liste_titre center maxwidthsearch">';
966 $searchpicto = $form->showFilterButtons();
972$totalarray = array();
973$totalarray[
'nbfield'] = 0;
977print
'<tr class="liste_titre">';
979 print
getTitleFieldOfList(($mode !=
'kanban' ? $selectedfields :
''), 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
980 $totalarray[
'nbfield']++;
982foreach (
$object->fields as $key => $val) {
983 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
984 if ($key ==
'fk_statut' || $key ==
'severity_code') {
985 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
986 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
987 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
988 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
989 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
990 } 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'])) {
991 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
993 $cssforfield = preg_replace(
'/small\s*/',
'', $cssforfield);
994 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
995 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";
996 $totalarray[
'nbfield']++;
1000include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
1002$parameters = array(
'arrayfields' => $arrayfields,
'param' => $param,
'sortfield' => $sortfield,
'sortorder' => $sortorder,
'totalarray' => &$totalarray);
1003$reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters, $object, $action);
1004print $hookmanager->resPrint;
1006 print
getTitleFieldOfList(($mode !=
'kanban' ? $selectedfields :
''), 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
1007 $totalarray[
'nbfield']++;
1013$needToFetchEachLine = 0;
1014if (isset($extrafields->attributes[
$object->table_element][
'computed']) && is_array($extrafields->attributes[
$object->table_element][
'computed']) && count($extrafields->attributes[
$object->table_element][
'computed']) > 0) {
1015 foreach ($extrafields->attributes[
$object->table_element][
'computed'] as $key => $val) {
1016 if (!is_null($val) && preg_match(
'/\$object/', $val)) {
1017 $needToFetchEachLine++;
1026$savnbfield = $totalarray[
'nbfield'];
1027$totalarray = array();
1028$totalarray[
'nbfield'] = 0;
1029$imaxinloop = ($limit ? min($num, $limit) : $num);
1030$cacheofoutputfield = array();
1031while ($i < $imaxinloop) {
1032 $obj = $db->fetch_object($resql);
1038 $object->setVarsFromFetchObj($obj);
1039 $object->type_code = $obj->type_code;
1042 if ($mode ==
'kanban') {
1044 print
'<tr class="trkanban"><td colspan="'.$savnbfield.
'">';
1045 print
'<div class="box-flex-container kanban">';
1050 $arraydata = array();
1051 if ($obj->fk_user_assign > 0) {
1052 $user_temp->fetch($obj->fk_user_assign);
1053 $arraydata[
'user_assignment'] = $user_temp->getNomUrl(-3);
1055 $arraydata[
'selected'] = in_array(
$object->id, $arrayofselected);
1058 print
$object->getKanbanView(
'', $arraydata);
1059 if ($i == ($imaxinloop - 1)) {
1066 print
'<tr data-rowid="'.$object->id.
'" class="oddeven">';
1070 print
'<td class="nowrap center">';
1071 if ($massactionbutton || $massaction) {
1073 if (in_array(
$object->id, $arrayofselected)) {
1076 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.
$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1080 $totalarray[
'nbfield']++;
1084 foreach (
$object->fields as $key => $val) {
1085 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
1086 if (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
1087 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
1090 if (in_array($val[
'type'], array(
'timestamp'))) {
1091 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
1093 if (in_array($key, array(
'ref',
'fk_project'))) {
1094 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowraponall';
1097 if ($key ==
'fk_statut' || $key ==
'severity_code') {
1098 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
1100 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
1101 print
'<td'.($cssforfield ?
' class="'.$cssforfield.((preg_match(
'/tdoverflow/', $cssforfield) && !in_array($val[
'type'], array(
'ip',
'url')) && !is_numeric(
$object->$key)) ?
' classfortooltip' :
'').
'"' :
'');
1102 if (preg_match(
'/tdoverflow/', $cssforfield) && !in_array($val[
'type'], array(
'ip',
'url')) && !is_numeric(
$object->$key)) {
1103 print
' title="'.dol_escape_htmltag(
$object->$key).
'"';
1106 if ($key ==
'fk_statut') {
1107 print
$object->getLibStatut(5);
1108 } elseif ($key ==
'subject') {
1110 print
'<span title="'.dol_escape_htmltag($s).
'">';
1113 } elseif ($key ==
'type_code') {
1114 $s = $langs->getLabelFromKey($db,
'TicketTypeShort'.
$object->type_code,
'c_ticket_type',
'code',
'label',
$object->type_code);
1115 print
'<span title="'.dol_escape_htmltag($s).
'">';
1118 } elseif ($key ==
'category_code') {
1119 $s = $langs->getLabelFromKey($db,
'TicketCategoryShort'.
$object->category_code,
'c_ticket_category',
'code',
'label',
$object->category_code);
1120 print
'<span title="'.dol_escape_htmltag($s).
'">';
1123 } elseif ($key ==
'severity_code') {
1124 $s = $langs->getLabelFromKey($db,
'TicketSeverityShort'.
$object->severity_code,
'c_ticket_severity',
'code',
'label',
$object->severity_code);
1125 print
'<span title="'.dol_escape_htmltag($s).
'">';
1128 } elseif ($key ==
'tms') {
1129 print
dol_print_date($db->jdate($obj->$key),
'dayhour',
'tzuser');
1130 } elseif ($key ==
'fk_user_create') {
1131 if (
$object->fk_user_create > 0) {
1132 if (isset($conf->cache[
'user'][
$object->fk_user_create])) {
1133 $user_temp = $conf->cache[
'user'][
$object->fk_user_create];
1135 $user_temp =
new User($db);
1136 $user_temp->fetch(
$object->fk_user_create);
1137 $conf->cache[
'user'][
$object->fk_user_create] = $user_temp;
1139 print $user_temp->getNomUrl(-1);
1141 } elseif ($key ==
'fk_user_assign') {
1142 if (
$object->fk_user_assign > 0) {
1143 if (isset($conf->cache[
'user'][
$object->fk_user_assign])) {
1144 $user_temp = $conf->cache[
'user'][
$object->fk_user_assign];
1146 $user_temp =
new User($db);
1147 $user_temp->fetch(
$object->fk_user_assign);
1148 $conf->cache[
'user'][
$object->fk_user_assign] = $user_temp;
1150 print $user_temp->getNomUrl(-1);
1152 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
1153 print
$object->showOutputField($val, $key, $db->jdate($obj->$key),
'');
1154 } elseif ($key ==
'ref') {
1155 print
$object->showOutputField($val, $key, $obj->$key,
'');
1158 $is_open = (
$object->status != Ticket::STATUS_CLOSED &&
$object->status != Ticket::STATUS_CANCELED);
1160 if ($is_open && $should_show_warning) {
1161 $date_last_msg_sent = (int)
$object->date_last_msg_sent;
1162 $hour_diff = ($now - $date_last_msg_sent) / 3600 ;
1164 if (
getDolGlobalString(
'TICKET_DELAY_BEFORE_FIRST_RESPONSE') && $date_last_msg_sent == 0) {
1165 $creation_date =
$object->datec;
1166 $hour_diff_creation = ($now - $creation_date) / 3600 ;
1167 if ($hour_diff_creation >
getDolGlobalInt(
'TICKET_DELAY_BEFORE_FIRST_RESPONSE')) {
1168 print
" " .
img_picto($langs->trans(
'Late') .
' : ' . $langs->trans(
'TicketsDelayForFirstResponseTooLong',
getDolGlobalString(
'TICKET_DELAY_BEFORE_FIRST_RESPONSE')),
'warning',
'style="color: red;"',
false, 0, 0,
'',
'');
1171 print
" " .
img_picto($langs->trans(
'Late') .
' : ' . $langs->trans(
'TicketsDelayFromLastResponseTooLong',
getDolGlobalString(
'TICKET_DELAY_SINCE_LAST_RESPONSE')),
'warning');
1175 $tmp = explode(
':', $val[
'type']);
1176 if ($tmp[0] ==
'integer' && !empty($tmp[1]) && class_exists($tmp[1])) {
1179 if ($key && $obj->$key && $val[
'type'] && array_key_exists($key.
'-'.$obj->$key.
'-'.$val[
'type'], $cacheofoutputfield)) {
1180 $result = $cacheofoutputfield[$key.
'-'.$obj->$key.
'-'.$val[
'type']];
1182 $result =
$object->showOutputField($val, $key, $obj->$key,
'');
1183 $cacheofoutputfield[$key.
'-'.$obj->$key.
'-'.$val[
'type']] = $result;
1186 $result =
$object->showOutputField($val, $key, $obj->$key,
'');
1193 $totalarray[
'nbfield']++;
1195 if (!empty($val[
'isameasure']) && $val[
'isameasure'] == 1) {
1197 $totalarray[
'pos'][$totalarray[
'nbfield']] =
't.'.$key;
1199 if (!isset($totalarray[
'val'])) {
1200 $totalarray[
'val'] = array();
1202 if (!isset($totalarray[
'val'][
't.'.$key])) {
1203 $totalarray[
'val'][
't.'.$key] = 0;
1205 $totalarray[
'val'][
't.'.$key] +=
$object->$key;
1210 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
1212 $parameters = array(
'arrayfields' => $arrayfields,
'object' => $object,
'obj' => $obj,
'i' => $i,
'totalarray' => &$totalarray);
1213 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $object, $action);
1214 print $hookmanager->resPrint;
1218 print
'<td class="nowrap center">';
1219 if ($massactionbutton || $massaction) {
1221 if (in_array(
$object->id, $arrayofselected)) {
1224 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.
$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1228 $totalarray[
'nbfield']++;
1239include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
1245 foreach ($arrayfields as $key => $val) {
1246 if (!empty($val[
'checked'])) {
1250 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
1256$parameters = array(
'arrayfields' => $arrayfields,
'sql' => $sql);
1257$reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object);
1258print $hookmanager->resPrint;
1260print
'</table>'.
"\n";
1264print
'</form>'.
"\n";
1268if (in_array(
'builddoc', array_keys($arrayofmassactions)) && ($nbtotalofrecords ===
'' || $nbtotalofrecords)) {
1269 $hidegeneratedfilelistifempty = 1;
1270 if ($massaction ==
'builddoc' || $action ==
'remove_file' || $show_files) {
1271 $hidegeneratedfilelistifempty = 0;
1274 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
1278 $urlsource = $_SERVER[
'PHP_SELF'].
'?sortfield='.$sortfield.
'&sortorder='.$sortorder;
1279 $urlsource .= str_replace(
'&',
'&', $param);
1281 $filedir = $diroutputmassaction;
1282 $genallowed = $permissiontoread;
1283 $delallowed = $permissiontoadd;
1285 print $formfile->showdocuments(
'massfilesarea_ticket',
'', $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 to manage projects.
Class to manage third parties objects (customers, suppliers, prospects...)
const STATUS_NOT_READ
Status.
Class to manage Dolibarr users.
societe_prepare_head(Societe $object)
Return array of tabs to used on pages for third parties cards.
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...
showValueWithClipboardCPButton($valuetocopy, $showonlyonhover=1, $texttoshow='')
Create a button to copy $valuetocopy in the clipboard (for copy and paste feature).
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
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...
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
dol_getdate($timestamp, $fast=false, $forcetimezone='')
Return an array with locale date info.
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...
Class to generate the form for creating a new ticket.
project_prepare_head(Project $project, $moreparam='')
Prepare array with list of tabs.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.