dolibarr 21.0.0-beta
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
45// Load translation files required by page
46$langs->loadLangs(array('companies', 'mails', 'admin', 'other', 'errors'));
47
48$id = GETPOSTINT("id");
49$ref = GETPOST('ref', 'alpha');
50
51if (!isset($id) || empty($id)) {
53}
54
55$action = GETPOST('action', 'aZ09');
56$actionid = GETPOSTINT('actionid');
57
58$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
59$sortfield = GETPOST('sortfield', 'aZ09comma');
60$sortorder = GETPOST('sortorder', 'aZ09comma');
61$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT("page");
62if (!$sortorder) {
63 $sortorder = "DESC";
64}
65if (!$sortfield) {
66 $sortfield = "n.daten";
67}
68if (empty($page) || $page == -1) {
69 $page = 0;
70}
71$offset = $limit * $page;
72$pageprev = $page - 1;
73$pagenext = $page + 1;
74
75$now = dol_now();
76
77// Security check
78$object = new User($db);
79if ($id > 0 || !empty($ref)) {
80 $result = $object->fetch($id, $ref, '', 1);
81 $object->loadRights();
82}
83
84$permissiontoadd = (($object->id == $user->id) || ($user->hasRight('user', 'user', 'lire')));
85
86// Security check
87if ($user->socid) {
88 $id = $user->socid;
89}
90$result = restrictedArea($user, 'user', '', '', 'user');
91
92
93/*
94 * Actions
95 */
96
97if (GETPOST('cancel', 'alpha')) {
98 $action = 'list';
99}
100
101$error = 0;
102
103// Add a notification
104if ($action == 'add' && $permissiontoadd) {
105 if ($actionid <= 0) {
106 setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Action")), null, 'errors');
107 $error++;
108 $action = 'create';
109 }
110
111 if (!$error) {
112 $db->begin();
113
114 $sql = "DELETE FROM ".MAIN_DB_PREFIX."notify_def";
115 $sql .= " WHERE fk_user = ".((int) $id)." AND fk_action = ".((int) $actionid);
116 if ($db->query($sql)) {
117 $sql = "INSERT INTO ".MAIN_DB_PREFIX."notify_def (datec, fk_user, fk_action)";
118 $sql .= " VALUES ('".$db->idate($now)."', ".((int) $id).", ".((int) $actionid).")";
119
120 if (!$db->query($sql)) {
121 $error++;
122 dol_print_error($db);
123 }
124 } else {
125 dol_print_error($db);
126 }
127
128 if (!$error) {
129 $db->commit();
130 } else {
131 $db->rollback();
132 $action = 'create';
133 }
134 }
135}
136
137// Remove a notification (edit a user)
138if ($action == 'delete' && $permissiontoadd) {
139 $sql = "DELETE FROM ".MAIN_DB_PREFIX."notify_def where rowid = ".GETPOSTINT("actid");
140 $db->query($sql);
141}
142
143
144
145/*
146 * View
147 */
148
149$form = new Form($db);
150
151$object = new User($db);
152$result = $object->fetch($id, '', '', 1);
153$object->loadRights();
154
155$title = $langs->trans("ThirdParty").' - '.$langs->trans("Notification");
156if (getDolGlobalString('MAIN_HTML_TITLE') && preg_match('/thirdpartynameonly/', getDolGlobalString('MAIN_HTML_TITLE')) && $object->name) {
157 $title = $object->name.' - '.$langs->trans("Notification");
158}
159$help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
160
161llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-user page-notify_card');
162
163
164if ($result > 0) {
165 $langs->load("other");
166
167 $head = user_prepare_head($object);
168
169 print dol_get_fiche_head($head, 'notify', $langs->trans("User"), -1, 'user');
170
171 $linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
172
173 $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">';
174 $morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"');
175 $morehtmlref .= '</a>';
176
177 $urltovirtualcard = '/user/virtualcard.php?id='.((int) $object->id);
178 $morehtmlref .= dolButtonToOpenUrlInDialogPopup('publicvirtualcard', $langs->transnoentitiesnoconv("PublicVirtualCardUrl").' - '.$object->getFullName($langs), img_picto($langs->trans("PublicVirtualCardUrl"), 'card', 'class="valignmiddle marginleftonly paddingrightonly"'), $urltovirtualcard, '', 'nohover');
179
180 dol_banner_tab($object, 'id', $linkback, $user->hasRight('user', 'user', 'lire') || $user->admin, 'rowid', 'ref', $morehtmlref, '', 0, '', '', 0, '');
181
182 print '<div class="fichecenter">';
183
184 print '<div class="underbanner clearboth"></div>';
185 print '<table class="border centpercent tableforfield">';
186
187 // Login
188 print '<tr><td class="titlefield">'.$langs->trans("Login").'</td>';
189 if (!empty($object->ldap_sid) && $object->statut == 0) {
190 print '<td class="error">';
191 print $langs->trans("LoginAccountDisableInDolibarr");
192 print '</td>';
193 } else {
194 print '<td>';
195 $addadmin = '';
196 if (property_exists($object, 'admin')) {
197 if (isModEnabled('multicompany') && !empty($object->admin) && empty($object->entity)) {
198 $addadmin .= img_picto($langs->trans("SuperAdministratorDesc"), "redstar", 'class="paddingleft"');
199 } elseif (!empty($object->admin)) {
200 $addadmin .= img_picto($langs->trans("AdministratorDesc"), "star", 'class="paddingleft"');
201 }
202 }
203 print showValueWithClipboardCPButton($object->login).$addadmin;
204 print '</td>';
205 }
206 print '</tr>'."\n";
207
208 print '</table>';
209
210 print '</div>';
211
212 print dol_get_fiche_end();
213
214 print "\n";
215
216 // Help
217 print '<span class="opacitymedium hideonsmartphone">';
218 print '<br>'.$langs->trans("NotificationsDesc");
219 print '<br>'.$langs->trans("NotificationsDescUser").' - '.$langs->trans("YouAreHere");
220 if (isModEnabled('societe')) {
221 print '<br>'.$langs->trans("NotificationsDescContact");
222 }
223 print '<br>'.$langs->trans("NotificationsDescGlobal");
224 print '</span>';
225
226 print '<br><br><br>'."\n";
227
228
229 // Add notification form
230
231 print '<form action="'.$_SERVER["PHP_SELF"].'?id='.urlencode((string) ($id)).'" method="POST">';
232 print '<input type="hidden" name="token" value="'.newToken().'">';
233 print '<input type="hidden" name="page_y" value="">';
234 if ($action == 'create') {
235 print '<input type="hidden" name="action" id="action" value="add">';
236 }
237
238 $param = "&id=".urlencode((string) ($id));
239
240 // Line with titles
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.photo, c.gender, 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 n.entity IN (".getEntity('notify_def').')';
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 = '';
262 $newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', (int) $permissiontoadd);
263
264 $titlelist = $form->textwithpicto($langs->trans("ListOfActiveNotifications"), $langs->trans("ListOfActiveNotificationsHelp", $langs->transnoentitiesnoconv("Target"), $langs->transnoentitiesnoconv("Event")));
265
266 $limitforsubscription = 0; // We show all subscription of user. Pagination will be reserved for the section of notifications sent.
267 // List of active notifications
268 // @phan-suppress-next-line PhanPluginSuspiciousParamPosition, PhanPluginSuspiciousParamOrder
269 print_barre_liste($titlelist, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $num, 'email', 0, $newcardbutton, '', $limitforsubscription, 0, 0, 1);
270
271 // Line with titles
272 print '<div class="div-table-responsive-no-min">';
273 print '<table class="noborder centpercent">';
274 print '<tr class="liste_titre">';
275 print_liste_field_titre("Target", $_SERVER["PHP_SELF"], "c.lastname,c.firstname", '', $param, '', $sortfield, $sortorder);
276 print_liste_field_titre("Event", $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder);
277 print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "n.type", '', $param, '', $sortfield, $sortorder);
278 print_liste_field_titre('', '', '');
279 print "</tr>\n";
280
281
282 if ($action == 'create') {
283 // $listofemails=$object->thirdparty_and_contact_email_array();
284 if ($object->email) {
285 $actions = array();
286
287 // Load array of available notifications
288 $notificationtrigger = new InterfaceNotification($db);
289 $listofnotifiedevents = $notificationtrigger->getListOfManagedEvents();
290
291 foreach ($listofnotifiedevents as $notifiedevent) {
292 $label = ($langs->trans("Notify_".$notifiedevent['code']) != "Notify_".$notifiedevent['code'] ? $langs->trans("Notify_".$notifiedevent['code']) : $notifiedevent['label']);
293 $actions[$notifiedevent['rowid']] = $label;
294 }
295 print '<tr class="oddeven nohover"><td>';
296 print $object->getNomUrl(1);
297 if (isValidEmail($object->email)) {
298 print ' &lt;'.$object->email.'&gt;';
299 } else {
300 $langs->load("errors");
301 print ' &nbsp; '.img_warning().' '.$langs->trans("ErrorBadEMail", $object->email);
302 }
303 print '</td>';
304 print '<td class="tdoverflowmax200">';
305 print img_picto('', 'object_action', '', 0, 0, 0, '', 'paddingright').$form->selectarray("actionid", $actions, '', 1);
306 print '</td>';
307 print '<td>';
308 $type = array('email' => $langs->trans("EMail"));
309 print $form->selectarray("typeid", $type);
310 print '</td>';
311 print '<td class="nowraponall">';
312 print '<input type="submit" class="button button-add small" value="'.$langs->trans("Add").'">';
313 print '&nbsp;';
314 print '<input type="submit" class="button button-cancel small" name="cancel" value="'.$langs->trans("Cancel").'">';
315 print '</td>';
316 print '</tr>';
317 } else {
318 print '<tr class="oddeven"><td colspan="4" class="opacitymedium">';
319 print $langs->trans("YouMustAssignUserMailFirst");
320 print '</td></tr>';
321 }
322 } else {
323 if ($num) {
324 $i = 0;
325
326 $userstatic = new User($db);
327
328 while ($i < $num) {
329 $obj = $db->fetch_object($resql);
330
331 $userstatic->id = $obj->userid;
332 $userstatic->lastname = $obj->lastname;
333 $userstatic->firstname = $obj->firstname;
334 $userstatic->email = $obj->email;
335 $userstatic->status = $obj->status;
336 $userstatic->photo = $obj->photo;
337 $userstatic->gender = $obj->gender;
338
339 print '<tr class="oddeven">';
340 print '<td>'.$userstatic->getNomUrl(-1);
341 if ($obj->type == 'email') {
342 if (isValidEmail($obj->email)) {
343 print ' &lt;'.$obj->email.'&gt;';
344 } else {
345 $langs->load("errors");
346 print ' &nbsp; '.img_warning().' <span class="warning">'.$langs->trans("ErrorBadEMail", $obj->email).'</span>';
347 }
348 }
349 print '</td>';
350
351 $label = ($langs->trans("Notify_".$obj->code) != "Notify_".$obj->code ? $langs->trans("Notify_".$obj->code) : $obj->label);
352 print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($label).'">';
353 print img_picto('', 'object_action', '', 0, 0, 0, '', 'pictofixedwidth').$label;
354 print '</td>';
355
356 print '<td>';
357 if ($obj->type == 'email') {
358 print $langs->trans("Email");
359 }
360 if ($obj->type == 'sms') {
361 print $langs->trans("SMS");
362 }
363 print '</td>';
364 print '<td class="right"><a href="card.php?id='.$id.'&action=delete&token='.newToken().'&actid='.$obj->rowid.'">'.img_delete().'</a></td>';
365 print '</tr>';
366 $i++;
367 }
368 $db->free($resql);
369 } else {
370 print '<tr><td colspan="4"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
371 }
372 // List of notifications enabled for fixed email
373 /*
374 foreach($conf->global as $key => $val) {
375 if (! preg_match('/^NOTIFICATION_FIXEDEMAIL_(.*)/', $key, $reg)) continue;
376 print '<tr class="oddeven"><td>';
377 $listtmp=explode(',', $val);
378 $first=1;
379 foreach($listtmp as $keyemail => $valemail) {
380 if (! $first) print ', ';
381 $first=0;
382 $valemail=trim($valemail);
383 //print $keyemail.' - '.$valemail.' - '.$reg[1].'<br>';
384 if (isValidEmail($valemail, 1)) {
385 if ($valemail == '__SUPERVISOREMAIL__') print $valemail;
386 else print ' &lt;'.$valemail.'&gt;';
387 } else {
388 print ' '.img_warning().' '.$langs->trans("ErrorBadEMail",$valemail);
389 }
390 }
391 print '</td>';
392 print '<td>';
393 $notifcode=preg_replace('/_THRESHOLD_.*$/','',$reg[1]);
394 $notifcodecond=preg_replace('/^.*_(THRESHOLD_)/','$1',$reg[1]);
395 $label=($langs->trans("Notify_".$notifcode)!="Notify_".$notifcode?$langs->trans("Notify_".$notifcode):$notifcode);
396 print $label;
397 if (preg_match('/^THRESHOLD_HIGHER_(.*)$/',$notifcodecond,$regcond) && ($regcond[1] > 0)) {
398 print ' - '.$langs->trans("IfAmountHigherThan",$regcond[1]);
399 }
400 print '</td>';
401 print '<td>';
402 print $langs->trans("Email");
403 print '</td>';
404 print '<td class="right">'.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).'</td>';
405 print '</tr>';
406 }*/
407 /*if ($user->admin) {
408 print '<tr class="oddeven"><td colspan="4">';
409 print '+ <a href="'.DOL_URL_ROOT.'/admin/notification.php">'.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).'</a>';
410 print '</td></tr>';
411 }*/
412 }
413
414 print '</table>';
415 print '</div>';
416
417 print '</form>';
418
419
420 print '<br><br>'."\n";
421
422
423 // List
424 $sql = "SELECT n.rowid, n.daten, n.email, n.objet_type as object_type, n.objet_id as object_id, n.type,";
425 $sql .= " c.rowid as id, c.lastname, c.firstname, c.email as contactemail, c.photo, c.gender, c.statut as status,";
426 $sql .= " a.code, a.label";
427 $sql .= " FROM ".MAIN_DB_PREFIX."c_action_trigger as a,";
428 $sql .= " ".MAIN_DB_PREFIX."notify as n";
429 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as c ON n.fk_user = c.rowid";
430 $sql .= " WHERE a.rowid = n.fk_action";
431 $sql .= " AND n.fk_user = ".((int) $object->id);
432 $sql .= $db->order($sortfield, $sortorder);
433
434 // Count total nb of records
435 $nbtotalofrecords = '';
436 if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
437 $result = $db->query($sql);
438 $nbtotalofrecords = $db->num_rows($result);
439 if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
440 $page = 0;
441 $offset = 0;
442 }
443 }
444
445 $sql .= $db->plimit($limit + 1, $offset);
446
447 $resql = $db->query($sql);
448 if ($resql) {
449 $num = $db->num_rows($resql);
450 } else {
451 dol_print_error($db);
452 }
453
454 $param = '&id='.$object->id;
455 if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
456 $param .= '&contextpage='.$contextpage;
457 }
458 if ($limit > 0 && $limit != $conf->liste_limit) {
459 $param .= '&limit='.$limit;
460 }
461
462 print '<form method="post" action="'.$_SERVER["PHP_SELF"].'" name="formfilter">';
463 if (isset($optioncss) && $optioncss != '') {
464 print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
465 }
466 print '<input type="hidden" name="token" value="'.newToken().'">';
467 print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
468 print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
469 print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
470 print '<input type="hidden" name="page" value="'.$page.'">';
471 print '<input type="hidden" name="id" value="'.$object->id.'">';
472
473 $titlelist = $form->textwithpicto($langs->trans("ListOfNotificationsDone"), $langs->trans("ListOfNotificationsDoneHelp"));
474
475 // List of notifications done @phan-suppress-next-line PhanPluginSuspiciousParamOrder
476 print_barre_liste($titlelist, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'email', 0, '', '', $limit, '');
477
478 // Line with titles
479 print '<div class="div-table-responsive-no-min">';
480 print '<table class="centpercent noborder">';
481 print '<tr class="liste_titre">';
482 print_liste_field_titre("Target", $_SERVER["PHP_SELF"], "c.lastname,c.firstname", '', $param, '', $sortfield, $sortorder);
483 print_liste_field_titre("Event", $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder);
484 print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "n.type", '', $param, '', $sortfield, $sortorder);
485 //print_liste_field_titre("Object",$_SERVER["PHP_SELF"],"",'',$param,'"',$sortfield,$sortorder);
486 print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "n.daten", '', $param, '', $sortfield, $sortorder, 'right ');
487 print '</tr>';
488
489 if ($num) {
490 $i = 0;
491
492 $userstatic = new User($db);
493
494 while ($i < $num) {
495 $obj = $db->fetch_object($resql);
496
497 print '<tr class="oddeven"><td>';
498 if ($obj->id > 0) {
499 $userstatic->id = $obj->id;
500 $userstatic->lastname = $obj->lastname;
501 $userstatic->firstname = $obj->firstname;
502 $userstatic->status = $obj->status;
503 $userstatic->email = $obj->email;
504 $userstatic->photo = $obj->photo;
505 $userstatic->gender = $obj->gender;
506
507 print $userstatic->getNomUrl(-1);
508 print $obj->email ? ' &lt;'.$obj->email.'&gt;' : $langs->trans("NoMail");
509 } else {
510 print $obj->email;
511 }
512 print '</td>';
513
514 $label = ($langs->trans("Notify_".$obj->code) != "Notify_".$obj->code ? $langs->trans("Notify_".$obj->code) : $obj->label);
515 print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($label).'">';
516 print img_picto('', 'object_action', '', 0, 0, 0, '', 'pictofixedwidth').$label;
517 print '</td>';
518 print '<td>';
519 if ($obj->type == 'email') {
520 print $langs->trans("Email");
521 }
522 if ($obj->type == 'sms') {
523 print $langs->trans("Sms");
524 }
525 print '</td>';
526 // TODO Add link to object here for other types
527 /*print '<td>';
528 if ($obj->object_type == 'order') {
529 $orderstatic->id=$obj->object_id;
530 $orderstatic->ref=...
531 print $orderstatic->getNomUrl(1);
532 }
533 print '</td>';*/
534 // print
535 print'<td class="right">'.dol_print_date($db->jdate($obj->daten), 'dayhour').'</td>';
536 print '</tr>';
537 $i++;
538 }
539 $db->free($resql);
540 } else {
541 print '<tr><td colspan="4"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
542 }
543
544 print '</table>';
545 print '</div>';
546
547 print '</form>';
548} else {
549 dol_print_error(null, 'RecordNotFound');
550}
551
552// End of page
553llxFooter();
554$db->close();
$id
Definition account.php:48
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:66
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:71
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.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
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.