31require
'../main.inc.php';
32require_once DOL_DOCUMENT_ROOT.
'/societe/class/societe.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/contact/class/contact.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
38$langs->load(
"companies");
43$hookmanager->initHooks(array(
'thirdpartiesindex'));
48 $socid = $user->socid;
52$result =
restrictedArea($user,
'societe|contact', 0,
'',
'',
'',
'');
54$thirdparty_static =
new Societe($db);
55$contact_static =
new Contact($db);
57if (!isset($form) || !is_object($form)) {
58 $form =
new Form($db);
66 require_once DOL_DOCUMENT_ROOT.
'/core/class/infobox.class.php';
69 $boxorder =
GETPOST(
'boxorder',
'aZ09');
70 $boxorder .=
GETPOST(
'boxcombo',
'aZ09');
84$transAreaType = $langs->trans(
"ThirdPartiesArea");
85$helpurl =
'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Terceros';
87llxHeader(
"", $langs->trans(
"ThirdParties"), $helpurl);
89print
load_fiche_titre($transAreaType, $resultboxes[
'selectboxlist'],
'companies');
102$sql =
"SELECT s.rowid, s.client, s.fournisseur";
103$sql .=
" FROM ".MAIN_DB_PREFIX.
"societe as s";
104if (!$user->hasRight(
'societe',
'client',
'voir')) {
105 $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
107$sql .=
' WHERE s.entity IN ('.getEntity(
'societe').
')';
108if (!$user->hasRight(
'societe',
'client',
'voir')) {
109 $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
111if (!$user->hasRight(
'fournisseur',
'lire')) {
112 $sql .=
" AND (s.fournisseur <> 1 OR s.client <> 0)";
115$parameters = array(
'socid' => $socid);
116$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $thirdparty_static);
117if (empty($reshook)) {
119 $sql .=
" AND s.rowid = ".((int) $socid);
122$sql .= $hookmanager->resPrint;
124$result = $db->query($sql);
126 while ($objp = $db->fetch_object($result)) {
128 if (isModEnabled(
'societe') && $user->hasRight(
'societe',
'lire') && !
getDolGlobalString(
'SOCIETE_DISABLE_PROSPECTS') && !
getDolGlobalString(
'SOCIETE_DISABLE_PROSPECTS_STATS') && ($objp->client == 2 || $objp->client == 3)) {
130 $third[
'prospect']++;
132 if (isModEnabled(
'societe') && $user->hasRight(
'societe',
'lire') && !
getDolGlobalString(
'SOCIETE_DISABLE_CUSTOMERS') && !
getDolGlobalString(
'SOCIETE_DISABLE_CUSTOMERS_STATS') && ($objp->client == 1 || $objp->client == 3)) {
134 $third[
'customer']++;
136 if (((isModEnabled(
'fournisseur') && $user->hasRight(
'fournisseur',
'lire') && !
getDolGlobalString(
'MAIN_USE_NEW_SUPPLIERMOD')) || (isModEnabled(
'supplier_order') && $user->hasRight(
'supplier_order',
'lire')) || (isModEnabled(
'supplier_invoice') && $user->hasRight(
'supplier_invoice',
'lire'))) && !
getDolGlobalString(
'SOCIETE_DISABLE_SUPPLIERS_STATS') && $objp->fournisseur) {
138 $third[
'supplier']++;
140 if (isModEnabled(
'societe') && $objp->client == 0 && $objp->fournisseur == 0) {
152$thirdpartygraph =
'<div class="div-table-responsive-no-min">';
153$thirdpartygraph .=
'<table class="noborder nohover centpercent">'.
"\n";
154$thirdpartygraph .=
'<tr class="liste_titre"><th colspan="2">'.$langs->trans(
"Statistics").
'</th></tr>';
155if (!empty($conf->use_javascript_ajax) && ((round($third[
'prospect']) ? 1 : 0) + (round($third[
'customer']) ? 1 : 0) + (round($third[
'supplier']) ? 1 : 0) + (round($third[
'other']) ? 1 : 0) >= 2)) {
156 $thirdpartygraph .=
'<tr><td class="center" colspan="2">';
157 $dataseries = array();
158 if (isModEnabled(
'societe') && $user->hasRight(
'societe',
'lire') && !
getDolGlobalString(
'SOCIETE_DISABLE_PROSPECTS') && !
getDolGlobalString(
'SOCIETE_DISABLE_PROSPECTS_STATS')) {
159 $dataseries[] = array($langs->transnoentitiesnoconv(
"Prospects"), round($third[
'prospect']));
161 if (isModEnabled(
'societe') && $user->hasRight(
'societe',
'lire') && !
getDolGlobalString(
'SOCIETE_DISABLE_CUSTOMERS') && !
getDolGlobalString(
'SOCIETE_DISABLE_CUSTOMERS_STATS')) {
162 $dataseries[] = array($langs->transnoentitiesnoconv(
"Customers"), round($third[
'customer']));
164 if (((isModEnabled(
'fournisseur') && $user->hasRight(
'fournisseur',
'lire') && !
getDolGlobalString(
'MAIN_USE_NEW_SUPPLIERMOD')) || (isModEnabled(
'supplier_order') && $user->hasRight(
'supplier_order',
'lire')) || (isModEnabled(
'supplier_invoice') && $user->hasRight(
'supplier_invoice',
'lire'))) && !
getDolGlobalString(
'SOCIETE_DISABLE_SUPPLIERS_STATS')) {
165 $dataseries[] = array($langs->transnoentitiesnoconv(
"Suppliers"), round($third[
'supplier']));
167 if (isModEnabled(
'societe')) {
168 $dataseries[] = array($langs->transnoentitiesnoconv(
"Others"), round($third[
'other']));
170 include_once DOL_DOCUMENT_ROOT.
'/core/class/dolgraph.class.php';
172 $dolgraph->SetData($dataseries);
173 $dolgraph->setShowLegend(2);
174 $dolgraph->setShowPercent(1);
175 $dolgraph->SetType(array(
'pie'));
176 $dolgraph->setHeight(
'200');
177 $dolgraph->draw(
'idgraphthirdparties');
178 $thirdpartygraph .= $dolgraph->show();
179 $thirdpartygraph .=
'</td></tr>'.
"\n";
182 if (isModEnabled(
'societe') && $user->hasRight(
'societe',
'lire') && !
getDolGlobalString(
'SOCIETE_DISABLE_PROSPECTS') && !
getDolGlobalString(
'SOCIETE_DISABLE_PROSPECTS_STATS')) {
183 $statstring .=
"<tr>";
184 $statstring .=
'<td><a href="'.DOL_URL_ROOT.
'/societe/list.php?type=p">'.$langs->trans(
"Prospects").
'</a></td><td class="right">'.round($third[
'prospect']).
'</td>';
185 $statstring .=
"</tr>";
187 if (isModEnabled(
'societe') && $user->hasRight(
'societe',
'lire') && !
getDolGlobalString(
'SOCIETE_DISABLE_CUSTOMERS') && !
getDolGlobalString(
'SOCIETE_DISABLE_CUSTOMERS_STATS')) {
188 $statstring .=
"<tr>";
189 $statstring .=
'<td><a href="'.DOL_URL_ROOT.
'/societe/list.php?type=c">'.$langs->trans(
"Customers").
'</a></td><td class="right">'.round($third[
'customer']).
'</td>';
190 $statstring .=
"</tr>";
193 if (((isModEnabled(
'fournisseur') && $user->hasRight(
'fournisseur',
'lire') && !
getDolGlobalString(
'MAIN_USE_NEW_SUPPLIERMOD')) || (isModEnabled(
'supplier_order') && $user->hasRight(
'supplier_order',
'lire')) || (isModEnabled(
'supplier_invoice') && $user->hasRight(
'supplier_invoice',
'lire'))) && !
getDolGlobalString(
'SOCIETE_DISABLE_SUPPLIERS_STATS')) {
194 $statstring2 .=
"<tr>";
195 $statstring2 .=
'<td><a href="'.DOL_URL_ROOT.
'/societe/list.php?type=f">'.$langs->trans(
"Suppliers").
'</a></td><td class="right">'.round($third[
'supplier']).
'</td>';
196 $statstring2 .=
"</tr>";
198 $thirdpartygraph .= $statstring;
199 $thirdpartygraph .= $statstring2;
201$thirdpartygraph .=
'<tr class="liste_total"><td>'.$langs->trans(
"UniqueThirdParties").
'</td><td class="right">';
202$thirdpartygraph .= $total;
203$thirdpartygraph .=
'</td></tr>';
204$thirdpartygraph .=
'</table>';
205$thirdpartygraph .=
'</div>';
207$thirdpartycateggraph =
'';
208if (isModEnabled(
'category') &&
getDolGlobalString(
'CATEGORY_GRAPHSTATS_ON_THIRDPARTIES')) {
209 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
210 $elementtype =
'societe';
212 $thirdpartycateggraph =
'<div class="div-table-responsive-no-min">';
213 $thirdpartycateggraph .=
'<table class="noborder nohover centpercent">';
214 $thirdpartycateggraph .=
'<tr class="liste_titre"><th colspan="2">'.$langs->trans(
"Categories").
'</th></tr>';
215 $thirdpartycateggraph .=
'<tr><td class="center" colspan="2">';
216 $sql =
"SELECT c.label, count(*) as nb";
217 $sql .=
" FROM ".MAIN_DB_PREFIX.
"categorie_societe as cs";
218 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"categorie as c ON cs.fk_categorie = c.rowid";
219 $sql .=
" WHERE c.type = 2";
221 $sql .=
" AND c.label like '".$db->escape($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES).
"'";
223 $sql .=
" AND c.entity IN (".getEntity(
'category').
")";
224 $sql .=
" GROUP BY c.label";
226 $result = $db->query($sql);
228 $num = $db->num_rows($result);
230 if (!empty($conf->use_javascript_ajax)) {
231 $dataseries = array();
236 $obj = $db->fetch_object($result);
238 $dataseries[] = array($obj->label, round($obj->nb));
246 $dataseries[] = array($langs->trans(
"Other"), round($rest));
248 include_once DOL_DOCUMENT_ROOT.
'/core/class/dolgraph.class.php';
250 $dolgraph->SetData($dataseries);
251 $dolgraph->setShowLegend(2);
252 $dolgraph->setShowPercent(1);
253 $dolgraph->SetType(array(
'pie'));
254 $dolgraph->setHeight(
'200');
255 $dolgraph->draw(
'idgraphcateg');
256 $thirdpartycateggraph .= $dolgraph->show();
259 $obj = $db->fetch_object($result);
261 $thirdpartycateggraph .=
'<tr class="oddeven"><td>'.$obj->label.
'</td><td>'.$obj->nb.
'</td></tr>';
267 $thirdpartycateggraph .=
'</td></tr>';
268 $thirdpartycateggraph .=
'<tr class="liste_total"><td>'.$langs->trans(
"Total").
'</td><td class="right">';
269 $thirdpartycateggraph .= $total;
270 $thirdpartycateggraph .=
'</td></tr>';
271 $thirdpartycateggraph .=
'</table>';
272 $thirdpartycateggraph .=
'</div>';
274 $thirdpartycateggraph =
'';
281$sql =
"SELECT s.rowid, s.nom as name, s.email, s.client, s.fournisseur";
282$sql .=
", s.code_client";
283$sql .=
", s.code_fournisseur";
285 $sql .=
", spe.accountancy_code_supplier as code_compta_fournisseur";
286 $sql .=
", spe.accountancy_code_customer as code_compta";
288 $sql .=
", s.code_compta_fournisseur";
289 $sql .=
", s.code_compta";
293$sql .=
", s.canvas, s.tms as date_modification, s.status as status";
294$sql .=
" FROM ".MAIN_DB_PREFIX.
"societe as s";
296 $sql .=
" LEFT JOIN " . MAIN_DB_PREFIX .
"societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity);
299if (!$user->hasRight(
'societe',
'client',
'voir')) {
300 $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
302$sql .=
' WHERE s.entity IN ('.getEntity(
'societe').
')';
303if (!$user->hasRight(
'societe',
'client',
'voir')) {
304 $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
306if (!$user->hasRight(
'fournisseur',
'lire')) {
307 $sql .=
" AND (s.fournisseur != 1 OR s.client != 0)";
310$parameters = array(
'socid' => $socid);
311$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $thirdparty_static);
312if (empty($reshook)) {
314 $sql .=
" AND s.rowid = ".((int) $socid);
317$sql .= $hookmanager->resPrint;
318$sql .= $db->order(
"s.tms",
"DESC");
319$sql .= $db->plimit($max, 0);
323$result = $db->query($sql);
325 $num = $db->num_rows($result);
330 $transRecordedType = $langs->trans(
"LastModifiedThirdParties", $max);
332 $lastmodified =
"\n<!-- last thirdparties modified -->\n";
333 $lastmodified .=
'<div class="div-table-responsive-no-min">';
334 $lastmodified .=
'<table class="noborder centpercent">';
336 $lastmodified .=
'<tr class="liste_titre"><th colspan="2">';
338 $lastmodified .=
'<span class="valignmiddle">'.$transRecordedType.
'</span>';
339 $lastmodified .=
'<a class="marginleftonlyshort" href="'.DOL_URL_ROOT.
'/societe/list.php?sortfield=s.tms&sortorder=DESC" title="'.$langs->trans(
"FullList").
'">';
340 $lastmodified .=
'<span class="badge marginleftonlyshort">...</span>';
341 $lastmodified .=
'</a>';
342 $lastmodified .=
'</th>';
343 $lastmodified .=
'<th> </th>';
344 $lastmodified .=
'<th class="right">';
345 $lastmodified .=
'</th>';
346 $lastmodified .=
'</tr>'.
"\n";
349 $objp = $db->fetch_object($result);
351 $thirdparty_static->id = $objp->rowid;
352 $thirdparty_static->name = $objp->name;
353 $thirdparty_static->client = $objp->client;
354 $thirdparty_static->fournisseur = $objp->fournisseur;
355 $thirdparty_static->logo = $objp->logo;
356 $thirdparty_static->date_modification = $db->jdate($objp->date_modification);
357 $thirdparty_static->status = $objp->status;
358 $thirdparty_static->code_client = $objp->code_client;
359 $thirdparty_static->code_fournisseur = $objp->code_fournisseur;
360 $thirdparty_static->canvas = $objp->canvas;
361 $thirdparty_static->email = $objp->email;
362 $thirdparty_static->entity = $objp->entity;
363 $thirdparty_static->code_compta_fournisseur = $objp->code_compta_fournisseur;
364 $thirdparty_static->code_compta_client = $objp->code_compta;
366 $lastmodified .=
'<tr class="oddeven">';
368 $lastmodified .=
'<td class="nowrap tdoverflowmax200">';
369 $lastmodified .= $thirdparty_static->getNomUrl(1);
370 $lastmodified .=
"</td>\n";
372 $lastmodified .=
'<td class="center">';
373 $lastmodified .= $thirdparty_static->getTypeUrl();
374 $lastmodified .=
'</td>';
376 $lastmodified .=
'<td class="right tddate" title="'.dol_escape_htmltag($langs->trans(
"DateModification").
' '.
dol_print_date($thirdparty_static->date_modification,
'dayhour',
'tzuserrel')).
'">';
377 $lastmodified .=
dol_print_date($thirdparty_static->date_modification,
'day',
'tzuserrel');
378 $lastmodified .=
"</td>";
379 $lastmodified .=
'<td class="right nowrap">';
380 $lastmodified .= $thirdparty_static->getLibStatut(3);
381 $lastmodified .=
"</td>";
382 $lastmodified .=
"</tr>\n";
388 $lastmodified .=
"</table>\n";
389 $lastmodified .=
'</div>';
390 $lastmodified .=
"<!-- End last thirdparties modified -->\n";
401$sql =
"SELECT s.rowid, s.nom as name, s.email, s.client, s.fournisseur";
402$sql .=
", s.code_client";
403$sql .=
", s.code_fournisseur";
405 $sql .=
", spe.accountancy_code_supplier as code_compta_fournisseur";
406 $sql .=
", spe.accountancy_code_customer as code_compta";
408 $sql .=
", s.code_compta_fournisseur";
409 $sql .=
", s.code_compta";
414$sql .=
", s.tms as date_modification, s.status as status";
415$sql .=
", sp.rowid as cid, sp.canvas as ccanvas, sp.email as cemail, sp.firstname, sp.lastname";
416$sql .=
", sp.address as caddress, sp.phone as cphone";
417$sql .=
" FROM ".MAIN_DB_PREFIX.
"societe as s, ".MAIN_DB_PREFIX.
"socpeople as sp";
419 $sql .=
" LEFT JOIN " . MAIN_DB_PREFIX .
"societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity);
422if (!$user->hasRight(
'societe',
'client',
'voir')) {
423 $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
425$sql .=
" WHERE s.entity IN (".getEntity(
'societe').
") AND sp.fk_soc = s.rowid";
426$sql .=
" AND ((sp.fk_user_creat = ".((int) $user->id).
" AND sp.priv = 1) OR sp.priv = 0)";
427if (!$user->hasRight(
'societe',
'client',
'voir')) {
428 $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
430if (!$user->hasRight(
'fournisseur',
'lire')) {
431 $sql .=
" AND (s.fournisseur != 1 OR s.client != 0)";
434$parameters = array(
'socid' => $socid);
435$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $thirdparty_static);
436if (empty($reshook)) {
438 $sql .=
" AND s.rowid = ".((int) $socid);
441$sql .= $hookmanager->resPrint;
442$sql .= $db->order(
"s.tms",
"DESC");
443$sql .= $db->plimit($max, 0);
446$lastmodifiedcontact =
'';
447$result = $db->query($sql);
449 $num = $db->num_rows($result);
454 $transRecordedType = $langs->trans(
"LastModifiedContacts", $max);
456 $lastmodifiedcontact =
"\n<!-- last contacts modified -->\n";
457 $lastmodifiedcontact .=
'<div class="div-table-responsive-no-min">';
458 $lastmodifiedcontact .=
'<table class="noborder centpercent">';
460 $lastmodifiedcontact .=
'<tr class="liste_titre"><th colspan="2">';
462 $lastmodifiedcontact .=
'<span class="valignmiddle">'.$transRecordedType.
'</div>';
463 $lastmodifiedcontact .=
'<a class="marginleftonlyshort" href="'.DOL_URL_ROOT.
'/contact/list.php?sortfield=p.tms&sortorder=DESC" title="'.$langs->trans(
"FullList").
'">';
465 $lastmodifiedcontact .=
'<span class="badge marginleftonlyshort">...</span>';
466 $lastmodifiedcontact .=
'</th>';
467 $lastmodifiedcontact .=
'<th> </th>';
468 $lastmodifiedcontact .=
'<th class="right">';
470 $lastmodifiedcontact .=
'</th>';
471 $lastmodifiedcontact .=
'</tr>'.
"\n";
474 $objp = $db->fetch_object($result);
476 $thirdparty_static->id = $objp->rowid;
477 $thirdparty_static->name = $objp->name;
478 $thirdparty_static->client = $objp->client;
479 $thirdparty_static->fournisseur = $objp->fournisseur;
480 $thirdparty_static->logo = $objp->logo;
481 $thirdparty_static->date_modification = $db->jdate($objp->date_modification);
482 $thirdparty_static->status = $objp->status;
483 $thirdparty_static->code_client = $objp->code_client;
484 $thirdparty_static->code_fournisseur = $objp->code_fournisseur;
485 $thirdparty_static->canvas = $objp->canvas;
486 $thirdparty_static->email = $objp->email;
487 $thirdparty_static->entity = $objp->entity;
488 $thirdparty_static->code_compta_fournisseur = $objp->code_compta_fournisseur;
489 $thirdparty_static->code_compta_client = $objp->code_compta;
491 $contact_static->id = $objp->cid;
492 $contact_static->firstname = $objp->firstname;
493 $contact_static->lastname = $objp->lastname;
494 $contact_static->email = $objp->cemail;
495 $contact_static->socid = $objp->rowid;
496 $contact_static->canvas = $objp->ccanvas;
497 $contact_static->phone_pro = $objp->cphone;
498 $contact_static->address = $objp->caddress;
500 $lastmodifiedcontact .=
'<tr class="oddeven">';
502 $lastmodifiedcontact .=
'<td>';
503 $lastmodifiedcontact .= $contact_static->getNomUrl(1);
504 $lastmodifiedcontact .=
'</td>';
506 $lastmodifiedcontact .=
'<td class="nowrap tdoverflowmax200">';
507 $lastmodifiedcontact .= $thirdparty_static->getNomUrl(1);
508 $lastmodifiedcontact .=
"</td>\n";
510 $lastmodifiedcontact .=
'<td class="right tddate" title="'.dol_escape_htmltag($langs->trans(
"DateModification").
' '.
dol_print_date($thirdparty_static->date_modification,
'dayhour',
'tzuserrel')).
'">';
511 $lastmodifiedcontact .=
dol_print_date($thirdparty_static->date_modification,
'day',
'tzuserrel');
512 $lastmodifiedcontact .=
"</td>";
513 $lastmodifiedcontact .=
'<td class="right nowrap">';
514 $lastmodifiedcontact .= $thirdparty_static->getLibStatut(3);
515 $lastmodifiedcontact .=
"</td>";
516 $lastmodifiedcontact .=
"</tr>\n";
522 $lastmodifiedcontact .=
"</table>\n";
523 $lastmodifiedcontact .=
'</div>';
524 $lastmodifiedcontact .=
"<!-- End last contacts modified -->\n";
532print
'<div class="clearboth"></div>';
533print
'<div class="fichecenter fichecenterbis">';
535$boxlist =
'<div class="twocolumns">';
537$boxlist .=
'<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
538$boxlist .= $thirdpartygraph;
540$boxlist .= $thirdpartycateggraph;
542$boxlist .= $resultboxes[
'boxlista'];
543$boxlist .=
'</div>'.
"\n";
545$boxlist .=
'<div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
546$boxlist .= $lastmodified;
548$boxlist .= $lastmodifiedcontact;
550$boxlist .= $resultboxes[
'boxlistb'];
551$boxlist .=
'</div>'.
"\n";
559$parameters = array(
'user' => $user);
560$reshook = $hookmanager->executeHooks(
'dashboardThirdparties', $parameters, $thirdparty_static);
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
static saveboxorder($dbs, $zone, $boxorder, $userid=0)
Save order of boxes for area and user.
Class to manage third parties objects (customers, suppliers, prospects...)
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
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...
getDolGlobalString($key, $default='')
Return 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.