dolibarr  9.0.0
mails_senderprofile_list.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
3  * Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
25 require '../main.inc.php';
26 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
27 require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
28 require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
29 require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
30 require_once DOL_DOCUMENT_ROOT.'/core/class/emailsenderprofile.class.php';
31 
32 // Load translation files required by the page
33 $langs->loadLangs(array("errors","admin","mails","languages"));
34 
35 $action = GETPOST('action','alpha')?GETPOST('action','alpha'):'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
36 $massaction = GETPOST('massaction','alpha'); // The bulk action (combo box choice into lists)
37 $show_files = GETPOST('show_files','int'); // Show files area generated by bulk actions ?
38 $confirm = GETPOST('confirm','alpha'); // Result of a confirmation
39 $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
40 $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
41 $contextpage= GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'emailsenderprofilelist'; // To manage different context of search
42 $backtopage = GETPOST('backtopage','alpha'); // Go back to a dedicated page
43 $optioncss = GETPOST('optioncss','aZ'); // Option for the css output (always '' except when 'print')
44 
45 $id = GETPOST('id','int');
46 
47 // Load variable for pagination
48 $limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
49 $sortfield = GETPOST('sortfield','alpha');
50 $sortorder = GETPOST('sortorder','alpha');
51 $page = GETPOST('page','int');
52 if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
53 $offset = $limit * $page;
54 $pageprev = $page - 1;
55 $pagenext = $page + 1;
56 
57 // Initialize technical objects
58 $object=new EmailSenderProfile($db);
59 $extrafields = new ExtraFields($db);
60 $diroutputmassaction=$conf->admin->dir_output . '/temp/massgeneration/'.$user->id;
61 $hookmanager->initHooks(array('emailsenderprofilelist')); // Note that conf->hooks_modules contains array
62 // Fetch optionals attributes and labels
63 $extralabels = $extrafields->fetch_name_optionals_label('emailsenderprofile');
64 $search_array_options=$extrafields->getOptionalsFromPost($object->table_element,'','search_');
65 
66 // Default sort order (if not yet defined by previous GETPOST)
67 if (! $sortfield) $sortfield="t.".key($object->fields); // Set here default search field. By default 1st field in definition.
68 if (! $sortorder) $sortorder="ASC";
69 
70 // Protection if external user
71 $socid=0;
72 if ($user->societe_id > 0)
73 {
74  //$socid = $user->societe_id;
76 }
77 
78 // Initialize array of search criterias
79 $search_all=trim(GETPOST("search_all",'alpha'));
80 $search=array();
81 foreach($object->fields as $key => $val)
82 {
83  if (GETPOST('search_'.$key,'alpha')) $search[$key]=GETPOST('search_'.$key,'alpha');
84 }
85 
86 // List of fields to search into when doing a "search in all"
87 $fieldstosearchall = array();
88 foreach($object->fields as $key => $val)
89 {
90  if ($val['searchall']) $fieldstosearchall['t.'.$key]=$val['label'];
91 }
92 
93 // Definition of fields for list
94 $arrayfields=array();
95 foreach($object->fields as $key => $val)
96 {
97  // If $val['visible']==0, then we never show the field
98  if (! empty($val['visible'])) $arrayfields['t.'.$key]=array('label'=>$val['label'], 'checked'=>(($val['visible']<0)?0:1), 'enabled'=>$val['enabled']);
99 }
100 // Extra fields
101 if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
102 {
103  foreach($extrafields->attribute_label as $key => $val)
104  {
105  if (! empty($extrafields->attribute_list[$key])) $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>(($extrafields->attribute_list[$key]<0)?0:1), 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>(abs($extrafields->attribute_list[$key])!=3 && $extrafields->attribute_perms[$key]));
106  }
107 }
108 
109 
110 
111 
112 /*
113  * Actions
114  */
115 
116 if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
117 if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
118 
119 $parameters=array();
120 $reshook=$hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
121 if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
122 
123 if (empty($reshook))
124 {
125  // Selection of new fields
126  include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
127 
128  // Purge search criteria
129  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
130  {
131  foreach($object->fields as $key => $val)
132  {
133  $search[$key]='';
134  }
135  $toselect='';
136  $search_array_options=array();
137  }
138  if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')
139  || GETPOST('button_search_x','alpha') || GETPOST('button_search.x','alpha') || GETPOST('button_search','alpha'))
140  {
141  $massaction=''; // Protection to avoid mass action if we force a new search during a mass action confirmation
142  }
143 
144  // Mass actions
145  $objectclass='EmailSenderProfile';
146  $objectlabel='EmailSenderProfile';
147  $permtoread = $user->admin;
148  $permtodelete = $user->admin;
149  $uploaddir = $conf->admin->dir_output.'/senderprofiles';
150  include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
151 }
152 
153 
154 
155 /*
156  * View
157  */
158 
159 $form=new Form($db);
160 
161 $now=dol_now();
162 
163 //$help_url="EN:Module_EmailSenderProfile|FR:Module_EmailSenderProfile_FR|ES:Módulo_EmailSenderProfile";
164 $help_url='';
165 $title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("EmailSenderProfiles"));
166 
167 
168 llxHeader();
169 
170 $titre=$langs->trans("EMailsSetup");
171 $linkback='';
172 $titlepicto='title_setup';
173 
174 print load_fiche_titre($titre,$linkback,$titlepicto);
175 
176 $head = email_admin_prepare_head();
177 
178 dol_fiche_head($head, 'senderprofiles', '', -1);
179 
180 // Build and execute select
181 // --------------------------------------------------------------------
182 $sql = 'SELECT ';
183 foreach($object->fields as $key => $val)
184 {
185  $sql.='t.'.$key.', ';
186 }
187 // Add fields from extrafields
188 foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ", ef.".$key.' as options_'.$key : '');
189 // Add fields from hooks
190 $parameters=array();
191 $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook
192 $sql.=$hookmanager->resPrint;
193 $sql=preg_replace('/, $/','', $sql);
194 $sql.= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t";
195 if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."myobject_extrafields as ef on (t.rowid = ef.fk_object)";
196 if ($object->ismultientitymanaged == 1) $sql.= " WHERE t.entity IN (".getEntity('emailsenderprofile').")";
197 else $sql.=" WHERE 1 = 1";
198 foreach($search as $key => $val)
199 {
200  $mode_search=(($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key]))?1:0);
201  if ($search[$key] != '') $sql.=natural_search($key, $search[$key], (($key == 'status')?2:$mode_search));
202 }
203 if ($search_all) $sql.= natural_search(array_keys($fieldstosearchall), $search_all);
204 // Add where from extra fields
205 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
206 // Add where from hooks
207 $parameters=array();
208 $reshook=$hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook
209 $sql.=$hookmanager->resPrint;
210 
211 /* If a group by is required
212 $sql.= " GROUP BY "
213 foreach($object->fields as $key => $val)
214 {
215  $sql.='t.'.$key.', ';
216 }
217 // Add fields from extrafields
218 foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key : '');
219 // Add where from hooks
220 $parameters=array();
221 $reshook=$hookmanager->executeHooks('printFieldListGroupBy',$parameters); // Note that $action and $object may have been modified by hook
222 $sql.=$hookmanager->resPrint;
223 */
224 
225 $sql.=$db->order($sortfield,$sortorder);
226 
227 // Count total nb of records
228 $nbtotalofrecords = '';
229 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
230 {
231  $result = $db->query($sql);
232  $nbtotalofrecords = $db->num_rows($result);
233  if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
234  {
235  $page = 0;
236  $offset = 0;
237  }
238 }
239 
240 $sql.= $db->plimit($limit+1, $offset);
241 
242 $resql=$db->query($sql);
243 if (! $resql)
244 {
245  dol_print_error($db);
246  exit;
247 }
248 
249 $num = $db->num_rows($resql);
250 
251 // Direct jump if only one record found
252 if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all)
253 {
254  $obj = $db->fetch_object($resql);
255  $id = $obj->rowid;
256  header("Location: ".DOL_URL_ROOT.'/monmodule/emailsenderprofile_card.php?id='.$id);
257  exit;
258 }
259 
260 
261 // Example : Adding jquery code
262 print '<script type="text/javascript" language="javascript">
263 jQuery(document).ready(function() {
264  function init_myfunc()
265  {
266  jQuery("#myid").removeAttr(\'disabled\');
267  jQuery("#myid").attr(\'disabled\',\'disabled\');
268  }
269  init_myfunc();
270  jQuery("#mybutton").click(function() {
271  init_myfunc();
272  });
273 });
274 </script>';
275 
276 $arrayofselected=is_array($toselect)?$toselect:array();
277 
278 $param='';
279 if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
280 if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
281 foreach($search as $key => $val)
282 {
283  $param.= '&search_'.$key.'='.urlencode($search[$key]);
284 }
285 if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
286 // Add $param from extra fields
287 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
288 
289 // List of mass actions available
290 $arrayofmassactions = array(
291  //'presend'=>$langs->trans("SendByMail"),
292  //'builddoc'=>$langs->trans("PDFMerge"),
293 );
294 if ($user->rights->monmodule->delete) $arrayofmassactions['predelete']=$langs->trans("Delete");
295 if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
296 $massactionbutton=$form->selectMassAction('', $arrayofmassactions);
297 
298 print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
299 if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
300 print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
301 print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
302 print '<input type="hidden" name="action" value="list">';
303 print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
304 print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
305 print '<input type="hidden" name="page" value="'.$page.'">';
306 print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
307 
308 //print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_companies', 0, '', '', $limit);
309 
310 $topicmail="Information";
311 //$modelmail="subscription";
312 $objecttmp=new EmailSenderProfile($db);
313 //$trackid='sub'.$object->id;
314 include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
315 
316 $moreforfilter = '';
317 /*$moreforfilter.='<div class="divsearchfield">';
318 $moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escape_htmltag($search_myfield).'">';
319 $moreforfilter.= '</div>';*/
320 
321 $parameters=array();
322 $reshook=$hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
323 if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint;
324 else $moreforfilter = $hookmanager->resPrint;
325 
326 if (! empty($moreforfilter))
327 {
328  print '<div class="liste_titre liste_titre_bydiv centpercent">';
329  print $moreforfilter;
330  print '</div>';
331 }
332 
333 $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
334 $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
335 $selectedfields.=(count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
336 
337 print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
338 print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
339 
340 
341 // Fields title search
342 // --------------------------------------------------------------------
343 print '<tr class="liste_titre">';
344 foreach($object->fields as $key => $val)
345 {
346  $align='';
347  if (in_array($val['type'], array('date','datetime','timestamp'))) $align.=($align?' ':'').'center';
348  if (in_array($val['type'], array('timestamp'))) $align.=($align?' ':'').'nowrap';
349  if ($key == 'status') $align.=($align?' ':'').'center';
350  if (! empty($arrayfields['t.'.$key]['checked'])) print '<td class="liste_titre'.($align?' '.$align:'').'"><input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'"></td>';
351 }
352 // Extra fields
353 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
354 // Fields from hook
355 $parameters=array('arrayfields'=>$arrayfields);
356 $reshook=$hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
357 print $hookmanager->resPrint;
358 // Action column
359 print '<td class="liste_titre" align="right">';
360 $searchpicto=$form->showFilterButtons();
361 print $searchpicto;
362 print '</td>';
363 print '</tr>'."\n";
364 
365 
366 // Fields title label
367 // --------------------------------------------------------------------
368 print '<tr class="liste_titre">';
369 foreach($object->fields as $key => $val)
370 {
371  $align='';
372  if (in_array($val['type'], array('date','datetime','timestamp'))) $align.=($align?' ':'').'center';
373  if (in_array($val['type'], array('timestamp'))) $align.=($align?' ':'').'nowrap';
374  if ($key == 'status') $align.=($align?' ':'').'center';
375  if (! empty($arrayfields['t.'.$key]['checked'])) print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($align?'class="'.$align.'"':''), $sortfield, $sortorder, $align.' ')."\n";
376 }
377 // Extra fields
378 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
379 
380 // Hook fields
381 $parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
382 $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
383 print $hookmanager->resPrint;
384 print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"],"",'','','align="center"',$sortfield,$sortorder,'maxwidthsearch ')."\n";
385 print '</tr>'."\n";
386 
387 
388 // Detect if we need a fetch on each output line
389 $needToFetchEachLine=0;
390 foreach ($extrafields->attribute_computed as $key => $val)
391 {
392  if (preg_match('/\$object/',$val)) $needToFetchEachLine++; // There is at least one compute field that use $object
393 }
394 
395 
396 // Loop on record
397 // --------------------------------------------------------------------
398 $i=0;
399 $totalarray=array();
400 while ($i < min($num, $limit))
401 {
402  $obj = $db->fetch_object($resql);
403  if (empty($obj)) break; // Should not happen
404 
405  // Store properties in $object
406  $object->id = $obj->rowid;
407  foreach($object->fields as $key => $val)
408  {
409  if (isset($obj->$key)) $object->$key = $obj->$key;
410  }
411 
412  // Show here line of result
413  print '<tr class="oddeven">';
414  foreach($object->fields as $key => $val)
415  {
416  $align='';
417  if (in_array($val['type'], array('date','datetime','timestamp'))) $align.=($align?' ':'').'center';
418  if (in_array($val['type'], array('timestamp'))) $align.=($align?' ':'').'nowrap';
419  if ($key == 'status') $align.=($align?' ':'').'center';
420  if (! empty($arrayfields['t.'.$key]['checked']))
421  {
422  print '<td';
423  if ($align) print ' class="'.$align.'"';
424  print '>';
425  print $object->showOutputField($val, $key, $obj->$key, '');
426  print '</td>';
427  if (! $i) $totalarray['nbfield']++;
428  if (! empty($val['isameasure']))
429  {
430  if (! $i) $totalarray['pos'][$totalarray['nbfield']]='t.'.$key;
431  $totalarray['val']['t.'.$key] += $obj->$key;
432  }
433  }
434  }
435  // Extra fields
436  include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
437  // Fields from hook
438  $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj);
439  $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
440  print $hookmanager->resPrint;
441  // Action column
442  print '<td class="nowrap" align="center">';
443  if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
444  {
445  $selected=0;
446  if (in_array($obj->rowid, $arrayofselected)) $selected=1;
447  print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected?' checked="checked"':'').'>';
448  }
449  print '</td>';
450  if (! $i) $totalarray['nbfield']++;
451 
452  print '</tr>';
453 
454  $i++;
455 }
456 
457 // Show total line
458 if (isset($totalarray['pos']))
459 {
460  print '<tr class="liste_total">';
461  $i=0;
462  while ($i < $totalarray['nbfield'])
463  {
464  $i++;
465  if (! empty($totalarray['pos'][$i])) print '<td align="right">'.price($totalarray['val'][$totalarray['pos'][$i]]).'</td>';
466  else
467  {
468  if ($i == 1)
469  {
470  if ($num < $limit) print '<td align="left">'.$langs->trans("Total").'</td>';
471  else print '<td align="left">'.$langs->trans("Totalforthispage").'</td>';
472  }
473  else print '<td></td>';
474  }
475  }
476  print '</tr>';
477 }
478 
479 // If no record found
480 if ($num == 0)
481 {
482  $colspan=1;
483  foreach($arrayfields as $key => $val) { if (! empty($val['checked'])) $colspan++; }
484  print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>';
485 }
486 
487 
488 $db->free($resql);
489 
490 $parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql);
491 $reshook=$hookmanager->executeHooks('printFieldListFooter', $parameters, $object); // Note that $action and $object may have been modified by hook
492 print $hookmanager->resPrint;
493 
494 print '</table>'."\n";
495 print '</div>'."\n";
496 
497 print '</form>'."\n";
498 
499 if (in_array('builddoc',$arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords))
500 {
501  require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
502  $formfile = new FormFile($db);
503 
504  $hidegeneratedfilelistifempty=1;
505  if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty=0;
506 
507  // Show list of available documents
508  $urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
509  $urlsource.=str_replace('&amp;','&',$param);
510 
511  $filedir=$diroutputmassaction;
512  $genallowed=$user->rights->monmodule->read;
513  $delallowed=$user->rights->monmodule->create;
514 
515  print $formfile->showdocuments('massfilesarea_monmodule','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
516 }
517 
518 dol_fiche_end();
519 
520 // End of page
521 llxFooter();
522 $db->close();
llxFooter()
Empty footer.
Definition: wrapper.php:56
load_fiche_titre($titre, $morehtmlright='', $picto='title_generic.png', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
GETPOST($paramname, $check='none', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
print
Draft customers invoices.
Definition: index.php:91
setEventMessages($mesg, $mesgs, $style='mesgs')
Set event messages in dol_events session object.
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:1053
email_admin_prepare_head()
Return array head with list of tabs to view object informations.
Definition: admin.lib.php:1730
dol_print_error($db='', $error='', $errors=null)
Affiche message erreur system avec toutes les informations pour faciliter le diagnostic et la remonte...
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields...
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
Class to manage standard extra fields.
Class to manage generation of HTML components Only common components must be here.
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='')
Get title line of an array.
dol_fiche_end($notab=0)
Show tab footer of a card.
llxHeader()
Empty header.
Definition: wrapper.php:44
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='gmt')
Return date for now.
Class to offer components to list and upload files.
price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
Function to format a value into an amount for visual output Function used into PDF and HTML pages...
Class for EmailSenderProfile.
dol_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='')
Show tab header of a card.