dolibarr 21.0.0-alpha
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 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
8 * Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22 */
23
30// Load Dolibarr environment
31require '../../main.inc.php';
32require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
33require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
34require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
35require_once DOL_DOCUMENT_ROOT.'/core/triggers/interface_50_modNotification_Notification.class.php';
36
37// Load translation files required by page
38$langs->loadLangs(array('companies', 'mails', 'admin', 'other', 'errors'));
39
40$id = GETPOSTINT("id");
41$ref = GETPOST('ref', 'alpha');
42
43if (!isset($id) || empty($id)) {
45}
46
47$action = GETPOST('action', 'aZ09');
48$actionid = GETPOSTINT('actionid');
49
50$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
51$sortfield = GETPOST('sortfield', 'aZ09comma');
52$sortorder = GETPOST('sortorder', 'aZ09comma');
53$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT("page");
54if (!$sortorder) {
55 $sortorder = "DESC";
56}
57if (!$sortfield) {
58 $sortfield = "n.daten";
59}
60if (empty($page) || $page == -1) {
61 $page = 0;
62}
63$offset = $limit * $page;
64$pageprev = $page - 1;
65$pagenext = $page + 1;
66
67$now = dol_now();
68
69// Security check
70$object = new User($db);
71if ($id > 0 || !empty($ref)) {
72 $result = $object->fetch($id, $ref, '', 1);
73 $object->loadRights();
74}
75
76$permissiontoadd = (($object->id == $user->id) || ($user->hasRight('user', 'user', 'lire')));
77
78// Security check
79if ($user->socid) {
80 $id = $user->socid;
81}
82$result = restrictedArea($user, 'user', '', '', 'user');
83
84
85/*
86 * Actions
87 */
88
89if (GETPOST('cancel', 'alpha')) {
90 $action = 'list';
91}
92
93$error = 0;
94
95// Add a notification
96if ($action == 'add' && $permissiontoadd) {
97 if ($actionid <= 0) {
98 setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Action")), null, 'errors');
99 $error++;
100 $action = 'create';
101 }
102
103 if (!$error) {
104 $db->begin();
105
106 $sql = "DELETE FROM ".MAIN_DB_PREFIX."notify_def";
107 $sql .= " WHERE fk_user = ".((int) $id)." AND fk_action = ".((int) $actionid);
108 if ($db->query($sql)) {
109 $sql = "INSERT INTO ".MAIN_DB_PREFIX."notify_def (datec, fk_user, fk_action)";
110 $sql .= " VALUES ('".$db->idate($now)."', ".((int) $id).", ".((int) $actionid).")";
111
112 if (!$db->query($sql)) {
113 $error++;
114 dol_print_error($db);
115 }
116 } else {
117 dol_print_error($db);
118 }
119
120 if (!$error) {
121 $db->commit();
122 } else {
123 $db->rollback();
124 $action = 'create';
125 }
126 }
127}
128
129// Remove a notification (edit a user)
130if ($action == 'delete' && $permissiontoadd) {
131 $sql = "DELETE FROM ".MAIN_DB_PREFIX."notify_def where rowid = ".GETPOSTINT("actid");
132 $db->query($sql);
133}
134
135
136
137/*
138 * View
139 */
140
141$form = new Form($db);
142
143$object = new User($db);
144$result = $object->fetch($id, '', '', 1);
145$object->loadRights();
146
147$title = $langs->trans("ThirdParty").' - '.$langs->trans("Notification");
148if (getDolGlobalString('MAIN_HTML_TITLE') && preg_match('/thirdpartynameonly/', getDolGlobalString('MAIN_HTML_TITLE')) && $object->name) {
149 $title = $object->name.' - '.$langs->trans("Notification");
150}
151$help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
152
153llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-user page-notify_card');
154
155
156if ($result > 0) {
157 $langs->load("other");
158
159 $head = user_prepare_head($object);
160
161 print dol_get_fiche_head($head, 'notify', $langs->trans("User"), -1, 'user');
162
163 $linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
164
165 $morehtmlref = '<a href="'.DOL_URL_ROOT.'/user/vcard.php?id='.$object->id.'&output=file&file='.urlencode(dol_sanitizeFileName($object->getFullName($langs).'.vcf')).'" class="refid" rel="noopener">';
166 $morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"');
167 $morehtmlref .= '</a>';
168
169 $urltovirtualcard = '/user/virtualcard.php?id='.((int) $object->id);
170 $morehtmlref .= dolButtonToOpenUrlInDialogPopup('publicvirtualcard', $langs->transnoentitiesnoconv("PublicVirtualCardUrl").' - '.$object->getFullName($langs), img_picto($langs->trans("PublicVirtualCardUrl"), 'card', 'class="valignmiddle marginleftonly paddingrightonly"'), $urltovirtualcard, '', 'nohover');
171
172 dol_banner_tab($object, 'id', $linkback, $user->hasRight('user', 'user', 'lire') || $user->admin, 'rowid', 'ref', $morehtmlref, '', 0, '', '', 0, '');
173
174 print '<div class="fichecenter">';
175
176 print '<div class="underbanner clearboth"></div>';
177 print '<table class="border centpercent tableforfield">';
178
179 // Login
180 print '<tr><td class="titlefield">'.$langs->trans("Login").'</td>';
181 if (!empty($object->ldap_sid) && $object->statut == 0) {
182 print '<td class="error">';
183 print $langs->trans("LoginAccountDisableInDolibarr");
184 print '</td>';
185 } else {
186 print '<td>';
187 $addadmin = '';
188 if (property_exists($object, 'admin')) {
189 if (isModEnabled('multicompany') && !empty($object->admin) && empty($object->entity)) {
190 $addadmin .= img_picto($langs->trans("SuperAdministratorDesc"), "redstar", 'class="paddingleft"');
191 } elseif (!empty($object->admin)) {
192 $addadmin .= img_picto($langs->trans("AdministratorDesc"), "star", 'class="paddingleft"');
193 }
194 }
195 print showValueWithClipboardCPButton($object->login).$addadmin;
196 print '</td>';
197 }
198 print '</tr>'."\n";
199
200 print '</table>';
201
202 print '</div>';
203
204 print dol_get_fiche_end();
205
206 print "\n";
207
208 // Help
209 print '<span class="opacitymedium hideonsmartphone">';
210 print '<br>'.$langs->trans("NotificationsDesc");
211 print '<br>'.$langs->trans("NotificationsDescUser").' - '.$langs->trans("YouAreHere");
212 if (isModEnabled('societe')) {
213 print '<br>'.$langs->trans("NotificationsDescContact");
214 }
215 print '<br>'.$langs->trans("NotificationsDescGlobal");
216 print '</span>';
217
218 print '<br><br><br>'."\n";
219
220
221 // Add notification form
222
223 print '<form action="'.$_SERVER["PHP_SELF"].'?id='.urlencode((string) ($id)).'" method="POST">';
224 print '<input type="hidden" name="token" value="'.newToken().'">';
225 print '<input type="hidden" name="page_y" value="">';
226 if ($action == 'create') {
227 print '<input type="hidden" name="action" id="action" value="add">';
228 }
229
230 $param = "&id=".urlencode((string) ($id));
231
232 // Line with titles
233
234 // List of notifications enabled for contacts
235 $sql = "SELECT n.rowid, n.type,";
236 $sql .= " a.code, a.label,";
237 $sql .= " c.rowid as userid, c.entity, c.login, c.lastname, c.firstname, c.email, c.photo, c.gender, c.statut as status";
238 $sql .= " FROM ".MAIN_DB_PREFIX."c_action_trigger as a,";
239 $sql .= " ".MAIN_DB_PREFIX."notify_def as n,";
240 $sql .= " ".MAIN_DB_PREFIX."user c";
241 $sql .= " WHERE a.rowid = n.fk_action";
242 $sql .= " AND c.rowid = n.fk_user";
243 $sql .= " AND c.rowid = ".((int) $object->id);
244 $sql .= " AND n.entity IN (".getEntity('notify_def').')';
245
246 $resql = $db->query($sql);
247 if ($resql) {
248 $num = $db->num_rows($resql);
249 } else {
250 dol_print_error($db);
251 }
252
253 $newcardbutton = '';
254 $newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', (int) $permissiontoadd);
255
256 $titlelist = $form->textwithpicto($langs->trans("ListOfActiveNotifications"), $langs->trans("ListOfActiveNotificationsHelp", $langs->transnoentitiesnoconv("Target"), $langs->transnoentitiesnoconv("Event")));
257
258 $limitforsubscription = 0; // We show all subscription of user. Pagination will be reserved for the section of notifications sent.
259 // List of active notifications
260 // @phan-suppress-next-line PhanPluginSuspiciousParamPosition, PhanPluginSuspiciousParamOrder
261 print_barre_liste($titlelist, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $num, 'email', 0, $newcardbutton, '', $limitforsubscription, 0, 0, 1);
262
263 // Line with titles
264 print '<div class="div-table-responsive-no-min">';
265 print '<table class="noborder centpercent">';
266 print '<tr class="liste_titre">';
267 print_liste_field_titre("Target", $_SERVER["PHP_SELF"], "c.lastname,c.firstname", '', $param, '', $sortfield, $sortorder);
268 print_liste_field_titre("Event", $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder);
269 print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "n.type", '', $param, '', $sortfield, $sortorder);
270 print_liste_field_titre('', '', '');
271 print "</tr>\n";
272
273
274 if ($action == 'create') {
275 // $listofemails=$object->thirdparty_and_contact_email_array();
276 if ($object->email) {
277 $actions = array();
278
279 // Load array of available notifications
280 $notificationtrigger = new InterfaceNotification($db);
281 $listofnotifiedevents = $notificationtrigger->getListOfManagedEvents();
282
283 foreach ($listofnotifiedevents as $notifiedevent) {
284 $label = ($langs->trans("Notify_".$notifiedevent['code']) != "Notify_".$notifiedevent['code'] ? $langs->trans("Notify_".$notifiedevent['code']) : $notifiedevent['label']);
285 $actions[$notifiedevent['rowid']] = $label;
286 }
287 print '<tr class="oddeven nohover"><td>';
288 print $object->getNomUrl(1);
289 if (isValidEmail($object->email)) {
290 print ' &lt;'.$object->email.'&gt;';
291 } else {
292 $langs->load("errors");
293 print ' &nbsp; '.img_warning().' '.$langs->trans("ErrorBadEMail", $object->email);
294 }
295 print '</td>';
296 print '<td class="tdoverflowmax200">';
297 print img_picto('', 'object_action', '', 0, 0, 0, '', 'paddingright').$form->selectarray("actionid", $actions, '', 1);
298 print '</td>';
299 print '<td>';
300 $type = array('email' => $langs->trans("EMail"));
301 print $form->selectarray("typeid", $type);
302 print '</td>';
303 print '<td class="nowraponall">';
304 print '<input type="submit" class="button button-add small" value="'.$langs->trans("Add").'">';
305 print '&nbsp;';
306 print '<input type="submit" class="button button-cancel small" name="cancel" value="'.$langs->trans("Cancel").'">';
307 print '</td>';
308 print '</tr>';
309 } else {
310 print '<tr class="oddeven"><td colspan="4" class="opacitymedium">';
311 print $langs->trans("YouMustAssignUserMailFirst");
312 print '</td></tr>';
313 }
314 } else {
315 if ($num) {
316 $i = 0;
317
318 $userstatic = new User($db);
319
320 while ($i < $num) {
321 $obj = $db->fetch_object($resql);
322
323 $userstatic->id = $obj->userid;
324 $userstatic->lastname = $obj->lastname;
325 $userstatic->firstname = $obj->firstname;
326 $userstatic->email = $obj->email;
327 $userstatic->status = $obj->status;
328 $userstatic->photo = $obj->photo;
329 $userstatic->gender = $obj->gender;
330
331 print '<tr class="oddeven">';
332 print '<td>'.$userstatic->getNomUrl(-1);
333 if ($obj->type == 'email') {
334 if (isValidEmail($obj->email)) {
335 print ' &lt;'.$obj->email.'&gt;';
336 } else {
337 $langs->load("errors");
338 print ' &nbsp; '.img_warning().' <span class="warning">'.$langs->trans("ErrorBadEMail", $obj->email).'</span>';
339 }
340 }
341 print '</td>';
342
343 $label = ($langs->trans("Notify_".$obj->code) != "Notify_".$obj->code ? $langs->trans("Notify_".$obj->code) : $obj->label);
344 print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($label).'">';
345 print img_picto('', 'object_action', '', 0, 0, 0, '', 'pictofixedwidth').$label;
346 print '</td>';
347
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 } else {
362 print '<tr><td colspan="4"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
363 }
364 // List of notifications enabled for fixed email
365 /*
366 foreach($conf->global as $key => $val) {
367 if (! preg_match('/^NOTIFICATION_FIXEDEMAIL_(.*)/', $key, $reg)) continue;
368 print '<tr class="oddeven"><td>';
369 $listtmp=explode(',', $val);
370 $first=1;
371 foreach($listtmp as $keyemail => $valemail) {
372 if (! $first) print ', ';
373 $first=0;
374 $valemail=trim($valemail);
375 //print $keyemail.' - '.$valemail.' - '.$reg[1].'<br>';
376 if (isValidEmail($valemail, 1)) {
377 if ($valemail == '__SUPERVISOREMAIL__') print $valemail;
378 else print ' &lt;'.$valemail.'&gt;';
379 } else {
380 print ' '.img_warning().' '.$langs->trans("ErrorBadEMail",$valemail);
381 }
382 }
383 print '</td>';
384 print '<td>';
385 $notifcode=preg_replace('/_THRESHOLD_.*$/','',$reg[1]);
386 $notifcodecond=preg_replace('/^.*_(THRESHOLD_)/','$1',$reg[1]);
387 $label=($langs->trans("Notify_".$notifcode)!="Notify_".$notifcode?$langs->trans("Notify_".$notifcode):$notifcode);
388 print $label;
389 if (preg_match('/^THRESHOLD_HIGHER_(.*)$/',$notifcodecond,$regcond) && ($regcond[1] > 0)) {
390 print ' - '.$langs->trans("IfAmountHigherThan",$regcond[1]);
391 }
392 print '</td>';
393 print '<td>';
394 print $langs->trans("Email");
395 print '</td>';
396 print '<td class="right">'.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).'</td>';
397 print '</tr>';
398 }*/
399 /*if ($user->admin) {
400 print '<tr class="oddeven"><td colspan="4">';
401 print '+ <a href="'.DOL_URL_ROOT.'/admin/notification.php">'.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).'</a>';
402 print '</td></tr>';
403 }*/
404 }
405
406 print '</table>';
407 print '</div>';
408
409 print '</form>';
410
411
412 print '<br><br>'."\n";
413
414
415 // List
416 $sql = "SELECT n.rowid, n.daten, n.email, n.objet_type as object_type, n.objet_id as object_id, n.type,";
417 $sql .= " c.rowid as id, c.lastname, c.firstname, c.email as contactemail, c.photo, c.gender, c.statut as status,";
418 $sql .= " a.code, a.label";
419 $sql .= " FROM ".MAIN_DB_PREFIX."c_action_trigger as a,";
420 $sql .= " ".MAIN_DB_PREFIX."notify as n";
421 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as c ON n.fk_user = c.rowid";
422 $sql .= " WHERE a.rowid = n.fk_action";
423 $sql .= " AND n.fk_user = ".((int) $object->id);
424 $sql .= $db->order($sortfield, $sortorder);
425
426 // Count total nb of records
427 $nbtotalofrecords = '';
428 if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
429 $result = $db->query($sql);
430 $nbtotalofrecords = $db->num_rows($result);
431 if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
432 $page = 0;
433 $offset = 0;
434 }
435 }
436
437 $sql .= $db->plimit($limit + 1, $offset);
438
439 $resql = $db->query($sql);
440 if ($resql) {
441 $num = $db->num_rows($resql);
442 } else {
443 dol_print_error($db);
444 }
445
446 $param = '&id='.$object->id;
447 if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
448 $param .= '&contextpage='.$contextpage;
449 }
450 if ($limit > 0 && $limit != $conf->liste_limit) {
451 $param .= '&limit='.$limit;
452 }
453
454 print '<form method="post" action="'.$_SERVER["PHP_SELF"].'" name="formfilter">';
455 if (isset($optioncss) && $optioncss != '') {
456 print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
457 }
458 print '<input type="hidden" name="token" value="'.newToken().'">';
459 print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
460 print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
461 print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
462 print '<input type="hidden" name="page" value="'.$page.'">';
463 print '<input type="hidden" name="id" value="'.$object->id.'">';
464
465 $titlelist = $form->textwithpicto($langs->trans("ListOfNotificationsDone"), $langs->trans("ListOfNotificationsDoneHelp"));
466
467 // List of notifications done @phan-suppress-next-line PhanPluginSuspiciousParamOrder
468 print_barre_liste($titlelist, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'email', 0, '', '', $limit, '');
469
470 // Line with titles
471 print '<div class="div-table-responsive-no-min">';
472 print '<table class="centpercent noborder">';
473 print '<tr class="liste_titre">';
474 print_liste_field_titre("Target", $_SERVER["PHP_SELF"], "c.lastname,c.firstname", '', $param, '', $sortfield, $sortorder);
475 print_liste_field_titre("Event", $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder);
476 print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "n.type", '', $param, '', $sortfield, $sortorder);
477 //print_liste_field_titre("Object",$_SERVER["PHP_SELF"],"",'',$param,'"',$sortfield,$sortorder);
478 print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "n.daten", '', $param, '', $sortfield, $sortorder, 'right ');
479 print '</tr>';
480
481 if ($num) {
482 $i = 0;
483
484 $userstatic = new User($db);
485
486 while ($i < $num) {
487 $obj = $db->fetch_object($resql);
488
489 print '<tr class="oddeven"><td>';
490 if ($obj->id > 0) {
491 $userstatic->id = $obj->id;
492 $userstatic->lastname = $obj->lastname;
493 $userstatic->firstname = $obj->firstname;
494 $userstatic->status = $obj->status;
495 $userstatic->email = $obj->email;
496 $userstatic->photo = $obj->photo;
497 $userstatic->gender = $obj->gender;
498
499 print $userstatic->getNomUrl(-1);
500 print $obj->email ? ' &lt;'.$obj->email.'&gt;' : $langs->trans("NoMail");
501 } else {
502 print $obj->email;
503 }
504 print '</td>';
505
506 $label = ($langs->trans("Notify_".$obj->code) != "Notify_".$obj->code ? $langs->trans("Notify_".$obj->code) : $obj->label);
507 print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($label).'">';
508 print img_picto('', 'object_action', '', 0, 0, 0, '', 'pictofixedwidth').$label;
509 print '</td>';
510 print '<td>';
511 if ($obj->type == 'email') {
512 print $langs->trans("Email");
513 }
514 if ($obj->type == 'sms') {
515 print $langs->trans("Sms");
516 }
517 print '</td>';
518 // TODO Add link to object here for other types
519 /*print '<td>';
520 if ($obj->object_type == 'order') {
521 $orderstatic->id=$obj->object_id;
522 $orderstatic->ref=...
523 print $orderstatic->getNomUrl(1);
524 }
525 print '</td>';*/
526 // print
527 print'<td class="right">'.dol_print_date($db->jdate($obj->daten), 'dayhour').'</td>';
528 print '</tr>';
529 $i++;
530 }
531 $db->free($resql);
532 } else {
533 print '<tr><td colspan="4"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
534 }
535
536 print '</table>';
537 print '</div>';
538
539 print '</form>';
540} else {
541 dol_print_error(null, 'RecordNotFound');
542}
543
544// End of page
545llxFooter();
546$db->close();
$id
Definition account.php:39
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:58
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Definition wrapper.php:70
Class to manage generation of HTML components Only common components must be here.
Class of triggers for notification module.
Class to manage Dolibarr users.
llxFooter()
Footer empty.
Definition document.php:107
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
print_barre_liste($title, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $selectlimitsuffix=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
showValueWithClipboardCPButton($valuetocopy, $showonlyonhover=1, $texttoshow='')
Create a button to copy $valuetocopy in the clipboard (for copy and paste feature).
img_delete($titlealt='default', $other='class="pictodelete"', $morecss='')
Show delete logo.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dolGetButtonTitle($label, $helpText='', $iconClass='fa fa-file', $url='', $id='', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
dolButtonToOpenUrlInDialogPopup($name, $label, $buttonstring, $url, $disabled='', $morecss='classlink button bordertransp', $jsonopen='', $backtopagejsfields='', $accesskey='')
Return HTML code to output a button to open a dialog popup box.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_now($mode='auto')
Return date for now.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
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.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
isValidEmail($address, $acceptsupervisorkey=0, $acceptuserkey=0)
Return true if email syntax is ok.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
restrictedArea(User $user, $features, $object=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.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.
user_prepare_head(User $object)
Prepare array with list of tabs.