@@ -36,7 +36,9 @@ discard block |
||
36 | 36 | $langs->loadlangs(array('banks', 'categories', 'bills', 'withdrawals')); |
37 | 37 | |
38 | 38 | // Security check |
39 | -if ($user->socid > 0) accessforbidden(); |
|
39 | +if ($user->socid > 0) { |
|
40 | + accessforbidden(); |
|
41 | +} |
|
40 | 42 | |
41 | 43 | // Get supervariables |
42 | 44 | $action = GETPOST('action', 'aZ09'); |
@@ -54,8 +56,12 @@ discard block |
||
54 | 56 | $pageprev = $page - 1; |
55 | 57 | $pagenext = $page + 1; |
56 | 58 | |
57 | -if ($sortorder == "") $sortorder = "DESC"; |
|
58 | -if ($sortfield == "") $sortfield = "pl.fk_soc"; |
|
59 | +if ($sortorder == "") { |
|
60 | + $sortorder = "DESC"; |
|
61 | +} |
|
62 | +if ($sortfield == "") { |
|
63 | + $sortfield = "pl.fk_soc"; |
|
64 | +} |
|
59 | 65 | |
60 | 66 | |
61 | 67 | /* |
@@ -275,7 +281,9 @@ discard block |
||
275 | 281 | $sql .= " AND pf.fk_facture = f.rowid"; |
276 | 282 | $sql .= " AND f.entity IN (".getEntity('invoice').")"; |
277 | 283 | $sql .= " AND pl.rowid=".$id; |
278 | - if ($socid) $sql .= " AND s.rowid = ".$socid; |
|
284 | + if ($socid) { |
|
285 | + $sql .= " AND s.rowid = ".$socid; |
|
286 | + } |
|
279 | 287 | $sql .= " ORDER BY $sortfield $sortorder "; |
280 | 288 | $sql .= $db->plimit($conf->liste_limit + 1, $offset); |
281 | 289 |
@@ -39,13 +39,17 @@ |
||
39 | 39 | // List of supported format |
40 | 40 | $tmptype2label = ExtraFields::$type2label; |
41 | 41 | $type2label = array(''); |
42 | -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); |
|
42 | +foreach ($tmptype2label as $key => $val) { |
|
43 | + $type2label[$key] = $langs->transnoentitiesnoconv($val); |
|
44 | +} |
|
43 | 45 | |
44 | 46 | $action = GETPOST('action', 'aZ09'); |
45 | 47 | $attrname = GETPOST('attrname', 'alpha'); |
46 | 48 | $elementtype = 'facturedet_rec'; //Must be the $table_element of the class that manage extrafield |
47 | 49 | |
48 | -if (!$user->admin) accessforbidden(); |
|
50 | +if (!$user->admin) { |
|
51 | + accessforbidden(); |
|
52 | +} |
|
49 | 53 | |
50 | 54 | |
51 | 55 | /* |
@@ -39,13 +39,17 @@ |
||
39 | 39 | // List of supported format |
40 | 40 | $tmptype2label = ExtraFields::$type2label; |
41 | 41 | $type2label = array(''); |
42 | -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); |
|
42 | +foreach ($tmptype2label as $key => $val) { |
|
43 | + $type2label[$key] = $langs->transnoentitiesnoconv($val); |
|
44 | +} |
|
43 | 45 | |
44 | 46 | $action = GETPOST('action', 'aZ09'); |
45 | 47 | $attrname = GETPOST('attrname', 'alpha'); |
46 | 48 | $elementtype = 'facture_rec'; //Must be the $table_element of the class that manage extrafield |
47 | 49 | |
48 | -if (!$user->admin) accessforbidden(); |
|
50 | +if (!$user->admin) { |
|
51 | + accessforbidden(); |
|
52 | +} |
|
49 | 53 | |
50 | 54 | |
51 | 55 | /* |
@@ -38,13 +38,17 @@ |
||
38 | 38 | // List of supported format |
39 | 39 | $tmptype2label = ExtraFields::$type2label; |
40 | 40 | $type2label = array(''); |
41 | -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); |
|
41 | +foreach ($tmptype2label as $key => $val) { |
|
42 | + $type2label[$key] = $langs->transnoentitiesnoconv($val); |
|
43 | +} |
|
42 | 44 | |
43 | 45 | $action = GETPOST('action', 'aZ09'); |
44 | 46 | $attrname = GETPOST('attrname', 'alpha'); |
45 | 47 | $elementtype = 'facture'; //Must be the $table_element of the class that manage extrafield |
46 | 48 | |
47 | -if (!$user->admin) accessforbidden(); |
|
49 | +if (!$user->admin) { |
|
50 | + accessforbidden(); |
|
51 | +} |
|
48 | 52 | |
49 | 53 | |
50 | 54 | /* |
@@ -39,13 +39,17 @@ |
||
39 | 39 | // List of supported format |
40 | 40 | $tmptype2label = ExtraFields::$type2label; |
41 | 41 | $type2label = array(''); |
42 | -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); |
|
42 | +foreach ($tmptype2label as $key => $val) { |
|
43 | + $type2label[$key] = $langs->transnoentitiesnoconv($val); |
|
44 | +} |
|
43 | 45 | |
44 | 46 | $action = GETPOST('action', 'aZ09'); |
45 | 47 | $attrname = GETPOST('attrname', 'alpha'); |
46 | 48 | $elementtype = 'facturedet'; //Must be the $table_element of the class that manage extrafield |
47 | 49 | |
48 | -if (!$user->admin) accessforbidden(); |
|
50 | +if (!$user->admin) { |
|
51 | + accessforbidden(); |
|
52 | +} |
|
49 | 53 | |
50 | 54 | |
51 | 55 | /* |
@@ -40,13 +40,17 @@ |
||
40 | 40 | // List of supported format |
41 | 41 | $tmptype2label = ExtraFields::$type2label; |
42 | 42 | $type2label = array(''); |
43 | -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); |
|
43 | +foreach ($tmptype2label as $key => $val) { |
|
44 | + $type2label[$key] = $langs->transnoentitiesnoconv($val); |
|
45 | +} |
|
44 | 46 | |
45 | 47 | $action = GETPOST('action', 'aZ09'); |
46 | 48 | $attrname = GETPOST('attrname', 'alpha'); |
47 | 49 | $elementtype = 'contratdet'; //Must be the $element of the class that manage extrafield |
48 | 50 | |
49 | -if (!$user->admin) accessforbidden(); |
|
51 | +if (!$user->admin) { |
|
52 | + accessforbidden(); |
|
53 | +} |
|
50 | 54 | |
51 | 55 | |
52 | 56 | /* |
@@ -40,13 +40,17 @@ |
||
40 | 40 | // List of supported format |
41 | 41 | $tmptype2label = ExtraFields::$type2label; |
42 | 42 | $type2label = array(''); |
43 | -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); |
|
43 | +foreach ($tmptype2label as $key => $val) { |
|
44 | + $type2label[$key] = $langs->transnoentitiesnoconv($val); |
|
45 | +} |
|
44 | 46 | |
45 | 47 | $action = GETPOST('action', 'aZ09'); |
46 | 48 | $attrname = GETPOST('attrname', 'alpha'); |
47 | 49 | $elementtype = 'contrat'; //Must be the $element of the class that manage extrafield |
48 | 50 | |
49 | -if (!$user->admin) accessforbidden(); |
|
51 | +if (!$user->admin) { |
|
52 | + accessforbidden(); |
|
53 | +} |
|
50 | 54 | |
51 | 55 | |
52 | 56 | /* |
@@ -38,13 +38,17 @@ |
||
38 | 38 | // List of supported format |
39 | 39 | $tmptype2label = ExtraFields::$type2label; |
40 | 40 | $type2label = array(''); |
41 | -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); |
|
41 | +foreach ($tmptype2label as $key => $val) { |
|
42 | + $type2label[$key] = $langs->transnoentitiesnoconv($val); |
|
43 | +} |
|
42 | 44 | |
43 | 45 | $action = GETPOST('action', 'aZ09'); |
44 | 46 | $attrname = GETPOST('attrname', 'alpha'); |
45 | 47 | $elementtype = 'projet'; //Must be the $table_element of the class that manage extrafield |
46 | 48 | |
47 | -if (!$user->admin) accessforbidden(); |
|
49 | +if (!$user->admin) { |
|
50 | + accessforbidden(); |
|
51 | +} |
|
48 | 52 | |
49 | 53 | |
50 | 54 | /* |
@@ -39,13 +39,17 @@ |
||
39 | 39 | // List of supported format |
40 | 40 | $tmptype2label = ExtraFields::$type2label; |
41 | 41 | $type2label = array(''); |
42 | -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); |
|
42 | +foreach ($tmptype2label as $key => $val) { |
|
43 | + $type2label[$key] = $langs->transnoentitiesnoconv($val); |
|
44 | +} |
|
43 | 45 | |
44 | 46 | $action = GETPOST('action', 'aZ09'); |
45 | 47 | $attrname = GETPOST('attrname', 'alpha'); |
46 | 48 | $elementtype = 'projet_task'; |
47 | 49 | |
48 | -if (!$user->admin) accessforbidden(); |
|
50 | +if (!$user->admin) { |
|
51 | + accessforbidden(); |
|
52 | +} |
|
49 | 53 | |
50 | 54 | |
51 | 55 | /* |