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-2017 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) 2024 MDW <mdeweerd@users.noreply.github.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// Load Dolibarr environment
29require '../../main.inc.php';
30require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
31require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
32require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
33require_once DOL_DOCUMENT_ROOT.'/core/triggers/interface_50_modNotification_Notification.class.php';
34
35$langs->loadLangs(array("companies", "mails", "admin", "other", "errors"));
36
37$socid = GETPOSTINT("socid");
38$action = GETPOST('action', 'aZ09');
39$contactid = GETPOST('contactid', 'alpha'); // May be an int or 'thirdparty'
40$actionid = GETPOSTINT('actionid');
41$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
42
43// Security check
44if ($user->socid) {
45 $socid = $user->socid;
46}
47$result = restrictedArea($user, 'societe', '', '');
48
49$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
50$sortfield = GETPOST('sortfield', 'aZ09comma');
51$sortorder = GETPOST('sortorder', 'aZ09comma');
52$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT("page");
53if (!$sortorder) {
54 $sortorder = "DESC";
55}
56if (!$sortfield) {
57 $sortfield = "n.daten";
58}
59if (empty($page) || $page == -1) {
60 $page = 0;
61}
62$offset = $limit * $page;
63$pageprev = $page - 1;
64$pagenext = $page + 1;
65
66$now = dol_now();
67
68$object = new Societe($db);
69
70// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
71$hookmanager->initHooks(array('thirdpartynotification', 'globalcard'));
72
73
74
75/*
76 * Actions
77 */
78
79$parameters = array('id' => $socid);
80$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
81if ($reshook < 0) {
82 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
83}
84
85if (empty($reshook)) {
86 $error = 0;
87
88 if (GETPOST('cancel', 'alpha')) {
89 $action = '';
90 }
91
92 // Add a notification
93 if ($action == 'add') {
94 if (empty($contactid)) {
95 setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Contact")), null, 'errors');
96 $error++;
97 }
98 if ($actionid <= 0) {
99 setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Action")), null, 'errors');
100 $error++;
101 }
102
103 if (!$error) {
104 $db->begin();
105
106 $sql = "DELETE FROM ".MAIN_DB_PREFIX."notify_def";
107 $sql .= " WHERE fk_soc=".((int) $socid)." AND fk_contact=".((int) $contactid)." AND fk_action=".((int) $actionid);
108 if ($db->query($sql)) {
109 $sql = "INSERT INTO ".MAIN_DB_PREFIX."notify_def (datec,fk_soc, fk_contact, fk_action)";
110 $sql .= " VALUES ('".$db->idate($now)."',".((int) $socid).",".((int) $contactid).",".((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 }
125 }
126 }
127
128 // Remove a notification
129 if ($action == 'delete') {
130 $sql = "DELETE FROM ".MAIN_DB_PREFIX."notify_def where rowid=".GETPOSTINT('actid');
131 $db->query($sql);
132 }
133}
134
135
136
137/*
138 * View
139 */
140
141$form = new Form($db);
142
143$object = new Societe($db);
144$result = $object->fetch($socid);
145
146$title = $langs->trans("ThirdParty").' - '.$langs->trans("Notification");
147if (getDolGlobalString('MAIN_HTML_TITLE') && preg_match('/thirdpartynameonly/', getDolGlobalString('MAIN_HTML_TITLE')) && $object->name) {
148 $title = $object->name.' - '.$langs->trans("Notification");
149}
150$help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
151
152llxHeader('', $title, $help_url);
153
154
155if ($result > 0) {
156 $langs->load("other");
157
159
160 print dol_get_fiche_head($head, 'notify', $langs->trans("ThirdParty"), -1, 'company');
161
162 $linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
163
164 dol_banner_tab($object, 'socid', $linkback, ($user->socid ? 0 : 1), 'rowid', 'nom');
165
166 print '<div class="fichecenter">';
167
168 print '<div class="underbanner clearboth"></div>';
169 print '<table class="border centpercent tableforfield">';
170
171 // Type Prospect/Customer/Supplier
172 print '<tr><td class="titlefield">'.$langs->trans('NatureOfThirdParty').'</td><td>';
173 print $object->getTypeUrl(1);
174 print '</td></tr>';
175
176 // Prefix
177 if (getDolGlobalString('SOCIETE_USEPREFIX')) { // Old not used prefix field
178 print '<tr><td class="titlefield">'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>';
179 }
180
181 if ($object->client) {
182 print '<tr><td class="titlefield">';
183 print $langs->trans('CustomerCode').'</td><td colspan="3">';
185 $tmpcheck = $object->check_codeclient();
186 if ($tmpcheck != 0 && $tmpcheck != -5) {
187 print ' <span class="error">('.$langs->trans("WrongCustomerCode").')</span>';
188 }
189 print '</td></tr>';
190 }
191
192 if ((isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) && $object->fournisseur && $user->hasRight('fournisseur', 'lire')) {
193 print '<tr><td class="titlefield">';
194 print $langs->trans('SupplierCode').'</td><td colspan="3">';
196 $tmpcheck = $object->check_codefournisseur();
197 if ($tmpcheck != 0 && $tmpcheck != -5) {
198 print ' <span class="error">('.$langs->trans("WrongSupplierCode").')</span>';
199 }
200 print '</td></tr>';
201 }
202
203 /*print '<tr><td class="titlefield">'.$langs->trans("NbOfActiveNotifications").'</td>'; // Notification for this thirdparty
204 print '<td colspan="3">';
205 $nbofrecipientemails=0;
206 $notify=new Notify($db);
207 $tmparray = $notify->getNotificationsArray('', $object->id, null, 0, array('thirdparty'));
208 foreach($tmparray as $tmpkey => $tmpval)
209 {
210 if (!empty($tmpkey)) $nbofrecipientemails++;
211 }
212 print $nbofrecipientemails;
213 print '</td></tr>';*/
214
215 print '</table>';
216
217 print '</div>';
218
219 print dol_get_fiche_end();
220
221 print "\n";
222
223 // Help
224 print '<div class="opacitymedium hideonsmartphone">';
225 print $langs->trans("NotificationsDesc");
226 print '<br>'.$langs->trans("NotificationsDescUser");
227 print '<br>'.$langs->trans("NotificationsDescContact").' - '.$langs->trans("YouAreHere");
228 print '<br>'.$langs->trans("NotificationsDescGlobal");
229 print '<br>';
230 print '</div>';
231
232 print '<br><br>'."\n";
233
234 $nbtotalofrecords = '';
235
236 // List of notifications enabled for contacts of the thirdparty
237 $sql = "SELECT n.rowid, n.type,";
238 $sql .= " a.code, a.label,";
239 $sql .= " c.rowid as contactid, c.lastname, c.firstname, c.email";
240 $sql .= " FROM ".MAIN_DB_PREFIX."c_action_trigger as a,";
241 $sql .= " ".MAIN_DB_PREFIX."notify_def as n,";
242 $sql .= " ".MAIN_DB_PREFIX."socpeople as c";
243 $sql .= " WHERE a.rowid = n.fk_action";
244 $sql .= " AND c.rowid = n.fk_contact";
245 $sql .= " AND c.fk_soc = ".((int) $object->id);
246
247 $resql = $db->query($sql);
248 if ($resql) {
249 $nbtotalofrecords = $db->num_rows($resql);
250 } else {
251 dol_print_error($db);
252 }
253
254 $param = '';
255 $newcardbutton = '';
256 $newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?socid='.$object->id.'&action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $user->hasRight("societe", "creer"));
257
258 $titlelist = $langs->trans("ListOfActiveNotifications");
259
260 // Add notification form
261 //print load_fiche_titre($titlelist.' <span class="opacitymedium colorblack paddingleft">('.$num.')</span>', '', '');
262 $num = $nbtotalofrecords;
263 print_barre_liste($titlelist, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, (empty($nbtotalofrecords) ? -1 : $nbtotalofrecords), 'email', 0, $newcardbutton, '', $limit, 0, 0, 1);
264
265 print '<form action="'.$_SERVER["PHP_SELF"].'?socid='.$socid.'" method="post">';
266 print '<input type="hidden" name="token" value="'.newToken().'">';
267 print '<input type="hidden" name="action" value="add">';
268
269 $param = "&socid=".$socid;
270
271 // Line with titles
272 print '<div class="div-table-responsive-no-min">';
273 print '<table class="centpercent noborder">';
274 print '<tr class="liste_titre">';
275 print_liste_field_titre("Target", $_SERVER["PHP_SELF"], "c.lastname,c.firstname", '', $param, 'width="45%"', $sortfield, $sortorder);
276 print_liste_field_titre("Action", $_SERVER["PHP_SELF"], "", '', $param, 'width="35%"', $sortfield, $sortorder);
277 print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "n.type", '', $param, 'width="10%"', $sortfield, $sortorder);
279 print "</tr>\n";
280
281 // Line to add a new subscription
282 if ($action == 'create') {
283 $listofemails = $object->thirdparty_and_contact_email_array();
284 if (count($listofemails) > 0) {
285 $actions = array();
286
287 // Load array of available notifications
288 $notificationtrigger = new InterfaceNotification($db);
289 $listofmanagedeventfornotification = $notificationtrigger->getListOfManagedEvents();
290
291 foreach ($listofmanagedeventfornotification as $managedeventfornotification) {
292 $label = ($langs->trans("Notify_".$managedeventfornotification['code']) != "Notify_".$managedeventfornotification['code'] ? $langs->trans("Notify_".$managedeventfornotification['code']) : $managedeventfornotification['label']);
293 $actions[$managedeventfornotification['rowid']] = $label;
294 }
295
296 $newlistofemails = array();
297 foreach ($listofemails as $tmpkey => $tmpval) {
298 $labelhtml = str_replace(array('<', '>'), array(' - <span class="opacitymedium">', '</span>'), $tmpval);
299 $newlistofemails[$tmpkey] = array('label' => dol_string_nohtmltag($tmpval), 'id' => $tmpkey, 'data-html' => $labelhtml);
300 }
301
302 print '<tr class="oddeven nohover">';
303 print '<td class="nowraponall">';
304 print img_picto('', 'contact', '', false, 0, 0, '', 'paddingright');
305 print $form->selectarray("contactid", $newlistofemails, '', 1, 0, 0, '', 0, 0, 0, '', 'minwidth100imp maxwidthonsmartphone');
306 print '</td>';
307 print '<td class="nowraponall">';
308 print img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright');
309 print $form->selectarray("actionid", $actions, '', 1, 0, 0, '', 0, 0, 0, '', 'minwidth100imp maxwidthonsmartphone');
310 print '</td>';
311 print '<td>';
312 $type = array('email' => $langs->trans("EMail"));
313 print $form->selectarray("typeid", $type, '', 0, 0, 0, '', 0, 0, 0, '', 'minwidth75imp');
314 print '</td>';
315 print '<td class="right nowraponall">';
316 print '<input type="submit" class="button button-add small" value="'.$langs->trans("Add").'">';
317 print '<input type="submit" class="button button-cancel small" name="cancel" value="'.$langs->trans("Cancel").'">';
318 print '</td>';
319 print '</tr>';
320 } else {
321 print '<tr class="oddeven"><td colspan="4" class="opacitymedium">';
322 print $langs->trans("YouMustCreateContactFirst");
323 print '</td></tr>';
324 }
325 } else {
326 if ($num) {
327 $i = 0;
328
329 $contactstatic = new Contact($db);
330
331 while ($i < $num) {
332 $obj = $db->fetch_object($resql);
333
334 $contactstatic->id = $obj->contactid;
335 $contactstatic->lastname = $obj->lastname;
336 $contactstatic->firstname = $obj->firstname;
337
338 print '<tr class="oddeven">';
339 print '<td>'.$contactstatic->getNomUrl(1);
340 if ($obj->type == 'email') {
341 if (isValidEmail($obj->email)) {
342 print ' &lt;'.$obj->email.'&gt;';
343 } else {
344 $langs->load("errors");
345 print ' '.img_warning().' <span class="warning">'.$langs->trans("ErrorBadEMail", $obj->email).'</span>';
346 }
347 }
348 print '</td>';
349
350 $label = ($langs->trans("Notify_".$obj->code) != "Notify_".$obj->code ? $langs->trans("Notify_".$obj->code) : $obj->label);
351 print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($label).'">';
352 print img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').$label;
353 print '</td>';
354 print '<td>';
355 if ($obj->type == 'email') {
356 print $langs->trans("Email");
357 }
358 if ($obj->type == 'sms') {
359 print $langs->trans("SMS");
360 }
361 print '</td>';
362 print '<td class="right"><a href="card.php?socid='.$socid.'&action=delete&token='.newToken().'&actid='.$obj->rowid.'">'.img_delete().'</a></td>';
363 print '</tr>';
364 $i++;
365 }
366 $db->free($resql);
367 } else {
368 print '<tr><td colspan="4"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
369 }
370 }
371
372
373
374 print '</table>';
375 print '</div>';
376 print '</form>';
377
378 print '<br><br>'."\n";
379
380
381 // List
382 $sql = "SELECT n.rowid, n.daten, n.email, n.objet_type as object_type, n.objet_id as object_id, n.type,";
383 $sql .= " c.rowid as id, c.lastname, c.firstname, c.email as contactemail,";
384 $sql .= " a.code, a.label";
385 $sql .= " FROM ".MAIN_DB_PREFIX."c_action_trigger as a,";
386 $sql .= " ".MAIN_DB_PREFIX."notify as n ";
387 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as c ON n.fk_contact = c.rowid";
388 $sql .= " WHERE a.rowid = n.fk_action";
389 $sql .= " AND n.fk_soc = ".((int) $object->id);
390 $sql .= $db->order($sortfield, $sortorder);
391
392 // Count total nb of records
393 $nbtotalofrecords = '';
394 if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
395 $result = $db->query($sql);
396 $nbtotalofrecords = $db->num_rows($result);
397 if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
398 $page = 0;
399 $offset = 0;
400 }
401 }
402
403 $sql .= $db->plimit($limit + 1, $offset);
404
405 $resql = $db->query($sql);
406 if ($resql) {
407 $num = $db->num_rows($resql);
408 } else {
409 dol_print_error($db);
410 }
411
412 $param = '&socid='.$object->id;
413 if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
414 $param .= '&contextpage='.$contextpage;
415 }
416 if ($limit > 0 && $limit != $conf->liste_limit) {
417 $param .= '&limit='.$limit;
418 }
419
420 print '<form method="post" action="'.$_SERVER["PHP_SELF"].'" name="formfilter">';
421 if ($optioncss != '') {
422 print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
423 }
424 print '<input type="hidden" name="token" value="'.newToken().'">';
425 print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
426 print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
427 print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
428 print '<input type="hidden" name="page" value="'.$page.'">';
429 print '<input type="hidden" name="socid" value="'.$object->id.'">';
430
431 // List of active notifications @phan-suppress-next-line PhanPluginSuspiciousParamOrder
432 print_barre_liste($langs->trans("ListOfNotificationsDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, empty($nbtotalofrecords) ? -1 : $nbtotalofrecords, 'email', 0, '', '', $limit);
433
434 // Line with titles
435 print '<div class="div-table-responsive-no-min">';
436 print '<table class="centpercent noborder">';
437 print '<tr class="liste_titre">';
438 print_liste_field_titre("Target", $_SERVER["PHP_SELF"], "c.lastname,c.firstname", '', $param, '', $sortfield, $sortorder);
439 print_liste_field_titre("Action", $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder);
440 print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "n.type", '', $param, '', $sortfield, $sortorder);
441 //print_liste_field_titre("Object",$_SERVER["PHP_SELF"],"",'',$param,'"',$sortfield,$sortorder);
442 print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "n.daten", '', $param, '', $sortfield, $sortorder, 'right ');
443 print '</tr>';
444
445 if ($num > 0) {
446 $i = 0;
447
448 $contactstatic = new Contact($db);
449
450 while ($i < $num) {
451 $obj = $db->fetch_object($resql);
452
453 print '<tr class="oddeven"><td>';
454 if ($obj->id > 0) {
455 $contactstatic->id = $obj->id;
456 $contactstatic->lastname = $obj->lastname;
457 $contactstatic->firstname = $obj->firstname;
458 print $contactstatic->getNomUrl(1);
459 print $obj->email ? ' &lt;'.$obj->email.'&gt;' : $langs->trans("NoMail");
460 } else {
461 print $obj->email;
462 }
463 print '</td>';
464 print '<td>';
465 $label = ($langs->trans("Notify_".$obj->code) != "Notify_".$obj->code ? $langs->trans("Notify_".$obj->code) : $obj->label);
466 print $label;
467 print '</td>';
468 print '<td>';
469 if ($obj->type == 'email') {
470 print $langs->trans("Email");
471 }
472 if ($obj->type == 'sms') {
473 print $langs->trans("Sms");
474 }
475 print '</td>';
476 // TODO Add link to object here for other types
477 /*print '<td>';
478 if ($obj->object_type == 'order')
479 {
480 $orderstatic->id=$obj->object_id;
481 $orderstatic->ref=...
482 print $orderstatic->getNomUrl(1);
483 }
484 print '</td>';*/
485 // print
486 print'<td class="right">'.dol_print_date($db->jdate($obj->daten), 'dayhour').'</td>';
487 print '</tr>';
488 $i++;
489 }
490 $db->free($resql);
491 } else {
492 print '<tr><td colspan="4"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
493 }
494
495 print '</table>';
496 print '</div>';
497
498 print '</form>';
499} else {
500 dol_print_error(null, 'RecordNotFound');
501}
502
503// End of page
504llxFooter();
505$db->close();
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 contact/addresses.
Class to manage generation of HTML components Only common components must be here.
Class of triggers for notification module.
Class to manage third parties objects (customers, suppliers, prospects...)
societe_prepare_head(Societe $object)
Return array of tabs to used on pages for third parties cards.
llxFooter()
Footer empty.
Definition document.php:107
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.
dol_string_nohtmltag($stringtoclean, $removelinefeed=1, $pagecodeto='UTF-8', $strip_tags=0, $removedoublespaces=1)
Clean a string from all HTML tags and entities.
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.
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.
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
print_barre_liste($title, $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.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
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 dolibarr global constant string value.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
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.