dolibarr  16.0.5
boxes.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
4  * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
5  * Copyright (C) 2015 Jean-Fran├žois Ferry <jfefe@aternatik.fr>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19  */
20 
26 require '../main.inc.php';
27 include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php';
28 require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php';
29 include_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
30 
31 // Load translation files required by the page
32 $langs->loadLangs(array('admin', 'boxes', 'accountancy'));
33 
34 if (!$user->admin) {
36 }
37 
38 $rowid = GETPOST('rowid', 'int');
39 $action = GETPOST('action', 'aZ09');
40 
41 
42 // Define possible position of boxes
43 $arrayofhomepages = InfoBox::getListOfPagesForBoxes();
44 $boxes = array();
45 
46 
47 /*
48  * Actions
49  */
50 
51 if ($action == 'addconst') {
52  dolibarr_set_const($db, "MAIN_BOXES_MAXLINES", GETPOST("MAIN_BOXES_MAXLINES", 'int'), '', 0, '', $conf->entity);
53  dolibarr_set_const($db, "MAIN_ACTIVATE_FILECACHE", GETPOST("MAIN_ACTIVATE_FILECACHE", 'alpha'), 'chaine', 0, '', $conf->entity);
54 }
55 
56 if ($action == 'add') {
57  $error = 0;
58  $boxids = GETPOST('boxid', 'array');
59 
60  $db->begin();
61  if (is_array($boxids)) {
62  foreach ($boxids as $boxid) {
63  if (is_numeric($boxid['pos']) && $boxid['pos'] >= 0) { // 0=Home, 1=...
64  $pos = $boxid['pos'];
65 
66  // Initialize distinct fk_user with all already existing values of fk_user (user that use a personalized view of boxes for page "pos")
67  $distinctfkuser = array();
68  if (!$error) {
69  $sql = "SELECT fk_user";
70  $sql .= " FROM ".MAIN_DB_PREFIX."user_param";
71  $sql .= " WHERE param = 'MAIN_BOXES_".$db->escape($pos)."' AND value = '1'";
72  $sql .= " AND entity = ".$conf->entity;
73  dol_syslog("boxes.php search fk_user to activate box for", LOG_DEBUG);
74  $resql = $db->query($sql);
75  if ($resql) {
76  $num = $db->num_rows($resql);
77  $i = 0;
78  while ($i < $num) {
79  $obj = $db->fetch_object($resql);
80  $distinctfkuser[$obj->fk_user] = $obj->fk_user;
81  $i++;
82  }
83  } else {
84  setEventMessages($db->lasterror(), null, 'errors');
85  $error++;
86  }
87  }
88 
89  $distinctfkuser['0'] = '0'; // Add entry for fk_user = 0. We must use string as key and val
90 
91  foreach ($distinctfkuser as $fk_user) {
92  if (!$error && $fk_user != '') {
93  $arrayofexistingboxid = array();
94  $nbboxonleft = $nbboxonright = 0;
95  $sql = "SELECT box_id, box_order FROM ".MAIN_DB_PREFIX."boxes";
96  $sql .= " WHERE position = ".((int) $pos)." AND fk_user = ".((int) $fk_user)." AND entity = ".((int) $conf->entity);
97  dol_syslog("boxes.php activate box", LOG_DEBUG);
98  $resql = $db->query($sql);
99  if ($resql) {
100  while ($obj = $db->fetch_object($resql)) {
101  $boxorder = $obj->box_order;
102  if (preg_match('/A/', $boxorder)) {
103  $nbboxonleft++;
104  }
105  if (preg_match('/B/', $boxorder)) {
106  $nbboxonright++;
107  }
108  $arrayofexistingboxid[$obj->box_id] = 1;
109  }
110  } else {
111  dol_print_error($db);
112  }
113 
114  if (empty($arrayofexistingboxid[$boxid['value']])) {
115  $sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes (";
116  $sql .= "box_id, position, box_order, fk_user, entity";
117  $sql .= ") VALUES (";
118  $sql .= ((int) $boxid['value']).", ".((int) $pos).", '".(($nbboxonleft > $nbboxonright) ? 'B01' : 'A01')."', ".((int) $fk_user).", ".$conf->entity;
119  $sql .= ")";
120 
121  dol_syslog("boxes.php activate box", LOG_DEBUG);
122  $resql = $db->query($sql);
123  if (!$resql) {
124  setEventMessages($db->lasterror(), null, 'errors');
125  $error++;
126  }
127  } else {
128  dol_syslog("boxes.php activate box - already exists in database", LOG_DEBUG);
129  }
130  }
131  }
132  }
133  }
134  }
135  if (!$error) {
136  $db->commit();
137  $action = '';
138  } else {
139  $db->rollback();
140  }
141 }
142 
143 if ($action == 'delete') {
144  $sql = "SELECT box_id FROM ".MAIN_DB_PREFIX."boxes";
145  $sql .= " WHERE rowid=".((int) $rowid);
146 
147  $resql = $db->query($sql);
148  $obj = $db->fetch_object($resql);
149  if (!empty($obj->box_id)) {
150  $db->begin();
151 
152  $sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes";
153  $sql .= " WHERE entity = ".$conf->entity;
154  $sql .= " AND box_id=".((int) $obj->box_id);
155 
156  $resql = $db->query($sql);
157 
158  $db->commit();
159  }
160 }
161 
162 if ($action == 'switch') {
163  // We switch values of field box_order for the 2 lines of table boxes
164  $db->begin();
165 
166  $objfrom = new ModeleBoxes($db);
167  $objfrom->fetch(GETPOST("switchfrom", 'int'));
168 
169  $objto = new ModeleBoxes($db);
170  $objto->fetch(GETPOST('switchto', 'int'));
171 
172  $resultupdatefrom = 0;
173  $resultupdateto = 0;
174  if (is_object($objfrom) && is_object($objto)) {
175  $newfirst = $objto->box_order;
176  $newsecond = $objfrom->box_order;
177  if ($newfirst == $newsecond) {
178  $newsecondchar = preg_replace('/[0-9]+/', '', $newsecond);
179  $newsecondnum = preg_replace('/[a-zA-Z]+/', '', $newsecond);
180  $newsecond = sprintf("%s%02d", $newsecondchar ? $newsecondchar : 'A', $newsecondnum + 1);
181  }
182 
183  $sql = "UPDATE ".MAIN_DB_PREFIX."boxes SET box_order='".$db->escape($newfirst)."' WHERE rowid=".((int) $objfrom->rowid);
184  dol_syslog($sql);
185  $resultupdatefrom = $db->query($sql);
186  if (!$resultupdatefrom) {
187  dol_print_error($db);
188  }
189 
190  $sql = "UPDATE ".MAIN_DB_PREFIX."boxes SET box_order='".$db->escape($newsecond)."' WHERE rowid=".((int) $objto->rowid);
191  dol_syslog($sql);
192  $resultupdateto = $db->query($sql);
193  if (!$resultupdateto) {
194  dol_print_error($db);
195  }
196  }
197 
198  if ($resultupdatefrom && $resultupdateto) {
199  $db->commit();
200  } else {
201  $db->rollback();
202  }
203 }
204 
205 
206 /*
207  * View
208  */
209 
210 $form = new Form($db);
211 
212 llxHeader('', $langs->trans("Boxes"));
213 
214 print load_fiche_titre($langs->trans("Boxes"), '', 'title_setup');
215 
216 print '<span class="opacitymedium">'.$langs->trans("BoxesDesc")." ".$langs->trans("OnlyActiveElementsAreShown")."</span><br>\n";
217 
218 /*
219  * Search for the default active boxes for each possible position
220  * We store the active boxes by default in $boxes[position][id_boite]=1
221  */
222 
223 $actives = array();
224 
225 $sql = "SELECT b.rowid, b.box_id, b.position, b.box_order,";
226 $sql .= " bd.rowid as boxid";
227 $sql .= " FROM ".MAIN_DB_PREFIX."boxes as b, ".MAIN_DB_PREFIX."boxes_def as bd";
228 $sql .= " WHERE b.box_id = bd.rowid";
229 $sql .= " AND b.entity IN (0,".$conf->entity.")";
230 $sql .= " AND b.fk_user=0";
231 $sql .= " ORDER by b.position, b.box_order";
232 //print $sql;
233 
234 dol_syslog("Search available boxes", LOG_DEBUG);
235 $resql = $db->query($sql);
236 if ($resql) {
237  $num = $db->num_rows($resql);
238 
239  // Check record to know if we must recalculate sort order
240  $i = 0;
241  $decalage = 0;
242  while ($i < $num) {
243  $obj = $db->fetch_object($resql);
244  $boxes[$obj->position][$obj->box_id] = 1;
245  $i++;
246 
247  array_push($actives, $obj->box_id);
248 
249  if ($obj->box_order == '' || $obj->box_order == '0' || $decalage) {
250  $decalage++;
251  }
252  // We renumber the order of the boxes if one of them is in ''
253  // This occurs just after an insert.
254  if ($decalage) {
255  $sql = "UPDATE ".MAIN_DB_PREFIX."boxes SET box_order='".$db->escape($decalage)."' WHERE rowid=".((int) $obj->rowid);
256  $db->query($sql);
257  }
258  }
259 
260  if ($decalage) {
261  // If we have renumbered, we correct the field box_order
262  // This occurs just after an insert.
263  $sql = "SELECT box_order";
264  $sql .= " FROM ".MAIN_DB_PREFIX."boxes";
265  $sql .= " WHERE entity = ".$conf->entity;
266  $sql .= " AND LENGTH(box_order) <= 2";
267 
268  dol_syslog("Execute requests to renumber box order", LOG_DEBUG);
269  $result = $db->query($sql);
270  if ($result) {
271  while ($record = $db->fetch_array($result)) {
272  if (dol_strlen($record['box_order']) == 1) {
273  if (preg_match("/[13579]{1}/", substr($record['box_order'], -1))) {
274  $box_order = "A0".$record['box_order'];
275  $sql = "UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$db->escape($box_order)."' WHERE entity = ".$conf->entity." AND box_order = '".$db->escape($record['box_order'])."'";
276  $resql = $db->query($sql);
277  } elseif (preg_match("/[02468]{1}/", substr($record['box_order'], -1))) {
278  $box_order = "B0".$record['box_order'];
279  $sql = "UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$db->escape($box_order)."' WHERE entity = ".$conf->entity." AND box_order = '".$db->escape($record['box_order'])."'";
280  $resql = $db->query($sql);
281  }
282  } elseif (dol_strlen($record['box_order']) == 2) {
283  if (preg_match("/[13579]{1}/", substr($record['box_order'], -1))) {
284  $box_order = "A".$record['box_order'];
285  $sql = "UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$db->escape($box_order)."' WHERE entity = ".$conf->entity." AND box_order = '".$db->escape($record['box_order'])."'";
286  $resql = $db->query($sql);
287  } elseif (preg_match("/[02468]{1}/", substr($record['box_order'], -1))) {
288  $box_order = "B".$record['box_order'];
289  $sql = "UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$db->escape($box_order)."' WHERE entity = ".$conf->entity." AND box_order = '".$db->escape($record['box_order'])."'";
290  $resql = $db->query($sql);
291  }
292  }
293  }
294  }
295  }
296  $db->free($resql);
297 }
298 
299 // Available boxes to activate
300 $boxtoadd = InfoBox::listBoxes($db, 'available', -1, null, $actives);
301 // Activated boxes
302 $boxactivated = InfoBox::listBoxes($db, 'activated', -1, null);
303 
304 print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
305 print '<input type="hidden" name="token" value="'.newToken().'">'."\n";
306 print '<input type="hidden" name="action" value="add">'."\n";
307 
308 
309 print '<br>';
310 
311 print '<div class="div-table-responsive-no-min">';
312 print '<table class="tagtable liste centpercent">'."\n";
313 
314 print '<tr class="liste_titre">';
315 print '<td>'.$langs->trans("Box").'</td>';
316 print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>';
317 print '<td></td>';
318 print '<td class="center" width="160">'.$langs->trans("ActivatableOn").'</td>';
319 print '<td class="center" width="60" colspan="2">'.$langs->trans("PositionByDefault").'</td>';
320 print '<td class="center" width="80">'.$langs->trans("Disable").'</td>';
321 print '</tr>'."\n";
322 
323 print "\n\n".'<!-- Boxes Available -->'."\n";
324 foreach ($boxtoadd as $box) {
325  if (preg_match('/^([^@]+)@([^@]+)$/i', $box->boximg)) {
326  $logo = $box->boximg;
327  } else {
328  $logo = preg_replace("/^object_/i", "", $box->boximg);
329  }
330 
331  print "\n".'<!-- Box '.$box->boxcode.' -->'."\n";
332  print '<tr class="oddeven" style="height:3em !important;">'."\n";
333  print '<td class="tdoverflowmax300" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv($box->boxlabel)).'">'.img_object("", $logo, 'class="pictofixedwidth" height="14px"').' '.$langs->transnoentitiesnoconv($box->boxlabel);
334  if (!empty($box->class) && preg_match('/graph_/', $box->class)) {
335  print img_picto('', 'graph', 'class="paddingleft"');
336  }
337  if (!empty($box->version)) {
338  if ($box->version == 'experimental') {
339  print ' <span class="opacitymedium">('.$langs->trans("Experimental").')</span>';
340  } elseif ($box->version == 'development') {
341  print ' <span class="opacitymedium">('.$langs->trans("Development").')</span>';
342  }
343  }
344  print '</td>'."\n";
345  print '<td class="tdoverflowmax300" title="'.dol_escape_htmltag($box->note).'">';
346  if ($box->note == '(WarningUsingThisBoxSlowDown)') {
347  $langs->load("errors");
348  print $langs->trans("WarningUsingThisBoxSlowDown");
349  } else {
350  print ($box->note ? $box->note : '&nbsp;');
351  }
352  print '</td>'."\n";
353  print '<td>';
354  print $form->textwithpicto('', $langs->trans("SourceFile").' : '.$box->sourcefile);
355  print '</td>'."\n";
356 
357  // For each possible position, an activation link is displayed if the box is not already active for that position
358  print '<td class="center">';
359  print $form->selectarray("boxid[".$box->box_id."][pos]", $arrayofhomepages, -1, 1, 0, 0, '', 1)."\n";
360  print '<input type="hidden" name="boxid['.$box->box_id.'][value]" value="'.$box->box_id.'">'."\n";
361  print '</td>';
362 
363  print '<td>';
364  print '</td>';
365 
366  print '<td>';
367  print '</td>';
368 
369  print '<td>';
370  print '<input type="submit" class="button small smallpaddingimp" value="'.$langs->trans("Activate").'">';
371  print '</td>';
372 
373  print '</tr>'."\n";
374 }
375 print "\n".'<!-- End Boxes Available -->'."\n";
376 
377 
378 $box_order = 1;
379 $foundrupture = 1;
380 foreach ($boxactivated as $key => $box) {
381  if (preg_match('/^([^@]+)@([^@]+)$/i', $box->boximg)) {
382  $logo = $box->boximg;
383  } else {
384  $logo = preg_replace("/^object_/i", "", $box->boximg);
385  }
386 
387  print "\n".'<!-- Box '.$box->boxcode.' -->'."\n";
388  print '<tr class="oddeven" style="height:3em !important;">';
389  print '<td>'.img_object("", $logo, 'class="pictofixedwidth" height="14px"').' '.$langs->transnoentitiesnoconv($box->boxlabel);
390  if (!empty($box->class) && preg_match('/graph_/', $box->class)) {
391  print img_picto('', 'graph', 'class="paddingleft"');
392  }
393  if (!empty($box->version)) {
394  if ($box->version == 'experimental') {
395  print ' <span class="opacitymedium">('.$langs->trans("Experimental").')</span>';
396  } elseif ($box->version == 'development') {
397  print ' <span class="opacitymedium">('.$langs->trans("Development").')</span>';
398  }
399  }
400  print '</td>';
401  $langs->load("errors");
402  print '<td class="tdoverflowmax300" title="'.dol_escape_htmltag($box->note == '(WarningUsingThisBoxSlowDown)' ? $langs->trans("WarningUsingThisBoxSlowDown") : $box->note).'">';
403  if ($box->note == '(WarningUsingThisBoxSlowDown)') {
404  print img_warning('', 0).' '.$langs->trans("WarningUsingThisBoxSlowDown");
405  } else {
406  print ($box->note ? $box->note : '&nbsp;');
407  }
408  print '</td>';
409  print '<td>';
410  print $form->textwithpicto('', $langs->trans("SourceFile").' : '.$box->sourcefile);
411  print '</td>'."\n";
412  print '<td class="center">'.(empty($arrayofhomepages[$box->position]) ? '' : $langs->trans($arrayofhomepages[$box->position])).'</td>';
413  $hasnext = ($key < (count($boxactivated) - 1));
414  $hasprevious = ($key != 0);
415  print '<td class="center">'.($key + 1).'</td>';
416  print '<td class="center nowraponall">';
417  print ($hasnext ? '<a class="reposition" href="boxes.php?action=switch&token='.newToken().'&switchfrom='.$box->rowid.'&switchto='.$boxactivated[$key + 1]->rowid.'">'.img_down().'</a>&nbsp;' : '');
418  print ($hasprevious ? '<a class="reposition" href="boxes.php?action=switch&token='.newToken().'&switchfrom='.$box->rowid.'&switchto='.$boxactivated[$key - 1]->rowid.'">'.img_up().'</a>' : '');
419  print '</td>';
420  print '<td class="center">';
421  print '<a class="reposition" href="boxes.php?rowid='.$box->rowid.'&action=delete&token='.newToken().'">'.img_delete().'</a>';
422  print '</td>';
423 
424  print '</tr>'."\n";
425 }
426 
427 print '</table>';
428 print '</div>';
429 print '<br>';
430 
431 print '</form>';
432 
433 
434 // Other parameters
435 
436 print "\n\n".'<!-- Other Const -->'."\n";
437 print load_fiche_titre($langs->trans("Other"), '', '');
438 print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
439 print '<input type="hidden" name="token" value="'.newToken().'">';
440 print '<input type="hidden" name="action" value="addconst">';
441 print '<div class="div-table-responsive-no-min">';
442 print '<table class="noborder centpercent">';
443 
444 print '<tr class="liste_titre">';
445 print '<td class="liste_titre">'.$langs->trans("Parameter").'</td>';
446 print '<td class="liste_titre">'.$langs->trans("Value").'</td>';
447 print '</tr>';
448 
449 print '<tr class="oddeven">';
450 print '<td>';
451 print $langs->trans("MaxNbOfLinesForBoxes");
452 print '</td>'."\n";
453 print '<td>';
454 print '<input type="text" class="flat" size="6" name="MAIN_BOXES_MAXLINES" value="'.(!empty($conf->global->MAIN_BOXES_MAXLINES) ? $conf->global->MAIN_BOXES_MAXLINES : '').'">';
455 print '</td>';
456 print '</tr>';
457 
458 // Activate FileCache - Developement
459 if ($conf->global->MAIN_FEATURES_LEVEL == 2 || !empty($conf->global->MAIN_ACTIVATE_FILECACHE)) {
460  print '<tr class="oddeven"><td width="35%">'.$langs->trans("EnableFileCache").'</td><td>';
461  print $form->selectyesno('MAIN_ACTIVATE_FILECACHE', (!empty($conf->global->MAIN_ACTIVATE_FILECACHE) ? $conf->global->MAIN_ACTIVATE_FILECACHE : 0), 1);
462  print '</td>';
463  print '</tr>';
464 }
465 
466 print '</table>';
467 print '</div>';
468 
469 print $form->buttonsSaveCancel("Save", '');
470 
471 print '</form>';
472 print "\n".'<!-- End Other Const -->'."\n";
473 
474 // End of page
475 llxFooter();
476 $db->close();
llxFooter
llxFooter()
Empty footer.
Definition: wrapper.php:73
load_fiche_titre
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
Definition: functions.lib.php:5190
GETPOST
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Definition: functions.lib.php:484
dol_print_error
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
Definition: functions.lib.php:4830
img_warning
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
Definition: functions.lib.php:4507
$form
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition: card.php:142
img_picto
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
Definition: functions.lib.php:3866
img_up
img_up($titlealt='default', $selected=0, $moreclass='')
Show top arrow logo.
Definition: functions.lib.php:4601
img_delete
img_delete($titlealt='default', $other='class="pictodelete"', $morecss='')
Show delete logo.
Definition: functions.lib.php:4415
dol_syslog
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
Definition: functions.lib.php:1589
img_down
img_down($titlealt='default', $selected=0, $moreclass='')
Show down arrow logo.
Definition: functions.lib.php:4582
InfoBox\listBoxes
static listBoxes($dbs, $mode, $zone, $user=null, $excludelist=array(), $includehidden=1)
Return array of boxes qualified for area and user.
Definition: infobox.class.php:94
dol_strlen
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
Definition: functions.lib.php:3733
newToken
newToken()
Return the value of token currently saved into session with name 'newtoken'.
Definition: functions.lib.php:10863
dolibarr_set_const
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
Definition: admin.lib.php:627
Form
Class to manage generation of HTML components Only common components must be here.
Definition: html.form.class.php:52
img_object
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
Definition: functions.lib.php:4197
$resql
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire)||(isModEnabled('supplier_invoice') && $user->rights->supplier_invoice->lire)) if(isModEnabled('don') &&!empty($user->rights->don->lire)) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
Definition: index.php:742
setEventMessages
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
Definition: functions.lib.php:8122
accessforbidden
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
Definition: security.lib.php:933
InfoBox\getListOfPagesForBoxes
static getListOfPagesForBoxes()
Name of positions (See below)
Definition: infobox.class.php:36
llxHeader
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Definition: wrapper.php:59
ModeleBoxes
Class ModeleBoxes.
Definition: modules_boxes.php:34