dolibarr  16.0.5
card.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
4  * Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
5  * Copyright (C) 2015 Marcos GarcĂ­a <marcosgdf@gmail.com>
6  * Copyright (C) 2016 Abbes Bahfir <contact@dolibarrpar.com>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20  */
21 
28 require '../../main.inc.php';
29 require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
30 require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
31 require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
32 require_once DOL_DOCUMENT_ROOT.'/core/triggers/interface_50_modNotification_Notification.class.php';
33 
34 // Load translation files required by page
35 $langs->loadLangs(array('companies', 'mails', 'admin', 'other', 'errors'));
36 
37 $id = GETPOST("id", 'int');
38 $ref = GETPOST('ref', 'alpha');
39 
40 $action = GETPOST('action', 'aZ09');
41 $actionid = GETPOST('actionid', 'int');
42 
43 $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
44 $sortfield = GETPOST('sortfield', 'aZ09comma');
45 $sortorder = GETPOST('sortorder', 'aZ09comma');
46 $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
47 if (!$sortorder) {
48  $sortorder = "DESC";
49 }
50 if (!$sortfield) {
51  $sortfield = "n.daten";
52 }
53 if (empty($page) || $page == -1) {
54  $page = 0;
55 }
56 $offset = $limit * $page;
57 $pageprev = $page - 1;
58 $pagenext = $page + 1;
59 
60 $now = dol_now();
61 
62 // Security check
63 $object = new User($db);
64 if ($id > 0 || !empty($ref)) {
65  $result = $object->fetch($id, $ref, '', 1);
66  $object->getrights();
67 }
68 
69 $permissiontoadd = (($object->id == $user->id) || (!empty($user->rights->user->user->lire)));
70 
71 // Security check
72 if ($user->socid) {
73  $id = $user->socid;
74 }
75 $result = restrictedArea($user, 'user', '', '', 'user');
76 
77 
78 /*
79  * Actions
80  */
81 
82 if (GETPOST('cancel', 'alpha')) {
83  $action = 'list';
84 }
85 
86 // Add a notification
87 if ($action == 'add') {
88  $error = 0;
89 
90  if ($actionid <= 0) {
91  setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Action")), null, 'errors');
92  $error++;
93  $action = 'create';
94  }
95 
96  if (!$error) {
97  $db->begin();
98 
99  $sql = "DELETE FROM ".MAIN_DB_PREFIX."notify_def";
100  $sql .= " WHERE fk_user=".((int) $id)." AND fk_action=".((int) $actionid);
101  if ($db->query($sql)) {
102  $sql = "INSERT INTO ".MAIN_DB_PREFIX."notify_def (datec, fk_user, fk_action)";
103  $sql .= " VALUES ('".$db->idate($now)."', ".((int) $id).", ".((int) $actionid).")";
104 
105  if (!$db->query($sql)) {
106  $error++;
107  dol_print_error($db);
108  }
109  } else {
110  dol_print_error($db);
111  }
112 
113  if (!$error) {
114  $db->commit();
115  } else {
116  $db->rollback();
117  $action = 'create';
118  }
119  }
120 }
121 
122 // Remove a notification
123 if ($action == 'delete') {
124  $sql = "DELETE FROM ".MAIN_DB_PREFIX."notify_def where rowid=".GETPOST("actid", "int");
125  $db->query($sql);
126 }
127 
128 
129 
130 /*
131  * View
132  */
133 
134 $form = new Form($db);
135 
136 $object = new User($db);
137 $result = $object->fetch($id, '', '', 1);
138 $object->getrights();
139 
140 $title = $langs->trans("ThirdParty").' - '.$langs->trans("Notification");
141 if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) {
142  $title = $object->name.' - '.$langs->trans("Notification");
143 }
144 $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
145 llxHeader('', $title, $help_url);
146 
147 
148 if ($result > 0) {
149  $langs->load("other");
150 
151  $head = user_prepare_head($object);
152 
153  print dol_get_fiche_head($head, 'notify', $langs->trans("User"), -1, 'user');
154 
155  $linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
156 
157  $morehtmlref = '<a href="'.DOL_URL_ROOT.'/user/vcard.php?id='.$object->id.'" class="refid">';
158  $morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"');
159  $morehtmlref .= '</a>';
160 
161  dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin, 'rowid', 'ref', $morehtmlref, '', 0, '', '', 0, '');
162 
163  print '<div class="fichecenter">';
164 
165  print '<div class="underbanner clearboth"></div>';
166  print '<table class="border centpercent tableforfield">';
167 
168  // Login
169  print '<tr><td class="titlefield">'.$langs->trans("Login").'</td>';
170  if (!empty($object->ldap_sid) && $object->statut == 0) {
171  print '<td class="error">';
172  print $langs->trans("LoginAccountDisableInDolibarr");
173  print '</td>';
174  } else {
175  print '<td>';
176  $addadmin = '';
177  if (property_exists($object, 'admin')) {
178  if (!empty($conf->multicompany->enabled) && !empty($object->admin) && empty($object->entity)) {
179  $addadmin .= img_picto($langs->trans("SuperAdministratorDesc"), "redstar", 'class="paddingleft"');
180  } elseif (!empty($object->admin)) {
181  $addadmin .= img_picto($langs->trans("AdministratorDesc"), "star", 'class="paddingleft"');
182  }
183  }
184  print showValueWithClipboardCPButton($object->login).$addadmin;
185  print '</td>';
186  }
187  print '</tr>'."\n";
188 
189  /*print '<tr><td class="titlefield">'.$langs->trans("NbOfActiveNotifications").'</td>'; // Notification for this thirdparty
190  print '<td colspan="3">';
191  $nbofrecipientemails=0;
192  $notify=new Notify($db);
193  $tmparray = $notify->getNotificationsArray('', 0, null, $object->id, array('user'));
194  foreach($tmparray as $tmpkey => $tmpval)
195  {
196  $nbofrecipientemails++;
197  }
198  print $nbofrecipientemails;
199  print '</td></tr>';*/
200 
201  print '</table>';
202 
203  print '</div>';
204 
205  print dol_get_fiche_end();
206 
207  print "\n";
208 
209  // Help
210  print '<span class="opacitymedium">';
211  print '<br>'.$langs->trans("NotificationsDesc");
212  print '<br>'.$langs->trans("NotificationsDescUser");
213  print '<br>'.$langs->trans("NotificationsDescContact");
214  print '<br>'.$langs->trans("NotificationsDescGlobal");
215  print '</span>';
216 
217  print '<br><br><br>'."\n";
218 
219 
220  // Add notification form
221  // print load_fiche_titre($langs->trans("AddNewNotification"), '', '');
222 
223  print '<form action="'.$_SERVER["PHP_SELF"].'?id='.urlencode($id).'" method="POST">';
224  print '<input type="hidden" name="token" value="'.newToken().'">';
225  print '<input type="hidden" name="action" value="add">';
226 
227  $param = "&id=".urlencode($id);
228 
229  // Line with titles
230  /* print '<table width="100%" class="noborder">';
231  print '<tr class="liste_titre">';
232  print_liste_field_titre("Target", $_SERVER["PHP_SELF"], "c.lastname,c.firstname", '', $param, 'width="45%"', $sortfield, $sortorder);
233  print_liste_field_titre("Action", $_SERVER["PHP_SELF"], "", '', $param, 'width="35%"', $sortfield, $sortorder);
234  print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "n.type", '', $param, 'width="10%"', $sortfield, $sortorder);
235  print_liste_field_titre('');
236  print "</tr>\n";
237 
238  print '</table>';
239 
240  print '<br>';
241  */
242  // List of notifications enabled for contacts
243  $sql = "SELECT n.rowid, n.type,";
244  $sql .= " a.code, a.label,";
245  $sql .= " c.rowid as userid, c.entity, c.login, c.lastname, c.firstname, c.email, c.statut as status";
246  $sql .= " FROM ".MAIN_DB_PREFIX."c_action_trigger as a,";
247  $sql .= " ".MAIN_DB_PREFIX."notify_def as n,";
248  $sql .= " ".MAIN_DB_PREFIX."user c";
249  $sql .= " WHERE a.rowid = n.fk_action";
250  $sql .= " AND c.rowid = n.fk_user";
251  $sql .= " AND c.rowid = ".((int) $object->id);
252  $sql .= " AND c.entity IN (".getEntity('user').')';
253 
254  $resql = $db->query($sql);
255  if ($resql) {
256  $num = $db->num_rows($resql);
257  } else {
258  dol_print_error($db);
259  }
260 
261  $newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd);
262 
263  $title = $langs->trans("ListOfActiveNotifications");
264 
265  // List of active notifications
266  //print load_fiche_titre($langs->trans("ListOfActiveNotifications").' ('.$num.')', '', '');
267  print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $num, 'email', 0, $newcardbutton, '', $limit, 0, 0, 1);
268 
269  // Line with titles
270  print '<table width="100%" class="noborder">';
271  print '<tr class="liste_titre">';
272  print_liste_field_titre("Target", $_SERVER["PHP_SELF"], "c.lastname,c.firstname", '', $param, 'width="45%"', $sortfield, $sortorder);
273  print_liste_field_titre("Action", $_SERVER["PHP_SELF"], "", '', $param, 'width="35%"', $sortfield, $sortorder);
274  print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "n.type", '', $param, 'width="10%"', $sortfield, $sortorder);
275  print_liste_field_titre('', '', '');
276  print '</tr>';
277 
278 
279  if ($action == 'create') {
280  // $listofemails=$object->thirdparty_and_contact_email_array();
281  if ($object->email) {
282  $actions = array();
283 
284  // Load array of available notifications
285  $notificationtrigger = new InterfaceNotification($db);
286  $listofnotifiedevents = $notificationtrigger->getListOfManagedEvents();
287 
288  foreach ($listofnotifiedevents as $notifiedevent) {
289  $label = ($langs->trans("Notify_".$notifiedevent['code']) != "Notify_".$notifiedevent['code'] ? $langs->trans("Notify_".$notifiedevent['code']) : $notifiedevent['label']);
290  $actions[$notifiedevent['rowid']] = $label;
291  }
292  print '<tr class="oddeven nohover"><td>';
293  print $object->getNomUrl(1);
294  if (isValidEmail($object->email)) {
295  print ' &lt;'.$object->email.'&gt;';
296  } else {
297  $langs->load("errors");
298  print ' &nbsp; '.img_warning().' '.$langs->trans("ErrorBadEMail", $object->email);
299  }
300  print '</td>';
301  print '<td>';
302  print img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').$form->selectarray("actionid", $actions, '', 1);
303  print '</td>';
304  print '<td>';
305  $type = array('email'=>$langs->trans("EMail"));
306  print $form->selectarray("typeid", $type);
307  print '</td>';
308  print '<td class="nowraponall">';
309  print '<input type="submit" class="button button-add" value="'.$langs->trans("Add").'">';
310  print '&nbsp;';
311  print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
312  print '</td>';
313  print '</tr>';
314  } else {
315  print '<tr class="oddeven"><td colspan="4">';
316  print $langs->trans("YouMustAssignUserMailFirst");
317  print '</td></tr>';
318  }
319  } else {
320  if ($num) {
321  $i = 0;
322 
323  $userstatic = new user($db);
324 
325  while ($i < $num) {
326  $obj = $db->fetch_object($resql);
327 
328  $userstatic->id = $obj->userid;
329  $userstatic->lastname = $obj->lastname;
330  $userstatic->firstname = $obj->firstname;
331  $userstatic->email = $obj->email;
332  $userstatic->statut = $obj->status;
333 
334  print '<tr class="oddeven"><td>'.$userstatic->getNomUrl(1);
335  if ($obj->type == 'email') {
336  if (isValidEmail($obj->email)) {
337  print ' &lt;'.$obj->email.'&gt;';
338  } else {
339  $langs->load("errors");
340  print ' &nbsp; '.img_warning().' '.$langs->trans("ErrorBadEMail", $obj->email);
341  }
342  }
343  print '</td>';
344  print '<td>';
345  $label = ($langs->trans("Notify_".$obj->code) != "Notify_".$obj->code ? $langs->trans("Notify_".$obj->code) : $obj->label);
346  print img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').$label;
347  print '</td>';
348  print '<td>';
349  if ($obj->type == 'email') {
350  print $langs->trans("Email");
351  }
352  if ($obj->type == 'sms') {
353  print $langs->trans("SMS");
354  }
355  print '</td>';
356  print '<td class="right"><a href="card.php?id='.$id.'&action=delete&token='.newToken().'&actid='.$obj->rowid.'">'.img_delete().'</a></td>';
357  print '</tr>';
358  $i++;
359  }
360  $db->free($resql);
361  }
362 
363  // List of notifications enabled for fixed email
364  /*
365  foreach($conf->global as $key => $val) {
366  if (! preg_match('/^NOTIFICATION_FIXEDEMAIL_(.*)/', $key, $reg)) continue;
367  print '<tr class="oddeven"><td>';
368  $listtmp=explode(',', $val);
369  $first=1;
370  foreach($listtmp as $keyemail => $valemail) {
371  if (! $first) print ', ';
372  $first=0;
373  $valemail=trim($valemail);
374  //print $keyemail.' - '.$valemail.' - '.$reg[1].'<br>';
375  if (isValidEmail($valemail, 1)) {
376  if ($valemail == '__SUPERVISOREMAIL__') print $valemail;
377  else print ' &lt;'.$valemail.'&gt;';
378  } else {
379  print ' '.img_warning().' '.$langs->trans("ErrorBadEMail",$valemail);
380  }
381  }
382  print '</td>';
383  print '<td>';
384  $notifcode=preg_replace('/_THRESHOLD_.*$/','',$reg[1]);
385  $notifcodecond=preg_replace('/^.*_(THRESHOLD_)/','$1',$reg[1]);
386  $label=($langs->trans("Notify_".$notifcode)!="Notify_".$notifcode?$langs->trans("Notify_".$notifcode):$notifcode);
387  print $label;
388  if (preg_match('/^THRESHOLD_HIGHER_(.*)$/',$notifcodecond,$regcond) && ($regcond[1] > 0)) {
389  print ' - '.$langs->trans("IfAmountHigherThan",$regcond[1]);
390  }
391  print '</td>';
392  print '<td>';
393  print $langs->trans("Email");
394  print '</td>';
395  print '<td class="right">'.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).'</td>';
396  print '</tr>';
397  }*/
398  /*if ($user->admin) {
399  print '<tr class="oddeven"><td colspan="4">';
400  print '+ <a href="'.DOL_URL_ROOT.'/admin/notification.php">'.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).'</a>';
401  print '</td></tr>';
402  }*/
403  }
404 
405  print '</table>';
406 
407  print '</form>';
408 
409 
410  print '<br><br>'."\n";
411 
412 
413  // List
414  $sql = "SELECT n.rowid, n.daten, n.email, n.objet_type as object_type, n.objet_id as object_id, n.type,";
415  $sql .= " c.rowid as id, c.lastname, c.firstname, c.email as contactemail, c.statut as status,";
416  $sql .= " a.code, a.label";
417  $sql .= " FROM ".MAIN_DB_PREFIX."c_action_trigger as a,";
418  $sql .= " ".MAIN_DB_PREFIX."notify as n";
419  $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as c ON n.fk_user = c.rowid";
420  $sql .= " WHERE a.rowid = n.fk_action";
421  $sql .= " AND n.fk_user = ".((int) $object->id);
422  $sql .= $db->order($sortfield, $sortorder);
423 
424  // Count total nb of records
425  $nbtotalofrecords = '';
426  if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
427  $result = $db->query($sql);
428  $nbtotalofrecords = $db->num_rows($result);
429  if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
430  $page = 0;
431  $offset = 0;
432  }
433  }
434 
435  $sql .= $db->plimit($limit + 1, $offset);
436 
437  $resql = $db->query($sql);
438  if ($resql) {
439  $num = $db->num_rows($resql);
440  } else {
441  dol_print_error($db);
442  }
443 
444  $param = '&id='.$object->id;
445  if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
446  $param .= '&contextpage='.$contextpage;
447  }
448  if ($limit > 0 && $limit != $conf->liste_limit) {
449  $param .= '&limit='.$limit;
450  }
451 
452  print '<form method="post" action="'.$_SERVER["PHP_SELF"].'" name="formfilter">';
453  if (isset($optioncss) && $optioncss != '') {
454  print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
455  }
456  print '<input type="hidden" name="token" value="'.newToken().'">';
457  print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
458  print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
459  print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
460  print '<input type="hidden" name="page" value="'.$page.'">';
461  print '<input type="hidden" name="id" value="'.$object->id.'">';
462 
463  // List of notifications done
464  print_barre_liste($langs->trans("ListOfNotificationsDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'email', 0, '', '', $limit);
465 
466  // Line with titles
467  print '<table width="100%" class="noborder">';
468  print '<tr class="liste_titre">';
469  print_liste_field_titre("Target", $_SERVER["PHP_SELF"], "c.lastname,c.firstname", '', $param, '', $sortfield, $sortorder);
470  print_liste_field_titre("Action", $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder);
471  print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "n.type", '', $param, '', $sortfield, $sortorder);
472  //print_liste_field_titre("Object",$_SERVER["PHP_SELF"],"",'',$param,'"',$sortfield,$sortorder);
473  print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "n.daten", '', $param, '', $sortfield, $sortorder, 'right ');
474  print '</tr>';
475 
476  if ($num) {
477  $i = 0;
478 
479  $userstatic = new User($db);
480 
481  while ($i < $num) {
482  $obj = $db->fetch_object($resql);
483 
484  print '<tr class="oddeven"><td>';
485  if ($obj->id > 0) {
486  $userstatic->id = $obj->id;
487  $userstatic->lastname = $obj->lastname;
488  $userstatic->firstname = $obj->firstname;
489  $userstatic->statut = $obj->status;
490  $userstatic->email = $obj->email;
491  print $userstatic->getNomUrl(1);
492  print $obj->email ? ' &lt;'.$obj->email.'&gt;' : $langs->trans("NoMail");
493  } else {
494  print $obj->email;
495  }
496  print '</td>';
497  print '<td>';
498  $label = ($langs->trans("Notify_".$obj->code) != "Notify_".$obj->code ? $langs->trans("Notify_".$obj->code) : $obj->label);
499  print $label;
500  print '</td>';
501  print '<td>';
502  if ($obj->type == 'email') {
503  print $langs->trans("Email");
504  }
505  if ($obj->type == 'sms') {
506  print $langs->trans("Sms");
507  }
508  print '</td>';
509  // TODO Add link to object here for other types
510  /*print '<td>';
511  if ($obj->object_type == 'order') {
512  $orderstatic->id=$obj->object_id;
513  $orderstatic->ref=...
514  print $orderstatic->getNomUrl(1);
515  }
516  print '</td>';*/
517  // print
518  print'<td class="right">'.dol_print_date($db->jdate($obj->daten), 'dayhour').'</td>';
519  print '</tr>';
520  $i++;
521  }
522  $db->free($resql);
523  } else {
524  print '<tr><td colspan="4"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
525  }
526 
527  print '</table>';
528 
529  print '</form>';
530 } else {
531  dol_print_error('', 'RecordNotFound');
532 }
533 
534 // End of page
535 llxFooter();
536 $db->close();
restrictedArea
restrictedArea($user, $features, $objectid=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.
Definition: security.lib.php:234
llxFooter
llxFooter()
Empty footer.
Definition: wrapper.php:73
user_prepare_head
user_prepare_head(User $object)
Prepare array with list of tabs.
Definition: usergroups.lib.php:35
GETPOST
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Definition: functions.lib.php:484
dol_print_error
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
Definition: functions.lib.php:4844
$form
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition: card.php:142
dol_banner_tab
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.
Definition: functions.lib.php:2046
$help_url
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
Definition: agenda.php:116
img_picto
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
Definition: functions.lib.php:3880
img_delete
img_delete($titlealt='default', $other='class="pictodelete"', $morecss='')
Show delete logo.
Definition: functions.lib.php:4429
InterfaceNotification
Class of triggers for notification module.
Definition: interface_50_modNotification_Notification.class.php:33
showValueWithClipboardCPButton
showValueWithClipboardCPButton($valuetocopy, $showonlyonhover=1, $texttoshow='')
Create a button to copy $valuetocopy in the clipboard (for copy and paste feature).
Definition: functions.lib.php:11087
isValidEmail
isValidEmail($address, $acceptsupervisorkey=0, $acceptuserkey=0)
Return true if email syntax is ok.
Definition: functions.lib.php:3681
dolGetButtonTitle
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.
Definition: functions.lib.php:10605
print_barre_liste
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.
Definition: functions.lib.php:5257
dol_get_fiche_head
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
Definition: functions.lib.php:1822
newToken
newToken()
Return the value of token currently saved into session with name 'newtoken'.
Definition: functions.lib.php:10878
dol_get_fiche_end
dol_get_fiche_end($notab=0)
Return tab footer of a card.
Definition: functions.lib.php:2018
User
Class to manage Dolibarr users.
Definition: user.class.php:44
GETPOSTISSET
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
Definition: functions.lib.php:386
print_liste_field_titre
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
Definition: functions.lib.php:5026
Form
Class to manage generation of HTML components Only common components must be here.
Definition: html.form.class.php:52
dol_now
dol_now($mode='auto')
Return date for now.
Definition: functions.lib.php:2845
$resql
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire)||(isModEnabled('supplier_invoice') && $user->rights->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->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
Definition: index.php:742
setEventMessages
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
Definition: functions.lib.php:8137
user
$conf db user
Definition: repair.php:123
llxHeader
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Definition: wrapper.php:59