32require
'../main.inc.php';
33require_once DOL_DOCUMENT_ROOT.
'/societe/class/societe.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/contact/class/contact.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
46$langs->load(
"companies");
51$hookmanager->initHooks(array(
'thirdpartiesindex'));
56 $socid = $user->socid;
60$result =
restrictedArea($user,
'societe|contact', 0,
'',
'',
'',
'');
62$thirdparty_static =
new Societe($db);
63$contact_static =
new Contact($db);
65if (!isset($form) || !is_object($form)) {
66 $form =
new Form($db);
74 require_once DOL_DOCUMENT_ROOT.
'/core/class/infobox.class.php';
77 $boxorder =
GETPOST(
'boxorder',
'aZ09');
78 $boxorder .=
GETPOST(
'boxcombo',
'aZ09');
92$transAreaType = $langs->trans(
"ThirdPartiesArea");
93$helpurl =
'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Terceros';
95llxHeader(
"", $langs->trans(
"ThirdParties"), $helpurl);
97print
load_fiche_titre($transAreaType, $resultboxes[
'selectboxlist'],
'companies');
110$sql =
"SELECT s.rowid, s.client, s.fournisseur";
111$sql .=
" FROM ".MAIN_DB_PREFIX.
"societe as s";
112if (!$user->hasRight(
'societe',
'client',
'voir')) {
113 $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
115$sql .=
' WHERE s.entity IN ('.getEntity(
'societe').
')';
116if (!$user->hasRight(
'societe',
'client',
'voir')) {
117 $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
119if (!$user->hasRight(
'fournisseur',
'lire')) {
120 $sql .=
" AND (s.fournisseur <> 1 OR s.client <> 0)";
123$parameters = array(
'socid' => $socid);
124$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $thirdparty_static);
125if (empty($reshook)) {
127 $sql .=
" AND s.rowid = ".((int) $socid);
130$sql .= $hookmanager->resPrint;
132$result = $db->query($sql);
134 while ($objp = $db->fetch_object($result)) {
136 if (isModEnabled(
'societe') && $user->hasRight(
'societe',
'lire') && !
getDolGlobalString(
'SOCIETE_DISABLE_PROSPECTS') && !
getDolGlobalString(
'SOCIETE_DISABLE_PROSPECTS_STATS') && ($objp->client == 2 || $objp->client == 3)) {
138 $third[
'prospect']++;
140 if (isModEnabled(
'societe') && $user->hasRight(
'societe',
'lire') && !
getDolGlobalString(
'SOCIETE_DISABLE_CUSTOMERS') && !
getDolGlobalString(
'SOCIETE_DISABLE_CUSTOMERS_STATS') && ($objp->client == 1 || $objp->client == 3)) {
142 $third[
'customer']++;
144 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) {
146 $third[
'supplier']++;
148 if (isModEnabled(
'societe') && $objp->client == 0 && $objp->fournisseur == 0) {
160$thirdpartygraph =
'<div class="div-table-responsive-no-min">';
161$thirdpartygraph .=
'<table class="noborder nohover centpercent">'.
"\n";
162$thirdpartygraph .=
'<tr class="liste_titre"><th colspan="2">'.$langs->trans(
"Statistics").
'</th></tr>';
163if (!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)) {
164 $thirdpartygraph .=
'<tr><td class="center" colspan="2">';
165 $dataseries = array();
166 if (isModEnabled(
'societe') && $user->hasRight(
'societe',
'lire') && !
getDolGlobalString(
'SOCIETE_DISABLE_PROSPECTS') && !
getDolGlobalString(
'SOCIETE_DISABLE_PROSPECTS_STATS')) {
167 $dataseries[] = array($langs->transnoentitiesnoconv(
"Prospects"), round($third[
'prospect']));
169 if (isModEnabled(
'societe') && $user->hasRight(
'societe',
'lire') && !
getDolGlobalString(
'SOCIETE_DISABLE_CUSTOMERS') && !
getDolGlobalString(
'SOCIETE_DISABLE_CUSTOMERS_STATS')) {
170 $dataseries[] = array($langs->transnoentitiesnoconv(
"Customers"), round($third[
'customer']));
172 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')) {
173 $dataseries[] = array($langs->transnoentitiesnoconv(
"Suppliers"), round($third[
'supplier']));
175 if (isModEnabled(
'societe')) {
176 $dataseries[] = array($langs->transnoentitiesnoconv(
"Others"), round($third[
'other']));
178 include_once DOL_DOCUMENT_ROOT.
'/core/class/dolgraph.class.php';
180 $dolgraph->SetData($dataseries);
181 $dolgraph->setShowLegend(2);
182 $dolgraph->setShowPercent(1);
183 $dolgraph->SetType(array(
'pie'));
184 $dolgraph->setHeight(
'200');
185 $dolgraph->draw(
'idgraphthirdparties');
186 $thirdpartygraph .= $dolgraph->show();
187 $thirdpartygraph .=
'</td></tr>'.
"\n";
190 if (isModEnabled(
'societe') && $user->hasRight(
'societe',
'lire') && !
getDolGlobalString(
'SOCIETE_DISABLE_PROSPECTS') && !
getDolGlobalString(
'SOCIETE_DISABLE_PROSPECTS_STATS')) {
191 $statstring .=
"<tr>";
192 $statstring .=
'<td><a href="'.DOL_URL_ROOT.
'/societe/list.php?type=p">'.$langs->trans(
"Prospects").
'</a></td><td class="right">'.round($third[
'prospect']).
'</td>';
193 $statstring .=
"</tr>";
195 if (isModEnabled(
'societe') && $user->hasRight(
'societe',
'lire') && !
getDolGlobalString(
'SOCIETE_DISABLE_CUSTOMERS') && !
getDolGlobalString(
'SOCIETE_DISABLE_CUSTOMERS_STATS')) {
196 $statstring .=
"<tr>";
197 $statstring .=
'<td><a href="'.DOL_URL_ROOT.
'/societe/list.php?type=c">'.$langs->trans(
"Customers").
'</a></td><td class="right">'.round($third[
'customer']).
'</td>';
198 $statstring .=
"</tr>";
201 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')) {
202 $statstring2 .=
"<tr>";
203 $statstring2 .=
'<td><a href="'.DOL_URL_ROOT.
'/societe/list.php?type=f">'.$langs->trans(
"Suppliers").
'</a></td><td class="right">'.round($third[
'supplier']).
'</td>';
204 $statstring2 .=
"</tr>";
206 $thirdpartygraph .= $statstring;
207 $thirdpartygraph .= $statstring2;
209$thirdpartygraph .=
'<tr class="liste_total"><td>'.$langs->trans(
"UniqueThirdParties").
'</td><td class="right">';
210$thirdpartygraph .= $total;
211$thirdpartygraph .=
'</td></tr>';
212$thirdpartygraph .=
'</table>';
213$thirdpartygraph .=
'</div>';
215$thirdpartycateggraph =
'';
216if (isModEnabled(
'category') &&
getDolGlobalString(
'CATEGORY_GRAPHSTATS_ON_THIRDPARTIES')) {
217 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
219 $thirdpartycateggraph =
'<div class="div-table-responsive-no-min">';
220 $thirdpartycateggraph .=
'<table class="noborder nohover centpercent">';
221 $thirdpartycateggraph .=
'<tr class="liste_titre"><th colspan="2">'.$langs->trans(
"Categories").
'</th></tr>';
222 $thirdpartycateggraph .=
'<tr><td class="center" colspan="2">';
223 $sql =
"SELECT c.label, count(*) as nb";
224 $sql .=
" FROM ".MAIN_DB_PREFIX.
"categorie_societe as cs";
225 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"categorie as c ON cs.fk_categorie = c.rowid";
226 $sql .=
" WHERE c.type = 2";
228 $sql .=
" AND c.label like '".$db->escape(
getDolGlobalString(
'CATEGORY_GRAPHSTATS_ON_THIRDPARTIES')).
"'";
230 $sql .=
" AND c.entity IN (".getEntity(
'category').
")";
231 $sql .=
" GROUP BY c.label";
233 $result = $db->query($sql);
235 $num = $db->num_rows($result);
237 if (!empty(
$conf->use_javascript_ajax)) {
238 $dataseries = array();
243 $obj = $db->fetch_object($result);
245 $dataseries[] = array($obj->label, round($obj->nb));
253 $dataseries[] = array($langs->trans(
"Other"), round($rest));
255 include_once DOL_DOCUMENT_ROOT.
'/core/class/dolgraph.class.php';
257 $dolgraph->SetData($dataseries);
258 $dolgraph->setShowLegend(2);
259 $dolgraph->setShowPercent(1);
260 $dolgraph->SetType(array(
'pie'));
261 $dolgraph->setHeight(
'200');
262 $dolgraph->draw(
'idgraphcateg');
263 $thirdpartycateggraph .= $dolgraph->show();
266 $obj = $db->fetch_object($result);
268 $thirdpartycateggraph .=
'<tr class="oddeven"><td>'.dolPrintHTML($obj->label).
'</td><td>'.$obj->nb.
'</td></tr>';
274 $thirdpartycateggraph .=
'</td></tr>';
275 $thirdpartycateggraph .=
'<tr class="liste_total"><td>'.$langs->trans(
"Total").
'</td><td class="right">';
276 $thirdpartycateggraph .= $total;
277 $thirdpartycateggraph .=
'</td></tr>';
278 $thirdpartycateggraph .=
'</table>';
279 $thirdpartycateggraph .=
'</div>';
281 $thirdpartycateggraph =
'';
289$sql =
"SELECT s.rowid, s.nom as name, s.email, s.client, s.fournisseur";
290$sql .=
", s.code_client";
291$sql .=
", s.code_fournisseur";
293 $sql .=
", spe.accountancy_code_supplier as code_compta_fournisseur";
294 $sql .=
", spe.accountancy_code_customer as code_compta";
296 $sql .=
", s.code_compta_fournisseur";
297 $sql .=
", s.code_compta";
301$sql .=
", s.canvas, s.tms as date_modification, s.status as status";
302$sql .=
" FROM ".MAIN_DB_PREFIX.
"societe as s";
304 $sql .=
" LEFT JOIN " . MAIN_DB_PREFIX .
"societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int)
$conf->entity);
307if (!$user->hasRight(
'societe',
'client',
'voir')) {
308 $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
310$sql .=
' WHERE s.entity IN ('.getEntity(
'societe').
')';
311if (!$user->hasRight(
'societe',
'client',
'voir')) {
312 $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
314if (!$user->hasRight(
'fournisseur',
'lire')) {
315 $sql .=
" AND (s.fournisseur != 1 OR s.client != 0)";
318$parameters = array(
'socid' => $socid);
319$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $thirdparty_static);
320if (empty($reshook)) {
322 $sql .=
" AND s.rowid = ".((int) $socid);
325$sql .= $hookmanager->resPrint;
326$sql .= $db->order(
"s.tms",
"DESC");
327$sql .= $db->plimit($max, 0);
331$result = $db->query($sql);
333 $num = $db->num_rows($result);
338 $transRecordedType = $langs->trans(
"LastModifiedThirdParties", $max);
340 $lastmodified =
"\n<!-- last thirdparties modified -->\n";
341 $lastmodified .=
'<div class="div-table-responsive-no-min">';
342 $lastmodified .=
'<table class="noborder centpercent">';
344 $lastmodified .=
'<tr class="liste_titre"><th colspan="2">';
346 $lastmodified .=
'<span class="valignmiddle">'.$transRecordedType.
'</span>';
347 $lastmodified .=
'<a class="marginleftonlyshort" href="'.DOL_URL_ROOT.
'/societe/list.php?sortfield=s.tms&sortorder=DESC" title="'.$langs->trans(
"FullList").
'">';
348 $lastmodified .=
'<span class="badge marginleftonlyshort">...</span>';
349 $lastmodified .=
'</a>';
350 $lastmodified .=
'</th>';
351 $lastmodified .=
'<th> </th>';
352 $lastmodified .=
'<th class="right">';
353 $lastmodified .=
'</th>';
354 $lastmodified .=
'</tr>'.
"\n";
357 $objp = $db->fetch_object($result);
359 $thirdparty_static->id = $objp->rowid;
360 $thirdparty_static->name = $objp->name;
361 $thirdparty_static->client = $objp->client;
362 $thirdparty_static->fournisseur = $objp->fournisseur;
363 $thirdparty_static->logo = $objp->logo;
364 $thirdparty_static->date_modification = $db->jdate($objp->date_modification);
365 $thirdparty_static->status = $objp->status;
366 $thirdparty_static->code_client = $objp->code_client;
367 $thirdparty_static->code_fournisseur = $objp->code_fournisseur;
368 $thirdparty_static->canvas = $objp->canvas;
369 $thirdparty_static->email = $objp->email;
370 $thirdparty_static->entity = $objp->entity;
371 $thirdparty_static->code_compta_fournisseur = $objp->code_compta_fournisseur;
372 $thirdparty_static->code_compta_client = $objp->code_compta;
374 $lastmodified .=
'<tr class="oddeven">';
376 $lastmodified .=
'<td class="nowrap tdoverflowmax200">';
377 $lastmodified .= $thirdparty_static->getNomUrl(1);
378 $lastmodified .=
"</td>\n";
380 $lastmodified .=
'<td class="center">';
381 $lastmodified .= $thirdparty_static->getTypeUrl();
382 $lastmodified .=
'</td>';
384 $lastmodified .=
'<td class="right tddate" title="'.dol_escape_htmltag($langs->trans(
"DateModification").
' '.
dol_print_date($thirdparty_static->date_modification,
'dayhour',
'tzuserrel')).
'">';
385 $lastmodified .=
dol_print_date($thirdparty_static->date_modification,
'day',
'tzuserrel');
386 $lastmodified .=
"</td>";
387 $lastmodified .=
'<td class="right nowrap">';
388 $lastmodified .= $thirdparty_static->getLibStatut(3);
389 $lastmodified .=
"</td>";
390 $lastmodified .=
"</tr>\n";
396 $lastmodified .=
"</table>\n";
397 $lastmodified .=
'</div>';
398 $lastmodified .=
"<!-- End last thirdparties modified -->\n";
409$sql =
"SELECT s.rowid, s.nom as name, s.email, s.client, s.fournisseur";
410$sql .=
", s.code_client";
411$sql .=
", s.code_fournisseur";
413 $sql .=
", spe.accountancy_code_supplier as code_compta_fournisseur";
414 $sql .=
", spe.accountancy_code_customer as code_compta";
416 $sql .=
", s.code_compta_fournisseur";
417 $sql .=
", s.code_compta";
422$sql .=
", s.tms as date_modification, s.status as status";
423$sql .=
", sp.rowid as cid, sp.canvas as ccanvas, sp.email as cemail, sp.firstname, sp.lastname";
424$sql .=
", sp.address as caddress, sp.phone as cphone";
425$sql .=
" FROM ".MAIN_DB_PREFIX.
"societe as s, ".MAIN_DB_PREFIX.
"socpeople as sp";
427 $sql .=
" LEFT JOIN " . MAIN_DB_PREFIX .
"societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int)
$conf->entity);
430if (!$user->hasRight(
'societe',
'client',
'voir')) {
431 $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
433$sql .=
" WHERE s.entity IN (".getEntity(
'societe').
") AND sp.fk_soc = s.rowid";
434$sql .=
" AND ((sp.fk_user_creat = ".((int) $user->id).
" AND sp.priv = 1) OR sp.priv = 0)";
435if (!$user->hasRight(
'societe',
'client',
'voir')) {
436 $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
438if (!$user->hasRight(
'fournisseur',
'lire')) {
439 $sql .=
" AND (s.fournisseur != 1 OR s.client != 0)";
442$parameters = array(
'socid' => $socid);
443$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $thirdparty_static);
444if (empty($reshook)) {
446 $sql .=
" AND s.rowid = ".((int) $socid);
449$sql .= $hookmanager->resPrint;
450$sql .= $db->order(
"s.tms",
"DESC");
451$sql .= $db->plimit($max, 0);
454$lastmodifiedcontact =
'';
455$result = $db->query($sql);
457 $num = $db->num_rows($result);
462 $transRecordedType = $langs->trans(
"LastModifiedContacts", $max);
464 $lastmodifiedcontact =
"\n<!-- last contacts modified -->\n";
465 $lastmodifiedcontact .=
'<div class="div-table-responsive-no-min">';
466 $lastmodifiedcontact .=
'<table class="noborder centpercent">';
468 $lastmodifiedcontact .=
'<tr class="liste_titre"><th colspan="2">';
470 $lastmodifiedcontact .=
'<span class="valignmiddle">'.$transRecordedType.
'</div>';
471 $lastmodifiedcontact .=
'<a class="marginleftonlyshort" href="'.DOL_URL_ROOT.
'/contact/list.php?sortfield=p.tms&sortorder=DESC" title="'.$langs->trans(
"FullList").
'">';
473 $lastmodifiedcontact .=
'<span class="badge marginleftonlyshort">...</span>';
474 $lastmodifiedcontact .=
'</th>';
475 $lastmodifiedcontact .=
'<th> </th>';
476 $lastmodifiedcontact .=
'<th class="right">';
478 $lastmodifiedcontact .=
'</th>';
479 $lastmodifiedcontact .=
'</tr>'.
"\n";
482 $objp = $db->fetch_object($result);
484 $thirdparty_static->id = $objp->rowid;
485 $thirdparty_static->name = $objp->name;
486 $thirdparty_static->client = $objp->client;
487 $thirdparty_static->fournisseur = $objp->fournisseur;
488 $thirdparty_static->logo = $objp->logo;
489 $thirdparty_static->date_modification = $db->jdate($objp->date_modification);
490 $thirdparty_static->status = $objp->status;
491 $thirdparty_static->code_client = $objp->code_client;
492 $thirdparty_static->code_fournisseur = $objp->code_fournisseur;
493 $thirdparty_static->canvas = $objp->canvas;
494 $thirdparty_static->email = $objp->email;
495 $thirdparty_static->entity = $objp->entity;
496 $thirdparty_static->code_compta_fournisseur = $objp->code_compta_fournisseur;
497 $thirdparty_static->code_compta_client = $objp->code_compta;
499 $contact_static->id = $objp->cid;
500 $contact_static->firstname = $objp->firstname;
501 $contact_static->lastname = $objp->lastname;
502 $contact_static->email = $objp->cemail;
503 $contact_static->socid = $objp->rowid;
504 $contact_static->canvas = $objp->ccanvas;
505 $contact_static->phone_pro = $objp->cphone;
506 $contact_static->address = $objp->caddress;
508 $lastmodifiedcontact .=
'<tr class="oddeven">';
510 $lastmodifiedcontact .=
'<td>';
511 $lastmodifiedcontact .= $contact_static->getNomUrl(1);
512 $lastmodifiedcontact .=
'</td>';
514 $lastmodifiedcontact .=
'<td class="nowrap tdoverflowmax200">';
515 $lastmodifiedcontact .= $thirdparty_static->getNomUrl(1);
516 $lastmodifiedcontact .=
"</td>\n";
518 $lastmodifiedcontact .=
'<td class="right tddate" title="'.dol_escape_htmltag($langs->trans(
"DateModification").
' '.
dol_print_date($thirdparty_static->date_modification,
'dayhour',
'tzuserrel')).
'">';
519 $lastmodifiedcontact .=
dol_print_date($thirdparty_static->date_modification,
'day',
'tzuserrel');
520 $lastmodifiedcontact .=
"</td>";
521 $lastmodifiedcontact .=
'<td class="right nowrap">';
522 $lastmodifiedcontact .= $thirdparty_static->getLibStatut(3);
523 $lastmodifiedcontact .=
"</td>";
524 $lastmodifiedcontact .=
"</tr>\n";
530 $lastmodifiedcontact .=
"</table>\n";
531 $lastmodifiedcontact .=
'</div>';
532 $lastmodifiedcontact .=
"<!-- End last contacts modified -->\n";
540print
'<div class="clearboth"></div>';
541print
'<div class="fichecenter fichecenterbis">';
543$boxlist =
'<div class="twocolumns">';
545$boxlist .=
'<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
546$boxlist .= $thirdpartygraph;
548$boxlist .= $thirdpartycateggraph;
550$boxlist .= $resultboxes[
'boxlista'];
551$boxlist .=
'</div>'.
"\n";
553$boxlist .=
'<div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
554$boxlist .= $lastmodified;
556$boxlist .= $lastmodifiedcontact;
558$boxlist .= $resultboxes[
'boxlistb'];
559$boxlist .=
'</div>'.
"\n";
567$parameters = array(
'user' => $user);
568$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($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
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.
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 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...
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.