28 require
'../../main.inc.php';
29 require_once DOL_DOCUMENT_ROOT.
'/core/modules/mailings/modules_mailings.php';
30 require_once DOL_DOCUMENT_ROOT.
'/comm/mailing/class/mailing.class.php';
31 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formmailing.class.php';
32 require_once DOL_DOCUMENT_ROOT.
'/core/lib/emailing.lib.php';
33 require_once DOL_DOCUMENT_ROOT.
'/core/class/CMailFile.class.php';
34 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
37 $langs->load(
"mails");
40 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
41 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
42 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
44 if (empty($page) || $page == -1) {
47 $offset = $limit * $page;
48 $pageprev = $page - 1;
49 $pagenext = $page + 1;
51 $sortfield =
"mc.statut,email";
54 $sortorder =
"DESC,ASC";
58 $rowid =
GETPOST(
'rowid',
'int');
59 $action =
GETPOST(
'action',
'aZ09');
60 $search_lastname =
GETPOST(
"search_lastname",
'alphanohtml');
61 $search_firstname =
GETPOST(
"search_firstname",
'alphanohtml');
62 $search_email =
GETPOST(
"search_email",
'alphanohtml');
63 $search_other =
GETPOST(
"search_other",
'alphanohtml');
64 $search_dest_status =
GETPOST(
'search_dest_status',
'int');
70 $result = $object->fetch($id);
73 $hookmanager->initHooks(array(
'ciblescard',
'globalcard'));
76 if (!$user->rights->mailing->lire || (empty($conf->global->EXTERNAL_USERS_ARE_AUTHORIZED) && $user->socid > 0)) {
86 if ($action ==
'add') {
87 $module =
GETPOST(
"module",
'alpha');
90 foreach ($modulesdir as $dir) {
93 dol_syslog(
"Scan directory ".$dir.
" for modules");
96 $file = $dir.
"/".$module.
".modules.php";
97 $classname =
"mailing_".$module;
99 if (file_exists($file)) {
103 $obj =
new $classname($db);
104 dol_syslog(
"Call add_to_target on class ".$classname);
105 $result = $obj->add_to_target($id);
116 setEventMessages($langs->trans(
"Error").($obj->error ?
' '.$obj->error :
''),
null,
'errors');
120 if (
GETPOST(
'clearlist',
'int')) {
123 $obj->clear_target($id);
130 if (
GETPOST(
'exportcsv',
'int')) {
131 $completefilename =
'targets_emailing'.$object->id.
'_'.
dol_print_date(
dol_now(),
'dayhourlog').
'.csv';
132 header(
'Content-Type: text/csv');
133 header(
'Content-Disposition: attachment;filename='.$completefilename);
136 $sql =
"SELECT mc.rowid, mc.lastname, mc.firstname, mc.email, mc.other, mc.statut as status, mc.date_envoi, mc.tms,";
137 $sql .=
" mc.source_id, mc.source_type, mc.error_text";
138 $sql .=
" FROM ".MAIN_DB_PREFIX.
"mailing_cibles as mc";
139 $sql .=
" WHERE mc.fk_mailing = ".((int) $object->id);
140 $sql .= $db->order($sortfield, $sortorder);
142 $resql = $db->query($sql);
144 $num = $db->num_rows(
$resql);
147 while ($obj = $db->fetch_object(
$resql)) {
148 print $obj->rowid.$sep;
149 print
'"'.$obj->lastname.
'"'.$sep;
150 print
'"'.$obj->firstname.
'"'.$sep;
151 print $obj->email.$sep;
152 print $obj->other.$sep;
153 print $obj->tms.$sep;
154 print $obj->source_type.$sep;
155 print $obj->source_id.$sep;
156 print $obj->date_envoi.$sep;
157 print $obj->status.$sep;
158 print
'"'.$obj->error_text.
'"'.$sep;
169 if ($action ==
'delete') {
171 $sql =
"DELETE FROM ".MAIN_DB_PREFIX.
"mailing_cibles WHERE rowid = ".((int) $rowid);
172 $resql = $db->query($sql);
176 $obj->update_nb($id);
180 header(
"Location: list.php");
189 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
190 $search_lastname =
'';
191 $search_firstname =
'';
194 $search_dest_status =
'';
203 llxHeader(
'', $langs->trans(
"Mailing"),
'EN:Module_EMailing|FR:Module_Mailing|ES:Módulo_Mailing');
208 if ($object->fetch($id) >= 0) {
213 $linkback =
'<a href="'.DOL_URL_ROOT.
'/comm/mailing/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
217 if ($object->statut == 2 || $object->statut == 3) {
218 $nbtry = $object->countNbOfTargets(
'alreadysent');
219 $nbko = $object->countNbOfTargets(
'alreadysentko');
220 $nbok = ($nbtry - $nbko);
222 $morehtmlright .=
' ('.$nbtry.
'/'.$object->nbemail;
224 $morehtmlright .=
' - '.$nbko.
' '.$langs->trans(
"Error");
226 $morehtmlright .=
') ';
229 dol_banner_tab($object,
'id', $linkback, 1,
'rowid',
'ref',
'',
'', 0,
'', $morehtmlright);
231 print
'<div class="fichecenter">';
232 print
'<div class="underbanner clearboth"></div>';
234 print
'<table class="border centpercent tableforfield">';
236 print
'<tr><td class="titlefield">'.$langs->trans(
"MailTitle").
'</td><td colspan="3">'.$object->title.
'</td></tr>';
238 print
'<tr><td>'.$langs->trans(
"MailFrom").
'</td><td colspan="3">';
240 foreach ($emailarray as $email => $name) {
241 if ($name && $name != $email) {
245 $langs->load(
"errors");
246 print
img_warning($langs->trans(
"ErrorBadEMail", $email));
257 print
'<tr><td>'.$langs->trans(
"MailErrorsTo").
'</td><td colspan="3">';
259 foreach ($emailarray as $email => $name) {
260 if ($name != $email) {
264 $langs->load(
"errors");
265 print
img_warning($langs->trans(
"ErrorBadEMail", $email));
275 print $langs->trans(
"TotalNbOfDistinctRecipients");
276 print
'</td><td colspan="3">';
277 $nbemail = ($object->nbemail ? $object->nbemail : 0);
278 if (is_numeric($nbemail)) {
280 if ((!empty($conf->global->MAILING_LIMIT_SENDBYWEB) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) && ($object->statut == 1 || ($object->statut == 2 && $nbtry < $nbemail))) {
281 if ($conf->global->MAILING_LIMIT_SENDBYWEB > 0) {
282 $text .= $langs->trans(
'LimitSendingEmailing', $conf->global->MAILING_LIMIT_SENDBYWEB);
284 $text .= $langs->trans(
'SendingFromWebInterfaceIsNotAllowed');
287 if (empty($nbemail)) {
288 $nbemail .=
' '.img_warning(
'').
' <span class="warning">'.$langs->trans(
"NoTargetYet").
'</span>';
291 print
$form->textwithpicto($nbemail, $text, 1,
'warning');
307 $allowaddtarget = ($object->statut == 0);
310 if ($allowaddtarget && $user->rights->mailing->creer) {
311 print
load_fiche_titre($langs->trans(
"ToAddRecipientsChooseHere"), ($user->admin ?
info_admin($langs->trans(
"YouCanAddYourOwnPredefindedListHere"), 1) :
''),
'generic');
313 print
'<div class="div-table-responsive">';
314 print
'<div class="tagtable centpercent liste_titre_bydiv borderbottom" id="tablelines">';
316 print
'<div class="tagtr liste_titre">';
317 print
'<div class="tagtd"></div>';
318 print
'<div class="tagtd">'.$langs->trans(
"RecipientSelectionModules").
'</div>';
319 print
'<div class="tagtd" align="center">'.$langs->trans(
"NbOfUniqueEMails").
'</div>';
320 print
'<div class="tagtd left">'.$langs->trans(
"Filter").
'</div>';
321 print
'<div class="tagtd"> </div>';
326 foreach ($modulesdir as $dir) {
327 $modulenames = array();
331 dol_syslog(
"Scan directory ".$dir.
" for modules");
332 $handle = @opendir($dir);
333 if (is_resource($handle)) {
334 while (($file = readdir($handle)) !==
false) {
335 if (substr($file, 0, 1) <>
'.' && substr($file, 0, 3) <>
'CVS') {
337 if (preg_match(
"/(.*)\.modules\.php$/i", $file, $reg)) {
338 if ($reg[1] ==
'example') {
341 $modulenames[] = $reg[1];
354 foreach ($modulenames as $modulename) {
356 $file = $dir.$modulename.
".modules.php";
357 $classname =
"mailing_".$modulename;
360 $obj =
new $classname($db);
363 $qualified = (is_null($obj->enabled) ? 1 :
dol_eval($obj->enabled, 1));
366 foreach ($obj->require_module as $key) {
367 if (empty($conf->$key->enabled) || (empty($user->admin) && $obj->require_admin)) {
378 if ($allowaddtarget) {
379 print
'<form '.$bctag[$var].
' name="'.$modulename.
'" action="'.$_SERVER[
'PHP_SELF'].
'?action=add&token='.
newToken().
'&id='.$object->id.
'&module='.$modulename.
'" method="POST" enctype="multipart/form-data">';
380 print
'<input type="hidden" name="token" value="'.newToken().
'">';
381 print
'<input type="hidden" name="page_y" value="'.newToken().
'">';
383 print
'<div '.$bctag[$var].
'>';
386 print
'<div class="tagtd paddingleftimp marginleftonly paddingrightimp marginrightonly valignmiddle center">';
387 if (empty($obj->picto)) {
388 $obj->picto =
'generic';
390 print
img_object($langs->trans(
"EmailingTargetSelector").
': '.get_class($obj), $obj->picto,
'class="valignmiddle width25 size15x"');
392 print
'<div class="tagtd valignmiddle">';
393 print $obj->getDesc();
397 $nbofrecipient = $obj->getNbOfRecipients(
'');
402 print
'<div class="tagtd center valignmiddle">';
403 if ($nbofrecipient ===
'' || $nbofrecipient >= 0) {
404 print $nbofrecipient;
406 print $langs->trans(
"Error").
' '.
img_error($obj->error);
410 print
'<div class="tagtd left valignmiddle">';
411 if ($allowaddtarget) {
413 $filter = $obj->formFilter();
420 print $langs->trans(
"None");
425 print
'<div class="tagtd right valignmiddle">';
426 if ($allowaddtarget) {
427 print
'<input type="submit" class="button button-add small reposition" name="button_'.$modulename.
'" value="'.$langs->trans(
"Add").
'">';
429 print
'<input type="submit" class="button small disabled" disabled="disabled" name="button_'.$modulename.
'" value="'.$langs->trans(
"Add").
'">';
435 if ($allowaddtarget) {
444 $parameters = array();
445 $reshook = $hookmanager->executeHooks(
'formObjectOptions', $parameters, $object, $action);
446 print $hookmanager->resPrint;
455 $sql =
"SELECT mc.rowid, mc.lastname, mc.firstname, mc.email, mc.other, mc.statut, mc.date_envoi, mc.tms,";
456 $sql .=
" mc.source_url, mc.source_id, mc.source_type, mc.error_text";
457 $sql .=
" FROM ".MAIN_DB_PREFIX.
"mailing_cibles as mc";
458 $sql .=
" WHERE mc.fk_mailing=".((int) $object->id);
459 $asearchcriteriahasbeenset = 0;
460 if ($search_lastname) {
462 $asearchcriteriahasbeenset++;
464 if ($search_firstname) {
466 $asearchcriteriahasbeenset++;
470 $asearchcriteriahasbeenset++;
474 $asearchcriteriahasbeenset++;
476 if ($search_dest_status !=
'' && $search_dest_status >= -1) {
477 $sql .=
" AND mc.statut = ".((int) $search_dest_status);
478 $asearchcriteriahasbeenset++;
480 $sql .= $db->order($sortfield, $sortorder);
484 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
485 $result = $db->query($sql);
493 if (empty($asearchcriteriahasbeenset)) {
495 dol_syslog(
"We found a difference in nb of record in target table and the property ->nbemail, we fix ->nbemail");
497 $resultrefresh = $object->refreshNbOfTargets();
498 if ($resultrefresh < 0) {
506 $sql .= $db->plimit($limit + 1, $offset);
508 $resql = $db->query($sql);
510 $num = $db->num_rows(
$resql);
512 $param =
"&id=".$object->id;
514 if ($limit > 0 && $limit != $conf->liste_limit) {
515 $param .=
'&limit='.urlencode($limit);
517 if ($search_lastname) {
518 $param .=
"&search_lastname=".urlencode($search_lastname);
520 if ($search_firstname) {
521 $param .=
"&search_firstname=".urlencode($search_firstname);
524 $param .=
"&search_email=".urlencode($search_email);
527 $param .=
"&search_other=".urlencode($search_other);
530 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
531 print
'<input type="hidden" name="token" value="'.newToken().
'">';
532 print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
533 print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
534 print
'<input type="hidden" name="page" value="'.$page.
'">';
535 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
537 $morehtmlcenter =
'';
538 if ($allowaddtarget) {
539 $morehtmlcenter =
'<span class="opacitymedium hideonsmartphone">'.$langs->trans(
"ToClearAllRecipientsClickHere").
'</span> <a href="'.$_SERVER[
"PHP_SELF"].
'?clearlist=1&id='.$object->id.
'" class="button reposition smallpaddingimp">'.$langs->trans(
"TargetsReset").
'</a>';
541 $morehtmlcenter .=
' <a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=exportcsv&token='.
newToken().
'&exportcsv=1&id='.$object->id.
'">'.
img_picto(
'',
'download',
'class="pictofixedwidth"').$langs->trans(
"Download").
'</a>';
543 $massactionbutton =
'';
545 print_barre_liste($langs->trans(
"MailSelectedRecipients"), $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $morehtmlcenter, $num,
$nbtotalofrecords,
'generic', 0,
'',
'', $limit, 0, 0, 1);
549 print
"\n<!-- Liste destinataires selectionnes -->\n";
550 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
551 print
'<input type="hidden" name="token" value="'.newToken().
'">';
552 print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
553 print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
554 print
'<input type="hidden" name="page" value="'.$page.
'">';
555 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
556 print
'<input type="hidden" name="limit" value="'.$limit.
'">';
557 print
'<input type="hidden" name="page_y" value="">';
559 print
'<div class="div-table-responsive">';
560 print
'<table class="noborder centpercent">';
563 print
'<tr class="liste_titre_filter">';
565 print
'<td class="liste_titre">';
566 print
'<input class="flat maxwidth75" type="text" name="search_email" value="'.dol_escape_htmltag($search_email).
'">';
569 print
'<td class="liste_titre">';
570 print
'<input class="flat maxwidth50" type="text" name="search_lastname" value="'.dol_escape_htmltag($search_lastname).
'">';
573 print
'<td class="liste_titre">';
574 print
'<input class="flat maxwidth50" type="text" name="search_firstname" value="'.dol_escape_htmltag($search_firstname).
'">';
577 print
'<td class="liste_titre">';
578 print
'<input class="flat maxwidth100" type="text" name="search_other" value="'.dol_escape_htmltag($search_other).
'">';
581 print
'<td class="liste_titre">';
586 print
'<td class="liste_titre">';
591 print
'<td class="liste_titre">';
596 print
'<td class="liste_titre right">';
597 print $formmailing->selectDestinariesStatus($search_dest_status,
'search_dest_status', 1);
600 print
'<td class="liste_titre maxwidthsearch">';
601 $searchpicto =
$form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0,
'checkforselect', 1);
607 $param .=
"&page=".urlencode($page);
610 print
'<tr class="liste_titre">';
612 print_liste_field_titre(
"Lastname", $_SERVER[
"PHP_SELF"],
"mc.lastname", $param,
"",
"", $sortfield, $sortorder);
613 print_liste_field_titre(
"Firstname", $_SERVER[
"PHP_SELF"],
"mc.firstname", $param,
"",
"", $sortfield, $sortorder);
614 print_liste_field_titre(
"OtherInformations", $_SERVER[
"PHP_SELF"],
"", $param,
"",
"", $sortfield, $sortorder);
615 print_liste_field_titre(
"Source", $_SERVER[
"PHP_SELF"],
"", $param,
"",
'align="center"', $sortfield, $sortorder);
617 print_liste_field_titre(
"DateLastModification", $_SERVER[
"PHP_SELF"],
"mc.tms", $param,
"",
'align="center"', $sortfield, $sortorder);
619 print_liste_field_titre(
"DateSending", $_SERVER[
"PHP_SELF"],
"mc.date_envoi", $param,
'',
'align="center"', $sortfield, $sortorder);
620 print_liste_field_titre(
"Status", $_SERVER[
"PHP_SELF"],
"mc.statut", $param,
'',
'class="right"', $sortfield, $sortorder);
627 include_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
628 include_once DOL_DOCUMENT_ROOT.
'/user/class/user.class.php';
629 include_once DOL_DOCUMENT_ROOT.
'/societe/class/societe.class.php';
630 include_once DOL_DOCUMENT_ROOT.
'/contact/class/contact.class.php';
631 include_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorboothattendee.class.php';
632 $objectstaticmember =
new Adherent($db);
633 $objectstaticuser =
new User($db);
634 $objectstaticcompany =
new Societe($db);
635 $objectstaticcontact =
new Contact($db);
638 while ($i < min($num, $limit)) {
639 $obj = $db->fetch_object(
$resql);
641 print
'<tr class="oddeven">';
642 print
'<td class="tdoverflowmax150">'.img_picto(
'$obj->email',
'email',
'class="paddingright"').dol_escape_htmltag($obj->email).
'</td>';
643 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->lastname).
'">'.
dol_escape_htmltag($obj->lastname).
'</td>';
644 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->firstname).
'">'.
dol_escape_htmltag($obj->firstname).
'</td>';
645 print
'<td><span class="small">'.dol_escape_htmltag($obj->other).
'</small></td>';
646 print
'<td class="center tdoverflowmax150">';
647 if (empty($obj->source_id) || empty($obj->source_type)) {
648 print empty($obj->source_url) ?
'' : $obj->source_url;
650 if ($obj->source_type ==
'member') {
651 $objectstaticmember->fetch($obj->source_id);
652 print $objectstaticmember->getNomUrl(1);
653 } elseif ($obj->source_type ==
'user') {
654 $objectstaticuser->fetch($obj->source_id);
655 print $objectstaticuser->getNomUrl(1);
656 } elseif ($obj->source_type ==
'thirdparty') {
657 $objectstaticcompany->fetch($obj->source_id);
658 print $objectstaticcompany->getNomUrl(1);
659 } elseif ($obj->source_type ==
'contact') {
660 $objectstaticcontact->fetch($obj->source_id);
661 print $objectstaticcontact->getNomUrl(1);
662 } elseif ($obj->source_type ==
'eventorganizationattendee') {
663 $objectstaticeventorganization->fetch($obj->source_id);
664 print $objectstaticeventorganization->getNomUrl(1);
666 print $obj->source_url;
672 print
'<td class="center nowraponall">';
677 if ($obj->statut == 0) {
679 print
'<td align="center"></td>';
681 print
'<td class="nowrap right">';
682 print $object::libStatutDest($obj->statut, 2,
'');
686 print
'<td class="center nowraponall">'.$obj->date_envoi.
'</td>';
688 print
'<td class="nowrap right">';
689 print $object::libStatutDest($obj->statut, 2, $obj->error_text);
694 print
'<td class="right">';
695 print
'<!-- ID mailing_cibles = '.$obj->rowid.
' -->';
696 if ($obj->statut == 0) {
697 if (!empty($user->rights->mailing->creer) && $allowaddtarget) {
698 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=delete&token='.
newToken().
'&rowid='.$obj->rowid.$param.
'">'.
img_delete($langs->trans(
"RemoveRecipient")).
'</a>';
711 if ($object->statut < 2) {
712 print
'<tr><td colspan="9" class="opacitymedium">';
713 print $langs->trans(
"NoTargetYet");
717 print
"</table><br>";
727 print
"\n<!-- Fin liste destinataires selectionnes -->\n";
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage members of a foundation.
static getArrayAddress($address)
Return a formatted array of address string for SMTP protocol.
Class for ConferenceOrBoothAttendee.
Class to manage emailings module.
Parent class of emailing target selectors modules.
Class to manage third parties objects (customers, suppliers, prospects...)
Class to manage Dolibarr users.
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("supplier_invoice", "lire"))) if(isModEnabled('don') &&!empty($user->rights->don->lire)) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->hasRight("commande", "lire") &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
emailing_prepare_head(Mailing $object)
Prepare array with list of tabs.
dolGetModulesDirs($subdir='')
Return list of modules directories.
dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='')
Show tab footer of a card.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
img_delete($titlealt='default', $other='class="pictodelete"', $morecss='')
Show delete logo.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
dol_get_fiche_end($notab=0)
Return tab footer of a card.
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...
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_print_email($email, $cid=0, $socid=0, $addlink=0, $max=64, $showinvalid=1, $withpicto=0)
Show EMail link formatted for HTML output.
dol_now($mode='auto')
Return date for now.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dol_eval($s, $returnvalue=0, $hideerrors=1, $onlysimplestring='1')
Replace eval function to add more security.
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='')
Show information for admin users or standard users.
print_barre_liste($titre, $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.
img_error($titlealt='default')
Show error logo.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
isValidEmail($address, $acceptsupervisorkey=0, $acceptuserkey=0)
Return true if email syntax is ok.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
$nbtotalofrecords
Count total nb of records.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.