dolibarr  7.0.0-beta
cibles.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2005-2016 Laurent Destailleur <eldy@uers.sourceforge.net>
4  * Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
5  * Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
27 require '../../main.inc.php';
28 require_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php';
29 require_once DOL_DOCUMENT_ROOT.'/comm/mailing/class/mailing.class.php';
30 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmailing.class.php';
31 require_once DOL_DOCUMENT_ROOT.'/core/lib/emailing.lib.php';
32 require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
33 require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
34 
35 $langs->load("mails");
36 
37 // Security check
38 if (! $user->rights->mailing->lire || $user->societe_id > 0) accessforbidden();
39 
40 
41 // Load variable for pagination
42 $limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
43 $sortfield = GETPOST('sortfield','alpha');
44 $sortorder = GETPOST('sortorder','alpha');
45 $page = GETPOST('page','int');
46 if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
47 $offset = $limit * $page;
48 $pageprev = $page - 1;
49 $pagenext = $page + 1;
50 if (! $sortfield) $sortfield="email";
51 if (! $sortorder) $sortorder="ASC";
52 
53 $id=GETPOST('id','int');
54 $rowid=GETPOST('rowid','int');
55 $action=GETPOST('action','aZ09');
56 $search_lastname=GETPOST("search_lastname");
57 $search_firstname=GETPOST("search_firstname");
58 $search_email=GETPOST("search_email");
59 $search_other=GETPOST("search_other");
60 $search_dest_status=GETPOST('search_dest_status');
61 
62 // Search modules dirs
63 $modulesdir = dolGetModulesDirs('/mailings');
64 
65 $object = new Mailing($db);
66 
67 
68 
69 /*
70  * Actions
71  */
72 
73 if ($action == 'add')
74 {
75  $module=GETPOST("module");
76  $result=-1;
77 
78  $var=true;
79 
80  foreach ($modulesdir as $dir)
81  {
82  // Load modules attributes in arrays (name, numero, orders) from dir directory
83  //print $dir."\n<br>";
84  dol_syslog("Scan directory ".$dir." for modules");
85 
86  // Loading Class
87  $file = $dir."/".$module.".modules.php";
88  $classname = "mailing_".$module;
89 
90  if (file_exists($file))
91  {
92  require_once $file;
93 
94  // We fill $filtersarray. Using this variable is now deprecated. Kept for backward compatibility.
95  $filtersarray=array();
96  if (isset($_POST["filter"])) $filtersarray[0]=$_POST["filter"];
97 
98  // Add targets into database
99  $obj = new $classname($db);
100  dol_syslog("Call add_to_target on class ".$classname);
101  $result=$obj->add_to_target($id,$filtersarray);
102  }
103  }
104  if ($result > 0)
105  {
106  setEventMessages($langs->trans("XTargetsAdded",$result), null, 'mesgs');
107 
108  header("Location: ".$_SERVER['PHP_SELF']."?id=".$id);
109  exit;
110  }
111  if ($result == 0)
112  {
113  setEventMessages($langs->trans("WarningNoEMailsAdded"), null, 'warnings');
114  }
115  if ($result < 0)
116  {
117  setEventMessages($langs->trans("Error").($obj->error?' '.$obj->error:''), null, 'errors');
118  }
119 }
120 
121 if (GETPOST('clearlist'))
122 {
123  // Loading Class
124  $obj = new MailingTargets($db);
125  $obj->clear_target($id);
126  /* Avoid this to allow reposition
127  header("Location: ".$_SERVER['PHP_SELF']."?id=".$id);
128  exit;
129  */
130 }
131 
132 if ($action == 'delete')
133 {
134  // Ici, rowid indique le destinataire et id le mailing
135  $sql="DELETE FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE rowid=".$rowid;
136  $resql=$db->query($sql);
137  if ($resql)
138  {
139  if (!empty($id))
140  {
141  $obj = new MailingTargets($db);
142  $obj->update_nb($id);
143 
144  header("Location: ".$_SERVER['PHP_SELF']."?id=".$id);
145  exit;
146  }
147  else
148  {
149  header("Location: list.php");
150  exit;
151  }
152  }
153  else
154  {
155  dol_print_error($db);
156  }
157 }
158 
159 // Purge search criteria
160 if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') ||GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers
161 {
162  $search_lastname='';
163  $search_firstname='';
164  $search_email='';
165  $search_other='';
166  $search_dest_status='';
167 }
168 
169 
170 
171 /*
172  * View
173  */
174 llxHeader('',$langs->trans("Mailing"),'EN:Module_EMailing|FR:Module_Mailing|ES:M&oacute;dulo_Mailing');
175 
176 $form = new Form($db);
177 $formmailing = new FormMailing($db);
178 
179 if ($object->fetch($id) >= 0)
180 {
181  $head = emailing_prepare_head($object);
182 
183  dol_fiche_head($head, 'targets', $langs->trans("Mailing"), -1, 'email');
184 
185  $linkback = '<a href="'.DOL_URL_ROOT.'/comm/mailing/list.php">'.$langs->trans("BackToList").'</a>';
186 
187  $morehtmlright='';
188  if ($object->statut == 2) $morehtmlright.=' ('.$object->countNbOfTargets('alreadysent').'/'.$object->nbemail.') ';
189 
190  dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '', '', 0, '', $morehtmlright);
191 
192  print '<div class="fichecenter">';
193  print '<div class="underbanner clearboth"></div>';
194 
195  print '<table class="border" width="100%">';
196 
197  print '<tr><td class="titlefield">'.$langs->trans("MailTitle").'</td><td colspan="3">'.$object->titre.'</td></tr>';
198 
199  print '<tr><td>'.$langs->trans("MailFrom").'</td><td colspan="3">'.dol_print_email($object->email_from,0,0,0,0,1).'</td></tr>';
200 
201  // Errors to
202  print '<tr><td>'.$langs->trans("MailErrorsTo").'</td><td colspan="3">'.dol_print_email($object->email_errorsto,0,0,0,0,1);
203  print '</td></tr>';
204 
205  // Nb of distinct emails
206  print '<tr><td>';
207  print $langs->trans("TotalNbOfDistinctRecipients");
208  print '</td><td colspan="3">';
209  $nbemail = ($object->nbemail?$object->nbemail:'0');
210  if (!empty($conf->global->MAILING_LIMIT_SENDBYWEB) && ($conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) && ($object->statut == 1 || $object->statut == 2))
211  {
212  $text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
213  print $form->textwithpicto($nbemail,$text,1,'warning');
214  }
215  else
216  {
217  print $nbemail;
218  }
219  print '</td></tr>';
220 
221  print '</table>';
222 
223  print "</div>";
224 
225  dol_fiche_end();
226 
227  print '<br>';
228 
229 
230  $allowaddtarget=($object->statut == 0);
231 
232  // Show email selectors
233  if ($allowaddtarget && $user->rights->mailing->creer)
234  {
235  print load_fiche_titre($langs->trans("ToAddRecipientsChooseHere"), ($user->admin?info_admin($langs->trans("YouCanAddYourOwnPredefindedListHere"),1):''), 'title_generic');
236 
237  //print '<table class="noborder" width="100%">';
238  print '<div class="tagtable centpercent liste_titre_bydiv" id="tablelines">';
239 
240  //print '<tr class="liste_titre">';
241  print '<div class="tagtr liste_titre">';
242  //print '<td class="liste_titre">'.$langs->trans("RecipientSelectionModules").'</td>';
243  print '<div class="tagtd">'.$langs->trans("RecipientSelectionModules").'</div>';
244  //print '<td class="liste_titre" align="center">'.$langs->trans("NbOfUniqueEMails").'</td>';
245  print '<div class="tagtd" align="center">'.$langs->trans("NbOfUniqueEMails").'</div>';
246  //print '<td class="liste_titre" align="left">'.$langs->trans("Filter").'</td>';
247  print '<div class="tagtd" align="left">'.$langs->trans("Filter").'</div>';
248  //print '<td class="liste_titre" align="center">&nbsp;</td>';
249  print '<div class="tagtd">&nbsp;</div>';
250  //print "</tr>\n";
251  print '</div>';
252 
253  clearstatcache();
254 
255  $var = true;
256 
257  foreach ($modulesdir as $dir)
258  {
259  $modulenames=array();
260 
261  // Load modules attributes in arrays (name, numero, orders) from dir directory
262  //print $dir."\n<br>";
263  dol_syslog("Scan directory ".$dir." for modules");
264  $handle=@opendir($dir);
265  if (is_resource($handle))
266  {
267  while (($file = readdir($handle))!==false)
268  {
269  if (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS')
270  {
271  if (preg_match("/(.*)\.modules\.php$/i",$file,$reg))
272  {
273  if ($reg[1] == 'example') continue;
274  $modulenames[]=$reg[1];
275  }
276  }
277  }
278  closedir($handle);
279  }
280 
281  // Sort $modulenames
282  sort($modulenames);
283 
284  // Loop on each submodule
285  foreach($modulenames as $modulename)
286  {
287  // Loading Class
288  $file = $dir.$modulename.".modules.php";
289  $classname = "mailing_".$modulename;
290  require_once $file;
291 
292  $obj = new $classname($db);
293 
294  // Check dependencies
295  $qualified=(isset($obj->enabled)?$obj->enabled:1);
296  foreach ($obj->require_module as $key)
297  {
298  if (! $conf->$key->enabled || (! $user->admin && $obj->require_admin))
299  {
300  $qualified=0;
301  //print "Les prerequis d'activation du module mailing ne sont pas respectes. Il ne sera pas actif";
302  break;
303  }
304  }
305 
306  // Si le module mailing est qualifie
307  if ($qualified)
308  {
309  $var = !$var;
310 
311  if ($allowaddtarget)
312  {
313  print '<form '.$bctag[$var].' name="'.$modulename.'" action="'.$_SERVER['PHP_SELF'].'?action=add&id='.$object->id.'&module='.$modulename.'" method="POST" enctype="multipart/form-data">';
314  print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
315  }
316  else
317  {
318  print '<div '.$bctag[$var].'>';
319  }
320 
321  print '<div class="tagtd">';
322  if (empty($obj->picto)) $obj->picto='generic';
323  print img_object($langs->trans("EmailingTargetSelector").': '.get_class($obj),$obj->picto);
324  print ' ';
325  print $obj->getDesc();
326  print '</div>';
327 
328  try {
329  $nbofrecipient=$obj->getNbOfRecipients('');
330  }
331  catch(Exception $e)
332  {
333  dol_syslog($e->getMessage(), LOG_ERR);
334  }
335 
336  print '<div class="tagtd center">';
337  if ($nbofrecipient >= 0)
338  {
339  print $nbofrecipient;
340  }
341  else
342  {
343  print $langs->trans("Error").' '.img_error($obj->error);
344  }
345  print '</div>';
346 
347  print '<div class="tagtd" align="left">';
348  if ($allowaddtarget)
349  {
350  try {
351  $filter=$obj->formFilter();
352  }
353  catch(Exception $e)
354  {
355  dol_syslog($e->getMessage(), LOG_ERR);
356  }
357  if ($filter) print $filter;
358  else print $langs->trans("None");
359  }
360  print '</div>';
361 
362  print '<div class="tagtd" align="right">';
363  if ($allowaddtarget)
364  {
365  print '<input type="submit" class="button" name="button_'.$modulename.'" value="'.$langs->trans("Add").'">';
366  }
367  else
368  {
369  print '<input type="submit" class="button disabled" disabled="disabled" name="button_'.$modulename.'" value="'.$langs->trans("Add").'">';
370  //print $langs->trans("MailNoChangePossible");
371  print "&nbsp;";
372  }
373  print '</div>';
374 
375  if ($allowaddtarget) print '</form>';
376  else print '</div>';
377  }
378  }
379  } // End foreach dir
380 
381  print '</div>';
382 
383  print '<br><br>';
384  }
385 
386  // List of selected targets
387  $sql = "SELECT mc.rowid, mc.lastname, mc.firstname, mc.email, mc.other, mc.statut, mc.date_envoi, mc.source_url, mc.source_id, mc.source_type, mc.error_text";
388  $sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc";
389  $sql .= " WHERE mc.fk_mailing=".$object->id;
390  if ($search_lastname) $sql.= natural_search("mc.lastname", $search_lastname);
391  if ($search_firstname) $sql.= natural_search("mc.firstname", $search_firstname);
392  if ($search_email) $sql.= natural_search("mc.email", $search_email);
393  if ($search_other) $sql.= natural_search("mc.other", $search_other);
394  if ($search_dest_status != '' && $search_dest_status >= -1) $sql.= " AND mc.statut=".$db->escape($search_dest_status)." ";
395  $sql .= $db->order($sortfield,$sortorder);
396 
397  // Count total nb of records
398  $nbtotalofrecords = '';
399  if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
400  {
401  $result = $db->query($sql);
402  $nbtotalofrecords = $db->num_rows($result);
403  }
404  //$nbtotalofrecords=$object->nbemail; // nbemail is a denormalized field storing nb of targets
405  $sql .= $db->plimit($limit+1, $offset);
406 
407  $resql=$db->query($sql);
408  if ($resql)
409  {
410 
411  $num = $db->num_rows($resql);
412 
413  $param = "&amp;id=".$object->id;
414  if ($search_lastname) $param.= "&amp;search_lastname=".urlencode($search_lastname);
415  if ($search_firstname) $param.= "&amp;search_firstname=".urlencode($search_firstname);
416  if ($search_email) $param.= "&amp;search_email=".urlencode($search_email);
417  if ($search_other) $param.= "&amp;search_other=".urlencode($search_other);
418 
419  print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
420  print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
421  print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
422  print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
423  print '<input type="hidden" name="page" value="'.$page.'">';
424  print '<input type="hidden" name="id" value="'.$object->id.'">';
425 
426  $cleartext='';
427  if ($allowaddtarget) {
428  $cleartext=$langs->trans("ToClearAllRecipientsClickHere").' '.'<a href="'.$_SERVER["PHP_SELF"].'?clearlist=1&id='.$object->id.'" class="button reposition">'.$langs->trans("TargetsReset").'</a>';
429  }
430  print_barre_liste($langs->trans("MailSelectedRecipients"),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,$cleartext,$num,$nbtotalofrecords,'title_generic',0,'','', $limit);
431 
432  print '</form>';
433 
434  print "\n<!-- Liste destinataires selectionnes -->\n";
435  print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
436  print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
437  print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
438  print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
439  print '<input type="hidden" name="page" value="'.$page.'">';
440  print '<input type="hidden" name="id" value="'.$object->id.'">';
441  print '<input type="hidden" name="limit" value="'.$limit.'">';
442 
443 
444  if ($page) $param.= "&amp;page=".$page;
445 
446  print '<div class="div-table-responsive">';
447  print '<table class="noborder" width="100%">';
448 
449  // Ligne des champs de filtres
450  print '<tr class="liste_titre_filter">';
451  // EMail
452  print '<td class="liste_titre">';
453  print '<input class="flat maxwidth100" type="text" name="search_email" value="'.dol_escape_htmltag($search_email).'">';
454  print '</td>';
455  // Name
456  print '<td class="liste_titre">';
457  print '<input class="flat maxwidth100" type="text" name="search_lastname" value="'.dol_escape_htmltag($search_lastname).'">';
458  print '</td>';
459  // Firstname
460  print '<td class="liste_titre">';
461  print '<input class="flat maxwidth100" type="text" name="search_firstname" value="'.dol_escape_htmltag($search_firstname).'">';
462  print '</td>';
463  // Other
464  print '<td class="liste_titre">';
465  print '<input class="flat maxwidth100" type="text" name="search_other" value="'.dol_escape_htmltag($search_other).'">';
466  print '</td>';
467  // Source
468  print '<td class="liste_titre">';
469  print '&nbsp';
470  print '</td>';
471 
472  // Date sending
473  print '<td class="liste_titre">';
474  print '&nbsp';
475  print '</td>';
476  //Statut
477  print '<td class="liste_titre" align="right">';
478  print $formmailing->selectDestinariesStatus($search_dest_status,'search_dest_status',1);
479  print '</td>';
480  // Action column
481  print '<td class="liste_titre" align="right">';
482  $searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
483  print $searchpicto;
484  print '</td>';
485  print '</tr>';
486 
487  print '<tr class="liste_titre">';
488  print_liste_field_titre("EMail",$_SERVER["PHP_SELF"],"mc.email",$param,"","",$sortfield,$sortorder);
489  print_liste_field_titre("Lastname",$_SERVER["PHP_SELF"],"mc.lastname",$param,"","",$sortfield,$sortorder);
490  print_liste_field_titre("Firstname",$_SERVER["PHP_SELF"],"mc.firstname",$param,"","",$sortfield,$sortorder);
491  print_liste_field_titre("OtherInformations",$_SERVER["PHP_SELF"],"",$param,"","",$sortfield,$sortorder);
492  print_liste_field_titre("Source",$_SERVER["PHP_SELF"],"",$param,"",'align="center"',$sortfield,$sortorder);
493  // Date sending
494  if ($object->statut < 2)
495  {
497  }
498  else
499  {
500  print_liste_field_titre("DateSending",$_SERVER["PHP_SELF"],"mc.date_envoi",$param,'','align="center"',$sortfield,$sortorder);
501  }
502  print_liste_field_titre("Status",$_SERVER["PHP_SELF"],"mc.statut",$param,'','align="right"',$sortfield,$sortorder);
503  print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch ');
504  print '</tr>';
505 
506  $i = 0;
507 
508  if ($num)
509  {
510  while ($i < min($num,$limit))
511  {
512  $obj = $db->fetch_object($resql);
513 
514  print '<tr class="oddeven">';
515  print '<td>'.$obj->email.'</td>';
516  print '<td>'.$obj->lastname.'</td>';
517  print '<td>'.$obj->firstname.'</td>';
518  print '<td>'.$obj->other.'</td>';
519  print '<td align="center">';
520  if (empty($obj->source_id) || empty($obj->source_type))
521  {
522  print empty($obj->source_url)?'':$obj->source_url; // For backward compatibility
523  }
524  else
525  {
526  if ($obj->source_type == 'member')
527  {
528  include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
529  $objectstatic=new Adherent($db);
530  $objectstatic->fetch($obj->source_id);
531  print $objectstatic->getNomUrl(2);
532  }
533  else if ($obj->source_type == 'user')
534  {
535  include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
536  $objectstatic=new User($db);
537  $objectstatic->fetch($obj->source_id);
538  $objectstatic->id=$obj->source_id;
539  print $objectstatic->getNomUrl(2);
540  }
541  else if ($obj->source_type == 'thirdparty')
542  {
543  include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
544  $objectstatic=new Societe($db);
545  $objectstatic->fetch($obj->source_id);
546  print $objectstatic->getNomUrl(2);
547  }
548  else
549  {
550  print $obj->source_url;
551  }
552  }
553  print '</td>';
554 
555  // Statut pour l'email destinataire (Attentioon != statut du mailing)
556  if ($obj->statut == 0)
557  {
558  print '<td align="center">&nbsp;</td>';
559  print '<td align="right" class="nowrap">'.$langs->trans("MailingStatusNotSent");
560  print '</td>';
561  }
562  else
563  {
564  print '<td align="center">'.$obj->date_envoi.'</td>';
565  print '<td align="right" class="nowrap">';
566  print $object::libStatutDest($obj->statut,2,$obj->error_text);
567  print '</td>';
568  }
569 
570  // Search Icon
571  print '<td align="right">';
572  if ($obj->statut == 0)
573  {
574  if ($user->rights->mailing->creer && $allowaddtarget) {
575  print '<a href="'.$_SERVER['PHP_SELF'].'?action=delete&rowid='.$obj->rowid.$param.'">'.img_delete($langs->trans("RemoveRecipient"));
576  }
577  }
578  print '</td>';
579  print '</tr>';
580 
581  $i++;
582  }
583  }
584  else
585  {
586  if ($object->statut < 2)
587  {
588  print '<tr><td colspan="8" class="opacitymedium">';
589  print $langs->trans("NoTargetYet");
590  print '</td></tr>';
591  }
592  }
593  print "</table><br>";
594  print '</div>';
595 
596  print '</form>';
597 
598  $db->free($resql);
599  }
600  else
601  {
602  dol_print_error($db);
603  }
604 
605  print "\n<!-- Fin liste destinataires selectionnes -->\n";
606 
607 }
608 
609 
610 llxFooter();
611 
612 $db->close();
llxFooter()
Empty footer.
Definition: wrapper.php:58
setEventMessages($mesg, $mesgs, $style='mesgs')
Set event messages in dol_events session object.
dol_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='')
Show tab header of a card.
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.
Class to manage Dolibarr users.
Definition: user.class.php:39
dolGetModulesDirs($subdir='')
Return list of modules directories.
dol_print_error($db='', $error='', $errors=null)
Affiche message erreur system avec toutes les informations pour faciliter le diagnostic et la remonte...
if(empty($reshook)) $form
View.
Definition: perms.php:103
Class to offer components to list and upload files.
GETPOST($paramname, $check='none', $method=0, $filter=NULL, $options=NULL, $noreplace=0)
Return value of a param into GET or POST supervariable.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
img_error($titlealt= 'default')
Show error logo.
Class to manage generation of HTML components Only common components must be here.
print_barre_liste($titre, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='title_generic.png', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $hideselectlimit=0, $hidenavigation=0)
Print a title with navigation controls for pagination.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1')
Show information for admin users or standard users.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='')
Write log message into outputs.
Class to manage third parties objects (customers, suppliers, prospects...)
emailing_prepare_head(Mailing $object)
Prepare array with list of tabs.
dol_fiche_end($notab=0)
Show tab footer of a card.
load_fiche_titre($titre, $morehtmlright='', $picto='title_generic.png', $pictoisfullpath=0, $id=0, $morecssontable='', $morehtmlcenter='')
Load a title with picto.
Class to manage members of a foundation.
llxHeader()
Empty header.
Definition: wrapper.php:46
img_object($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
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...
Class to manage emailings module.
img_delete($titlealt= 'default', $other= 'class="pictodelete"')
Show delete logo.
print
Draft customers invoices.
Definition: index.php:91
dol_print_email($email, $cid=0, $socid=0, $addlink=0, $max=64, $showinvalid=1, $withpicto=0)
Show EMail link.
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if(!empty($conf->fournisseur->enabled)&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->societe->lire) if(!empty($conf->tax->enabled)&&$user->rights->tax->charges->lire) if(!empty($conf->facture->enabled)&&!empty($conf->commande->enabled)&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if(!empty($conf->fournisseur->enabled)&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
Definition: index.php:1013
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="")
Show title line of an array.
Parent class of emailing target selectors modules.