Test Failed
Push — master ( 2c8b6d...9d1fea )
by Alxarafe
45:51
created
dolibarr/htdocs/admin/translation.php 1 patch
Spacing   +76 added lines, -76 removed lines patch added patch discarded remove patch
@@ -23,11 +23,11 @@  discard block
 block discarded – undo
23 23
  *       \file       htdocs/admin/translation.php
24 24
  *       \brief      Page to show translation information
25 25
  */
26
-require DOL_BASE_PATH . '/main.inc.php';
26
+require DOL_BASE_PATH.'/main.inc.php';
27 27
 
28
-require_once DOL_BASE_PATH . '/core/lib/admin.lib.php';
29
-require_once DOL_BASE_PATH . '/core/lib/files.lib.php';
30
-require_once DOL_BASE_PATH . '/core/class/html.formadmin.class.php';
28
+require_once DOL_BASE_PATH.'/core/lib/admin.lib.php';
29
+require_once DOL_BASE_PATH.'/core/lib/files.lib.php';
30
+require_once DOL_BASE_PATH.'/core/class/html.formadmin.class.php';
31 31
 
32 32
 // Load translation files required by the page
33 33
 $langs->loadLangs(array("companies", "products", "admin", "sms", "other", "errors"));
@@ -77,11 +77,11 @@  discard block
 block discarded – undo
77 77
 }
78 78
 
79 79
 $parameters = array('socid' => $socid);
80
-$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action);    // Note that $action and $object may have been modified by some hooks
80
+$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
81 81
 if ($reshook < 0)
82 82
     setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
83 83
 
84
-include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php';
84
+include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
85 85
 
86 86
 // Purge search criteria
87 87
 if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     if (!$error) {
108 108
         $db->begin();
109 109
 
110
-        $sql = "UPDATE " . MAIN_DB_PREFIX . "overwrite_trans set transvalue = '" . $db->escape($transvalue) . "' WHERE rowid = " . GETPOST('rowid', 'int');
110
+        $sql = "UPDATE ".MAIN_DB_PREFIX."overwrite_trans set transvalue = '".$db->escape($transvalue)."' WHERE rowid = ".GETPOST('rowid', 'int');
111 111
         $result = $db->query($sql);
112 112
         if ($result > 0) {
113 113
             $db->commit();
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
     if (!$error) {
147 147
         $db->begin();
148 148
 
149
-        $sql = "INSERT INTO " . MAIN_DB_PREFIX . "overwrite_trans(lang, transkey, transvalue, entity) VALUES ('" . $db->escape($langcode) . "','" . $db->escape($transkey) . "','" . $db->escape($transvalue) . "', " . $db->escape($conf->entity) . ")";
149
+        $sql = "INSERT INTO ".MAIN_DB_PREFIX."overwrite_trans(lang, transkey, transvalue, entity) VALUES ('".$db->escape($langcode)."','".$db->escape($transkey)."','".$db->escape($transvalue)."', ".$db->escape($conf->entity).")";
150 150
         $result = $db->query($sql);
151 151
         if ($result > 0) {
152 152
             $db->commit();
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
 // Delete line from delete picto
171 171
 if ($action == 'delete') {
172
-    $sql = "DELETE FROM " . MAIN_DB_PREFIX . "overwrite_trans WHERE rowid = " . $db->escape($id);
172
+    $sql = "DELETE FROM ".MAIN_DB_PREFIX."overwrite_trans WHERE rowid = ".$db->escape($id);
173 173
     $result = $db->query($sql);
174 174
     if ($result >= 0) {
175 175
         setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
@@ -188,20 +188,20 @@  discard block
 block discarded – undo
188 188
 $wikihelp = 'EN:Setup|FR:Paramétrage|ES:Configuración';
189 189
 llxHeader('', $langs->trans("Setup"), $wikihelp);
190 190
 
191
-$param = '&mode=' . $mode;
191
+$param = '&mode='.$mode;
192 192
 
193 193
 $enabledisablehtml = '';
194
-$enabledisablehtml .= $langs->trans("EnableOverwriteTranslation") . ' ';
194
+$enabledisablehtml .= $langs->trans("EnableOverwriteTranslation").' ';
195 195
 if (empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION)) {
196 196
     // Button off, click to enable
197 197
     // $enabledisablehtml.='<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setMAIN_ENABLE_OVERWRITE_TRANSLATION&value=1'.$param.'">';
198
-    $enabledisablehtml .= '<a class="reposition" href="' . BASE_URI . '?controller=admin&method=translation&action=setMAIN_ENABLE_OVERWRITE_TRANSLATION&value=1' . $param . '">';
198
+    $enabledisablehtml .= '<a class="reposition" href="'.BASE_URI.'?controller=admin&method=translation&action=setMAIN_ENABLE_OVERWRITE_TRANSLATION&value=1'.$param.'">';
199 199
     $enabledisablehtml .= img_picto($langs->trans("Disabled"), 'switch_off');
200 200
     $enabledisablehtml .= '</a>';
201 201
 } else {
202 202
     // Button on, click to disable
203 203
     // $enabledisablehtml.='<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setMAIN_ENABLE_OVERWRITE_TRANSLATION&value=0'.$param.'">';
204
-    $enabledisablehtml .= '<a class="reposition" href="' . BASE_URI . '?controller=admin&method=translation&action=setMAIN_ENABLE_OVERWRITE_TRANSLATION&value=0' . $param . '">';
204
+    $enabledisablehtml .= '<a class="reposition" href="'.BASE_URI.'?controller=admin&method=translation&action=setMAIN_ENABLE_OVERWRITE_TRANSLATION&value=0'.$param.'">';
205 205
     $enabledisablehtml .= img_picto($langs->trans("Activated"), 'switch_on');
206 206
     $enabledisablehtml .= '</a>';
207 207
 }
@@ -209,39 +209,39 @@  discard block
 block discarded – undo
209 209
 print load_fiche_titre($langs->trans("Translation"), $enabledisablehtml, 'title_setup');
210 210
 
211 211
 //print '<span class="opacitymedium">';
212
-print $langs->trans("TranslationDesc") . "<br>\n";
212
+print $langs->trans("TranslationDesc")."<br>\n";
213 213
 //print '</span>';
214 214
 print "<br>\n";
215 215
 
216 216
 $current_language_code = $langs->defaultlang;
217 217
 $s = picto_from_langcode($current_language_code);
218
-print $langs->trans("CurrentUserLanguage") . ': <strong>' . $s . ' ' . $current_language_code . '</strong><br>';
218
+print $langs->trans("CurrentUserLanguage").': <strong>'.$s.' '.$current_language_code.'</strong><br>';
219 219
 
220 220
 print '<br>';
221 221
 
222 222
 if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"])
223
-    $param .= '&contextpage=' . $contextpage;
223
+    $param .= '&contextpage='.$contextpage;
224 224
 if ($limit > 0 && $limit != $conf->liste_limit)
225
-    $param .= '&limit=' . $limit;
225
+    $param .= '&limit='.$limit;
226 226
 if ($optioncss != '')
227
-    $param .= '&optioncss=' . $optioncss;
227
+    $param .= '&optioncss='.$optioncss;
228 228
 if ($langcode)
229
-    $param .= '&langcode=' . urlencode($langcode);
229
+    $param .= '&langcode='.urlencode($langcode);
230 230
 if ($transkey)
231
-    $param .= '&transkey=' . urlencode($transkey);
231
+    $param .= '&transkey='.urlencode($transkey);
232 232
 if ($transvalue)
233
-    $param .= '&transvalue=' . urlencode($transvalue);
233
+    $param .= '&transvalue='.urlencode($transvalue);
234 234
 
235 235
 
236
-print '<form action="' . $_SERVER["PHP_SELF"] . ((empty($user->entity) && $debug) ? '?debug=1' : '') . '" method="POST">';
236
+print '<form action="'.$_SERVER["PHP_SELF"].((empty($user->entity) && $debug) ? '?debug=1' : '').'" method="POST">';
237 237
 if ($optioncss != '') {
238
-    print '<input type="hidden" name="optioncss" value="' . $optioncss . '">';
238
+    print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
239 239
 }
240
-print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
240
+print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
241 241
 print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
242
-print '<input type="hidden" name="sortfield" value="' . $sortfield . '">';
243
-print '<input type="hidden" name="sortorder" value="' . $sortorder . '">';
244
-print '<input type="hidden" name="page" value="' . $page . '">';
242
+print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
243
+print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
244
+print '<input type="hidden" name="page" value="'.$page.'">';
245 245
 
246 246
 $head = translation_prepare_head();
247 247
 
@@ -259,23 +259,23 @@  discard block
 block discarded – undo
259 259
         $disablededit = ' disabled';
260 260
 
261 261
     print '<div class="justify"><span class="opacitymedium">';
262
-    print img_info() . ' ' . $langs->trans("SomeTranslationAreUncomplete");
262
+    print img_info().' '.$langs->trans("SomeTranslationAreUncomplete");
263 263
     $urlwikitranslatordoc = 'https://wiki.dolibarr.org/index.php/Translator_documentation';
264
-    print ' (' . $langs->trans("SeeAlso", '<a href="' . $urlwikitranslatordoc . '" target="_blank">' . $langs->trans("Here") . '</a>') . ')<br>';
265
-    print $langs->trans("TranslationOverwriteDesc", $langs->transnoentitiesnoconv("Language"), $langs->transnoentitiesnoconv("Key"), $langs->transnoentitiesnoconv("NewTranslationStringToShow")) . "\n";
266
-    print ' (' . $langs->trans("TranslationOverwriteDesc2") . ').' . "<br>\n";
264
+    print ' ('.$langs->trans("SeeAlso", '<a href="'.$urlwikitranslatordoc.'" target="_blank">'.$langs->trans("Here").'</a>').')<br>';
265
+    print $langs->trans("TranslationOverwriteDesc", $langs->transnoentitiesnoconv("Language"), $langs->transnoentitiesnoconv("Key"), $langs->transnoentitiesnoconv("NewTranslationStringToShow"))."\n";
266
+    print ' ('.$langs->trans("TranslationOverwriteDesc2").').'."<br>\n";
267 267
     print '</span></div>';
268 268
 
269 269
     print '<br>';
270 270
 
271 271
 
272
-    print '<input type="hidden" name="action" value="' . ($action == 'edit' ? 'update' : 'add') . '">';
273
-    print '<input type="hidden" id="mode" name="mode" value="' . $mode . '">';
272
+    print '<input type="hidden" name="action" value="'.($action == 'edit' ? 'update' : 'add').'">';
273
+    print '<input type="hidden" id="mode" name="mode" value="'.$mode.'">';
274 274
 
275 275
     print '<div class="div-table-responsive-no-min">';
276 276
     print '<table class="noborder" width="100%">';
277 277
     print '<tr class="liste_titre">';
278
-    print_liste_field_titre($langs->trans("Language") . ' (en_US, es_MX, ...)', $_SERVER["PHP_SELF"], 'lang,transkey', '', $param, '', $sortfield, $sortorder);
278
+    print_liste_field_titre($langs->trans("Language").' (en_US, es_MX, ...)', $_SERVER["PHP_SELF"], 'lang,transkey', '', $param, '', $sortfield, $sortorder);
279 279
     print_liste_field_titre("Key", $_SERVER["PHP_SELF"], 'transkey', '', $param, '', $sortfield, $sortorder);
280 280
     print_liste_field_titre("NewTranslationStringToShow", $_SERVER["PHP_SELF"], 'transvalue', '', $param, '', $sortfield, $sortorder);
281 281
     //if (! empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre("Entity"),$_SERVER["PHP_SELF"],'entity,transkey','',$param,'',$sortfield,$sortorder);
@@ -288,11 +288,11 @@  discard block
 block discarded – undo
288 288
 
289 289
     print '<tr class="oddeven"><td>';
290 290
     print $formadmin->select_language(GETPOST('langcode'), 'langcode', 0, null, 1, 0, $disablededit ? 1 : 0, 'maxwidthonsmartphone', 1);
291
-    print '</td>' . "\n";
291
+    print '</td>'."\n";
292 292
     print '<td>';
293
-    print '<input type="text" class="flat maxwidthonsmartphone"' . $disablededit . ' name="transkey" id="transkey" value="' . (!empty($transkey) ? $transkey : "") . '">';
293
+    print '<input type="text" class="flat maxwidthonsmartphone"'.$disablededit.' name="transkey" id="transkey" value="'.(!empty($transkey) ? $transkey : "").'">';
294 294
     print '</td><td>';
295
-    print '<input type="text" class="quatrevingtpercent"' . $disablededit . ' name="transvalue" id="transvalue" value="' . (!empty($transvalue) ? $transvalue : "") . '">';
295
+    print '<input type="text" class="quatrevingtpercent"'.$disablededit.' name="transvalue" id="transvalue" value="'.(!empty($transvalue) ? $transvalue : "").'">';
296 296
     print '</td>';
297 297
     // Limit to superadmin
298 298
     /* if (! empty($conf->multicompany->enabled) && !$user->entity)
@@ -305,18 +305,18 @@  discard block
 block discarded – undo
305 305
       else
306 306
       { */
307 307
     print '<td align="center">';
308
-    print '<input type="hidden" name="entity" value="' . $conf->entity . '">';
308
+    print '<input type="hidden" name="entity" value="'.$conf->entity.'">';
309 309
     //}
310
-    print '<input type="submit" class="button"' . $disabled . ' value="' . $langs->trans("Add") . '" name="add" title="' . dol_escape_htmltag($langs->trans("YouMustEnabledTranslationOverwriteBefore")) . '">';
310
+    print '<input type="submit" class="button"'.$disabled.' value="'.$langs->trans("Add").'" name="add" title="'.dol_escape_htmltag($langs->trans("YouMustEnabledTranslationOverwriteBefore")).'">';
311 311
     print "</td>\n";
312 312
     print '</tr>';
313 313
 
314 314
 
315 315
     // Show constants
316 316
     $sql = "SELECT rowid, entity, lang, transkey, transvalue";
317
-    $sql .= " FROM " . MAIN_DB_PREFIX . "overwrite_trans";
317
+    $sql .= " FROM ".MAIN_DB_PREFIX."overwrite_trans";
318 318
     $sql .= " WHERE 1 = 1";
319
-    $sql .= " AND entity IN (" . getEntity('overwrite_trans') . ")";
319
+    $sql .= " AND entity IN (".getEntity('overwrite_trans').")";
320 320
     $sql .= $db->order($sortfield, $sortorder);
321 321
 
322 322
     dol_syslog("translation::select from table", LOG_DEBUG);
@@ -332,8 +332,8 @@  discard block
 block discarded – undo
332 332
 
333 333
             print '<tr class="oddeven">';
334 334
 
335
-            print '<td>' . $obj->lang . '</td>' . "\n";
336
-            print '<td>' . $obj->transkey . '</td>' . "\n";
335
+            print '<td>'.$obj->lang.'</td>'."\n";
336
+            print '<td>'.$obj->transkey.'</td>'."\n";
337 337
 
338 338
             // Value
339 339
             print '<td>';
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
               print '<input type="text" id="value_'.$i.'" class="flat inputforupdate" size="30" name="const['.$i.'][value]" value="'.dol_escape_htmltag($obj->transvalue).'">';
344 344
              */
345 345
             if ($action == 'edit' && $obj->rowid == GETPOST('rowid', 'int')) {
346
-                print '<input type="text" class="quatrevingtpercent" name="transvalue" value="' . $obj->transvalue . '">';
346
+                print '<input type="text" class="quatrevingtpercent" name="transvalue" value="'.$obj->transvalue.'">';
347 347
             } else {
348 348
                 print $obj->transvalue;
349 349
             }
@@ -351,16 +351,16 @@  discard block
 block discarded – undo
351 351
 
352 352
             print '<td align="center">';
353 353
             if ($action == 'edit' && $obj->rowid == GETPOST('rowid', 'int')) {
354
-                print '<input type="hidden" class="button" name="rowid" value="' . $obj->rowid . '">';
355
-                print '<input type="submit" class="button" name="save" value="' . dol_escape_htmltag($langs->trans("Save")) . '">';
354
+                print '<input type="hidden" class="button" name="rowid" value="'.$obj->rowid.'">';
355
+                print '<input type="submit" class="button" name="save" value="'.dol_escape_htmltag($langs->trans("Save")).'">';
356 356
                 print ' &nbsp; ';
357
-                print '<input type="submit" class="button" name="cancel" value="' . dol_escape_htmltag($langs->trans("Cancel")) . '">';
357
+                print '<input type="submit" class="button" name="cancel" value="'.dol_escape_htmltag($langs->trans("Cancel")).'">';
358 358
             } else {
359 359
                 // print '<a href="'.$_SERVER['PHP_SELF'].'?rowid='.$obj->rowid.'&entity='.$obj->entity.'&action=edit'.((empty($user->entity) && $debug)?'&debug=1':'').'">'.img_edit().'</a>';
360
-                print '<a href="' . BASE_URI . '?controller=admin&method=translation&rowid=' . $obj->rowid . '&entity=' . $obj->entity . '&action=edit' . ((empty($user->entity) && $debug) ? '&debug=1' : '') . '">' . img_edit() . '</a>';
360
+                print '<a href="'.BASE_URI.'?controller=admin&method=translation&rowid='.$obj->rowid.'&entity='.$obj->entity.'&action=edit'.((empty($user->entity) && $debug) ? '&debug=1' : '').'">'.img_edit().'</a>';
361 361
                 print ' &nbsp; ';
362 362
                 // print '<a href="'.$_SERVER['PHP_SELF'].'?rowid='.$obj->rowid.'&entity='.$obj->entity.'&action=delete'.((empty($user->entity) && $debug)?'&debug=1':'').'">'.img_delete().'</a>';
363
-                print '<a href="' . BASE_URI . '?controller=admin&method=translation&rowid=' . $obj->rowid . '&entity=' . $obj->entity . '&action=delete' . ((empty($user->entity) && $debug) ? '&debug=1' : '') . '">' . img_delete() . '</a>';
363
+                print '<a href="'.BASE_URI.'?controller=admin&method=translation&rowid='.$obj->rowid.'&entity='.$obj->entity.'&action=delete'.((empty($user->entity) && $debug) ? '&debug=1' : '').'">'.img_delete().'</a>';
364 364
             }
365 365
             print '</td>';
366 366
 
@@ -408,9 +408,9 @@  discard block
 block discarded – undo
408 408
         // Search into dir of modules (the $modulesdir is already a list that loop on $conf->file->dol_document_root)
409 409
         $i = 0;
410 410
         foreach ($modulesdir as $keydir => $tmpsearchdir) {
411
-            $searchdir = $tmpsearchdir;  // $searchdir can be '.../htdocs/core/modules/' or '.../htdocs/custom/mymodule/core/modules/'
411
+            $searchdir = $tmpsearchdir; // $searchdir can be '.../htdocs/core/modules/' or '.../htdocs/custom/mymodule/core/modules/'
412 412
             // Directory of translation files
413
-            $dir_lang = dirname(dirname($searchdir)) . "/langs/" . $langcode; // The 2 dirname is to go up in dir for 2 levels
413
+            $dir_lang = dirname(dirname($searchdir))."/langs/".$langcode; // The 2 dirname is to go up in dir for 2 levels
414 414
             $dir_lang_osencoded = dol_osencode($dir_lang);
415 415
 
416 416
             $filearray = dol_dir_list($dir_lang_osencoded, 'files', 0, '', '', $sortfield, (strtolower($sortorder) == 'asc' ? SORT_ASC : SORT_DESC), 1);
@@ -420,14 +420,14 @@  discard block
 block discarded – undo
420 420
 
421 421
                 $langkey = $tmpfile;
422 422
                 if ($i > 0) {
423
-                    $langkey .= '@' . $moduledirname;
423
+                    $langkey .= '@'.$moduledirname;
424 424
                 }
425 425
                 //var_dump($i.' - '.$keydir.' - '.$dir_lang_osencoded.' -> '.$moduledirname . ' / ' . $tmpfile.' -> '.$langkey);
426 426
 
427
-                $result = $newlang->load($langkey, 0, 0, '', 0);                              // Load translation files + database overwrite
428
-                $result = $newlangfileonly->load($langkey, 0, 0, '', 1);                      // Load translation files only
427
+                $result = $newlang->load($langkey, 0, 0, '', 0); // Load translation files + database overwrite
428
+                $result = $newlangfileonly->load($langkey, 0, 0, '', 1); // Load translation files only
429 429
                 if ($result < 0) {
430
-                    print 'Failed to load language file ' . $tmpfile . '<br>' . "\n";
430
+                    print 'Failed to load language file '.$tmpfile.'<br>'."\n";
431 431
                 } else {
432 432
                     $nbtotaloffiles++;
433 433
                 }
@@ -438,10 +438,10 @@  discard block
 block discarded – undo
438 438
 
439 439
         // Now search into translation array
440 440
         foreach ($newlang->tab_translate as $key => $val) {
441
-            if ($transkey && !preg_match('/' . preg_quote($transkey, '/') . '/i', $key)) {
441
+            if ($transkey && !preg_match('/'.preg_quote($transkey, '/').'/i', $key)) {
442 442
                 continue;
443 443
             }
444
-            if ($transvalue && !preg_match('/' . preg_quote($transvalue, '/') . '/i', $val)) {
444
+            if ($transvalue && !preg_match('/'.preg_quote($transvalue, '/').'/i', $val)) {
445 445
                 continue;
446 446
             }
447 447
             $recordtoshow[$key] = $val;
@@ -459,17 +459,17 @@  discard block
 block discarded – undo
459 459
     //print 'param='.$param.' $_SERVER["PHP_SELF"]='.$_SERVER["PHP_SELF"].' num='.$num.' page='.$page.' nbtotalofrecords='.$nbtotalofrecords." sortfield=".$sortfield." sortorder=".$sortorder;
460 460
     $title = $langs->trans("TranslationKeySearch");
461 461
     if ($nbtotalofrecords > 0) {
462
-        $title .= ' (' . $nbtotalofrecords . ' / ' . $nbtotalofrecordswithoutfilters . ' - ' . $nbtotaloffiles . ' ' . $langs->trans("Files") . ')';
462
+        $title .= ' ('.$nbtotalofrecords.' / '.$nbtotalofrecordswithoutfilters.' - '.$nbtotaloffiles.' '.$langs->trans("Files").')';
463 463
     }
464
-    print print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, -1 * $nbtotalofrecords, '', 0, '', '', $limit) . "\n";
464
+    print print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, -1 * $nbtotalofrecords, '', 0, '', '', $limit)."\n";
465 465
 
466 466
     print '<input type="hidden" id="action" name="action" value="search">';
467
-    print '<input type="hidden" id="mode" name="mode" value="' . $mode . '">';
467
+    print '<input type="hidden" id="mode" name="mode" value="'.$mode.'">';
468 468
 
469 469
     print '<div class="div-table-responsive-no-min">';
470 470
     print '<table class="noborder" width="100%">';
471 471
     print '<tr class="liste_titre">';
472
-    print_liste_field_titre($langs->trans("Language") . ' (en_US, es_MX, ...)', $_SERVER["PHP_SELF"], 'lang,transkey', '', $param, '', $sortfield, $sortorder) . '</td>';
472
+    print_liste_field_titre($langs->trans("Language").' (en_US, es_MX, ...)', $_SERVER["PHP_SELF"], 'lang,transkey', '', $param, '', $sortfield, $sortorder).'</td>';
473 473
     print_liste_field_titre("Key", $_SERVER["PHP_SELF"], 'transkey', '', $param, '', $sortfield, $sortorder);
474 474
     print_liste_field_titre("CurrentTranslationString", $_SERVER["PHP_SELF"], 'transvalue', '', $param, '', $sortfield, $sortorder);
475 475
     //if (! empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre("Entity",$_SERVER["PHP_SELF"],'entity,transkey','',$param,'',$sortfield,$sortorder);
@@ -482,11 +482,11 @@  discard block
 block discarded – undo
482 482
     print '<tr class="oddeven"><td>';
483 483
     //print $formadmin->select_language($langcode,'langcode',0,null,$langs->trans("All"),0,0,'',1);
484 484
     print $formadmin->select_language($langcode, 'langcode', 0, null, 0, 0, 0, 'maxwidthonsmartphone', 1);
485
-    print '</td>' . "\n";
485
+    print '</td>'."\n";
486 486
     print '<td>';
487
-    print '<input type="text" class="flat maxwidthonsmartphone" name="transkey" value="' . $transkey . '">';
487
+    print '<input type="text" class="flat maxwidthonsmartphone" name="transkey" value="'.$transkey.'">';
488 488
     print '</td><td>';
489
-    print '<input type="text" class="quatrevingtpercent" name="transvalue" value="' . $transvalue . '">';
489
+    print '<input type="text" class="quatrevingtpercent" name="transvalue" value="'.$transvalue.'">';
490 490
     // Limit to superadmin
491 491
     /* if (! empty($conf->multicompany->enabled) && !$user->entity)
492 492
       {
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
       }
496 496
       else
497 497
       { */
498
-    print '<input type="hidden" name="entitysearch" value="' . $conf->entity . '">';
498
+    print '<input type="hidden" name="entitysearch" value="'.$conf->entity.'">';
499 499
     //}
500 500
     print '</td>';
501 501
     // Action column
@@ -528,41 +528,41 @@  discard block
 block discarded – undo
528 528
         if ($i > ($offset + $limit)) {
529 529
             break;
530 530
         }
531
-        print '<tr class="oddeven"><td>' . $langcode . '</td><td>' . $key . '</td><td>';
531
+        print '<tr class="oddeven"><td>'.$langcode.'</td><td>'.$key.'</td><td>';
532 532
         print dol_escape_htmltag($val);
533 533
         print '</td><td align="right">';
534 534
         if (!empty($newlangfileonly->tab_translate[$key])) {
535 535
             if ($val != $newlangfileonly->tab_translate[$key]) {
536 536
                 // retrieve rowid
537 537
                 $sql = "SELECT rowid";
538
-                $sql .= " FROM " . MAIN_DB_PREFIX . "overwrite_trans";
539
-                $sql .= " WHERE transkey = '" . $key . "'";
540
-                $sql .= " AND entity IN (" . getEntity('overwrite_trans') . ")";
538
+                $sql .= " FROM ".MAIN_DB_PREFIX."overwrite_trans";
539
+                $sql .= " WHERE transkey = '".$key."'";
540
+                $sql .= " AND entity IN (".getEntity('overwrite_trans').")";
541 541
                 dol_syslog("translation::select from table", LOG_DEBUG);
542 542
                 $result = $db->query($sql);
543 543
                 if ($result) {
544 544
                     $obj = $db->fetch_object($result);
545 545
                 }
546 546
                 // print '<a href="' . $_SERVER['PHP_SELF'] . '?rowid=' . $obj->rowid . '&entity=' . $conf->entity . '&action=edit">' . img_edit() . '</a>';
547
-                print '<a href="' . BASE_URI . '?controller=admin&method=translation&rowid=' . $obj->rowid . '&entity=' . $conf->entity . '&action=edit">' . img_edit() . '</a>';
547
+                print '<a href="'.BASE_URI.'?controller=admin&method=translation&rowid='.$obj->rowid.'&entity='.$conf->entity.'&action=edit">'.img_edit().'</a>';
548 548
                 print '&nbsp;&nbsp;';
549 549
                 //print '<a href="' . $_SERVER['PHP_SELF'] . '?rowid=' . $obj->rowid . '&entity=' . $conf->entity . '&action=delete">' . img_delete() . '</a>';
550
-                print '<a href="' . BASE_URI . '?controller=admin&method=translation&rowid=' . $obj->rowid . '&entity=' . $conf->entity . '&action=delete">' . img_delete() . '</a>';
550
+                print '<a href="'.BASE_URI.'?controller=admin&method=translation&rowid='.$obj->rowid.'&entity='.$conf->entity.'&action=delete">'.img_delete().'</a>';
551 551
                 print '&nbsp;&nbsp;';
552 552
                 $htmltext = $langs->trans("OriginalValueWas", $newlangfileonly->tab_translate[$key]);
553 553
                 print $form->textwithpicto('', $htmltext, 1, 'info');
554 554
             } else if (!empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION)) {
555 555
                 //print $key.'-'.$val;
556 556
                 // print '<a href="' . $_SERVER['PHP_SELF'] . '?mode=overwrite&amp;langcode=' . $langcode . '&amp;transkey=' . $key . '">' . img_edit_add($langs->trans("Overwrite")) . '</a>';
557
-                print '<a href="' . BASE_URI . '?controller=admin&method=translation&mode=overwrite&amp;langcode=' . $langcode . '&amp;transkey=' . $key . '">' . img_edit_add($langs->trans("Overwrite")) . '</a>';
557
+                print '<a href="'.BASE_URI.'?controller=admin&method=translation&mode=overwrite&amp;langcode='.$langcode.'&amp;transkey='.$key.'">'.img_edit_add($langs->trans("Overwrite")).'</a>';
558 558
             }
559 559
 
560 560
             if (!empty($conf->global->MAIN_FEATURES_LEVEL)) {
561
-                $transifexlangfile = '$';  // $ means 'All'
561
+                $transifexlangfile = '$'; // $ means 'All'
562 562
                 //$transifexurl = 'https://www.transifex.com/dolibarr-association/dolibarr/translate/#'.$langcode.'/'.$transifexlangfile.'?key='.$key;
563
-                $transifexurl = 'https://www.transifex.com/dolibarr-association/dolibarr/translate/#' . $langcode . '/' . $transifexlangfile . '?q=key%3A' . $key;
563
+                $transifexurl = 'https://www.transifex.com/dolibarr-association/dolibarr/translate/#'.$langcode.'/'.$transifexlangfile.'?q=key%3A'.$key;
564 564
 
565
-                print ' &nbsp; <a href="' . $transifexurl . '" target="transifex">' . img_picto('FixOnTransifex', 'object_globe') . '</a>';
565
+                print ' &nbsp; <a href="'.$transifexurl.'" target="transifex">'.img_picto('FixOnTransifex', 'object_globe').'</a>';
566 566
             }
567 567
         } else {
568 568
             $htmltext = $langs->trans("TransKeyWithoutOriginalValue", $key);
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
           {
573 573
           print '<td>'.$val.'</td>';
574 574
           } */
575
-        print '</td></tr>' . "\n";
575
+        print '</td></tr>'."\n";
576 576
     }
577 577
 
578 578
     print '</table>';
Please login to merge, or discard this patch.
dolibarr/htdocs/admin/company.php 1 patch
Spacing   +216 added lines, -216 removed lines patch added patch discarded remove patch
@@ -28,19 +28,19 @@  discard block
 block discarded – undo
28 28
  * 	\ingroup    company
29 29
  * 	\brief      Setup page to configure company/foundation
30 30
  */
31
-require DOL_BASE_PATH . '/main.inc.php';
31
+require DOL_BASE_PATH.'/main.inc.php';
32 32
 
33
-require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
34
-require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
35
-require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
36
-require_once DOL_DOCUMENT_ROOT . '/core/lib/images.lib.php';
37
-require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
38
-require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
39
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
40
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php';
33
+require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
34
+require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
35
+require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
36
+require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
37
+require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
38
+require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
39
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
40
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
41 41
 
42 42
 $action = GETPOST('action', 'aZ09', 3);
43
-$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'admincompany';   // To manage different context of search
43
+$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'admincompany'; // To manage different context of search
44 44
 // Load translation files required by the page
45 45
 $langs->loadLangs(array('admin', 'companies'));
46 46
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
  */
59 59
 
60 60
 $parameters = array();
61
-$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action);    // Note that $action and $object may have been modified by some hooks
61
+$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
62 62
 if ($reshook < 0)
63 63
     setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
64 64
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         $mysoc->country_code = $tmparray['code'];
70 70
         $mysoc->country_label = $tmparray['label'];
71 71
 
72
-        $s = $mysoc->country_id . ':' . $mysoc->country_code . ':' . $mysoc->country_label;
72
+        $s = $mysoc->country_id.':'.$mysoc->country_code.':'.$mysoc->country_label;
73 73
         dolibarr_set_const($db, "MAIN_INFO_SOCIETE_COUNTRY", $s, 'chaine', 0, '', $conf->entity);
74 74
 
75 75
         activateModulesRequiredByCountry($mysoc->country_code);
@@ -92,18 +92,18 @@  discard block
 block discarded – undo
92 92
     dolibarr_set_const($db, "MAIN_INFO_SOCIETE_GENCOD", GETPOST("barcode", 'alpha'), 'chaine', 0, '', $conf->entity);
93 93
 
94 94
     $varforimage = 'logo';
95
-    $dirforimage = $conf->mycompany->dir_output . '/logos/';
95
+    $dirforimage = $conf->mycompany->dir_output.'/logos/';
96 96
     if ($_FILES[$varforimage]["tmp_name"]) {
97 97
         if (preg_match('/([^\\/:]+)$/i', $_FILES[$varforimage]["name"], $reg)) {
98 98
             $original_file = $reg[1];
99 99
 
100 100
             $isimage = image_format_supported($original_file);
101 101
             if ($isimage >= 0) {
102
-                dol_syslog("Move file " . $_FILES[$varforimage]["tmp_name"] . " to " . $dirforimage . $original_file);
102
+                dol_syslog("Move file ".$_FILES[$varforimage]["tmp_name"]." to ".$dirforimage.$original_file);
103 103
                 if (!is_dir($dirforimage)) {
104 104
                     dol_mkdir($dirforimage);
105 105
                 }
106
-                $result = dol_move_uploaded_file($_FILES[$varforimage]["tmp_name"], $dirforimage . $original_file, 1, 0, $_FILES[$varforimage]['error']);
106
+                $result = dol_move_uploaded_file($_FILES[$varforimage]["tmp_name"], $dirforimage.$original_file, 1, 0, $_FILES[$varforimage]['error']);
107 107
                 if ($result > 0) {
108 108
                     dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO", $original_file, 'chaine', 0, '', $conf->entity);
109 109
 
@@ -112,17 +112,17 @@  discard block
 block discarded – undo
112 112
                         // Create thumbs
113 113
                         //$object->addThumbs($newfile);    // We can't use addThumbs here yet because we need name of generated thumbs to add them into constants. TODO Check if need such constants. We should be able to retreive value with get...
114 114
                         // Create small thumb, Used on logon for example
115
-                        $imgThumbSmall = vignette($dirforimage . $original_file, $maxwidthsmall, $maxheightsmall, '_small', $quality);
115
+                        $imgThumbSmall = vignette($dirforimage.$original_file, $maxwidthsmall, $maxheightsmall, '_small', $quality);
116 116
                         if (image_format_supported($imgThumbSmall) >= 0 && preg_match('/([^\\/:]+)$/i', $imgThumbSmall, $reg)) {
117
-                            $imgThumbSmall = $reg[1];    // Save only basename
117
+                            $imgThumbSmall = $reg[1]; // Save only basename
118 118
                             dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL", $imgThumbSmall, 'chaine', 0, '', $conf->entity);
119 119
                         } else
120 120
                             dol_syslog($imgThumbSmall);
121 121
 
122 122
                         // Create mini thumb, Used on menu or for setup page for example
123
-                        $imgThumbMini = vignette($dirforimage . $original_file, $maxwidthmini, $maxheightmini, '_mini', $quality);
123
+                        $imgThumbMini = vignette($dirforimage.$original_file, $maxwidthmini, $maxheightmini, '_mini', $quality);
124 124
                         if (image_format_supported($imgThumbMini) >= 0 && preg_match('/([^\\/:]+)$/i', $imgThumbMini, $reg)) {
125
-                            $imgThumbMini = $reg[1];     // Save only basename
125
+                            $imgThumbMini = $reg[1]; // Save only basename
126 126
                             dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_MINI", $imgThumbMini, 'chaine', 0, '', $conf->entity);
127 127
                         } else
128 128
                             dol_syslog($imgThumbMini);
@@ -203,13 +203,13 @@  discard block
 block discarded – undo
203 203
     }
204 204
 
205 205
     if ($action != 'updateedit' && !$error) {
206
-        header("Location: " . $_SERVER["PHP_SELF"]);
206
+        header("Location: ".$_SERVER["PHP_SELF"]);
207 207
         exit;
208 208
     }
209 209
 }
210 210
 
211 211
 if ($action == 'addthumb') {  // Regenerate thumbs
212
-    if (file_exists($conf->mycompany->dir_output . '/logos/' . $_GET["file"])) {
212
+    if (file_exists($conf->mycompany->dir_output.'/logos/'.$_GET["file"])) {
213 213
         $isimage = image_format_supported($_GET["file"]);
214 214
 
215 215
         // Create thumbs of logo
@@ -217,22 +217,22 @@  discard block
 block discarded – undo
217 217
             // Create thumbs
218 218
             //$object->addThumbs($newfile);    // We can't use addThumbs here yet because we need name of generated thumbs to add them into constants. TODO Check if need such constants. We should be able to retreive value with get...
219 219
             // Create small thumb. Used on logon for example
220
-            $imgThumbSmall = vignette($conf->mycompany->dir_output . '/logos/' . $_GET["file"], $maxwidthsmall, $maxheightsmall, '_small', $quality);
220
+            $imgThumbSmall = vignette($conf->mycompany->dir_output.'/logos/'.$_GET["file"], $maxwidthsmall, $maxheightsmall, '_small', $quality);
221 221
             if (image_format_supported($imgThumbSmall) >= 0 && preg_match('/([^\\/:]+)$/i', $imgThumbSmall, $reg)) {
222
-                $imgThumbSmall = $reg[1];   // Save only basename
222
+                $imgThumbSmall = $reg[1]; // Save only basename
223 223
                 dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL", $imgThumbSmall, 'chaine', 0, '', $conf->entity);
224 224
             } else
225 225
                 dol_syslog($imgThumbSmall);
226 226
 
227 227
             // Create mini thumbs. Used on menu or for setup page for example
228
-            $imgThumbMini = vignette($conf->mycompany->dir_output . '/logos/' . $_GET["file"], $maxwidthmini, $maxheightmini, '_mini', $quality);
228
+            $imgThumbMini = vignette($conf->mycompany->dir_output.'/logos/'.$_GET["file"], $maxwidthmini, $maxheightmini, '_mini', $quality);
229 229
             if (image_format_supported($imgThumbSmall) >= 0 && preg_match('/([^\\/:]+)$/i', $imgThumbMini, $reg)) {
230
-                $imgThumbMini = $reg[1];   // Save only basename
230
+                $imgThumbMini = $reg[1]; // Save only basename
231 231
                 dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_MINI", $imgThumbMini, 'chaine', 0, '', $conf->entity);
232 232
             } else
233 233
                 dol_syslog($imgThumbMini);
234 234
 
235
-            header("Location: " . $_SERVER["PHP_SELF"]);
235
+            header("Location: ".$_SERVER["PHP_SELF"]);
236 236
             exit;
237 237
         }
238 238
         else {
@@ -250,21 +250,21 @@  discard block
 block discarded – undo
250 250
 }
251 251
 
252 252
 if ($action == 'removelogo') {
253
-    require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
253
+    require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
254 254
 
255
-    $logofile = $conf->mycompany->dir_output . '/logos/' . $mysoc->logo;
255
+    $logofile = $conf->mycompany->dir_output.'/logos/'.$mysoc->logo;
256 256
     if ($mysoc->logo != '')
257 257
         dol_delete_file($logofile);
258 258
     dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO", $conf->entity);
259 259
     $mysoc->logo = '';
260 260
 
261
-    $logosmallfile = $conf->mycompany->dir_output . '/logos/thumbs/' . $mysoc->logo_small;
261
+    $logosmallfile = $conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small;
262 262
     if ($mysoc->logo_small != '')
263 263
         dol_delete_file($logosmallfile);
264 264
     dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL", $conf->entity);
265 265
     $mysoc->logo_small = '';
266 266
 
267
-    $logominifile = $conf->mycompany->dir_output . '/logos/thumbs/' . $mysoc->logo_mini;
267
+    $logominifile = $conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini;
268 268
     if ($mysoc->logo_mini != '')
269 269
         dol_delete_file($logominifile);
270 270
     dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO_MINI", $conf->entity);
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 $formother = new FormOther($db);
284 284
 $formcompany = new FormCompany($db);
285 285
 
286
-$countrynotdefined = '<font class="error">' . $langs->trans("ErrorSetACountryFirst") . ' (' . $langs->trans("SeeAbove") . ')</font>';
286
+$countrynotdefined = '<font class="error">'.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')</font>';
287 287
 
288 288
 print load_fiche_titre($langs->trans("CompanyFoundation"), '', 'title_setup');
289 289
 
@@ -291,115 +291,115 @@  discard block
 block discarded – undo
291 291
 
292 292
 dol_fiche_head($head, 'company', $langs->trans("Company"), -1, 'company');
293 293
 
294
-print '<span class="opacitymedium">' . $langs->trans("CompanyFundationDesc", $langs->transnoentities("Modify"), $langs->transnoentities("Save")) . "</span><br>\n";
294
+print '<span class="opacitymedium">'.$langs->trans("CompanyFundationDesc", $langs->transnoentities("Modify"), $langs->transnoentities("Save"))."</span><br>\n";
295 295
 print "<br>\n";
296 296
 
297 297
 if ($action == 'edit' || $action == 'updateedit') {
298 298
     /**
299 299
      * Edition des parametres
300 300
      */
301
-    print "\n" . '<script type="text/javascript" language="javascript">';
301
+    print "\n".'<script type="text/javascript" language="javascript">';
302 302
     print '$(document).ready(function () {
303 303
 			  $("#selectcountry_id").change(function() {
304 304
 				document.form_index.action.value="updateedit";
305 305
 				document.form_index.submit();
306 306
 			  });
307 307
 		  });';
308
-    print '</script>' . "\n";
308
+    print '</script>'."\n";
309 309
 
310
-    print '<form enctype="multipart/form-data" method="POST" href="' . BASE_URI . '?controller=admin&method=company" name="form_index">';
311
-    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
310
+    print '<form enctype="multipart/form-data" method="POST" href="'.BASE_URI.'?controller=admin&method=company" name="form_index">';
311
+    print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
312 312
     print '<input type="hidden" name="action" value="update">';
313 313
 
314 314
     print '<table class="noborder" width="100%">';
315
-    print '<tr class="liste_titre"><th class="titlefield wordbreak">' . $langs->trans("CompanyInfo") . '</th><th>' . $langs->trans("Value") . '</th></tr>' . "\n";
315
+    print '<tr class="liste_titre"><th class="titlefield wordbreak">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
316 316
 
317 317
     // Name
318 318
 
319
-    print '<tr class="oddeven"><td class="fieldrequired"><label for="name">' . $langs->trans("CompanyName") . '</label></td><td>';
320
-    print '<input name="nom" id="name" class="minwidth200" value="' . dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_NOM ? $conf->global->MAIN_INFO_SOCIETE_NOM : GETPOST("nom", 'nohtml')) . '" autofocus="autofocus"></td></tr>' . "\n";
319
+    print '<tr class="oddeven"><td class="fieldrequired"><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
320
+    print '<input name="nom" id="name" class="minwidth200" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_NOM ? $conf->global->MAIN_INFO_SOCIETE_NOM : GETPOST("nom", 'nohtml')).'" autofocus="autofocus"></td></tr>'."\n";
321 321
 
322 322
     // Addresse
323 323
 
324
-    print '<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_ADDRESS">' . $langs->trans("CompanyAddress") . '</label></td><td>';
325
-    print '<textarea name="MAIN_INFO_SOCIETE_ADDRESS" id="MAIN_INFO_SOCIETE_ADDRESS" class="quatrevingtpercent" rows="' . ROWS_3 . '">' . ($conf->global->MAIN_INFO_SOCIETE_ADDRESS ? $conf->global->MAIN_INFO_SOCIETE_ADDRESS : GETPOST("MAIN_INFO_SOCIETE_ADDRESS", 'nohtml')) . '</textarea></td></tr>' . "\n";
324
+    print '<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_ADDRESS">'.$langs->trans("CompanyAddress").'</label></td><td>';
325
+    print '<textarea name="MAIN_INFO_SOCIETE_ADDRESS" id="MAIN_INFO_SOCIETE_ADDRESS" class="quatrevingtpercent" rows="'.ROWS_3.'">'.($conf->global->MAIN_INFO_SOCIETE_ADDRESS ? $conf->global->MAIN_INFO_SOCIETE_ADDRESS : GETPOST("MAIN_INFO_SOCIETE_ADDRESS", 'nohtml')).'</textarea></td></tr>'."\n";
326 326
 
327 327
 
328
-    print '<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_ZIP">' . $langs->trans("CompanyZip") . '</label></td><td>';
329
-    print '<input class="minwidth100" name="MAIN_INFO_SOCIETE_ZIP" id="MAIN_INFO_SOCIETE_ZIP" value="' . dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_ZIP ? $conf->global->MAIN_INFO_SOCIETE_ZIP : GETPOST("MAIN_INFO_SOCIETE_ZIP", 'alpha')) . '"></td></tr>' . "\n";
328
+    print '<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_ZIP">'.$langs->trans("CompanyZip").'</label></td><td>';
329
+    print '<input class="minwidth100" name="MAIN_INFO_SOCIETE_ZIP" id="MAIN_INFO_SOCIETE_ZIP" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_ZIP ? $conf->global->MAIN_INFO_SOCIETE_ZIP : GETPOST("MAIN_INFO_SOCIETE_ZIP", 'alpha')).'"></td></tr>'."\n";
330 330
 
331 331
 
332
-    print '<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_TOWN">' . $langs->trans("CompanyTown") . '</label></td><td>';
333
-    print '<input name="MAIN_INFO_SOCIETE_TOWN" class="minwidth100" id="MAIN_INFO_SOCIETE_TOWN" value="' . dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_TOWN ? $conf->global->MAIN_INFO_SOCIETE_TOWN : GETPOST("MAIN_INFO_SOCIETE_TOWN", 'nohtml')) . '"></td></tr>' . "\n";
332
+    print '<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_TOWN">'.$langs->trans("CompanyTown").'</label></td><td>';
333
+    print '<input name="MAIN_INFO_SOCIETE_TOWN" class="minwidth100" id="MAIN_INFO_SOCIETE_TOWN" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_TOWN ? $conf->global->MAIN_INFO_SOCIETE_TOWN : GETPOST("MAIN_INFO_SOCIETE_TOWN", 'nohtml')).'"></td></tr>'."\n";
334 334
 
335 335
     // Country
336 336
 
337
-    print '<tr class="oddeven"><td class="fieldrequired"><label for="selectcountry_id">' . $langs->trans("Country") . '</label></td><td class="maxwidthonsmartphone">';
337
+    print '<tr class="oddeven"><td class="fieldrequired"><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td class="maxwidthonsmartphone">';
338 338
     //if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2);    // By default, country of localization
339 339
     print $form->select_country($mysoc->country_id, 'country_id');
340 340
     if ($user->admin)
341 341
         print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
342
-    print '</td></tr>' . "\n";
342
+    print '</td></tr>'."\n";
343 343
 
344 344
 
345
-    print '<tr class="oddeven"><td><label for="state_id">' . $langs->trans("State") . '</label></td><td class="maxwidthonsmartphone">';
345
+    print '<tr class="oddeven"><td><label for="state_id">'.$langs->trans("State").'</label></td><td class="maxwidthonsmartphone">';
346 346
     $formcompany->select_departement($conf->global->MAIN_INFO_SOCIETE_STATE, $mysoc->country_code, 'state_id');
347
-    print '</td></tr>' . "\n";
347
+    print '</td></tr>'."\n";
348 348
 
349 349
 
350
-    print '<tr class="oddeven"><td><label for="currency">' . $langs->trans("CompanyCurrency") . '</label></td><td>';
350
+    print '<tr class="oddeven"><td><label for="currency">'.$langs->trans("CompanyCurrency").'</label></td><td>';
351 351
     print $form->selectCurrency($conf->currency, "currency");
352
-    print '</td></tr>' . "\n";
352
+    print '</td></tr>'."\n";
353 353
 
354 354
 
355
-    print '<tr class="oddeven"><td><label for="phone">' . $langs->trans("Phone") . '</label></td><td>';
356
-    print '<input name="tel" id="phone" value="' . dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_TEL) . '"></td></tr>';
357
-    print '</td></tr>' . "\n";
355
+    print '<tr class="oddeven"><td><label for="phone">'.$langs->trans("Phone").'</label></td><td>';
356
+    print '<input name="tel" id="phone" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_TEL).'"></td></tr>';
357
+    print '</td></tr>'."\n";
358 358
 
359 359
 
360
-    print '<tr class="oddeven"><td><label for="fax">' . $langs->trans("Fax") . '</label></td><td>';
361
-    print '<input name="fax" id="fax" value="' . dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_FAX) . '"></td></tr>';
362
-    print '</td></tr>' . "\n";
360
+    print '<tr class="oddeven"><td><label for="fax">'.$langs->trans("Fax").'</label></td><td>';
361
+    print '<input name="fax" id="fax" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_FAX).'"></td></tr>';
362
+    print '</td></tr>'."\n";
363 363
 
364 364
 
365
-    print '<tr class="oddeven"><td><label for="email">' . $langs->trans("EMail") . '</label></td><td>';
366
-    print '<input name="mail" id="email" class="minwidth200" value="' . dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_MAIL) . '"></td></tr>';
367
-    print '</td></tr>' . "\n";
365
+    print '<tr class="oddeven"><td><label for="email">'.$langs->trans("EMail").'</label></td><td>';
366
+    print '<input name="mail" id="email" class="minwidth200" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_MAIL).'"></td></tr>';
367
+    print '</td></tr>'."\n";
368 368
 
369 369
     // Web
370
-    print '<tr class="oddeven"><td><label for="web">' . $langs->trans("Web") . '</label></td><td>';
371
-    print '<input name="web" id="web" class="minwidth300" value="' . dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_WEB) . '"></td></tr>';
372
-    print '</td></tr>' . "\n";
370
+    print '<tr class="oddeven"><td><label for="web">'.$langs->trans("Web").'</label></td><td>';
371
+    print '<input name="web" id="web" class="minwidth300" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_WEB).'"></td></tr>';
372
+    print '</td></tr>'."\n";
373 373
 
374 374
     // Barcode
375 375
     if (!empty($conf->barcode->enabled)) {
376 376
 
377
-        print '<tr class="oddeven"><td><label for="barcode">' . $langs->trans("Gencod") . '</label></td><td>';
378
-        print '<input name="barcode" id="barcode" class="minwidth150" value="' . dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_GENCOD) . '"></td></tr>';
377
+        print '<tr class="oddeven"><td><label for="barcode">'.$langs->trans("Gencod").'</label></td><td>';
378
+        print '<input name="barcode" id="barcode" class="minwidth150" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_GENCOD).'"></td></tr>';
379 379
         print '</td></tr>';
380 380
     }
381 381
 
382 382
     // Logo
383
-    print '<tr class="oddeven hideonsmartphone"><td><label for="logo">' . $langs->trans("Logo") . ' (png,jpg)</label></td><td>';
383
+    print '<tr class="oddeven hideonsmartphone"><td><label for="logo">'.$langs->trans("Logo").' (png,jpg)</label></td><td>';
384 384
     print '<table width="100%" class="nobordernopadding"><tr class="nocellnopadd"><td valign="middle" class="nocellnopadd">';
385 385
     print '<input type="file" class="flat class=minwidth200" name="logo" id="logo">';
386 386
     print '</td><td class="nocellnopadd" valign="middle" align="right">';
387 387
     if (!empty($mysoc->logo_mini)) {
388
-        print '<a href="' . $_SERVER["PHP_SELF"] . '?action=removelogo">' . img_delete($langs->trans("Delete")) . '</a>';
389
-        if (file_exists($conf->mycompany->dir_output . '/logos/thumbs/' . $mysoc->logo_mini)) {
388
+        print '<a href="'.$_SERVER["PHP_SELF"].'?action=removelogo">'.img_delete($langs->trans("Delete")).'</a>';
389
+        if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) {
390 390
             print ' &nbsp; ';
391
-            print '<img src="' . DOL_URL_ROOT . '/viewimage.php?modulepart=mycompany&amp;file=' . urlencode('logos/thumbs/' . $mysoc->logo_mini) . '">';
391
+            print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;file='.urlencode('logos/thumbs/'.$mysoc->logo_mini).'">';
392 392
         }
393 393
     } else {
394 394
         // print '<img height="30" src="' . DOL_URL_ROOT . '/public/theme/common/nophoto.png">';
395
-        print '<img height="30" src="' . DOL_BASE_URI . '/public/theme/common/nophoto.png">';
395
+        print '<img height="30" src="'.DOL_BASE_URI.'/public/theme/common/nophoto.png">';
396 396
     }
397 397
     print '</td></tr></table>';
398 398
     print '</td></tr>';
399 399
 
400 400
     // Note
401
-    print '<tr class="oddeven"><td class="tdtop"><label for="note">' . $langs->trans("Note") . '</label></td><td>';
402
-    print '<textarea class="flat quatrevingtpercent" name="note" id="note" rows="' . ROWS_5 . '">' . (GETPOST('note', 'none') ? GETPOST('note', 'none') : $conf->global->MAIN_INFO_SOCIETE_NOTE) . '</textarea></td></tr>';
401
+    print '<tr class="oddeven"><td class="tdtop"><label for="note">'.$langs->trans("Note").'</label></td><td>';
402
+    print '<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.'">'.(GETPOST('note', 'none') ? GETPOST('note', 'none') : $conf->global->MAIN_INFO_SOCIETE_NOTE).'</textarea></td></tr>';
403 403
     print '</td></tr>';
404 404
 
405 405
     print '</table>';
@@ -408,30 +408,30 @@  discard block
 block discarded – undo
408 408
 
409 409
     // IDs of the company (country-specific)
410 410
     print '<table class="noborder" width="100%">';
411
-    print '<tr class="liste_titre"><td class="titlefield">' . $langs->trans("CompanyIds") . '</td><td>' . $langs->trans("Value") . '</td></tr>';
411
+    print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
412 412
 
413 413
     $langs->load("companies");
414 414
 
415 415
     // Managing Director(s)
416 416
 
417
-    print '<tr class="oddeven"><td><label for="director">' . $langs->trans("ManagingDirectors") . '</label></td><td>';
418
-    print '<input name="MAIN_INFO_SOCIETE_MANAGERS" id="director" class="minwidth200" value="' . dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_MANAGERS) . '"></td></tr>';
417
+    print '<tr class="oddeven"><td><label for="director">'.$langs->trans("ManagingDirectors").'</label></td><td>';
418
+    print '<input name="MAIN_INFO_SOCIETE_MANAGERS" id="director" class="minwidth200" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_MANAGERS).'"></td></tr>';
419 419
 
420 420
     // GDPR contact
421 421
 
422 422
     print '<tr class="oddeven"><td>';
423 423
     print $form->textwithpicto($langs->trans("GDPRContact"), $langs->trans("GDPRContactDesc"));
424 424
     print '</td><td>';
425
-    print '<input name="MAIN_INFO_GDPR" id="director" class="minwidth500" value="' . dol_escape_htmltag($conf->global->MAIN_INFO_GDPR) . '"></td></tr>';
425
+    print '<input name="MAIN_INFO_GDPR" id="director" class="minwidth500" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_GDPR).'"></td></tr>';
426 426
 
427 427
     // Capital
428 428
 
429
-    print '<tr class="oddeven"><td><label for="capital">' . $langs->trans("Capital") . '</label></td><td>';
430
-    print '<input name="capital" id="capital" class="minwidth100" value="' . dol_escape_htmltag($conf->global->MAIN_INFO_CAPITAL) . '"></td></tr>';
429
+    print '<tr class="oddeven"><td><label for="capital">'.$langs->trans("Capital").'</label></td><td>';
430
+    print '<input name="capital" id="capital" class="minwidth100" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_CAPITAL).'"></td></tr>';
431 431
 
432 432
     // Juridical Status
433 433
 
434
-    print '<tr class="oddeven"><td><label for="forme_juridique_code">' . $langs->trans("JuridicalStatus") . '</label></td><td>';
434
+    print '<tr class="oddeven"><td><label for="forme_juridique_code">'.$langs->trans("JuridicalStatus").'</label></td><td>';
435 435
     if ($mysoc->country_code) {
436 436
         print $formcompany->select_juridicalstatus($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE, $mysoc->country_code, '', 'forme_juridique_code');
437 437
     } else {
@@ -442,9 +442,9 @@  discard block
 block discarded – undo
442 442
     // ProfID1
443 443
     if ($langs->transcountry("ProfId1", $mysoc->country_code) != '-') {
444 444
 
445
-        print '<tr class="oddeven"><td><label for="profid1">' . $langs->transcountry("ProfId1", $mysoc->country_code) . '</label></td><td>';
445
+        print '<tr class="oddeven"><td><label for="profid1">'.$langs->transcountry("ProfId1", $mysoc->country_code).'</label></td><td>';
446 446
         if (!empty($mysoc->country_code)) {
447
-            print '<input name="siren" id="profid1" class="minwidth200" value="' . dol_escape_htmltag(!empty($conf->global->MAIN_INFO_SIREN) ? $conf->global->MAIN_INFO_SIREN : '') . '">';
447
+            print '<input name="siren" id="profid1" class="minwidth200" value="'.dol_escape_htmltag(!empty($conf->global->MAIN_INFO_SIREN) ? $conf->global->MAIN_INFO_SIREN : '').'">';
448 448
         } else {
449 449
             print $countrynotdefined;
450 450
         }
@@ -454,9 +454,9 @@  discard block
 block discarded – undo
454 454
     // ProfId2
455 455
     if ($langs->transcountry("ProfId2", $mysoc->country_code) != '-') {
456 456
 
457
-        print '<tr class="oddeven"><td><label for="profid2">' . $langs->transcountry("ProfId2", $mysoc->country_code) . '</label></td><td>';
457
+        print '<tr class="oddeven"><td><label for="profid2">'.$langs->transcountry("ProfId2", $mysoc->country_code).'</label></td><td>';
458 458
         if (!empty($mysoc->country_code)) {
459
-            print '<input name="siret" id="profid2" class="minwidth200" value="' . dol_escape_htmltag(!empty($conf->global->MAIN_INFO_SIRET) ? $conf->global->MAIN_INFO_SIRET : '' ) . '">';
459
+            print '<input name="siret" id="profid2" class="minwidth200" value="'.dol_escape_htmltag(!empty($conf->global->MAIN_INFO_SIRET) ? $conf->global->MAIN_INFO_SIRET : '').'">';
460 460
         } else {
461 461
             print $countrynotdefined;
462 462
         }
@@ -466,9 +466,9 @@  discard block
 block discarded – undo
466 466
     // ProfId3
467 467
     if ($langs->transcountry("ProfId3", $mysoc->country_code) != '-') {
468 468
 
469
-        print '<tr class="oddeven"><td><label for="profid3">' . $langs->transcountry("ProfId3", $mysoc->country_code) . '</label></td><td>';
469
+        print '<tr class="oddeven"><td><label for="profid3">'.$langs->transcountry("ProfId3", $mysoc->country_code).'</label></td><td>';
470 470
         if (!empty($mysoc->country_code)) {
471
-            print '<input name="ape" id="profid3" class="minwidth200" value="' . dol_escape_htmltag(!empty($conf->global->MAIN_INFO_APE) ? $conf->global->MAIN_INFO_APE : '') . '">';
471
+            print '<input name="ape" id="profid3" class="minwidth200" value="'.dol_escape_htmltag(!empty($conf->global->MAIN_INFO_APE) ? $conf->global->MAIN_INFO_APE : '').'">';
472 472
         } else {
473 473
             print $countrynotdefined;
474 474
         }
@@ -478,9 +478,9 @@  discard block
 block discarded – undo
478 478
     // ProfId4
479 479
     if ($langs->transcountry("ProfId4", $mysoc->country_code) != '-') {
480 480
 
481
-        print '<tr class="oddeven"><td><label for="profid4">' . $langs->transcountry("ProfId4", $mysoc->country_code) . '</label></td><td>';
481
+        print '<tr class="oddeven"><td><label for="profid4">'.$langs->transcountry("ProfId4", $mysoc->country_code).'</label></td><td>';
482 482
         if (!empty($mysoc->country_code)) {
483
-            print '<input name="rcs" id="profid4" class="minwidth200" value="' . dol_escape_htmltag(!empty($conf->global->MAIN_INFO_RCS) ? $conf->global->MAIN_INFO_RCS : '') . '">';
483
+            print '<input name="rcs" id="profid4" class="minwidth200" value="'.dol_escape_htmltag(!empty($conf->global->MAIN_INFO_RCS) ? $conf->global->MAIN_INFO_RCS : '').'">';
484 484
         } else {
485 485
             print $countrynotdefined;
486 486
         }
@@ -490,9 +490,9 @@  discard block
 block discarded – undo
490 490
     // ProfId5
491 491
     if ($langs->transcountry("ProfId5", $mysoc->country_code) != '-') {
492 492
 
493
-        print '<tr class="oddeven"><td><label for="profid5">' . $langs->transcountry("ProfId5", $mysoc->country_code) . '</label></td><td>';
493
+        print '<tr class="oddeven"><td><label for="profid5">'.$langs->transcountry("ProfId5", $mysoc->country_code).'</label></td><td>';
494 494
         if (!empty($mysoc->country_code)) {
495
-            print '<input name="MAIN_INFO_PROFID5" id="profid5" class="minwidth200" value="' . dol_escape_htmltag(!empty($conf->global->MAIN_INFO_PROFID5) ? $conf->global->MAIN_INFO_PROFID5 : '') . '">';
495
+            print '<input name="MAIN_INFO_PROFID5" id="profid5" class="minwidth200" value="'.dol_escape_htmltag(!empty($conf->global->MAIN_INFO_PROFID5) ? $conf->global->MAIN_INFO_PROFID5 : '').'">';
496 496
         } else {
497 497
             print $countrynotdefined;
498 498
         }
@@ -502,9 +502,9 @@  discard block
 block discarded – undo
502 502
     // ProfId6
503 503
     if ($langs->transcountry("ProfId6", $mysoc->country_code) != '-') {
504 504
 
505
-        print '<tr class="oddeven"><td><label for="profid6">' . $langs->transcountry("ProfId6", $mysoc->country_code) . '</label></td><td>';
505
+        print '<tr class="oddeven"><td><label for="profid6">'.$langs->transcountry("ProfId6", $mysoc->country_code).'</label></td><td>';
506 506
         if (!empty($mysoc->country_code)) {
507
-            print '<input name="MAIN_INFO_PROFID6" id="profid6" class="minwidth200" value="' . dol_escape_htmltag(!empty($conf->global->MAIN_INFO_PROFID6) ? $conf->global->MAIN_INFO_PROFID6 : '') . '">';
507
+            print '<input name="MAIN_INFO_PROFID6" id="profid6" class="minwidth200" value="'.dol_escape_htmltag(!empty($conf->global->MAIN_INFO_PROFID6) ? $conf->global->MAIN_INFO_PROFID6 : '').'">';
508 508
         } else {
509 509
             print $countrynotdefined;
510 510
         }
@@ -513,14 +513,14 @@  discard block
 block discarded – undo
513 513
 
514 514
     // TVA Intra
515 515
 
516
-    print '<tr class="oddeven"><td><label for="intra_vat">' . $langs->trans("VATIntra") . '</label></td><td>';
517
-    print '<input name="tva" id="intra_vat" class="minwidth200" value="' . dol_escape_htmltag(!empty($conf->global->MAIN_INFO_TVAINTRA) ? $conf->global->MAIN_INFO_TVAINTRA : '') . '">';
516
+    print '<tr class="oddeven"><td><label for="intra_vat">'.$langs->trans("VATIntra").'</label></td><td>';
517
+    print '<input name="tva" id="intra_vat" class="minwidth200" value="'.dol_escape_htmltag(!empty($conf->global->MAIN_INFO_TVAINTRA) ? $conf->global->MAIN_INFO_TVAINTRA : '').'">';
518 518
     print '</td></tr>';
519 519
 
520 520
     // Object of the company
521 521
 
522
-    print '<tr class="oddeven"><td><label for="object">' . $langs->trans("CompanyObject") . '</label></td><td>';
523
-    print '<textarea class="flat quatrevingtpercent" name="object" id="object" rows="' . ROWS_5 . '">' . (!empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? $conf->global->MAIN_INFO_SOCIETE_OBJECT : '') . '</textarea></td></tr>';
522
+    print '<tr class="oddeven"><td><label for="object">'.$langs->trans("CompanyObject").'</label></td><td>';
523
+    print '<textarea class="flat quatrevingtpercent" name="object" id="object" rows="'.ROWS_5.'">'.(!empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? $conf->global->MAIN_INFO_SOCIETE_OBJECT : '').'</textarea></td></tr>';
524 524
     print '</td></tr>';
525 525
 
526 526
     print '</table>';
@@ -530,12 +530,12 @@  discard block
 block discarded – undo
530 530
     print '<br>';
531 531
     print '<table class="noborder" width="100%">';
532 532
     print '<tr class="liste_titre">';
533
-    print '<td class="titlefield">' . $langs->trans("FiscalYearInformation") . '</td><td>' . $langs->trans("Value") . '</td>';
533
+    print '<td class="titlefield">'.$langs->trans("FiscalYearInformation").'</td><td>'.$langs->trans("Value").'</td>';
534 534
     print "</tr>\n";
535 535
 
536 536
 
537
-    print '<tr class="oddeven"><td><label for="SOCIETE_FISCAL_MONTH_START">' . $langs->trans("FiscalMonthStart") . '</label></td><td>';
538
-    print $formother->select_month($conf->global->SOCIETE_FISCAL_MONTH_START, 'SOCIETE_FISCAL_MONTH_START', 0, 1) . '</td></tr>';
537
+    print '<tr class="oddeven"><td><label for="SOCIETE_FISCAL_MONTH_START">'.$langs->trans("FiscalMonthStart").'</label></td><td>';
538
+    print $formother->select_month($conf->global->SOCIETE_FISCAL_MONTH_START, 'SOCIETE_FISCAL_MONTH_START', 0, 1).'</td></tr>';
539 539
 
540 540
     print "</table>";
541 541
 
@@ -544,27 +544,27 @@  discard block
 block discarded – undo
544 544
     print '<br>';
545 545
     print '<table class="noborder" width="100%">';
546 546
     print '<tr class="liste_titre">';
547
-    print '<td width="140">' . $langs->trans("VATManagement") . '</td><td>' . $langs->trans("Description") . '</td>';
547
+    print '<td width="140">'.$langs->trans("VATManagement").'</td><td>'.$langs->trans("Description").'</td>';
548 548
     print '<td align="right">&nbsp;</td>';
549 549
     print "</tr>\n";
550 550
 
551 551
 
552
-    print "<tr class=\"oddeven\"><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" id=\"use_vat\" value=\"1\"" . (empty($conf->global->FACTURE_TVAOPTION) ? "" : " checked") . "> " . $langs->trans("VATIsUsed") . "</label></td>";
552
+    print "<tr class=\"oddeven\"><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" id=\"use_vat\" value=\"1\"".(empty($conf->global->FACTURE_TVAOPTION) ? "" : " checked")."> ".$langs->trans("VATIsUsed")."</label></td>";
553 553
     print '<td colspan="2">';
554 554
     print "<table>";
555
-    print "<tr><td><label for=\"use_vat\">" . $langs->trans("VATIsUsedDesc") . "</label></td></tr>";
555
+    print "<tr><td><label for=\"use_vat\">".$langs->trans("VATIsUsedDesc")."</label></td></tr>";
556 556
     if ($mysoc->country_code == 'FR')
557
-        print "<tr><td><i>" . $langs->trans("Example") . ': ' . $langs->trans("VATIsUsedExampleFR") . "</i></td></tr>\n";
557
+        print "<tr><td><i>".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."</i></td></tr>\n";
558 558
     print "</table>";
559 559
     print "</td></tr>\n";
560 560
 
561 561
 
562
-    print "<tr class=\"oddeven\"><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" id=\"no_vat\" value=\"0\"" . (empty($conf->global->FACTURE_TVAOPTION) ? " checked" : "") . "> " . $langs->trans("VATIsNotUsed") . "</label></td>";
562
+    print "<tr class=\"oddeven\"><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" id=\"no_vat\" value=\"0\"".(empty($conf->global->FACTURE_TVAOPTION) ? " checked" : "")."> ".$langs->trans("VATIsNotUsed")."</label></td>";
563 563
     print '<td colspan="2">';
564 564
     print "<table>";
565
-    print "<tr><td><label for=\"no_vat\">" . $langs->trans("VATIsNotUsedDesc") . "</label></td></tr>";
565
+    print "<tr><td><label for=\"no_vat\">".$langs->trans("VATIsNotUsedDesc")."</label></td></tr>";
566 566
     if ($mysoc->country_code == 'FR')
567
-        print "<tr><td><i>" . $langs->trans("Example") . ': ' . $langs->trans("VATIsNotUsedExampleFR") . "</i></td></tr>\n";
567
+        print "<tr><td><i>".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."</i></td></tr>\n";
568 568
     print "</table>";
569 569
     print "</td></tr>\n";
570 570
 
@@ -578,38 +578,38 @@  discard block
 block discarded – undo
578 578
         print '<br>';
579 579
         print '<table class="noborder" width="100%">';
580 580
         print '<tr class="liste_titre">';
581
-        print '<td width="140">' . $langs->transcountry("LocalTax1Management", $mysoc->country_code) . '</td><td>' . $langs->trans("Description") . '</td>';
581
+        print '<td width="140">'.$langs->transcountry("LocalTax1Management", $mysoc->country_code).'</td><td>'.$langs->trans("Description").'</td>';
582 582
         print '<td align="right">&nbsp;</td>';
583 583
         print "</tr>\n";
584 584
 
585 585
         // Note: When option is not set, it must not appears as set on on, because there is no default value for this option
586
-        print "<tr class=\"oddeven\"><td width=\"140\"><input type=\"radio\" name=\"optionlocaltax1\" id=\"lt1\" value=\"localtax1on\"" . (($conf->global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on") ? " checked" : "") . "> " . $langs->transcountry("LocalTax1IsUsed", $mysoc->country_code) . "</td>";
586
+        print "<tr class=\"oddeven\"><td width=\"140\"><input type=\"radio\" name=\"optionlocaltax1\" id=\"lt1\" value=\"localtax1on\"".(($conf->global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on") ? " checked" : "")."> ".$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code)."</td>";
587 587
         print '<td colspan="2">';
588 588
         print '<table class="nobordernopadding">';
589
-        print "<tr><td><label for=\"lt1\">" . $langs->transcountry("LocalTax1IsUsedDesc", $mysoc->country_code) . "</label></td></tr>";
589
+        print "<tr><td><label for=\"lt1\">".$langs->transcountry("LocalTax1IsUsedDesc", $mysoc->country_code)."</label></td></tr>";
590 590
         $example = $langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code);
591
-        print ($example != "LocalTax1IsUsedExample" ? "<tr><td><i>" . $langs->trans("Example") . ': ' . $langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code) . "</i></td></tr>\n" : "");
591
+        print ($example != "LocalTax1IsUsedExample" ? "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code)."</i></td></tr>\n" : "");
592 592
         if (!isOnlyOneLocalTax(1)) {
593
-            print '<tr><td align="left"><label for="lt1">' . $langs->trans("LTRate") . '</label>: ';
593
+            print '<tr><td align="left"><label for="lt1">'.$langs->trans("LTRate").'</label>: ';
594 594
             $formcompany->select_localtax(1, $conf->global->MAIN_INFO_VALUE_LOCALTAX1, "lt1");
595 595
             print '</td></tr>';
596 596
         }
597 597
 
598
-        $opcions = array($langs->trans("CalcLocaltax1") . ' ' . $langs->trans("CalcLocaltax1Desc"), $langs->trans("CalcLocaltax2") . ' - ' . $langs->trans("CalcLocaltax2Desc"), $langs->trans("CalcLocaltax3") . ' - ' . $langs->trans("CalcLocaltax3Desc"));
598
+        $opcions = array($langs->trans("CalcLocaltax1").' '.$langs->trans("CalcLocaltax1Desc"), $langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc"), $langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc"));
599 599
 
600
-        print '<tr><td align="left"></label for="clt1">' . $langs->trans("CalcLocaltax") . '</label>: ';
600
+        print '<tr><td align="left"></label for="clt1">'.$langs->trans("CalcLocaltax").'</label>: ';
601 601
         print $form->selectarray("clt1", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC1);
602 602
         print '</td></tr>';
603 603
         print "</table>";
604 604
         print "</td></tr>\n";
605 605
 
606 606
 
607
-        print "<tr class=\"oddeven\"><td width=\"140\"><input type=\"radio\" name=\"optionlocaltax1\" id=\"nolt1\" value=\"localtax1off\"" . ((empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off") ? " checked" : "") . "> " . $langs->transcountry("LocalTax1IsNotUsed", $mysoc->country_code) . "</td>";
607
+        print "<tr class=\"oddeven\"><td width=\"140\"><input type=\"radio\" name=\"optionlocaltax1\" id=\"nolt1\" value=\"localtax1off\"".((empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off") ? " checked" : "")."> ".$langs->transcountry("LocalTax1IsNotUsed", $mysoc->country_code)."</td>";
608 608
         print '<td colspan="2">';
609 609
         print "<table>";
610
-        print "<tr><td><label for=\"nolt1\">" . $langs->transcountry("LocalTax1IsNotUsedDesc", $mysoc->country_code) . "</label></td></tr>";
610
+        print "<tr><td><label for=\"nolt1\">".$langs->transcountry("LocalTax1IsNotUsedDesc", $mysoc->country_code)."</label></td></tr>";
611 611
         $example = $langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code);
612
-        print ($example != "LocalTax1IsNotUsedExample" ? "<tr><td><i>" . $langs->trans("Example") . ': ' . $langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code) . "</i></td></tr>\n" : "");
612
+        print ($example != "LocalTax1IsNotUsedExample" ? "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code)."</i></td></tr>\n" : "");
613 613
         print "</table>";
614 614
         print "</td></tr>\n";
615 615
         print "</table>";
@@ -619,36 +619,36 @@  discard block
 block discarded – undo
619 619
         print '<br>';
620 620
         print '<table class="noborder" width="100%">';
621 621
         print '<tr class="liste_titre">';
622
-        print '<td>' . $langs->transcountry("LocalTax2Management", $mysoc->country_code) . '</td><td>' . $langs->trans("Description") . '</td>';
622
+        print '<td>'.$langs->transcountry("LocalTax2Management", $mysoc->country_code).'</td><td>'.$langs->trans("Description").'</td>';
623 623
         print '<td align="right">&nbsp;</td>';
624 624
         print "</tr>\n";
625 625
 
626 626
 
627 627
         // Note: When option is not set, it must not appears as set on on, because there is no default value for this option
628
-        print "<tr class=\"oddeven\"><td width=\"140\"><input type=\"radio\" name=\"optionlocaltax2\" id=\"lt2\" value=\"localtax2on\"" . (($conf->global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on") ? " checked" : "") . "> " . $langs->transcountry("LocalTax2IsUsed", $mysoc->country_code) . "</td>";
628
+        print "<tr class=\"oddeven\"><td width=\"140\"><input type=\"radio\" name=\"optionlocaltax2\" id=\"lt2\" value=\"localtax2on\"".(($conf->global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on") ? " checked" : "")."> ".$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code)."</td>";
629 629
         print '<td colspan="2">';
630 630
         print '<table class="nobordernopadding">';
631
-        print "<tr><td><label for=\"lt2\">" . $langs->transcountry("LocalTax2IsUsedDesc", $mysoc->country_code) . "</label></td></tr>";
631
+        print "<tr><td><label for=\"lt2\">".$langs->transcountry("LocalTax2IsUsedDesc", $mysoc->country_code)."</label></td></tr>";
632 632
         $example = $langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code);
633
-        print ($example != "LocalTax2IsUsedExample" ? "<tr><td><i>" . $langs->trans("Example") . ': ' . $langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code) . "</i></td></tr>\n" : "");
633
+        print ($example != "LocalTax2IsUsedExample" ? "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code)."</i></td></tr>\n" : "");
634 634
         if (!isOnlyOneLocalTax(2)) {
635
-            print '<tr><td align="left"><label for="lt2">' . $langs->trans("LTRate") . '</label>: ';
635
+            print '<tr><td align="left"><label for="lt2">'.$langs->trans("LTRate").'</label>: ';
636 636
             $formcompany->select_localtax(2, $conf->global->MAIN_INFO_VALUE_LOCALTAX2, "lt2");
637 637
             print '</td></tr>';
638 638
         }
639
-        print '<tr><td align="left"><label for="clt2">' . $langs->trans("CalcLocaltax") . '</label>: ';
639
+        print '<tr><td align="left"><label for="clt2">'.$langs->trans("CalcLocaltax").'</label>: ';
640 640
         print $form->selectarray("clt2", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC2);
641 641
         print '</td></tr>';
642 642
         print "</table>";
643 643
         print "</td></tr>\n";
644 644
 
645 645
 
646
-        print "<tr class=\"oddeven\"><td width=\"140\"><input type=\"radio\" name=\"optionlocaltax2\" id=\"nolt2\" value=\"localtax2off\"" . ((empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off") ? " checked" : "") . "> " . $langs->transcountry("LocalTax2IsNotUsed", $mysoc->country_code) . "</td>";
646
+        print "<tr class=\"oddeven\"><td width=\"140\"><input type=\"radio\" name=\"optionlocaltax2\" id=\"nolt2\" value=\"localtax2off\"".((empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off") ? " checked" : "")."> ".$langs->transcountry("LocalTax2IsNotUsed", $mysoc->country_code)."</td>";
647 647
         print '<td colspan="2">';
648 648
         print "<table>";
649
-        print "<tr><td><label for=\"nolt2\">" . $langs->transcountry("LocalTax2IsNotUsedDesc", $mysoc->country_code) . "</label></td></tr>";
649
+        print "<tr><td><label for=\"nolt2\">".$langs->transcountry("LocalTax2IsNotUsedDesc", $mysoc->country_code)."</label></td></tr>";
650 650
         $example = $langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code);
651
-        print ($example != "LocalTax2IsNotUsedExample" ? "<tr><td><i>" . $langs->trans("Example") . ': ' . $langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code) . "</i></td></tr>\n" : "");
651
+        print ($example != "LocalTax2IsNotUsedExample" ? "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code)."</i></td></tr>\n" : "");
652 652
         print "</table>";
653 653
         print "</td></tr>\n";
654 654
         print "</table>";
@@ -656,9 +656,9 @@  discard block
 block discarded – undo
656 656
 
657 657
 
658 658
     print '<br><div class="center">';
659
-    print '<input type="submit" class="button" name="save" value="' . $langs->trans("Save") . '">';
659
+    print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
660 660
     print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
661
-    print '<input type="submit" class="button" name="cancel" value="' . $langs->trans("Cancel") . '">';
661
+    print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
662 662
     print '</div>';
663 663
     print '<br>';
664 664
 
@@ -675,42 +675,42 @@  discard block
 block discarded – undo
675 675
 
676 676
     print '<div class="div-table-responsive-no-min">';
677 677
     print '<table class="noborder" width="100%">';
678
-    print '<tr class="liste_titre"><td>' . $langs->trans("CompanyInfo") . '</td><td>' . $langs->trans("Value") . '</td></tr>';
678
+    print '<tr class="liste_titre"><td>'.$langs->trans("CompanyInfo").'</td><td>'.$langs->trans("Value").'</td></tr>';
679 679
 
680 680
 
681
-    print '<tr class="oddeven"><td class="titlefield wordbreak">' . $langs->trans("CompanyName") . '</td><td>';
681
+    print '<tr class="oddeven"><td class="titlefield wordbreak">'.$langs->trans("CompanyName").'</td><td>';
682 682
     if (!empty($conf->global->MAIN_INFO_SOCIETE_NOM)) {
683 683
         print $conf->global->MAIN_INFO_SOCIETE_NOM;
684 684
     } else {
685
-        print img_warning() . ' <font class="error">' . $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyName")) . '</font>';
685
+        print img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyName")).'</font>';
686 686
     }
687 687
     print '</td></tr>';
688 688
 
689 689
 
690
-    print '<tr class="oddeven"><td>' . $langs->trans("CompanyAddress") . '</td><td>' . nl2br(empty($conf->global->MAIN_INFO_SOCIETE_ADDRESS) ? '' : $conf->global->MAIN_INFO_SOCIETE_ADDRESS) . '</td></tr>';
690
+    print '<tr class="oddeven"><td>'.$langs->trans("CompanyAddress").'</td><td>'.nl2br(empty($conf->global->MAIN_INFO_SOCIETE_ADDRESS) ? '' : $conf->global->MAIN_INFO_SOCIETE_ADDRESS).'</td></tr>';
691 691
 
692 692
 
693
-    print '<tr class="oddeven"><td>' . $langs->trans("CompanyZip") . '</td><td>' . (empty($conf->global->MAIN_INFO_SOCIETE_ZIP) ? '' : $conf->global->MAIN_INFO_SOCIETE_ZIP) . '</td></tr>';
693
+    print '<tr class="oddeven"><td>'.$langs->trans("CompanyZip").'</td><td>'.(empty($conf->global->MAIN_INFO_SOCIETE_ZIP) ? '' : $conf->global->MAIN_INFO_SOCIETE_ZIP).'</td></tr>';
694 694
 
695 695
 
696
-    print '<tr class="oddeven"><td>' . $langs->trans("CompanyTown") . '</td><td>' . (empty($conf->global->MAIN_INFO_SOCIETE_TOWN) ? '' : $conf->global->MAIN_INFO_SOCIETE_TOWN) . '</td></tr>';
696
+    print '<tr class="oddeven"><td>'.$langs->trans("CompanyTown").'</td><td>'.(empty($conf->global->MAIN_INFO_SOCIETE_TOWN) ? '' : $conf->global->MAIN_INFO_SOCIETE_TOWN).'</td></tr>';
697 697
 
698 698
 
699
-    print '<tr class="oddeven"><td>' . $langs->trans("CompanyCountry") . '</td><td>';
699
+    print '<tr class="oddeven"><td>'.$langs->trans("CompanyCountry").'</td><td>';
700 700
     if ($mysoc->country_code) {
701 701
         $img = picto_from_langcode($mysoc->country_code);
702
-        print $img ? $img . ' ' : '';
702
+        print $img ? $img.' ' : '';
703 703
         print getCountry($mysoc->country_code, 1);
704 704
     } else {
705
-        print img_warning() . ' <font class="error">' . $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")) . '</font>';
705
+        print img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
706 706
     }
707 707
     print '</td></tr>';
708 708
 
709 709
 
710 710
     if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT)) {
711
-        print '<tr class="oddeven"><td>' . $langs->trans("Region-State") . '</td><td>';
711
+        print '<tr class="oddeven"><td>'.$langs->trans("Region-State").'</td><td>';
712 712
     } else {
713
-        print '<tr class="oddeven"><td>' . $langs->trans("State") . '</td><td>';
713
+        print '<tr class="oddeven"><td>'.$langs->trans("State").'</td><td>';
714 714
     } if (!empty($conf->global->MAIN_INFO_SOCIETE_STATE)) {
715 715
         print getState($conf->global->MAIN_INFO_SOCIETE_STATE, $conf->global->MAIN_SHOW_STATE_CODE, 0, $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT);
716 716
     } else {
@@ -719,25 +719,25 @@  discard block
 block discarded – undo
719 719
     print '</td></tr>';
720 720
 
721 721
 
722
-    print '<tr class="oddeven"><td>' . $langs->trans("CompanyCurrency") . '</td><td>';
722
+    print '<tr class="oddeven"><td>'.$langs->trans("CompanyCurrency").'</td><td>';
723 723
     print currency_name($conf->currency, 1);
724
-    print ' (' . $conf->currency;
725
-    print ($conf->currency != $langs->getCurrencySymbol($conf->currency) ? ' - ' . $langs->getCurrencySymbol($conf->currency) : '');
724
+    print ' ('.$conf->currency;
725
+    print ($conf->currency != $langs->getCurrencySymbol($conf->currency) ? ' - '.$langs->getCurrencySymbol($conf->currency) : '');
726 726
     print ')';
727 727
     print '</td></tr>';
728 728
 
729 729
 
730
-    print '<tr class="oddeven"><td>' . $langs->trans("Phone") . '</td><td>' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_TEL, $mysoc->country_code) . '</td></tr>';
730
+    print '<tr class="oddeven"><td>'.$langs->trans("Phone").'</td><td>'.dol_print_phone($conf->global->MAIN_INFO_SOCIETE_TEL, $mysoc->country_code).'</td></tr>';
731 731
 
732 732
 
733
-    print '<tr class="oddeven"><td>' . $langs->trans("Fax") . '</td><td>' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_FAX, $mysoc->country_code) . '</td></tr>';
733
+    print '<tr class="oddeven"><td>'.$langs->trans("Fax").'</td><td>'.dol_print_phone($conf->global->MAIN_INFO_SOCIETE_FAX, $mysoc->country_code).'</td></tr>';
734 734
 
735 735
 
736
-    print '<tr class="oddeven"><td>' . $langs->trans("Mail") . '</td><td>' . dol_print_email($conf->global->MAIN_INFO_SOCIETE_MAIL, 0, 0, 0, 80) . '</td></tr>';
736
+    print '<tr class="oddeven"><td>'.$langs->trans("Mail").'</td><td>'.dol_print_email($conf->global->MAIN_INFO_SOCIETE_MAIL, 0, 0, 0, 80).'</td></tr>';
737 737
 
738 738
     // Web
739 739
 
740
-    print '<tr class="oddeven"><td>' . $langs->trans("Web") . '</td><td>';
740
+    print '<tr class="oddeven"><td>'.$langs->trans("Web").'</td><td>';
741 741
     $arrayofurl = preg_split('/\s/', $conf->global->MAIN_INFO_SOCIETE_WEB);
742 742
     foreach ($arrayofurl as $urltoshow) {
743 743
         if ($urltoshow)
@@ -748,35 +748,35 @@  discard block
 block discarded – undo
748 748
     // Barcode
749 749
     if (!empty($conf->barcode->enabled)) {
750 750
 
751
-        print '<tr class="oddeven"><td>' . $langs->trans("Gencod") . '</td><td>' . $conf->global->MAIN_INFO_SOCIETE_GENCOD . '</td></tr>';
751
+        print '<tr class="oddeven"><td>'.$langs->trans("Gencod").'</td><td>'.$conf->global->MAIN_INFO_SOCIETE_GENCOD.'</td></tr>';
752 752
     }
753 753
 
754 754
     // Logo
755 755
 
756
-    print '<tr class="oddeven"><td>' . $langs->trans("Logo") . '</td><td>';
756
+    print '<tr class="oddeven"><td>'.$langs->trans("Logo").'</td><td>';
757 757
 
758 758
     $tagtd = 'tagtd ';
759 759
     if ($conf->browser->layout == 'phone')
760 760
         $tagtd = '';
761
-    print '<div class="tagtable centpercent"><div class="tagtr inline-block centpercent valignmiddle"><div class="' . $tagtd . 'inline-block valignmiddle left">';
761
+    print '<div class="tagtable centpercent"><div class="tagtr inline-block centpercent valignmiddle"><div class="'.$tagtd.'inline-block valignmiddle left">';
762 762
     print $mysoc->logo;
763
-    print '</div><div class="' . $tagtd . 'inline-block valignmiddle left">';
763
+    print '</div><div class="'.$tagtd.'inline-block valignmiddle left">';
764 764
 
765 765
     // It offers the generation of the thumbnail if it does not exist
766
-    if (!is_file($conf->mycompany->dir_output . '/logos/thumbs/' . $mysoc->logo_mini) && preg_match('/(\.jpg|\.jpeg|\.png)$/i', $mysoc->logo)) {
767
-        print '<a class="img_logo" href="' . $_SERVER["PHP_SELF"] . '?action=addthumb&amp;file=' . urlencode($mysoc->logo) . '">' . img_picto($langs->trans('GenerateThumb'), 'refresh') . '</a>&nbsp;&nbsp;';
768
-    } else if ($mysoc->logo_mini && is_file($conf->mycompany->dir_output . '/logos/thumbs/' . $mysoc->logo_mini)) {
769
-        print '<img class="img_logo" src="' . DOL_URL_ROOT . '/viewimage.php?modulepart=mycompany&amp;file=' . urlencode('logos/thumbs/' . $mysoc->logo_mini) . '">';
766
+    if (!is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini) && preg_match('/(\.jpg|\.jpeg|\.png)$/i', $mysoc->logo)) {
767
+        print '<a class="img_logo" href="'.$_SERVER["PHP_SELF"].'?action=addthumb&amp;file='.urlencode($mysoc->logo).'">'.img_picto($langs->trans('GenerateThumb'), 'refresh').'</a>&nbsp;&nbsp;';
768
+    } else if ($mysoc->logo_mini && is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) {
769
+        print '<img class="img_logo" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;file='.urlencode('logos/thumbs/'.$mysoc->logo_mini).'">';
770 770
     } else {
771 771
         // print '<img class="img_logo" src="' . DOL_URL_ROOT . '/public/theme/common/nophoto.png">';
772
-        print '<img class="img_logo" src="' . DOL_BASE_URI . '/public/theme/common/nophoto.png">';
772
+        print '<img class="img_logo" src="'.DOL_BASE_URI.'/public/theme/common/nophoto.png">';
773 773
     }
774 774
     print '</div></div></div>';
775 775
 
776 776
     print '</td></tr>';
777 777
 
778 778
 
779
-    print '<tr class="oddeven"><td class="tdtop">' . $langs->trans("Note") . '</td><td>' . (!empty($conf->global->MAIN_INFO_SOCIETE_NOTE) ? nl2br($conf->global->MAIN_INFO_SOCIETE_NOTE) : '') . '</td></tr>';
779
+    print '<tr class="oddeven"><td class="tdtop">'.$langs->trans("Note").'</td><td>'.(!empty($conf->global->MAIN_INFO_SOCIETE_NOTE) ? nl2br($conf->global->MAIN_INFO_SOCIETE_NOTE) : '').'</td></tr>';
780 780
 
781 781
     print '</table>';
782 782
     print "</div>";
@@ -786,42 +786,42 @@  discard block
 block discarded – undo
786 786
 
787 787
     // IDs of the company (country-specific)
788 788
     print '<form name="formsoc" method="post">';
789
-    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
789
+    print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
790 790
 
791 791
     print '<div class="div-table-responsive-no-min">';
792 792
     print '<table class="noborder" width="100%">';
793
-    print '<tr class="liste_titre"><td class="titlefield wordbreak">' . $langs->trans("CompanyIds") . '</td><td>' . $langs->trans("Value") . '</td></tr>';
793
+    print '<tr class="liste_titre"><td class="titlefield wordbreak">'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
794 794
 
795 795
     // Managing Director(s)
796 796
 
797
-    print '<tr class="oddeven"><td>' . $langs->trans("ManagingDirectors") . '</td><td>';
798
-    print $conf->global->MAIN_INFO_SOCIETE_MANAGERS . '</td></tr>';
797
+    print '<tr class="oddeven"><td>'.$langs->trans("ManagingDirectors").'</td><td>';
798
+    print $conf->global->MAIN_INFO_SOCIETE_MANAGERS.'</td></tr>';
799 799
 
800 800
     // GDPR Contact
801 801
 
802
-    print '<tr class="oddeven"><td>' . $langs->trans("GDPRContact") . '</td><td>';
803
-    print $conf->global->MAIN_INFO_GDPR . '</td></tr>';
802
+    print '<tr class="oddeven"><td>'.$langs->trans("GDPRContact").'</td><td>';
803
+    print $conf->global->MAIN_INFO_GDPR.'</td></tr>';
804 804
 
805 805
     // Capital
806 806
 
807
-    print '<tr class="oddeven"><td>' . $langs->trans("Capital") . '</td><td>';
808
-    print $conf->global->MAIN_INFO_CAPITAL . '</td></tr>';
807
+    print '<tr class="oddeven"><td>'.$langs->trans("Capital").'</td><td>';
808
+    print $conf->global->MAIN_INFO_CAPITAL.'</td></tr>';
809 809
 
810 810
     // Juridical Status
811 811
 
812
-    print '<tr class="oddeven"><td>' . $langs->trans("JuridicalStatus") . '</td><td>';
812
+    print '<tr class="oddeven"><td>'.$langs->trans("JuridicalStatus").'</td><td>';
813 813
     print getFormeJuridiqueLabel($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE);
814 814
     print '</td></tr>';
815 815
 
816 816
     // ProfId1
817 817
     if ($langs->transcountry("ProfId1", $mysoc->country_code) != '-') {
818 818
 
819
-        print '<tr class="oddeven"><td>' . $langs->transcountry("ProfId1", $mysoc->country_code) . '</td><td>';
819
+        print '<tr class="oddeven"><td>'.$langs->transcountry("ProfId1", $mysoc->country_code).'</td><td>';
820 820
         if (!empty($conf->global->MAIN_INFO_SIREN)) {
821 821
             print $conf->global->MAIN_INFO_SIREN;
822 822
             $s = $mysoc->id_prof_url(1, $mysoc);
823 823
             if ($s)
824
-                print ' - ' . $s;
824
+                print ' - '.$s;
825 825
         } else {
826 826
             print '&nbsp;';
827 827
         }
@@ -831,12 +831,12 @@  discard block
 block discarded – undo
831 831
     // ProfId2
832 832
     if ($langs->transcountry("ProfId2", $mysoc->country_code) != '-') {
833 833
 
834
-        print '<tr class="oddeven"><td>' . $langs->transcountry("ProfId2", $mysoc->country_code) . '</td><td>';
834
+        print '<tr class="oddeven"><td>'.$langs->transcountry("ProfId2", $mysoc->country_code).'</td><td>';
835 835
         if (!empty($conf->global->MAIN_INFO_SIRET)) {
836 836
             print $conf->global->MAIN_INFO_SIRET;
837 837
             $s = $mysoc->id_prof_url(2, $mysoc);
838 838
             if ($s)
839
-                print ' - ' . $s;
839
+                print ' - '.$s;
840 840
         } else {
841 841
             print '&nbsp;';
842 842
         }
@@ -846,12 +846,12 @@  discard block
 block discarded – undo
846 846
     // ProfId3
847 847
     if ($langs->transcountry("ProfId3", $mysoc->country_code) != '-') {
848 848
 
849
-        print '<tr class="oddeven"><td>' . $langs->transcountry("ProfId3", $mysoc->country_code) . '</td><td>';
849
+        print '<tr class="oddeven"><td>'.$langs->transcountry("ProfId3", $mysoc->country_code).'</td><td>';
850 850
         if (!empty($conf->global->MAIN_INFO_APE)) {
851 851
             print $conf->global->MAIN_INFO_APE;
852 852
             $s = $mysoc->id_prof_url(3, $mysoc);
853 853
             if ($s)
854
-                print ' - ' . $s;
854
+                print ' - '.$s;
855 855
         } else {
856 856
             print '&nbsp;';
857 857
         }
@@ -861,12 +861,12 @@  discard block
 block discarded – undo
861 861
     // ProfId4
862 862
     if ($langs->transcountry("ProfId4", $mysoc->country_code) != '-') {
863 863
 
864
-        print '<tr class="oddeven"><td>' . $langs->transcountry("ProfId4", $mysoc->country_code) . '</td><td>';
864
+        print '<tr class="oddeven"><td>'.$langs->transcountry("ProfId4", $mysoc->country_code).'</td><td>';
865 865
         if (!empty($conf->global->MAIN_INFO_RCS)) {
866 866
             print $conf->global->MAIN_INFO_RCS;
867 867
             $s = $mysoc->id_prof_url(4, $mysoc);
868 868
             if ($s)
869
-                print ' - ' . $s;
869
+                print ' - '.$s;
870 870
         } else {
871 871
             print '&nbsp;';
872 872
         }
@@ -876,12 +876,12 @@  discard block
 block discarded – undo
876 876
     // ProfId5
877 877
     if ($langs->transcountry("ProfId5", $mysoc->country_code) != '-') {
878 878
 
879
-        print '<tr class="oddeven"><td>' . $langs->transcountry("ProfId5", $mysoc->country_code) . '</td><td>';
879
+        print '<tr class="oddeven"><td>'.$langs->transcountry("ProfId5", $mysoc->country_code).'</td><td>';
880 880
         if (!empty($conf->global->MAIN_INFO_PROFID5)) {
881 881
             print $conf->global->MAIN_INFO_PROFID5;
882 882
             $s = $mysoc->id_prof_url(5, $mysoc);
883 883
             if ($s)
884
-                print ' - ' . $s;
884
+                print ' - '.$s;
885 885
         } else {
886 886
             print '&nbsp;';
887 887
         }
@@ -891,12 +891,12 @@  discard block
 block discarded – undo
891 891
     // ProfId6
892 892
     if ($langs->transcountry("ProfId6", $mysoc->country_code) != '-') {
893 893
 
894
-        print '<tr class="oddeven"><td>' . $langs->transcountry("ProfId6", $mysoc->country_code) . '</td><td>';
894
+        print '<tr class="oddeven"><td>'.$langs->transcountry("ProfId6", $mysoc->country_code).'</td><td>';
895 895
         if (!empty($conf->global->MAIN_INFO_PROFID6)) {
896 896
             print $conf->global->MAIN_INFO_PROFID6;
897 897
             $s = $mysoc->id_prof_url(6, $mysoc);
898 898
             if ($s)
899
-                print ' - ' . $s;
899
+                print ' - '.$s;
900 900
         } else {
901 901
             print '&nbsp;';
902 902
         }
@@ -905,26 +905,26 @@  discard block
 block discarded – undo
905 905
 
906 906
     // VAT
907 907
 
908
-    print '<tr class="oddeven"><td>' . $langs->trans("VATIntra") . '</td>';
908
+    print '<tr class="oddeven"><td>'.$langs->trans("VATIntra").'</td>';
909 909
     print '<td>';
910 910
     if (!empty($conf->global->MAIN_INFO_TVAINTRA)) {
911 911
         $s = '';
912 912
         $s .= $conf->global->MAIN_INFO_TVAINTRA;
913
-        $s .= '<input type="hidden" name="tva_intra" size="12" maxlength="20" value="' . $conf->global->MAIN_INFO_TVAINTRA . '">';
913
+        $s .= '<input type="hidden" name="tva_intra" size="12" maxlength="20" value="'.$conf->global->MAIN_INFO_TVAINTRA.'">';
914 914
         if (empty($conf->global->MAIN_DISABLEVATCHECK) && $mysoc->isInEEC()) {
915 915
             $s .= ' - ';
916 916
             if (!empty($conf->use_javascript_ajax)) {
917 917
                 print "\n";
918 918
                 print '<script language="JavaScript" type="text/javascript">';
919 919
                 print "function CheckVAT(a) {\n";
920
-                print "newpopup('" . DOL_URL_ROOT . "/societe/checkvat/checkVatPopup.php?vatNumber='+a,'" . dol_escape_js($langs->trans("VATIntraCheckableOnEUSite")) . "',500,285);\n";
920
+                print "newpopup('".DOL_URL_ROOT."/societe/checkvat/checkVatPopup.php?vatNumber='+a,'".dol_escape_js($langs->trans("VATIntraCheckableOnEUSite"))."',500,285);\n";
921 921
                 print "}\n";
922 922
                 print '</script>';
923 923
                 print "\n";
924
-                $s .= '<a href="#" onClick="javascript: CheckVAT(document.formsoc.tva_intra.value);">' . $langs->trans("VATIntraCheck") . '</a>';
924
+                $s .= '<a href="#" onClick="javascript: CheckVAT(document.formsoc.tva_intra.value);">'.$langs->trans("VATIntraCheck").'</a>';
925 925
                 $s = $form->textwithpicto($s, $langs->trans("VATIntraCheckDesc", $langs->trans("VATIntraCheck")), 1);
926 926
             } else {
927
-                $s .= '<a href="' . $langs->transcountry("VATIntraCheckURL", $soc->id_country) . '" target="_blank">' . img_picto($langs->trans("VATIntraCheckableOnEUSite"), 'help') . '</a>';
927
+                $s .= '<a href="'.$langs->transcountry("VATIntraCheckURL", $soc->id_country).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"), 'help').'</a>';
928 928
             }
929 929
         }
930 930
         print $s;
@@ -935,7 +935,7 @@  discard block
 block discarded – undo
935 935
     print '</tr>';
936 936
 
937 937
 
938
-    print '<tr class="oddeven"><td class="tdtop">' . $langs->trans("CompanyObject") . '</td><td>' . (!empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? nl2br($conf->global->MAIN_INFO_SOCIETE_OBJECT) : '') . '</td></tr>';
938
+    print '<tr class="oddeven"><td class="tdtop">'.$langs->trans("CompanyObject").'</td><td>'.(!empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? nl2br($conf->global->MAIN_INFO_SOCIETE_OBJECT) : '').'</td></tr>';
939 939
 
940 940
     print '</table>';
941 941
     print "</div>";
@@ -950,13 +950,13 @@  discard block
 block discarded – undo
950 950
     print '<div class="div-table-responsive-no-min">';
951 951
     print '<table class="noborder" width="100%">';
952 952
     print '<tr class="liste_titre">';
953
-    print '<td class="titlefield">' . $langs->trans("FiscalYearInformation") . '</td><td>' . $langs->trans("Value") . '</td>';
953
+    print '<td class="titlefield">'.$langs->trans("FiscalYearInformation").'</td><td>'.$langs->trans("Value").'</td>';
954 954
     print "</tr>\n";
955 955
 
956 956
 
957
-    print '<tr class="oddeven"><td>' . $langs->trans("FiscalMonthStart") . '</td><td>';
957
+    print '<tr class="oddeven"><td>'.$langs->trans("FiscalMonthStart").'</td><td>';
958 958
     $monthstart = (!empty($conf->global->SOCIETE_FISCAL_MONTH_START)) ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1;
959
-    print dol_print_date(dol_mktime(12, 0, 0, $monthstart, 1, 2000, 1), '%B', 'gm') . '</td></tr>';
959
+    print dol_print_date(dol_mktime(12, 0, 0, $monthstart, 1, 2000, 1), '%B', 'gm').'</td></tr>';
960 960
 
961 961
     print "</table>";
962 962
     print "</div>";
@@ -968,29 +968,29 @@  discard block
 block discarded – undo
968 968
     print '<div class="div-table-responsive-no-min">';
969 969
     print '<table class="noborder" width="100%">';
970 970
     print '<tr class="liste_titre">';
971
-    print '<td class="titlefield">' . $langs->trans("VATManagement") . '</td><td>' . $langs->trans("Description") . '</td>';
971
+    print '<td class="titlefield">'.$langs->trans("VATManagement").'</td><td>'.$langs->trans("Description").'</td>';
972 972
     print '<td align="right">&nbsp;</td>';
973 973
     print "</tr>\n";
974 974
 
975 975
 
976 976
     print '<tr class="oddeven"><td class="titlefield">';
977
-    print "<input class=\"oddeven\" type=\"radio\" name=\"optiontva\" id=\"use_vat\" disabled value=\"1\"" . (empty($conf->global->FACTURE_TVAOPTION) ? "" : " checked") . "> " . $langs->trans("VATIsUsed") . "</td>";
977
+    print "<input class=\"oddeven\" type=\"radio\" name=\"optiontva\" id=\"use_vat\" disabled value=\"1\"".(empty($conf->global->FACTURE_TVAOPTION) ? "" : " checked")."> ".$langs->trans("VATIsUsed")."</td>";
978 978
     print '<td colspan="2">';
979 979
     print "<table>";
980
-    print "<tr><td><label for=\"use_vat\">" . $langs->trans("VATIsUsedDesc") . "</label></td></tr>";
980
+    print "<tr><td><label for=\"use_vat\">".$langs->trans("VATIsUsedDesc")."</label></td></tr>";
981 981
     if ($mysoc->country_code == 'FR')
982
-        print "<tr><td><i>" . $langs->trans("Example") . ': ' . $langs->trans("VATIsUsedExampleFR") . "</i></td></tr>\n";
982
+        print "<tr><td><i>".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."</i></td></tr>\n";
983 983
     print "</table>";
984 984
     print "</td></tr>\n";
985 985
 
986 986
 
987 987
     print '<tr class="oddeven"><td class="titlefield">';
988
-    print "<input class=\"oddeven\" type=\"radio\" name=\"optiontva\" id=\"no_vat\" disabled value=\"0\"" . (empty($conf->global->FACTURE_TVAOPTION) ? " checked" : "") . "> " . $langs->trans("VATIsNotUsed") . "</td>";
988
+    print "<input class=\"oddeven\" type=\"radio\" name=\"optiontva\" id=\"no_vat\" disabled value=\"0\"".(empty($conf->global->FACTURE_TVAOPTION) ? " checked" : "")."> ".$langs->trans("VATIsNotUsed")."</td>";
989 989
     print '<td colspan="2">';
990 990
     print "<table>";
991
-    print "<tr><td><label=\"no_vat\">" . $langs->trans("VATIsNotUsedDesc") . "</label></td></tr>";
991
+    print "<tr><td><label=\"no_vat\">".$langs->trans("VATIsNotUsedDesc")."</label></td></tr>";
992 992
     if ($mysoc->country_code == 'FR')
993
-        print "<tr><td><i>" . $langs->trans("Example") . ': ' . $langs->trans("VATIsNotUsedExampleFR") . "</i></td></tr>\n";
993
+        print "<tr><td><i>".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."</i></td></tr>\n";
994 994
     print "</table>";
995 995
     print "</td></tr>\n";
996 996
 
@@ -1006,28 +1006,28 @@  discard block
 block discarded – undo
1006 1006
         print '<div class="div-table-responsive-no-min">';
1007 1007
         print '<table class="noborder" width="100%">';
1008 1008
         print '<tr class="liste_titre">';
1009
-        print '<td class="titlefield">' . $langs->transcountry("LocalTax1Management", $mysoc->country_code) . '</td><td>' . $langs->trans("Description") . '</td>';
1009
+        print '<td class="titlefield">'.$langs->transcountry("LocalTax1Management", $mysoc->country_code).'</td><td>'.$langs->trans("Description").'</td>';
1010 1010
         print '<td align="right">&nbsp;</td>';
1011 1011
         print "</tr>\n";
1012 1012
 
1013 1013
 
1014 1014
         print "<tr class=\"oddeven\"><td>";
1015
-        print "<input class=\"oddeven\" type=\"radio\" name=\"optionlocaltax1\" id=\"lt1\" disabled value=\"localtax1on\"" . (($conf->global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on") ? " checked" : "") . "> " . $langs->transcountry("LocalTax1IsUsed", $mysoc->country_code) . "</td>";
1015
+        print "<input class=\"oddeven\" type=\"radio\" name=\"optionlocaltax1\" id=\"lt1\" disabled value=\"localtax1on\"".(($conf->global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on") ? " checked" : "")."> ".$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code)."</td>";
1016 1016
         print '<td colspan="2">';
1017 1017
         print "<table>";
1018
-        print "<tr><td></label for=\"lt1\">" . $langs->transcountry("LocalTax1IsUsedDesc", $mysoc->country_code) . "</label></td></tr>";
1018
+        print "<tr><td></label for=\"lt1\">".$langs->transcountry("LocalTax1IsUsedDesc", $mysoc->country_code)."</label></td></tr>";
1019 1019
         $example = $langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code);
1020
-        print ($example != "LocalTax1IsUsedExample" ? "<tr><td><i>" . $langs->trans("Example") . ': ' . $langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code) . "</i></td></tr>\n" : "");
1020
+        print ($example != "LocalTax1IsUsedExample" ? "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code)."</i></td></tr>\n" : "");
1021 1021
         if ($conf->global->MAIN_INFO_VALUE_LOCALTAX1 != 0) {
1022
-            print '<tr><td>' . $langs->trans("LTRate") . ': ' . $conf->global->MAIN_INFO_VALUE_LOCALTAX1 . '</td></tr>';
1022
+            print '<tr><td>'.$langs->trans("LTRate").': '.$conf->global->MAIN_INFO_VALUE_LOCALTAX1.'</td></tr>';
1023 1023
         }
1024
-        print '<tr><td align="left">' . $langs->trans("CalcLocaltax") . ': ';
1024
+        print '<tr><td align="left">'.$langs->trans("CalcLocaltax").': ';
1025 1025
         if ($conf->global->MAIN_INFO_LOCALTAX_CALC1 == 0) {
1026
-            print $langs->trans("CalcLocaltax1") . ' - ' . $langs->trans("CalcLocaltax1Desc");
1026
+            print $langs->trans("CalcLocaltax1").' - '.$langs->trans("CalcLocaltax1Desc");
1027 1027
         } else if ($conf->global->MAIN_INFO_LOCALTAX_CALC1 == 1) {
1028
-            print $langs->trans("CalcLocaltax2") . ' - ' . $langs->trans("CalcLocaltax2Desc");
1028
+            print $langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc");
1029 1029
         } else if ($conf->global->MAIN_INFO_LOCALTAX_CALC1 == 2) {
1030
-            print $langs->trans("CalcLocaltax3") . ' - ' . $langs->trans("CalcLocaltax3Desc");
1030
+            print $langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc");
1031 1031
         }
1032 1032
 
1033 1033
         print '</td></tr>';
@@ -1036,12 +1036,12 @@  discard block
 block discarded – undo
1036 1036
 
1037 1037
 
1038 1038
         print '<tr class="oddeven"><td>';
1039
-        print "<input class=\"oddeven\" type=\"radio\" name=\"optionlocaltax1\" id=\"nolt1\" disabled value=\"localtax1off\"" . ((empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off") ? " checked" : "") . "> " . $langs->transcountry("LocalTax1IsNotUsed", $mysoc->country_code) . "</td>";
1039
+        print "<input class=\"oddeven\" type=\"radio\" name=\"optionlocaltax1\" id=\"nolt1\" disabled value=\"localtax1off\"".((empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off") ? " checked" : "")."> ".$langs->transcountry("LocalTax1IsNotUsed", $mysoc->country_code)."</td>";
1040 1040
         print '<td colspan="2">';
1041 1041
         print "<table>";
1042
-        print "<tr><td><label for=\"no_lt1\">" . $langs->transcountry("LocalTax1IsNotUsedDesc", $mysoc->country_code) . "</label></td></tr>";
1042
+        print "<tr><td><label for=\"no_lt1\">".$langs->transcountry("LocalTax1IsNotUsedDesc", $mysoc->country_code)."</label></td></tr>";
1043 1043
         $example = $langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code);
1044
-        print ($example != "LocalTax1IsNotUsedExample" ? "<tr><td><i>" . $langs->trans("Example") . ': ' . $langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code) . "</i></td></tr>\n" : "");
1044
+        print ($example != "LocalTax1IsNotUsedExample" ? "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code)."</i></td></tr>\n" : "");
1045 1045
         print "</table>";
1046 1046
         print "</td></tr>\n";
1047 1047
 
@@ -1054,28 +1054,28 @@  discard block
 block discarded – undo
1054 1054
         print '<div class="div-table-responsive-no-min">';
1055 1055
         print '<table class="noborder" width="100%">';
1056 1056
         print '<tr class="liste_titre">';
1057
-        print '<td class="titlefield">' . $langs->transcountry("LocalTax2Management", $mysoc->country_code) . '</td><td>' . $langs->trans("Description") . '</td>';
1057
+        print '<td class="titlefield">'.$langs->transcountry("LocalTax2Management", $mysoc->country_code).'</td><td>'.$langs->trans("Description").'</td>';
1058 1058
         print '<td align="right">&nbsp;</td>';
1059 1059
         print "</tr>\n";
1060 1060
 
1061 1061
 
1062 1062
         print "<tr class=\"oddeven\"><td>";
1063
-        print "<input class=\"oddeven\" type=\"radio\" name=\"optionlocaltax2\" id=\"lt2\" disabled value=\"localtax2on\"" . (($conf->global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on") ? " checked" : "") . "> " . $langs->transcountry("LocalTax2IsUsed", $mysoc->country_code) . "</td>";
1063
+        print "<input class=\"oddeven\" type=\"radio\" name=\"optionlocaltax2\" id=\"lt2\" disabled value=\"localtax2on\"".(($conf->global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on") ? " checked" : "")."> ".$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code)."</td>";
1064 1064
         print '<td colspan="2">';
1065 1065
         print "<table>";
1066
-        print "<tr><td><label for=\"lt2\">" . $langs->transcountry("LocalTax2IsUsedDesc", $mysoc->country_code) . "</label></td></tr>";
1066
+        print "<tr><td><label for=\"lt2\">".$langs->transcountry("LocalTax2IsUsedDesc", $mysoc->country_code)."</label></td></tr>";
1067 1067
         $example = $langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code);
1068
-        print ($example != "LocalTax2IsUsedExample" ? "<tr><td><i>" . $langs->trans("Example") . ': ' . $langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code) . "</i></td></tr>\n" : "");
1068
+        print ($example != "LocalTax2IsUsedExample" ? "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code)."</i></td></tr>\n" : "");
1069 1069
         if ($conf->global->MAIN_INFO_VALUE_LOCALTAX2 != 0) {
1070
-            print '<tr><td>' . $langs->trans("LTRate") . ': ' . $conf->global->MAIN_INFO_VALUE_LOCALTAX2 . '</td></tr>';
1070
+            print '<tr><td>'.$langs->trans("LTRate").': '.$conf->global->MAIN_INFO_VALUE_LOCALTAX2.'</td></tr>';
1071 1071
         }
1072
-        print '<tr><td align="left">' . $langs->trans("CalcLocaltax") . ': ';
1072
+        print '<tr><td align="left">'.$langs->trans("CalcLocaltax").': ';
1073 1073
         if ($conf->global->MAIN_INFO_LOCALTAX_CALC2 == 0) {
1074
-            print $langs->trans("CalcLocaltax1") . ' - ' . $langs->trans("CalcLocaltax1Desc");
1074
+            print $langs->trans("CalcLocaltax1").' - '.$langs->trans("CalcLocaltax1Desc");
1075 1075
         } else if ($conf->global->MAIN_INFO_LOCALTAX_CALC2 == 1) {
1076
-            print $langs->trans("CalcLocaltax2") . ' - ' . $langs->trans("CalcLocaltax2Desc");
1076
+            print $langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc");
1077 1077
         } else if ($conf->global->MAIN_INFO_LOCALTAX_CALC2 == 2) {
1078
-            print $langs->trans("CalcLocaltax3") . ' - ' . $langs->trans("CalcLocaltax3Desc");
1078
+            print $langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc");
1079 1079
         }
1080 1080
 
1081 1081
         print '</td></tr>';
@@ -1083,12 +1083,12 @@  discard block
 block discarded – undo
1083 1083
         print "</td></tr>\n";
1084 1084
 
1085 1085
 
1086
-        print "<tr class=\"oddeven\"><td width=\"160\"><input class=\"oddeven\" type=\"radio\" name=\"optionlocaltax2\" id=\"nolt2\" disabled value=\"localtax2off\"" . ((empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off") ? " checked" : "") . "> " . $langs->transcountry("LocalTax2IsNotUsed", $mysoc->country_code) . "</td>";
1086
+        print "<tr class=\"oddeven\"><td width=\"160\"><input class=\"oddeven\" type=\"radio\" name=\"optionlocaltax2\" id=\"nolt2\" disabled value=\"localtax2off\"".((empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off") ? " checked" : "")."> ".$langs->transcountry("LocalTax2IsNotUsed", $mysoc->country_code)."</td>";
1087 1087
         print '<td colspan="2">';
1088 1088
         print "<table>";
1089
-        print "<tr><td><label for=\"nolt2\">" . $langs->transcountry("LocalTax2IsNotUsedDesc", $mysoc->country_code) . "</label></td></tr>";
1089
+        print "<tr><td><label for=\"nolt2\">".$langs->transcountry("LocalTax2IsNotUsedDesc", $mysoc->country_code)."</label></td></tr>";
1090 1090
         $example = $langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code);
1091
-        print ($example != "LocalTax2IsNotUsedExample" ? "<tr><td><i>" . $langs->trans("Example") . ': ' . $langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code) . "</i></td></tr>\n" : "");
1091
+        print ($example != "LocalTax2IsNotUsedExample" ? "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code)."</i></td></tr>\n" : "");
1092 1092
         print "</table>";
1093 1093
         print "</td></tr>\n";
1094 1094
 
@@ -1100,7 +1100,7 @@  discard block
 block discarded – undo
1100 1100
     // Actions buttons
1101 1101
     print '<div class="tabsAction">';
1102 1102
     // print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=edit">' . $langs->trans("Modify") . '</a></div>';
1103
-    print '<div class="inline-block divButAction"><a class="butAction" href="' . BASE_URI . '?controller=admin&method=company&action=edit">' . $langs->trans("Modify") . '</a></div>';
1103
+    print '<div class="inline-block divButAction"><a class="butAction" href="'.BASE_URI.'?controller=admin&method=company&action=edit">'.$langs->trans("Modify").'</a></div>';
1104 1104
     print '</div>';
1105 1105
 }
1106 1106
 
Please login to merge, or discard this patch.
dolibarr/htdocs/admin/accountant.php 1 patch
Spacing   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -23,51 +23,51 @@  discard block
 block discarded – undo
23 23
  *	\brief      Setup page to configure accountant / auditor
24 24
  */
25 25
 
26
-require DOL_BASE_PATH . '/main.inc.php';
26
+require DOL_BASE_PATH.'/main.inc.php';
27 27
 
28
-require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
28
+require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
29 29
 require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
30 30
 require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
31 31
 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
32 32
 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
33 33
 
34 34
 $action = GETPOST('action', 'aZ09', 3);
35
-$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'adminaccoutant';   // To manage different context of search
35
+$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'adminaccoutant'; // To manage different context of search
36 36
 
37 37
 // Load translation files required by the page
38 38
 $langs->loadLangs(array('admin', 'companies'));
39 39
 
40
-if (! $user->admin) accessforbidden();
40
+if (!$user->admin) accessforbidden();
41 41
 
42
-$error=0;
42
+$error = 0;
43 43
 
44 44
 
45 45
 /*
46 46
  * Actions
47 47
  */
48 48
 
49
-$parameters=array();
50
-$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action);    // Note that $action and $object may have been modified by some hooks
49
+$parameters = array();
50
+$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
51 51
 if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
52 52
 
53
-if ( ($action == 'update' && ! GETPOST("cancel",'alpha'))
54
-|| ($action == 'updateedit') )
53
+if (($action == 'update' && !GETPOST("cancel", 'alpha'))
54
+|| ($action == 'updateedit'))
55 55
 {
56
-	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_NAME", GETPOST("nom",'nohtml'),'chaine',0,'',$conf->entity);
57
-	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_ADDRESS", GETPOST("address",'nohtml'),'chaine',0,'',$conf->entity);
58
-	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_TOWN", GETPOST("town",'nohtml'),'chaine',0,'',$conf->entity);
59
-	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_ZIP", GETPOST("zipcode",'alpha'),'chaine',0,'',$conf->entity);
60
-	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_STATE", GETPOST("state_id",'alpha'),'chaine',0,'',$conf->entity);
61
-	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_REGION", GETPOST("region_code",'alpha'),'chaine',0,'',$conf->entity);
62
-	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_COUNTRY", GETPOST('country_id','int'), 'chaine',0,'',$conf->entity);
63
-	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_PHONE", GETPOST("tel",'alpha'),'chaine',0,'',$conf->entity);
64
-	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_FAX", GETPOST("fax",'alpha'),'chaine',0,'',$conf->entity);
65
-	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_MAIL", GETPOST("mail",'alpha'),'chaine',0,'',$conf->entity);
66
-	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_WEB", GETPOST("web",'alpha'),'chaine',0,'',$conf->entity);
67
-	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_CODE", GETPOST("code",'nohtml'),'chaine',0,'',$conf->entity);
68
-	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_NOTE", GETPOST("note",'none'),'chaine',0,'',$conf->entity);
69
-
70
-	if ($action != 'updateedit' && ! $error)
56
+	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_NAME", GETPOST("nom", 'nohtml'), 'chaine', 0, '', $conf->entity);
57
+	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_ADDRESS", GETPOST("address", 'nohtml'), 'chaine', 0, '', $conf->entity);
58
+	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_TOWN", GETPOST("town", 'nohtml'), 'chaine', 0, '', $conf->entity);
59
+	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_ZIP", GETPOST("zipcode", 'alpha'), 'chaine', 0, '', $conf->entity);
60
+	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_STATE", GETPOST("state_id", 'alpha'), 'chaine', 0, '', $conf->entity);
61
+	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_REGION", GETPOST("region_code", 'alpha'), 'chaine', 0, '', $conf->entity);
62
+	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_COUNTRY", GETPOST('country_id', 'int'), 'chaine', 0, '', $conf->entity);
63
+	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_PHONE", GETPOST("tel", 'alpha'), 'chaine', 0, '', $conf->entity);
64
+	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_FAX", GETPOST("fax", 'alpha'), 'chaine', 0, '', $conf->entity);
65
+	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_MAIL", GETPOST("mail", 'alpha'), 'chaine', 0, '', $conf->entity);
66
+	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_WEB", GETPOST("web", 'alpha'), 'chaine', 0, '', $conf->entity);
67
+	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_CODE", GETPOST("code", 'nohtml'), 'chaine', 0, '', $conf->entity);
68
+	dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_NOTE", GETPOST("note", 'none'), 'chaine', 0, '', $conf->entity);
69
+
70
+	if ($action != 'updateedit' && !$error)
71 71
 	{
72 72
 		header("Location: ".$_SERVER["PHP_SELF"]);
73 73
 		exit;
@@ -78,20 +78,20 @@  discard block
 block discarded – undo
78 78
  * View
79 79
  */
80 80
 
81
-$help_url='';
82
-llxHeader('',$langs->trans("CompanyFoundation"),$help_url);
81
+$help_url = '';
82
+llxHeader('', $langs->trans("CompanyFoundation"), $help_url);
83 83
 
84
-print load_fiche_titre($langs->trans("CompanyFoundation"),'','title_setup');
84
+print load_fiche_titre($langs->trans("CompanyFoundation"), '', 'title_setup');
85 85
 
86 86
 $head = company_admin_prepare_head();
87 87
 
88 88
 dol_fiche_head($head, 'accountant', $langs->trans("Company"), -1, 'company');
89 89
 
90
-$form=new Form($db);
91
-$formother=new FormOther($db);
92
-$formcompany=new FormCompany($db);
90
+$form = new Form($db);
91
+$formother = new FormOther($db);
92
+$formcompany = new FormCompany($db);
93 93
 
94
-$countrynotdefined='<font class="error">'.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')</font>';
94
+$countrynotdefined = '<font class="error">'.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')</font>';
95 95
 
96 96
 print '<span class="opacitymedium">'.$langs->trans("AccountantDesc")."</span><br>\n";
97 97
 print "<br>\n";
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	print '</script>'."\n";
112 112
 
113 113
 	//print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'" name="form_index">';
114
-    print '<form method="POST" href="' . BASE_URI . '?controller=admin&method=accountant" name="form_index">';
114
+    print '<form method="POST" href="'.BASE_URI.'?controller=admin&method=accountant" name="form_index">';
115 115
     print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
116 116
 	print '<input type="hidden" name="action" value="update">';
117 117
 
@@ -120,23 +120,23 @@  discard block
 block discarded – undo
120 120
 
121 121
 	// Name
122 122
 	print '<tr class="oddeven"><td class="fieldrequired"><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
123
-	print '<input name="nom" id="name" class="minwidth200" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_NAME?$conf->global->MAIN_INFO_ACCOUNTANT_NAME: GETPOST("nom",'nohtml')) . '" autofocus="autofocus"></td></tr>'."\n";
123
+	print '<input name="nom" id="name" class="minwidth200" value="'.($conf->global->MAIN_INFO_ACCOUNTANT_NAME ? $conf->global->MAIN_INFO_ACCOUNTANT_NAME : GETPOST("nom", 'nohtml')).'" autofocus="autofocus"></td></tr>'."\n";
124 124
 
125 125
 	// Address
126 126
 	print '<tr class="oddeven"><td><label for="address">'.$langs->trans("CompanyAddress").'</label></td><td>';
127
-	print '<textarea name="address" id="address" class="quatrevingtpercent" rows="'.ROWS_3.'">'. ($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS?$conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS: GETPOST("address",'nohtml')) . '</textarea></td></tr>'."\n";
127
+	print '<textarea name="address" id="address" class="quatrevingtpercent" rows="'.ROWS_3.'">'.($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS ? $conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS : GETPOST("address", 'nohtml')).'</textarea></td></tr>'."\n";
128 128
 
129 129
 	print '<tr class="oddeven"><td><label for="zipcode">'.$langs->trans("CompanyZip").'</label></td><td>';
130
-	print '<input class="minwidth100" name="zipcode" id="zipcode" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_ZIP?$conf->global->MAIN_INFO_ACCOUNTANT_ZIP: GETPOST("zipcode",'alpha')) . '"></td></tr>'."\n";
130
+	print '<input class="minwidth100" name="zipcode" id="zipcode" value="'.($conf->global->MAIN_INFO_ACCOUNTANT_ZIP ? $conf->global->MAIN_INFO_ACCOUNTANT_ZIP : GETPOST("zipcode", 'alpha')).'"></td></tr>'."\n";
131 131
 
132 132
 	print '<tr class="oddeven"><td><label for="town">'.$langs->trans("CompanyTown").'</label></td><td>';
133
-	print '<input name="town" class="minwidth100" id="town" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_TOWN?$conf->global->MAIN_INFO_ACCOUNTANT_TOWN: GETPOST("town",'nohtml')) . '"></td></tr>'."\n";
133
+	print '<input name="town" class="minwidth100" id="town" value="'.($conf->global->MAIN_INFO_ACCOUNTANT_TOWN ? $conf->global->MAIN_INFO_ACCOUNTANT_TOWN : GETPOST("town", 'nohtml')).'"></td></tr>'."\n";
134 134
 
135 135
 	// Country
136 136
 	print '<tr class="oddeven"><td class="fieldrequired"><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td class="maxwidthonsmartphone">';
137 137
 	//if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2);    // By default, country of localization
138 138
 	print $form->select_country($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'country_id');
139
-	if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
139
+	if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
140 140
 	print '</td></tr>'."\n";
141 141
 
142 142
 	print '<tr class="oddeven"><td><label for="state_id">'.$langs->trans("State").'</label></td><td class="maxwidthonsmartphone">';
@@ -144,29 +144,29 @@  discard block
 block discarded – undo
144 144
 	print '</td></tr>'."\n";
145 145
 
146 146
 	print '<tr class="oddeven"><td><label for="phone">'.$langs->trans("Phone").'</label></td><td>';
147
-	print '<input name="tel" id="phone" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_PHONE . '"></td></tr>';
147
+	print '<input name="tel" id="phone" value="'.$conf->global->MAIN_INFO_ACCOUNTANT_PHONE.'"></td></tr>';
148 148
 	print '</td></tr>'."\n";
149 149
 
150 150
 	print '<tr class="oddeven"><td><label for="fax">'.$langs->trans("Fax").'</label></td><td>';
151
-	print '<input name="fax" id="fax" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_FAX . '"></td></tr>';
151
+	print '<input name="fax" id="fax" value="'.$conf->global->MAIN_INFO_ACCOUNTANT_FAX.'"></td></tr>';
152 152
 	print '</td></tr>'."\n";
153 153
 
154 154
 	print '<tr class="oddeven"><td><label for="email">'.$langs->trans("EMail").'</label></td><td>';
155
-	print '<input name="mail" id="email" class="minwidth200" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_MAIL . '"></td></tr>';
155
+	print '<input name="mail" id="email" class="minwidth200" value="'.$conf->global->MAIN_INFO_ACCOUNTANT_MAIL.'"></td></tr>';
156 156
 	print '</td></tr>'."\n";
157 157
 
158 158
 	// Web
159 159
 	print '<tr class="oddeven"><td><label for="web">'.$langs->trans("Web").'</label></td><td>';
160
-	print '<input name="web" id="web" class="minwidth300" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_WEB . '"></td></tr>';
160
+	print '<input name="web" id="web" class="minwidth300" value="'.$conf->global->MAIN_INFO_ACCOUNTANT_WEB.'"></td></tr>';
161 161
 	print '</td></tr>'."\n";
162 162
 
163 163
 	// Code
164 164
 	print '<tr class="oddeven"><td><label for="code">'.$langs->trans("AccountantFileNumber").'</label></td><td>';
165
-	print '<input name="code" id="code" class="minwidth100" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_CODE?$conf->global->MAIN_INFO_ACCOUNTANT_CODE: GETPOST("code",'nohtml')) . '" autofocus="autofocus"></td></tr>'."\n";
165
+	print '<input name="code" id="code" class="minwidth100" value="'.($conf->global->MAIN_INFO_ACCOUNTANT_CODE ? $conf->global->MAIN_INFO_ACCOUNTANT_CODE : GETPOST("code", 'nohtml')).'" autofocus="autofocus"></td></tr>'."\n";
166 166
 
167 167
 	// Note
168 168
 	print '<tr class="oddeven"><td class="tdtop"><label for="note">'.$langs->trans("Note").'</label></td><td>';
169
-	print '<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.'">'.(GETPOST('note','none') ? GETPOST('note','none') : $conf->global->MAIN_INFO_ACCOUNTANT_NOTE).'</textarea></td></tr>';
169
+	print '<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.'">'.(GETPOST('note', 'none') ? GETPOST('note', 'none') : $conf->global->MAIN_INFO_ACCOUNTANT_NOTE).'</textarea></td></tr>';
170 170
 	print '</td></tr>';
171 171
 
172 172
 	print '</table>';
@@ -201,43 +201,43 @@  discard block
 block discarded – undo
201 201
 	print '</td></tr>';
202 202
 
203 203
 
204
-	print '<tr class="oddeven"><td>'.$langs->trans("CompanyAddress").'</td><td>' . nl2br(empty($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS)?'':$conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS) . '</td></tr>';
204
+	print '<tr class="oddeven"><td>'.$langs->trans("CompanyAddress").'</td><td>'.nl2br(empty($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS) ? '' : $conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS).'</td></tr>';
205 205
 
206 206
 
207
-	print '<tr class="oddeven"><td>'.$langs->trans("CompanyZip").'</td><td>' . (empty($conf->global->MAIN_INFO_ACCOUNTANT_ZIP)?'':$conf->global->MAIN_INFO_ACCOUNTANT_ZIP) . '</td></tr>';
207
+	print '<tr class="oddeven"><td>'.$langs->trans("CompanyZip").'</td><td>'.(empty($conf->global->MAIN_INFO_ACCOUNTANT_ZIP) ? '' : $conf->global->MAIN_INFO_ACCOUNTANT_ZIP).'</td></tr>';
208 208
 
209 209
 
210
-	print '<tr class="oddeven"><td>'.$langs->trans("CompanyTown").'</td><td>' . (empty($conf->global->MAIN_INFO_ACCOUNTANT_TOWN)?'':$conf->global->MAIN_INFO_ACCOUNTANT_TOWN) . '</td></tr>';
210
+	print '<tr class="oddeven"><td>'.$langs->trans("CompanyTown").'</td><td>'.(empty($conf->global->MAIN_INFO_ACCOUNTANT_TOWN) ? '' : $conf->global->MAIN_INFO_ACCOUNTANT_TOWN).'</td></tr>';
211 211
 
212 212
 
213 213
 	print '<tr class="oddeven"><td>'.$langs->trans("CompanyCountry").'</td><td>';
214
-	if (! empty($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY))
214
+	if (!empty($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY))
215 215
 	{
216 216
 		$code = getCountry($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 2);
217
-		$img=picto_from_langcode($code);
218
-		print $img?$img.' ':'';
219
-		print getCountry($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY,1);
217
+		$img = picto_from_langcode($code);
218
+		print $img ? $img.' ' : '';
219
+		print getCountry($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 1);
220 220
 	}
221 221
 	print '</td></tr>';
222 222
 
223 223
 
224
-	if (! empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT)) print '<tr class="oddeven"><td>'.$langs->trans("Region-State").'</td><td>';
224
+	if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT)) print '<tr class="oddeven"><td>'.$langs->trans("Region-State").'</td><td>';
225 225
 	else print '<tr class="oddeven"><td>'.$langs->trans("State").'</td><td>';
226
-	if (! empty($conf->global->MAIN_INFO_ACCOUNTANT_STATE)) print getState($conf->global->MAIN_INFO_ACCOUNTANT_STATE,$conf->global->MAIN_SHOW_STATE_CODE,0,$conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT);
226
+	if (!empty($conf->global->MAIN_INFO_ACCOUNTANT_STATE)) print getState($conf->global->MAIN_INFO_ACCOUNTANT_STATE, $conf->global->MAIN_SHOW_STATE_CODE, 0, $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT);
227 227
 	else print '&nbsp;';
228 228
 	print '</td></tr>';
229 229
 
230
-	print '<tr class="oddeven"><td>'.$langs->trans("Phone").'</td><td>' . dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_PHONE,$mysoc->country_code) . '</td></tr>';
230
+	print '<tr class="oddeven"><td>'.$langs->trans("Phone").'</td><td>'.dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_PHONE, $mysoc->country_code).'</td></tr>';
231 231
 
232
-	print '<tr class="oddeven"><td>'.$langs->trans("Fax").'</td><td>' . dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_FAX,$mysoc->country_code) . '</td></tr>';
232
+	print '<tr class="oddeven"><td>'.$langs->trans("Fax").'</td><td>'.dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_FAX, $mysoc->country_code).'</td></tr>';
233 233
 
234
-	print '<tr class="oddeven"><td>'.$langs->trans("Mail").'</td><td>' . dol_print_email($conf->global->MAIN_INFO_ACCOUNTANT_MAIL,0,0,0,80) . '</td></tr>';
234
+	print '<tr class="oddeven"><td>'.$langs->trans("Mail").'</td><td>'.dol_print_email($conf->global->MAIN_INFO_ACCOUNTANT_MAIL, 0, 0, 0, 80).'</td></tr>';
235 235
 
236
-	print '<tr class="oddeven"><td>'.$langs->trans("Web").'</td><td>' . dol_print_url($conf->global->MAIN_INFO_ACCOUNTANT_WEB,'_blank',80) . '</td></tr>';
236
+	print '<tr class="oddeven"><td>'.$langs->trans("Web").'</td><td>'.dol_print_url($conf->global->MAIN_INFO_ACCOUNTANT_WEB, '_blank', 80).'</td></tr>';
237 237
 
238
-	print '<tr class="oddeven"><td>'.$langs->trans("AccountantFileNumber").'</td><td>' . $conf->global->MAIN_INFO_ACCOUNTANT_CODE . '</td></tr>';
238
+	print '<tr class="oddeven"><td>'.$langs->trans("AccountantFileNumber").'</td><td>'.$conf->global->MAIN_INFO_ACCOUNTANT_CODE.'</td></tr>';
239 239
 
240
-	print '<tr class="oddeven"><td class="tdtop">'.$langs->trans("Note").'</td><td>' . (! empty($conf->global->MAIN_INFO_ACCOUNTANT_NOTE) ? nl2br($conf->global->MAIN_INFO_ACCOUNTANT_NOTE) : '') . '</td></tr>';
240
+	print '<tr class="oddeven"><td class="tdtop">'.$langs->trans("Note").'</td><td>'.(!empty($conf->global->MAIN_INFO_ACCOUNTANT_NOTE) ? nl2br($conf->global->MAIN_INFO_ACCOUNTANT_NOTE) : '').'</td></tr>';
241 241
 
242 242
 	print '</table>';
243 243
 	print "</div>";
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 	// Actions buttons
248 248
 	print '<div class="tabsAction">';
249 249
 	// print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a></div>';
250
-    print '<div class="inline-block divButAction"><a class="butAction" href="' . BASE_URI . '?controller=admin&method=accountant&action=edit">' . $langs->trans("Modify") . '</a></div>';
250
+    print '<div class="inline-block divButAction"><a class="butAction" href="'.BASE_URI.'?controller=admin&method=accountant&action=edit">'.$langs->trans("Modify").'</a></div>';
251 251
     print '</div>';
252 252
 }
253 253
 
Please login to merge, or discard this patch.
dolibarr/htdocs/core/menus/standard/empty.php 1 patch
Spacing   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
      * @var DoliDB Database handler.
31 31
      */
32 32
     public $db;
33
-    var $type_user = 0;     // Put 0 for internal users, 1 for external users
34
-    var $atarget = "";                 // To store default target to use onto links
33
+    var $type_user = 0; // Put 0 for internal users, 1 for external users
34
+    var $atarget = ""; // To store default target to use onto links
35 35
     var $menu;
36 36
     var $menu_array_after;
37 37
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
         $id = 'mainmenu';
72 72
 
73
-        require_once DOL_DOCUMENT_ROOT . '/core/class/menu.class.php';
73
+        require_once DOL_DOCUMENT_ROOT.'/core/class/menu.class.php';
74 74
         $this->menu = new Menu();
75 75
 
76 76
         $res = 'ErrorBadParameterForMode';
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
                 if (empty($noout))
114 114
                     print_start_menu_entry_empty($menuval['idsel'], $menuval['classname'], $menuval['enabled']);
115 115
                 if (empty($noout))
116
-                    print_text_menu_entry_empty($menuval['titre'], $menuval['enabled'], ($menuval['url'] != '#' ? DOL_URL_ROOT : '') . $menuval['url'], $menuval['id'], $menuval['idsel'], $menuval['classname'], ($menuval['target'] ? $menuval['target'] : $atarget));
116
+                    print_text_menu_entry_empty($menuval['titre'], $menuval['enabled'], ($menuval['url'] != '#' ? DOL_URL_ROOT : '').$menuval['url'], $menuval['id'], $menuval['idsel'], $menuval['classname'], ($menuval['target'] ? $menuval['target'] : $atarget));
117 117
                 if (empty($noout))
118 118
                     print_end_menu_entry_empty($menuval['enabled']);
119 119
             }
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
             // $this->menu->liste is top menu
146 146
             //var_dump($this->menu->liste);exit;
147 147
             $lastlevel = array();
148
-            print '<!-- Generate menu list from menu handler ' . $this->name . ' -->' . "\n";
148
+            print '<!-- Generate menu list from menu handler '.$this->name.' -->'."\n";
149 149
             foreach ($this->menu->liste as $key => $val) {  // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu'
150 150
                 print '<ul class="ulmenu" data-inset="true">';
151 151
                 print '<li class="lilevel0">';
@@ -165,14 +165,14 @@  discard block
 block discarded – undo
165 165
                         print '<span class="fa fa-home fa-fw paddingright" aria-hidden="true"></span>';
166 166
 
167 167
                     print $val['titre'];
168
-                    print '</a>' . "\n";
168
+                    print '</a>'."\n";
169 169
 
170 170
                     // Search submenu fot this mainmenu entry
171 171
                     $tmpmainmenu = $val['mainmenu'];
172 172
                     $tmpleftmenu = 'all';
173 173
                     $submenu = new Menu();
174 174
 
175
-                    $langs->load("admin");  // Load translation file admin.lang
175
+                    $langs->load("admin"); // Load translation file admin.lang
176 176
                     $submenu->add("/admin/index.php?leftmenu=setup", $langs->trans("Setup"), 0);
177 177
                     $submenu->add("/admin/company.php", $langs->trans("MenuCompanySetup"), 1);
178 178
                     $submenu->add("/admin/modules.php", $langs->trans("Modules"), 1);
@@ -199,20 +199,20 @@  discard block
 block discarded – undo
199 199
                     $canonnexturl = preg_replace('/\?.*$/', '', $nexturl);
200 200
                     //var_dump($canonrelurl);
201 201
                     //var_dump($canonnexturl);
202
-                    print '<ul>' . "\n";
202
+                    print '<ul>'."\n";
203 203
                     if (($canonrelurl != $canonnexturl && !in_array($val['mainmenu'], array('tools'))) || (strpos($canonrelurl, '/product/index.php') !== false || strpos($canonrelurl, '/compta/bank/list.php') !== false)) {
204 204
                         // We add sub entry
205
-                        print str_pad('', 1) . '<li class="lilevel1 ui-btn-icon-right ui-btn">';  // ui-btn to highlight on clic
206
-                        print '<a href="' . $relurl . '">';
207
-                        if ($langs->trans(ucfirst($val['mainmenu']) . "Dashboard") == ucfirst($val['mainmenu']) . "Dashboard") {  // No translation
205
+                        print str_pad('', 1).'<li class="lilevel1 ui-btn-icon-right ui-btn">'; // ui-btn to highlight on clic
206
+                        print '<a href="'.$relurl.'">';
207
+                        if ($langs->trans(ucfirst($val['mainmenu'])."Dashboard") == ucfirst($val['mainmenu'])."Dashboard") {  // No translation
208 208
                             if (in_array($val['mainmenu'], array('cashdesk', 'websites')))
209 209
                                 print $langs->trans("Access");
210 210
                             else
211 211
                                 print $langs->trans("Dashboard");
212 212
                         } else
213
-                            print $langs->trans(ucfirst($val['mainmenu']) . "Dashboard");
213
+                            print $langs->trans(ucfirst($val['mainmenu'])."Dashboard");
214 214
                         print '</a>';
215
-                        print '</li>' . "\n";
215
+                        print '</li>'."\n";
216 216
                     }
217 217
 
218 218
                     if ($val['level'] == 0) {
@@ -258,13 +258,13 @@  discard block
 block discarded – undo
258 258
                             }
259 259
 
260 260
                             print str_pad('', $val2['level'] + 1);
261
-                            print '<li class="lilevel' . ($val2['level'] + 1);
261
+                            print '<li class="lilevel'.($val2['level'] + 1);
262 262
                             if ($val2['level'] == 0)
263
-                                print ' ui-btn-icon-right ui-btn';  // ui-btn to highlight on clic
264
-                            print $disabled . '">';  // ui-btn to highlight on clic
263
+                                print ' ui-btn-icon-right ui-btn'; // ui-btn to highlight on clic
264
+                            print $disabled.'">'; // ui-btn to highlight on clic
265 265
                             if ($relurl2) {
266 266
                                 if ($val2['enabled']) { // Allowed
267
-                                    print '<a href="' . $relurl2 . '"';
267
+                                    print '<a href="'.$relurl2.'"';
268 268
                                     //print ' data-ajax="false"';
269 269
                                     print '>';
270 270
                                     $lastlevel2[$val2['level']] = 'enabled';
@@ -288,17 +288,17 @@  discard block
 block discarded – undo
288 288
                                 else
289 289
                                     print '</a>';
290 290
                             }
291
-                            print '</li>' . "\n";
291
+                            print '</li>'."\n";
292 292
                         }
293 293
                     }
294 294
                     //var_dump($submenu);
295 295
                     print '</ul>';
296 296
                 }
297 297
                 if ($val['enabled'] == 2) {
298
-                    print '<font class="vsmenudisabled">' . $val['titre'] . '</font>';
298
+                    print '<font class="vsmenudisabled">'.$val['titre'].'</font>';
299 299
                 }
300 300
                 print '</li>';
301
-                print '</ul>' . "\n";
301
+                print '</ul>'."\n";
302 302
             }
303 303
         }
304 304
 
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
             // Put here left menu entries
307 307
             // ***** START *****
308 308
 
309
-            $langs->load("admin");  // Load translation file admin.lang
309
+            $langs->load("admin"); // Load translation file admin.lang
310 310
 
311 311
             /*
312 312
               $this->menu->add("/admin/index.php?leftmenu=setup", $langs->trans("Setup"),0);
@@ -328,23 +328,23 @@  discard block
 block discarded – undo
328 328
               $this->menu->add("/admin/const.php?mainmenu=home", $langs->trans("OtherSetup"),1);
329 329
              */
330 330
 
331
-            $this->menu->add(BASE_URI . "?controller=admin&method=index&leftmenu=setup", $langs->trans("Setup"), 0);
332
-            $this->menu->add(BASE_URI . "?controller=admin&method=company", $langs->trans("MenuCompanySetup"), 1);
333
-            $this->menu->add(BASE_URI . "?controller=admin&method=modules", $langs->trans("Modules"), 1);
334
-            $this->menu->add(BASE_URI . "?controller=admin&method=menus", $langs->trans("Menus"), 1);
335
-            $this->menu->add(BASE_URI . "?controller=admin&method=ihm", $langs->trans("GUISetup"), 1);
336
-            $this->menu->add(BASE_URI . "?controller=admin&method=translation&mainmenu=home", $langs->trans("Translation"), 1);
337
-            $this->menu->add(BASE_URI . "?controller=admin&method=defaultvalues&mainmenu=home", $langs->trans("DefaultValues"), 1);
338
-
339
-            $this->menu->add(BASE_URI . "?controller=admin&method=boxes", $langs->trans("Boxes"), 1);
340
-            $this->menu->add(BASE_URI . "?controller=admin&method=delais", $langs->trans("Alerts"), 1);
341
-            $this->menu->add(BASE_URI . "?controller=admin&method=proxy&mainmenu=home", $langs->trans("Security"), 1);
342
-            $this->menu->add(BASE_URI . "?controller=admin&method=limits&mainmenu=home", $langs->trans("MenuLimits"), 1);
343
-            $this->menu->add(BASE_URI . "?controller=admin&method=pdf&mainmenu=home", $langs->trans("PDF"), 1);
344
-            $this->menu->add(BASE_URI . "?controller=admin&method=mails&mainmenu=home", $langs->trans("Emails"), 1);
345
-            $this->menu->add(BASE_URI . "?controller=admin&method=sms&mainmenu=home", $langs->trans("SMS"), 1);
346
-            $this->menu->add(BASE_URI . "?controller=admin&method=dict&mainmenu=home", $langs->trans("DictionarySetup"), 1);
347
-            $this->menu->add(BASE_URI . "?controller=admin&method=const&mainmenu=home", $langs->trans("OtherSetup"), 1);
331
+            $this->menu->add(BASE_URI."?controller=admin&method=index&leftmenu=setup", $langs->trans("Setup"), 0);
332
+            $this->menu->add(BASE_URI."?controller=admin&method=company", $langs->trans("MenuCompanySetup"), 1);
333
+            $this->menu->add(BASE_URI."?controller=admin&method=modules", $langs->trans("Modules"), 1);
334
+            $this->menu->add(BASE_URI."?controller=admin&method=menus", $langs->trans("Menus"), 1);
335
+            $this->menu->add(BASE_URI."?controller=admin&method=ihm", $langs->trans("GUISetup"), 1);
336
+            $this->menu->add(BASE_URI."?controller=admin&method=translation&mainmenu=home", $langs->trans("Translation"), 1);
337
+            $this->menu->add(BASE_URI."?controller=admin&method=defaultvalues&mainmenu=home", $langs->trans("DefaultValues"), 1);
338
+
339
+            $this->menu->add(BASE_URI."?controller=admin&method=boxes", $langs->trans("Boxes"), 1);
340
+            $this->menu->add(BASE_URI."?controller=admin&method=delais", $langs->trans("Alerts"), 1);
341
+            $this->menu->add(BASE_URI."?controller=admin&method=proxy&mainmenu=home", $langs->trans("Security"), 1);
342
+            $this->menu->add(BASE_URI."?controller=admin&method=limits&mainmenu=home", $langs->trans("MenuLimits"), 1);
343
+            $this->menu->add(BASE_URI."?controller=admin&method=pdf&mainmenu=home", $langs->trans("PDF"), 1);
344
+            $this->menu->add(BASE_URI."?controller=admin&method=mails&mainmenu=home", $langs->trans("Emails"), 1);
345
+            $this->menu->add(BASE_URI."?controller=admin&method=sms&mainmenu=home", $langs->trans("SMS"), 1);
346
+            $this->menu->add(BASE_URI."?controller=admin&method=dict&mainmenu=home", $langs->trans("DictionarySetup"), 1);
347
+            $this->menu->add(BASE_URI."?controller=admin&method=const&mainmenu=home", $langs->trans("OtherSetup"), 1);
348 348
 
349 349
             // ***** END *****
350 350
             // do not change code after this
@@ -364,12 +364,12 @@  discard block
 block discarded – undo
364 364
                             if (empty($menu_array[$j]['level']))
365 365
                                 $lastopened = false;
366 366
                         }
367
-                        $alt = 0;   // For menu manager "empty", we force to not have blockvmenufirst defined
367
+                        $alt = 0; // For menu manager "empty", we force to not have blockvmenufirst defined
368 368
                         $lastopened = 1; // For menu manager "empty", we force to not have blockvmenulast defined
369 369
                         if (($alt % 2 == 0)) {
370
-                            print '<div class="blockvmenub lockvmenuimpair blockvmenuunique' . ($lastopened ? ' blockvmenulast' : '') . ($alt == 1 ? ' blockvmenufirst' : '') . '">' . "\n";
370
+                            print '<div class="blockvmenub lockvmenuimpair blockvmenuunique'.($lastopened ? ' blockvmenulast' : '').($alt == 1 ? ' blockvmenufirst' : '').'">'."\n";
371 371
                         } else {
372
-                            print '<div class="blockvmenu blockvmenupair blockvmenuunique' . ($lastopened ? ' blockvmenulast' : '') . ($alt == 1 ? ' blockvmenufirst' : '') . '">' . "\n";
372
+                            print '<div class="blockvmenu blockvmenupair blockvmenuunique'.($lastopened ? ' blockvmenulast' : '').($alt == 1 ? ' blockvmenufirst' : '').'">'."\n";
373 373
                         }
374 374
                     }
375 375
 
@@ -384,44 +384,44 @@  discard block
 block discarded – undo
384 384
 
385 385
                     if ($this->menu->liste[$i]['level'] == 0) {
386 386
                         if ($this->menu->liste[$i]['enabled']) {
387
-                            print '<div class="menu_titre">' . $tabstring . '<a class="vmenu" href="' . dol_buildpath($this->menu->liste[$i]['url'], 1) . '"' . ($this->menu->liste[$i]['target'] ? ' target="' . $this->menu->liste[$i]['target'] . '"' : '') . '>' . $this->menu->liste[$i]['titre'] . '</a></div>' . "\n";
387
+                            print '<div class="menu_titre">'.$tabstring.'<a class="vmenu" href="'.dol_buildpath($this->menu->liste[$i]['url'], 1).'"'.($this->menu->liste[$i]['target'] ? ' target="'.$this->menu->liste[$i]['target'].'"' : '').'>'.$this->menu->liste[$i]['titre'].'</a></div>'."\n";
388 388
                         } else {
389
-                            print '<div class="menu_titre">' . $tabstring . '<font class="vmenudisabled">' . $this->menu->liste[$i]['titre'] . '</font></div>' . "\n";
389
+                            print '<div class="menu_titre">'.$tabstring.'<font class="vmenudisabled">'.$this->menu->liste[$i]['titre'].'</font></div>'."\n";
390 390
                         }
391
-                        print '<div class="menu_top"></div>' . "\n";
391
+                        print '<div class="menu_top"></div>'."\n";
392 392
                     }
393 393
 
394 394
                     if ($this->menu->liste[$i]['level'] > 0) {
395 395
                         $cssmenu = '';
396 396
                         if ($this->menu->liste[$i]['url'])
397
-                            $cssmenu = ' menu_contenu' . dol_string_nospecial(preg_replace('/\.php.*$/', '', $this->menu->liste[$i]['url']));
397
+                            $cssmenu = ' menu_contenu'.dol_string_nospecial(preg_replace('/\.php.*$/', '', $this->menu->liste[$i]['url']));
398 398
 
399
-                        print '<div class="menu_contenu' . $cssmenu . '">';
399
+                        print '<div class="menu_contenu'.$cssmenu.'">';
400 400
 
401 401
                         if ($this->menu->liste[$i]['enabled']) {
402 402
                             print $tabstring;
403 403
                             if ($this->menu->liste[$i]['url'])
404
-                                print '<a class="vsmenu" href="' . dol_buildpath($this->menu->liste[$i]['url'], 1) . '"' . ($this->menu->liste[$i]['target'] ? ' target="' . $this->menu->liste[$i]['target'] . '"' : '') . '>';
404
+                                print '<a class="vsmenu" href="'.dol_buildpath($this->menu->liste[$i]['url'], 1).'"'.($this->menu->liste[$i]['target'] ? ' target="'.$this->menu->liste[$i]['target'].'"' : '').'>';
405 405
                             else
406 406
                                 print '<span class="vsmenu">';
407 407
                             if ($this->menu->liste[$i]['url'])
408
-                                print $this->menu->liste[$i]['titre'] . '</a>';
408
+                                print $this->menu->liste[$i]['titre'].'</a>';
409 409
                             else
410 410
                                 print '</span>';
411 411
                         }
412 412
                         else {
413
-                            print $tabstring . '<font class="vsmenudisabled vsmenudisabledmargin">' . $this->menu->liste[$i]['titre'] . '</font>';
413
+                            print $tabstring.'<font class="vsmenudisabled vsmenudisabledmargin">'.$this->menu->liste[$i]['titre'].'</font>';
414 414
                         }
415 415
 
416 416
                         // If title is not pure text and contains a table, no carriage return added
417 417
                         if (!strstr($this->menu->liste[$i]['titre'], '<table'))
418 418
                             print '<br>';
419
-                        print '</div>' . "\n";
419
+                        print '</div>'."\n";
420 420
                     }
421 421
 
422 422
                     // If next is a new block or end
423 423
                     if (empty($this->menu->liste[$i + 1]['level'])) {
424
-                        print '<div class="menu_end"></div>' . "\n";
424
+                        print '<div class="menu_end"></div>'."\n";
425 425
                         print "</div>\n";
426 426
                     }
427 427
                 }
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
     global $conf;
512 512
 
513 513
     print '<div class="tmenudiv">';
514
-    print '<ul class="tmenu"' . (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '' : ' title="Top menu"') . '>';
514
+    print '<ul class="tmenu"'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '' : ' title="Top menu"').'>';
515 515
 }
516 516
 
517 517
 /**
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
 function print_start_menu_entry_empty($idsel, $classname, $showmode)
526 526
 {
527 527
     if ($showmode) {
528
-        print '<li ' . $classname . ' id="mainmenutd_' . $idsel . '">';
528
+        print '<li '.$classname.' id="mainmenutd_'.$idsel.'">';
529 529
         //print '<div class="tmenuleft tmenusep"></div>';
530 530
         print '<div class="tmenucenter">';
531 531
     }
@@ -548,18 +548,18 @@  discard block
 block discarded – undo
548 548
     global $conf, $langs;
549 549
 
550 550
     if ($showmode == 1) {
551
-        print '<a class="tmenuimage" tabindex="-1" href="' . $url . '"' . ($atarget ? ' target="' . $atarget . '"' : '') . '>';
552
-        print '<div class="' . $id . ' ' . $idsel . '"><span class="' . $id . ' tmenuimage" id="mainmenuspan_' . $idsel . '"></span></div>';
551
+        print '<a class="tmenuimage" tabindex="-1" href="'.$url.'"'.($atarget ? ' target="'.$atarget.'"' : '').'>';
552
+        print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.' tmenuimage" id="mainmenuspan_'.$idsel.'"></span></div>';
553 553
         print '</a>';
554
-        print '<a ' . $classname . ' id="mainmenua_' . $idsel . '" href="' . $url . '"' . ($atarget ? ' target="' . $atarget . '"' : '') . '>';
554
+        print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.$url.'"'.($atarget ? ' target="'.$atarget.'"' : '').'>';
555 555
         print '<span class="mainmenuaspan">';
556 556
         print $text;
557 557
         print '</span>';
558 558
         print '</a>';
559 559
     }
560 560
     if ($showmode == 2) {
561
-        print '<div class="' . $id . ' ' . $idsel . ' tmenudisabled"><span class="' . $id . '" id="mainmenuspan_' . $idsel . '"></span></div>';
562
-        print '<a class="tmenudisabled" id="mainmenua_' . $idsel . '" href="#" title="' . dol_escape_htmltag($langs->trans("NotAllowed")) . '">';
561
+        print '<div class="'.$id.' '.$idsel.' tmenudisabled"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
562
+        print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">';
563 563
     }
564 564
 }
565 565
 
Please login to merge, or discard this patch.
dolibarr/htdocs/core/lib/admin.lib.php 1 patch
Spacing   +161 added lines, -161 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 20
  * or see http://www.gnu.org/
21 21
  */
22
-require_once DOL_BASE_PATH . '/core/lib/functions2.lib.php';
22
+require_once DOL_BASE_PATH.'/core/lib/functions2.lib.php';
23 23
 
24 24
 /**
25 25
  * 	\file			htdocs/core/lib/admin.lib.php
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
     if (isset($versionarray[0]))
39 39
         $string = $versionarray[0];
40 40
     if (isset($versionarray[1]))
41
-        $string .= '.' . $versionarray[1];
41
+        $string .= '.'.$versionarray[1];
42 42
     if (isset($versionarray[2]))
43
-        $string .= '.' . $versionarray[2];
43
+        $string .= '.'.$versionarray[2];
44 44
     return $string;
45 45
 }
46 46
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 {
148 148
     global $db, $conf, $langs, $user;
149 149
 
150
-    dol_syslog("Admin.lib::run_sql run sql file " . $sqlfile . " silent=" . $silent . " entity=" . $entity . " usesavepoint=" . $usesavepoint . " handler=" . $handler . " okerror=" . $okerror, LOG_DEBUG);
150
+    dol_syslog("Admin.lib::run_sql run sql file ".$sqlfile." silent=".$silent." entity=".$entity." usesavepoint=".$usesavepoint." handler=".$handler." okerror=".$okerror, LOG_DEBUG);
151 151
 
152 152
     if (!is_numeric($linelengthlimit)) {
153 153
         dol_syslog("Admin.lib::run_sql param linelengthlimit is not a numeric", LOG_ERR);
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 
179 179
                 // restrict on database type
180 180
                 if (!empty($reg[1])) {
181
-                    if (!preg_match('/' . preg_quote($reg[1]) . '/i', $db->type))
181
+                    if (!preg_match('/'.preg_quote($reg[1]).'/i', $db->type))
182 182
                         $qualified = 0;
183 183
                 }
184 184
 
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
         fclose($fp);
234 234
     }
235 235
     else {
236
-        dol_syslog("Admin.lib::run_sql failed to open file " . $sqlfile, LOG_ERR);
236
+        dol_syslog("Admin.lib::run_sql failed to open file ".$sqlfile, LOG_ERR);
237 237
     }
238 238
 
239 239
     // Loop on each request to see if there is a __+MAX_table__ key
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
             $table = $reg[1];
247 247
             if (!isset($listofmaxrowid[$table])) {
248 248
                 //var_dump($db);
249
-                $sqlgetrowid = 'SELECT MAX(rowid) as max from ' . preg_replace('/^llx_/', MAIN_DB_PREFIX, $table);
249
+                $sqlgetrowid = 'SELECT MAX(rowid) as max from '.preg_replace('/^llx_/', MAIN_DB_PREFIX, $table);
250 250
                 $resql = $db->query($sqlgetrowid);
251 251
                 if ($resql) {
252 252
                     $obj = $db->fetch_object($resql);
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
                     if (!$silent)
259 259
                         print '<tr><td valign="top" colspan="2">';
260 260
                     if (!$silent)
261
-                        print '<div class="error">' . $langs->trans("Failed to get max rowid for " . $table) . "</div></td>";
261
+                        print '<div class="error">'.$langs->trans("Failed to get max rowid for ".$table)."</div></td>";
262 262
                     if (!$silent)
263 263
                         print '</tr>';
264 264
                     $error++;
@@ -266,10 +266,10 @@  discard block
 block discarded – undo
266 266
                 }
267 267
             }
268 268
             // Replace __+MAX_llx_table__ with +999
269
-            $from = '__+MAX_' . $table . '__';
270
-            $to = '+' . $listofmaxrowid[$table];
269
+            $from = '__+MAX_'.$table.'__';
270
+            $to = '+'.$listofmaxrowid[$table];
271 271
             $newsql = str_replace($from, $to, $newsql);
272
-            dol_syslog('Admin.lib::run_sql New Request ' . ($i + 1) . ' (replacing ' . $from . ' to ' . $to . ')', LOG_DEBUG);
272
+            dol_syslog('Admin.lib::run_sql New Request '.($i + 1).' (replacing '.$from.' to '.$to.')', LOG_DEBUG);
273 273
 
274 274
             $arraysql[$i] = $newsql;
275 275
         }
@@ -279,8 +279,8 @@  discard block
 block discarded – undo
279 279
             // 'INSERT INTO llx_accounting_account (__ENTITY__, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1401, 'PCG99-ABREGE','CAPIT', 'XXXXXX', '1', 0, '...', 1);'
280 280
             // with
281 281
             // 'INSERT INTO llx_accounting_account (__ENTITY__, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1401 + 200100000, 'PCG99-ABREGE','CAPIT', 'XXXXXX', '1', 0, '...', 1);'
282
-            $newsql = preg_replace('/VALUES\s*\(__ENTITY__, \s*(\d+)\s*,(\s*\'[^\',]*\'\s*,\s*\'[^\',]*\'\s*,\s*\'[^\',]*\'\s*,\s*\'[^\',]*\'\s*),\s*\'?([^\',]*)\'?/ims', 'VALUES (__ENTITY__, \1 + ' . $offsetforchartofaccount . ', \2, \3 + ' . $offsetforchartofaccount, $newsql);
283
-            $newsql = preg_replace('/([,\s])0 \+ ' . $offsetforchartofaccount . '/ims', '\1 0', $newsql);
282
+            $newsql = preg_replace('/VALUES\s*\(__ENTITY__, \s*(\d+)\s*,(\s*\'[^\',]*\'\s*,\s*\'[^\',]*\'\s*,\s*\'[^\',]*\'\s*,\s*\'[^\',]*\'\s*),\s*\'?([^\',]*)\'?/ims', 'VALUES (__ENTITY__, \1 + '.$offsetforchartofaccount.', \2, \3 + '.$offsetforchartofaccount, $newsql);
283
+            $newsql = preg_replace('/([,\s])0 \+ '.$offsetforchartofaccount.'/ims', '\1 0', $newsql);
284 284
             //var_dump($newsql);
285 285
             $arraysql[$i] = $newsql;
286 286
         }
@@ -297,14 +297,14 @@  discard block
 block discarded – undo
297 297
             }
298 298
 
299 299
             if (!empty($handler))
300
-                $sql = preg_replace('/__HANDLER__/i', "'" . $handler . "'", $sql);
300
+                $sql = preg_replace('/__HANDLER__/i', "'".$handler."'", $sql);
301 301
 
302 302
             $newsql = preg_replace('/__ENTITY__/i', (!empty($entity) ? $entity : $conf->entity), $sql);
303 303
 
304 304
             // Ajout trace sur requete (eventuellement a commenter si beaucoup de requetes)
305 305
             if (!$silent)
306
-                print '<tr><td class="tdtop">' . $langs->trans("Request") . ' ' . ($i + 1) . " sql='" . dol_htmlentities($newsql, ENT_NOQUOTES) . "'</td></tr>\n";
307
-            dol_syslog('Admin.lib::run_sql Request ' . ($i + 1), LOG_DEBUG);
306
+                print '<tr><td class="tdtop">'.$langs->trans("Request").' '.($i + 1)." sql='".dol_htmlentities($newsql, ENT_NOQUOTES)."'</td></tr>\n";
307
+            dol_syslog('Admin.lib::run_sql Request '.($i + 1), LOG_DEBUG);
308 308
             $sqlmodified = 0;
309 309
 
310 310
             // Replace for encrypt data
@@ -338,25 +338,25 @@  discard block
 block discarded – undo
338 338
                     if (!$silent)
339 339
                         print '<tr><td valign="top" colspan="2">';
340 340
                     if (!$silent)
341
-                        print '<div class="error">' . $langs->trans("FileIsNotCorrect") . "</div></td>";
341
+                        print '<div class="error">'.$langs->trans("FileIsNotCorrect")."</div></td>";
342 342
                     if (!$silent)
343 343
                         print '</tr>';
344 344
                     $error++;
345 345
                     break;
346 346
                 }
347
-                $from = '__' . $cursor . '__';
347
+                $from = '__'.$cursor.'__';
348 348
                 $to = $listofinsertedrowid[$cursor];
349 349
                 $newsql = str_replace($from, $to, $newsql);
350 350
                 $sqlmodified++;
351 351
             }
352 352
 
353 353
             if ($sqlmodified)
354
-                dol_syslog('Admin.lib::run_sql New Request ' . ($i + 1), LOG_DEBUG);
354
+                dol_syslog('Admin.lib::run_sql New Request '.($i + 1), LOG_DEBUG);
355 355
 
356 356
             $result = $db->query($newsql, $usesavepoint);
357 357
             if ($result) {
358 358
                 if (!$silent)
359
-                    print '<!-- Result = OK -->' . "\n";
359
+                    print '<!-- Result = OK -->'."\n";
360 360
 
361 361
                 if (preg_replace('/insert into ([^\s]+)/i', $newsql, $reg)) {
362 362
                     $cursorinsert++;
@@ -365,13 +365,13 @@  discard block
 block discarded – undo
365 365
                     $table = preg_replace('/([^a-zA-Z_]+)/i', '', $reg[1]);
366 366
                     $insertedrowid = $db->last_insert_id($table);
367 367
                     $listofinsertedrowid[$cursorinsert] = $insertedrowid;
368
-                    dol_syslog('Admin.lib::run_sql Insert nb ' . $cursorinsert . ', done in table ' . $table . ', rowid is ' . $listofinsertedrowid[$cursorinsert], LOG_DEBUG);
368
+                    dol_syslog('Admin.lib::run_sql Insert nb '.$cursorinsert.', done in table '.$table.', rowid is '.$listofinsertedrowid[$cursorinsert], LOG_DEBUG);
369 369
                 }
370 370
                 // 	          print '<td align="right">OK</td>';
371 371
             } else {
372 372
                 $errno = $db->errno();
373 373
                 if (!$silent)
374
-                    print '<!-- Result = ' . $errno . ' -->' . "\n";
374
+                    print '<!-- Result = '.$errno.' -->'."\n";
375 375
 
376 376
                 // Define list of errors we accept (array $okerrors)
377 377
                 $okerrors = array(// By default
@@ -397,31 +397,31 @@  discard block
 block discarded – undo
397 397
                     if (!$silent)
398 398
                         print '<tr><td valign="top" colspan="2">';
399 399
                     if (!$silent)
400
-                        print '<div class="error">' . $langs->trans("Error") . " " . $db->errno() . ": " . $newsql . "<br>" . $db->error() . "</div></td>";
400
+                        print '<div class="error">'.$langs->trans("Error")." ".$db->errno().": ".$newsql."<br>".$db->error()."</div></td>";
401 401
                     if (!$silent)
402
-                        print '</tr>' . "\n";
403
-                    dol_syslog('Admin.lib::run_sql Request ' . ($i + 1) . " Error " . $db->errno() . " " . $newsql . "<br>" . $db->error(), LOG_ERR);
402
+                        print '</tr>'."\n";
403
+                    dol_syslog('Admin.lib::run_sql Request '.($i + 1)." Error ".$db->errno()." ".$newsql."<br>".$db->error(), LOG_ERR);
404 404
                     $error++;
405 405
                 }
406 406
             }
407 407
 
408 408
             if (!$silent)
409
-                print '</tr>' . "\n";
409
+                print '</tr>'."\n";
410 410
         }
411 411
     }
412 412
 
413 413
     if ($error == 0) {
414 414
         if (!$silent)
415
-            print '<tr><td>' . $langs->trans("ProcessMigrateScript") . '</td>';
415
+            print '<tr><td>'.$langs->trans("ProcessMigrateScript").'</td>';
416 416
         if (!$silent)
417
-            print '<td align="right">' . $langs->trans("OK") . '</td></tr>' . "\n";
417
+            print '<td align="right">'.$langs->trans("OK").'</td></tr>'."\n";
418 418
         $ok = 1;
419 419
     }
420 420
     else {
421 421
         if (!$silent)
422
-            print '<tr><td>' . $langs->trans("ProcessMigrateScript") . '</td>';
422
+            print '<tr><td>'.$langs->trans("ProcessMigrateScript").'</td>';
423 423
         if (!$silent)
424
-            print '<td align="right"><font class="error">' . $langs->trans("KO") . '</font></td></tr>' . "\n";
424
+            print '<td align="right"><font class="error">'.$langs->trans("KO").'</font></td></tr>'."\n";
425 425
         $ok = 0;
426 426
     }
427 427
 
@@ -447,13 +447,13 @@  discard block
 block discarded – undo
447 447
         return -1;
448 448
     }
449 449
 
450
-    $sql = "DELETE FROM " . MAIN_DB_PREFIX . "const";
451
-    $sql .= " WHERE (" . $db->decrypt('name') . " = '" . $db->escape($name) . "'";
450
+    $sql = "DELETE FROM ".MAIN_DB_PREFIX."const";
451
+    $sql .= " WHERE (".$db->decrypt('name')." = '".$db->escape($name)."'";
452 452
     if (is_numeric($name))
453
-        $sql .= " OR rowid = '" . $db->escape($name) . "'";
453
+        $sql .= " OR rowid = '".$db->escape($name)."'";
454 454
     $sql .= ")";
455 455
     if ($entity >= 0)
456
-        $sql .= " AND entity = " . $entity;
456
+        $sql .= " AND entity = ".$entity;
457 457
 
458 458
     dol_syslog("admin.lib::dolibarr_del_const", LOG_DEBUG);
459 459
     $resql = $db->query($sql);
@@ -481,10 +481,10 @@  discard block
 block discarded – undo
481 481
     global $conf;
482 482
     $value = '';
483 483
 
484
-    $sql = "SELECT " . $db->decrypt('value') . " as value";
485
-    $sql .= " FROM " . MAIN_DB_PREFIX . "const";
486
-    $sql .= " WHERE name = " . $db->encrypt($name, 1);
487
-    $sql .= " AND entity = " . $entity;
484
+    $sql = "SELECT ".$db->decrypt('value')." as value";
485
+    $sql .= " FROM ".MAIN_DB_PREFIX."const";
486
+    $sql .= " WHERE name = ".$db->encrypt($name, 1);
487
+    $sql .= " AND entity = ".$entity;
488 488
 
489 489
     dol_syslog("admin.lib::dolibarr_get_const", LOG_DEBUG);
490 490
     $resql = $db->query($sql);
@@ -527,20 +527,20 @@  discard block
 block discarded – undo
527 527
 
528 528
     $db->begin();
529 529
 
530
-    $sql = "DELETE FROM " . MAIN_DB_PREFIX . "const";
531
-    $sql .= " WHERE name = " . $db->encrypt($name, 1);
530
+    $sql = "DELETE FROM ".MAIN_DB_PREFIX."const";
531
+    $sql .= " WHERE name = ".$db->encrypt($name, 1);
532 532
     if ($entity >= 0)
533
-        $sql .= " AND entity = " . $entity;
533
+        $sql .= " AND entity = ".$entity;
534 534
 
535 535
     dol_syslog("admin.lib::dolibarr_set_const", LOG_DEBUG);
536 536
     $resql = $db->query($sql);
537 537
 
538 538
     if (strcmp($value, '')) { // true if different. Must work for $value='0' or $value=0
539
-        $sql = "INSERT INTO " . MAIN_DB_PREFIX . "const(name,value,type,visible,note,entity)";
539
+        $sql = "INSERT INTO ".MAIN_DB_PREFIX."const(name,value,type,visible,note,entity)";
540 540
         $sql .= " VALUES (";
541 541
         $sql .= $db->encrypt($name, 1);
542
-        $sql .= ", " . $db->encrypt($value, 1);
543
-        $sql .= ",'" . $db->escape($type) . "'," . $visible . ",'" . $db->escape($note) . "'," . $entity . ")";
542
+        $sql .= ", ".$db->encrypt($value, 1);
543
+        $sql .= ",'".$db->escape($type)."',".$visible.",'".$db->escape($note)."',".$entity.")";
544 544
 
545 545
         //print "sql".$value."-".pg_escape_string($value)."-".$sql;exit;
546 546
         //print "xx".$db->escape($value);
@@ -571,25 +571,25 @@  discard block
 block discarded – undo
571 571
     $head = array();
572 572
 
573 573
     // $head[$h][0] = DOL_URL_ROOT . "/admin/modules.php?mode=common";
574
-    $head[$h][0] = BASE_URI . "?controller=admin&method=modules&mode=common";
574
+    $head[$h][0] = BASE_URI."?controller=admin&method=modules&mode=common";
575 575
     $head[$h][1] = $langs->trans("AvailableModules");
576 576
     $head[$h][2] = 'common';
577 577
     $h++;
578 578
 
579 579
     // $head[$h][0] = DOL_URL_ROOT . "/admin/modules.php?mode=marketplace";
580
-    $head[$h][0] = BASE_URI . "?controller=admin&method=modules&mode=marketplace";
580
+    $head[$h][0] = BASE_URI."?controller=admin&method=modules&mode=marketplace";
581 581
     $head[$h][1] = $langs->trans("ModulesMarketPlaces");
582 582
     $head[$h][2] = 'marketplace';
583 583
     $h++;
584 584
 
585 585
     // $head[$h][0] = DOL_URL_ROOT . "/admin/modules.php?mode=deploy";
586
-    $head[$h][0] = BASE_URI . "?controller=admin&method=modules&mode=deploy";
586
+    $head[$h][0] = BASE_URI."?controller=admin&method=modules&mode=deploy";
587 587
     $head[$h][1] = $langs->trans("AddExtensionThemeModuleOrOther");
588 588
     $head[$h][2] = 'deploy';
589 589
     $h++;
590 590
 
591 591
     // $head[$h][0] = DOL_URL_ROOT . "/admin/modules.php?mode=develop";
592
-    $head[$h][0] = BASE_URI . "?controller=admin&method=modules&mode=develop";
592
+    $head[$h][0] = BASE_URI."?controller=admin&method=modules&mode=develop";
593 593
     $head[$h][1] = $langs->trans("ModulesDevelopYourModule");
594 594
     $head[$h][2] = 'develop';
595 595
     $h++;
@@ -609,20 +609,20 @@  discard block
 block discarded – undo
609 609
     $head = array();
610 610
 
611 611
     // $head[$h][0] = DOL_URL_ROOT . "/admin/security_other.php";
612
-    $head[$h][0] = BASE_URI . "?controller=admin&method=security_other";
612
+    $head[$h][0] = BASE_URI."?controller=admin&method=security_other";
613 613
     $head[$h][1] = $langs->trans("Miscellaneous");
614 614
     $head[$h][2] = 'misc';
615 615
     $h++;
616 616
 
617 617
     // $head[$h][0] = DOL_URL_ROOT . "/admin/security.php";
618
-    $head[$h][0] = BASE_URI . "?controller=admin&method=security";
618
+    $head[$h][0] = BASE_URI."?controller=admin&method=security";
619 619
     $head[$h][1] = $langs->trans("Passwords");
620 620
     $head[$h][2] = 'passwords';
621 621
     $h++;
622 622
 
623 623
     // $head[$h][0] = DOL_URL_ROOT . "/admin/security_file.php";
624
-    $head[$h][0] = BASE_URI . "?controller=admin&method=security_file";
625
-    $head[$h][1] = $langs->trans("Files") . ' (' . $langs->trans("Upload") . ')';
624
+    $head[$h][0] = BASE_URI."?controller=admin&method=security_file";
625
+    $head[$h][1] = $langs->trans("Files").' ('.$langs->trans("Upload").')';
626 626
     $head[$h][2] = 'file';
627 627
     $h++;
628 628
 
@@ -634,13 +634,13 @@  discard block
 block discarded – undo
634 634
      */
635 635
 
636 636
     // $head[$h][0] = DOL_URL_ROOT . "/admin/proxy.php";
637
-    $head[$h][0] = BASE_URI . "?controller=admin&method=proxy";
637
+    $head[$h][0] = BASE_URI."?controller=admin&method=proxy";
638 638
     $head[$h][1] = $langs->trans("ExternalAccess");
639 639
     $head[$h][2] = 'proxy';
640 640
     $h++;
641 641
 
642 642
     // $head[$h][0] = DOL_URL_ROOT . "/admin/events.php";
643
-    $head[$h][0] = BASE_URI . "?controller=admin&method=events";
643
+    $head[$h][0] = BASE_URI."?controller=admin&method=events";
644 644
     $head[$h][1] = $langs->trans("Audit");
645 645
     $head[$h][2] = 'audit';
646 646
     $h++;
@@ -649,12 +649,12 @@  discard block
 block discarded – undo
649 649
     // Show permissions lines
650 650
     $nbPerms = 0;
651 651
     $sql = "SELECT COUNT(r.id) as nb";
652
-    $sql .= " FROM " . MAIN_DB_PREFIX . "rights_def as r";
653
-    $sql .= " WHERE r.libelle NOT LIKE 'tou%'";    // On ignore droits "tous"
654
-    $sql .= " AND entity = " . $conf->entity;
652
+    $sql .= " FROM ".MAIN_DB_PREFIX."rights_def as r";
653
+    $sql .= " WHERE r.libelle NOT LIKE 'tou%'"; // On ignore droits "tous"
654
+    $sql .= " AND entity = ".$conf->entity;
655 655
     $sql .= " AND bydefault = 1";
656 656
     if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
657
-        $sql .= " AND r.perms NOT LIKE '%_advance'";  // Hide advanced perms if option is not enabled
657
+        $sql .= " AND r.perms NOT LIKE '%_advance'"; // Hide advanced perms if option is not enabled
658 658
     }
659 659
     $resql = $db->query($sql);
660 660
     if ($resql) {
@@ -668,11 +668,11 @@  discard block
 block discarded – undo
668 668
         dol_print_error($db);
669 669
     }
670 670
 
671
-    $head[$h][0] = DOL_URL_ROOT . "/admin/perms.php";
671
+    $head[$h][0] = DOL_URL_ROOT."/admin/perms.php";
672 672
     $head[$h][1] = $langs->trans("DefaultRights");
673 673
     if ($nbPerms > 0)
674 674
     {
675
-        $head[$h][1] .= ' <span class="badge">' . $nbPerms . '</span>';
675
+        $head[$h][1] .= ' <span class="badge">'.$nbPerms.'</span>';
676 676
     }
677 677
     $head[$h][2] = 'default';
678 678
     $h++;
@@ -692,13 +692,13 @@  discard block
 block discarded – undo
692 692
     $head = array();
693 693
 
694 694
     // $head[$h][0] = DOL_URL_ROOT . "/admin/translation.php?mode=overwrite";
695
-    $head[$h][0] = BASE_URI . "?controller=admin&method=translation&mode=overwrite";
695
+    $head[$h][0] = BASE_URI."?controller=admin&method=translation&mode=overwrite";
696 696
     $head[$h][1] = $langs->trans("TranslationOverwriteKey");
697 697
     $head[$h][2] = 'overwrite';
698 698
     $h++;
699 699
 
700 700
     // $head[$h][0] = DOL_URL_ROOT . "/admin/translation.php?mode=searchkey";
701
-    $head[$h][0] = BASE_URI . "?controller=admin&method=translation&mode=searchkey";
701
+    $head[$h][0] = BASE_URI."?controller=admin&method=translation&mode=searchkey";
702 702
     $head[$h][1] = $langs->trans("TranslationKeySearch");
703 703
     $head[$h][2] = 'searchkey';
704 704
     $h++;
@@ -723,32 +723,32 @@  discard block
 block discarded – undo
723 723
     $head = array();
724 724
 
725 725
     // $head[$h][0] = DOL_URL_ROOT . "/admin/defaultvalues.php?mode=createform";
726
-    $head[$h][0] = BASE_URI . "?controller=admin&method=defaultvalues&mode=createform";
726
+    $head[$h][0] = BASE_URI."?controller=admin&method=defaultvalues&mode=createform";
727 727
     $head[$h][1] = $langs->trans("DefaultCreateForm");
728 728
     $head[$h][2] = 'createform';
729 729
     $h++;
730 730
 
731 731
     // $head[$h][0] = DOL_URL_ROOT . "/admin/defaultvalues.php?mode=filters";
732
-    $head[$h][0] = BASE_URI . "?controller=admin&method=defaultvalues&mode=filters";
732
+    $head[$h][0] = BASE_URI."?controller=admin&method=defaultvalues&mode=filters";
733 733
     $head[$h][1] = $langs->trans("DefaultSearchFilters");
734 734
     $head[$h][2] = 'filters';
735 735
     $h++;
736 736
 
737 737
     // $head[$h][0] = DOL_URL_ROOT . "/admin/defaultvalues.php?mode=sortorder";
738
-    $head[$h][0] = BASE_URI . "?controller=admin&method=defaultvalues&mode=sortorder";
738
+    $head[$h][0] = BASE_URI."?controller=admin&method=defaultvalues&mode=sortorder";
739 739
     $head[$h][1] = $langs->trans("DefaultSortOrder");
740 740
     $head[$h][2] = 'sortorder';
741 741
     $h++;
742 742
 
743 743
     if (!empty($conf->use_javascript_ajax)) {
744 744
         // $head[$h][0] = DOL_URL_ROOT . "/admin/defaultvalues.php?mode=focus";
745
-        $head[$h][0] = BASE_URI . "?controller=admin&method=defaultvalues&mode=focus";
745
+        $head[$h][0] = BASE_URI."?controller=admin&method=defaultvalues&mode=focus";
746 746
         $head[$h][1] = $langs->trans("DefaultFocus");
747 747
         $head[$h][2] = 'focus';
748 748
         $h++;
749 749
 
750 750
         // $head[$h][0] = DOL_URL_ROOT . "/admin/defaultvalues.php?mode=mandatory";
751
-        $head[$h][0] = BASE_URI . "?controller=admin&method=defaultvalues&mode=mandatory";
751
+        $head[$h][0] = BASE_URI."?controller=admin&method=defaultvalues&mode=mandatory";
752 752
         $head[$h][1] = $langs->trans("DefaultMandatory");
753 753
         $head[$h][2] = 'mandatory';
754 754
         $h++;
@@ -784,13 +784,13 @@  discard block
 block discarded – undo
784 784
         $sessPath = $iniPath;
785 785
     }
786 786
     $sessPath .= '/'; // We need the trailing slash
787
-    dol_syslog('admin.lib:listOfSessions sessPath=' . $sessPath);
787
+    dol_syslog('admin.lib:listOfSessions sessPath='.$sessPath);
788 788
 
789 789
     $dh = @opendir(dol_osencode($sessPath));
790 790
     if ($dh) {
791 791
         while (($file = @readdir($dh)) !== false) {
792 792
             if (preg_match('/^sess_/i', $file) && $file != "." && $file != "..") {
793
-                $fullpath = $sessPath . $file;
793
+                $fullpath = $sessPath.$file;
794 794
                 if (!@is_dir($fullpath) && is_readable($fullpath)) {
795 795
                     $sessValues = file_get_contents($fullpath); // get raw session data
796 796
                     // Example of possible value
@@ -799,8 +799,8 @@  discard block
 block discarded – undo
799 799
                     // dol_screenheight|s:3:"971";dol_company|s:12:"MyBigCompany";dol_entity|i:1;mainmenu|s:4:"home";leftmenuopened|s:10:"admintools";idmenu|s:0:"";leftmenu|s:10:"admintools";';
800 800
 
801 801
                     if (preg_match('/dol_login/i', $sessValues) && // limit to dolibarr session
802
-                        (preg_match('/dol_entity\|i:' . $conf->entity . ';/i', $sessValues) || preg_match('/dol_entity\|s:([0-9]+):"' . $conf->entity . '"/i', $sessValues)) && // limit to current entity
803
-                        preg_match('/dol_company\|s:([0-9]+):"(' . $conf->global->MAIN_INFO_SOCIETE_NOM . ')"/i', $sessValues)) { // limit to company name
802
+                        (preg_match('/dol_entity\|i:'.$conf->entity.';/i', $sessValues) || preg_match('/dol_entity\|s:([0-9]+):"'.$conf->entity.'"/i', $sessValues)) && // limit to current entity
803
+                        preg_match('/dol_company\|s:([0-9]+):"('.$conf->global->MAIN_INFO_SOCIETE_NOM.')"/i', $sessValues)) { // limit to company name
804 804
                         $tmp = explode('_', $file);
805 805
                         $idsess = $tmp[1];
806 806
                         $login = preg_match('/dol_login\|s:[0-9]+:"([A-Za-z0-9]+)"/i', $sessValues, $regs);
@@ -830,20 +830,20 @@  discard block
 block discarded – undo
830 830
     global $conf;
831 831
 
832 832
     $arrayofSessions = array();
833
-    $sessPath = ini_get("session.save_path") . "/";
834
-    dol_syslog('admin.lib:purgeSessions mysessionid=' . $mysessionid . ' sessPath=' . $sessPath);
833
+    $sessPath = ini_get("session.save_path")."/";
834
+    dol_syslog('admin.lib:purgeSessions mysessionid='.$mysessionid.' sessPath='.$sessPath);
835 835
 
836 836
     $error = 0;
837 837
     $dh = @opendir(dol_osencode($sessPath));
838 838
     while (($file = @readdir($dh)) !== false) {
839 839
         if ($file != "." && $file != "..") {
840
-            $fullpath = $sessPath . $file;
840
+            $fullpath = $sessPath.$file;
841 841
             if (!@is_dir($fullpath)) {
842 842
                 $sessValues = file_get_contents($fullpath); // get raw session data
843 843
 
844 844
                 if (preg_match('/dol_login/i', $sessValues) && // limit to dolibarr session
845
-                    preg_match('/dol_entity\|s:([0-9]+):"(' . $conf->entity . ')"/i', $sessValues) && // limit to current entity
846
-                    preg_match('/dol_company\|s:([0-9]+):"(' . $conf->global->MAIN_INFO_SOCIETE_NOM . ')"/i', $sessValues)) { // limit to company name
845
+                    preg_match('/dol_entity\|s:([0-9]+):"('.$conf->entity.')"/i', $sessValues) && // limit to current entity
846
+                    preg_match('/dol_company\|s:([0-9]+):"('.$conf->global->MAIN_INFO_SOCIETE_NOM.')"/i', $sessValues)) { // limit to company name
847 847
                     $tmp = explode('_', $file);
848 848
                     $idsess = $tmp[1];
849 849
                     // We remove session if it's not ourself
@@ -883,7 +883,7 @@  discard block
 block discarded – undo
883 883
 
884 884
     $ret = array('nbmodules' => 0, 'errors' => array(), 'nbperms' => 0);
885 885
     $modName = $value;
886
-    $modFile = $modName . ".class.php";
886
+    $modFile = $modName.".class.php";
887 887
 
888 888
     // Loop on each directory to fill $modulesdir
889 889
     $modulesdir = dolGetModulesDirs();
@@ -891,8 +891,8 @@  discard block
 block discarded – undo
891 891
     // Loop on each modulesdir directories
892 892
     $found = false;
893 893
     foreach ($modulesdir as $dir) {
894
-        if (file_exists($dir . $modFile)) {
895
-            $found = @include_once $dir . $modFile;
894
+        if (file_exists($dir.$modFile)) {
895
+            $found = @include_once $dir.$modFile;
896 896
             if ($found)
897 897
                 break;
898 898
         }
@@ -928,7 +928,7 @@  discard block
 block discarded – undo
928 928
         return $ret;
929 929
     }
930 930
 
931
-    $result = $objMod->init();    // Enable module
931
+    $result = $objMod->init(); // Enable module
932 932
 
933 933
     if ($result <= 0) {
934 934
         $ret['errors'][] = $objMod->error;
@@ -939,13 +939,13 @@  discard block
 block discarded – undo
939 939
                 // this->depends may be array('modModule1', 'mmodModule2') or array('always1'=>"modModule1", 'FR'=>'modModule2')
940 940
                 foreach ($objMod->depends as $key => $modulestring) {
941 941
                     //var_dump((! is_numeric($key)) && ! preg_match('/^always/', $key) && $mysoc->country_code && ! preg_match('/^'.$mysoc->country_code.'/', $key));exit;
942
-                    if ((!is_numeric($key)) && !preg_match('/^always/', $key) && $mysoc->country_code && !preg_match('/^' . $mysoc->country_code . '/', $key)) {
943
-                        dol_syslog("We are not concerned by dependency with key=" . $key . " because our country is " . $mysoc->country_code);
942
+                    if ((!is_numeric($key)) && !preg_match('/^always/', $key) && $mysoc->country_code && !preg_match('/^'.$mysoc->country_code.'/', $key)) {
943
+                        dol_syslog("We are not concerned by dependency with key=".$key." because our country is ".$mysoc->country_code);
944 944
                         continue;
945 945
                     }
946 946
                     $activate = false;
947 947
                     foreach ($modulesdir as $dir) {
948
-                        if (file_exists($dir . $modulestring . ".class.php")) {
948
+                        if (file_exists($dir.$modulestring.".class.php")) {
949 949
                             $resarray = activateModule($modulestring);
950 950
                             if (empty($resarray['errors'])) {
951 951
                                 $activate = true;
@@ -972,7 +972,7 @@  discard block
 block discarded – undo
972 972
                 $num = count($objMod->conflictwith);
973 973
                 for ($i = 0; $i < $num; $i++) {
974 974
                     foreach ($modulesdir as $dir) {
975
-                        if (file_exists($dir . $objMod->conflictwith[$i] . ".class.php")) {
975
+                        if (file_exists($dir.$objMod->conflictwith[$i].".class.php")) {
976 976
                             unActivateModule($objMod->conflictwith[$i], 0);
977 977
                         }
978 978
                     }
@@ -982,7 +982,7 @@  discard block
 block discarded – undo
982 982
     }
983 983
 
984 984
     if (!count($ret['errors'])) {
985
-        $ret['nbmodules'] ++;
985
+        $ret['nbmodules']++;
986 986
         if (isset($objMod->rights)) {
987 987
             $ret['nbperms'] += count($objMod->rights);
988 988
         }
@@ -1008,7 +1008,7 @@  discard block
 block discarded – undo
1008 1008
 
1009 1009
     $ret = '';
1010 1010
     $modName = $value;
1011
-    $modFile = $modName . ".class.php";
1011
+    $modFile = $modName.".class.php";
1012 1012
 
1013 1013
     // Loop on each directory to fill $modulesdir
1014 1014
     $modulesdir = dolGetModulesDirs();
@@ -1016,8 +1016,8 @@  discard block
 block discarded – undo
1016 1016
     // Loop on each modulesdir directories
1017 1017
     $found = false;
1018 1018
     foreach ($modulesdir as $dir) {
1019
-        if (file_exists($dir . $modFile)) {
1020
-            $found = @include_once $dir . $modFile;
1019
+        if (file_exists($dir.$modFile)) {
1020
+            $found = @include_once $dir.$modFile;
1021 1021
             if ($found)
1022 1022
                 break;
1023 1023
         }
@@ -1032,12 +1032,12 @@  discard block
 block discarded – undo
1032 1032
     else {
1033 1033
         //print $dir.$modFile;
1034 1034
         // TODO Replace this after DolibarrModules is moved as abstract class with a try catch to show module we try to disable has not been found or could not be loaded
1035
-        include_once DOL_BASE_PATH . '/core/modules/DolibarrModules.class.php';
1035
+        include_once DOL_BASE_PATH.'/core/modules/DolibarrModules.class.php';
1036 1036
         $genericMod = new DolibarrModules($db);
1037 1037
         $genericMod->name = preg_replace('/^mod/i', '', $modName);
1038 1038
         $genericMod->rights_class = strtolower(preg_replace('/^mod/i', '', $modName));
1039
-        $genericMod->const_name = 'MAIN_MODULE_' . strtoupper(preg_replace('/^mod/i', '', $modName));
1040
-        dol_syslog("modules::unActivateModule Failed to find module file, we use generic function with name " . $modName);
1039
+        $genericMod->const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i', '', $modName));
1040
+        dol_syslog("modules::unActivateModule Failed to find module file, we use generic function with name ".$modName);
1041 1041
         $genericMod->_remove(array());
1042 1042
     }
1043 1043
 
@@ -1083,16 +1083,16 @@  discard block
 block discarded – undo
1083 1083
     foreach ($modulesdir as $dir) {
1084 1084
         // Load modules attributes in arrays (name, numero, orders) from dir directory
1085 1085
         //print $dir."\n<br>";
1086
-        dol_syslog("Scan directory " . $dir . " for modules");
1086
+        dol_syslog("Scan directory ".$dir." for modules");
1087 1087
         $handle = @opendir(dol_osencode($dir));
1088 1088
         if (is_resource($handle)) {
1089 1089
             while (($file = readdir($handle)) !== false) {
1090 1090
                 //print "$i ".$file."\n<br>";
1091
-                if (is_readable($dir . $file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php') {
1091
+                if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php') {
1092 1092
                     $modName = substr($file, 0, dol_strlen($file) - 10);
1093 1093
 
1094 1094
                     if ($modName) {
1095
-                        include_once $dir . $file;
1095
+                        include_once $dir.$file;
1096 1096
                         $objMod = new $modName($db);
1097 1097
 
1098 1098
                         if ($objMod->numero > 0) {
@@ -1104,7 +1104,7 @@  discard block
 block discarded – undo
1104 1104
                         $modulequalified = 1;
1105 1105
 
1106 1106
                         // We discard modules according to features level (PS: if module is activated we always show it)
1107
-                        $const_name = 'MAIN_MODULE_' . strtoupper(preg_replace('/^mod/i', '', get_class($objMod)));
1107
+                        $const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i', '', get_class($objMod)));
1108 1108
                         if ($objMod->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2 && !$conf->global->$const_name)
1109 1109
                             $modulequalified = 0;
1110 1110
                         if ($objMod->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1 && !$conf->global->$const_name)
@@ -1123,7 +1123,7 @@  discard block
 block discarded – undo
1123 1123
 
1124 1124
                             // Complete the arrays &$tabname,&$tablib,&$tabsql,&$tabsqlsort,&$tabfield,&$tabfieldvalue,&$tabfieldinsert,&$tabrowid,&$tabcond
1125 1125
                             if (empty($objMod->dictionaries) && !empty($objMod->dictionnaries))
1126
-                                $objMod->dictionaries = $objMod->dictionnaries;  // For backward compatibility
1126
+                                $objMod->dictionaries = $objMod->dictionnaries; // For backward compatibility
1127 1127
 
1128 1128
                             if (!empty($objMod->dictionaries)) {
1129 1129
                                 //var_dump($objMod->dictionaries['tabname']);
@@ -1177,7 +1177,7 @@  discard block
 block discarded – undo
1177 1177
                                     }
1178 1178
 
1179 1179
                                 if ($nbtabname != $nbtablib || $nbtablib != $nbtabsql || $nbtabsql != $nbtabsqlsort) {
1180
-                                    print 'Error in descriptor of module ' . $const_name . '. Array ->dictionaries has not same number of record for key "tabname", "tablib", "tabsql" and "tabsqlsort"';
1180
+                                    print 'Error in descriptor of module '.$const_name.'. Array ->dictionaries has not same number of record for key "tabname", "tablib", "tabsql" and "tabsqlsort"';
1181 1181
                                     //print "$const_name: $nbtabname=$nbtablib=$nbtabsql=$nbtabsqlsort=$nbtabfield=$nbtabfieldvalue=$nbtabfieldinsert=$nbtabrowid=$nbtabcond=$nbtabfieldcheck=$nbtabhelp\n";
1182 1182
                                 } else {
1183 1183
                                     $taborder[] = 0; // Add an empty line
@@ -1187,14 +1187,14 @@  discard block
 block discarded – undo
1187 1187
                             $j++;
1188 1188
                             $i++;
1189 1189
                         } else
1190
-                            dol_syslog("Module " . get_class($objMod) . " not qualified");
1190
+                            dol_syslog("Module ".get_class($objMod)." not qualified");
1191 1191
                     }
1192 1192
                 }
1193 1193
             }
1194 1194
             closedir($handle);
1195 1195
         }
1196 1196
         else {
1197
-            dol_syslog("htdocs/admin/modules.php: Failed to open directory " . $dir . ". See permission and open_basedir option.", LOG_WARNING);
1197
+            dol_syslog("htdocs/admin/modules.php: Failed to open directory ".$dir.". See permission and open_basedir option.", LOG_WARNING);
1198 1198
         }
1199 1199
     }
1200 1200
 
@@ -1215,21 +1215,21 @@  discard block
 block discarded – undo
1215 1215
 
1216 1216
     foreach ($modulesdir as $dir) {
1217 1217
         // Load modules attributes in arrays (name, numero, orders) from dir directory
1218
-        dol_syslog("Scan directory " . $dir . " for modules");
1218
+        dol_syslog("Scan directory ".$dir." for modules");
1219 1219
         $handle = @opendir(dol_osencode($dir));
1220 1220
         if (is_resource($handle)) {
1221 1221
             while (($file = readdir($handle)) !== false) {
1222
-                if (is_readable($dir . $file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php') {
1222
+                if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php') {
1223 1223
                     $modName = substr($file, 0, dol_strlen($file) - 10);
1224 1224
 
1225 1225
                     if ($modName) {
1226
-                        include_once $dir . $file;
1226
+                        include_once $dir.$file;
1227 1227
                         $objMod = new $modName($db);
1228 1228
 
1229 1229
                         $modulequalified = 1;
1230 1230
 
1231 1231
                         // We discard modules according to features level (PS: if module is activated we always show it)
1232
-                        $const_name = 'MAIN_MODULE_' . strtoupper(preg_replace('/^mod/i', '', get_class($objMod)));
1232
+                        $const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i', '', get_class($objMod)));
1233 1233
 
1234 1234
                         if ($objMod->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2)
1235 1235
                             $modulequalified = 0;
@@ -1246,14 +1246,14 @@  discard block
 block discarded – undo
1246 1246
                                 setEventMessages($objMod->automatic_activation[$country_code], null, 'warnings');
1247 1247
                             }
1248 1248
                         } else
1249
-                            dol_syslog("Module " . get_class($objMod) . " not qualified");
1249
+                            dol_syslog("Module ".get_class($objMod)." not qualified");
1250 1250
                     }
1251 1251
                 }
1252 1252
             }
1253 1253
             closedir($handle);
1254 1254
         }
1255 1255
         else {
1256
-            dol_syslog("htdocs/admin/modules.php: Failed to open directory " . $dir . ". See permission and open_basedir option.", LOG_WARNING);
1256
+            dol_syslog("htdocs/admin/modules.php: Failed to open directory ".$dir.". See permission and open_basedir option.", LOG_WARNING);
1257 1257
         }
1258 1258
     }
1259 1259
 
@@ -1285,16 +1285,16 @@  discard block
 block discarded – undo
1285 1285
     foreach ($modulesdir as $dir) {
1286 1286
         // Load modules attributes in arrays (name, numero, orders) from dir directory
1287 1287
         //print $dir."\n<br>";
1288
-        dol_syslog("Scan directory " . $dir . " for modules");
1288
+        dol_syslog("Scan directory ".$dir." for modules");
1289 1289
         $handle = @opendir(dol_osencode($dir));
1290 1290
         if (is_resource($handle)) {
1291 1291
             while (($file = readdir($handle)) !== false) {
1292 1292
                 //print "$i ".$file."\n<br>";
1293
-                if (is_readable($dir . $file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php') {
1293
+                if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php') {
1294 1294
                     $modName = substr($file, 0, dol_strlen($file) - 10);
1295 1295
 
1296 1296
                     if ($modName) {
1297
-                        include_once $dir . $file;
1297
+                        include_once $dir.$file;
1298 1298
                         $objMod = new $modName($db);
1299 1299
 
1300 1300
                         if ($objMod->numero > 0) {
@@ -1306,7 +1306,7 @@  discard block
 block discarded – undo
1306 1306
                         $modulequalified = 1;
1307 1307
 
1308 1308
                         // We discard modules according to features level (PS: if module is activated we always show it)
1309
-                        $const_name = 'MAIN_MODULE_' . strtoupper(preg_replace('/^mod/i', '', get_class($objMod)));
1309
+                        $const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i', '', get_class($objMod)));
1310 1310
                         if ($objMod->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2 && !$conf->global->$const_name)
1311 1311
                             $modulequalified = 0;
1312 1312
                         if ($objMod->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1 && !$conf->global->$const_name)
@@ -1325,7 +1325,7 @@  discard block
 block discarded – undo
1325 1325
 
1326 1326
                             $modules[$i] = $objMod;
1327 1327
                             $filename[$i] = $modName;
1328
-                            $orders[$i] = $objMod->family . "_" . $j;   // Sort on family then module number
1328
+                            $orders[$i] = $objMod->family."_".$j; // Sort on family then module number
1329 1329
                             $dirmod[$i] = $dir;
1330 1330
                             //print "x".$modName." ".$orders[$i]."\n<br>";
1331 1331
 
@@ -1336,14 +1336,14 @@  discard block
 block discarded – undo
1336 1336
                             $j++;
1337 1337
                             $i++;
1338 1338
                         } else
1339
-                            dol_syslog("Module " . get_class($objMod) . " not qualified");
1339
+                            dol_syslog("Module ".get_class($objMod)." not qualified");
1340 1340
                     }
1341 1341
                 }
1342 1342
             }
1343 1343
             closedir($handle);
1344 1344
         }
1345 1345
         else {
1346
-            dol_syslog("htdocs/admin/modules.php: Failed to open directory " . $dir . ". See permission and open_basedir option.", LOG_WARNING);
1346
+            dol_syslog("htdocs/admin/modules.php: Failed to open directory ".$dir.". See permission and open_basedir option.", LOG_WARNING);
1347 1347
         }
1348 1348
     }
1349 1349
 
@@ -1367,17 +1367,17 @@  discard block
 block discarded – undo
1367 1367
     $form = new Form($db);
1368 1368
 
1369 1369
     if (!empty($strictw3c) && $strictw3c == 1)
1370
-        print "\n" . '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
1370
+        print "\n".'<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
1371 1371
 
1372 1372
     print '<table class="noborder" width="100%">';
1373 1373
     print '<tr class="liste_titre">';
1374
-    print '<td class="titlefield">' . $langs->trans("Description") . '</td>';
1374
+    print '<td class="titlefield">'.$langs->trans("Description").'</td>';
1375 1375
     print '<td>';
1376 1376
     $text = $langs->trans("Value");
1377 1377
     print $form->textwithpicto($text, $helptext, 1, 'help', '', 0, 2, 'idhelptext');
1378 1378
     print '</td>';
1379 1379
     if (empty($strictw3c))
1380
-        print '<td align="center" width="80">' . $langs->trans("Action") . '</td>';
1380
+        print '<td align="center" width="80">'.$langs->trans("Action").'</td>';
1381 1381
     print "</tr>\n";
1382 1382
 
1383 1383
     $label = '';
@@ -1400,13 +1400,13 @@  discard block
 block discarded – undo
1400 1400
 
1401 1401
         $sql = "SELECT ";
1402 1402
         $sql .= "rowid";
1403
-        $sql .= ", " . $db->decrypt('name') . " as name";
1404
-        $sql .= ", " . $db->decrypt('value') . " as value";
1403
+        $sql .= ", ".$db->decrypt('name')." as name";
1404
+        $sql .= ", ".$db->decrypt('value')." as value";
1405 1405
         $sql .= ", type";
1406 1406
         $sql .= ", note";
1407
-        $sql .= " FROM " . MAIN_DB_PREFIX . "const";
1408
-        $sql .= " WHERE " . $db->decrypt('name') . " = '" . $db->escape($const) . "'";
1409
-        $sql .= " AND entity IN (0, " . $conf->entity . ")";
1407
+        $sql .= " FROM ".MAIN_DB_PREFIX."const";
1408
+        $sql .= " WHERE ".$db->decrypt('name')." = '".$db->escape($const)."'";
1409
+        $sql .= " AND entity IN (0, ".$conf->entity.")";
1410 1410
         $sql .= " ORDER BY name ASC, entity DESC";
1411 1411
         $result = $db->query($sql);
1412 1412
 
@@ -1419,8 +1419,8 @@  discard block
 block discarded – undo
1419 1419
             }
1420 1420
 
1421 1421
             if (empty($strictw3c)) {
1422
-                print "\n" . '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
1423
-                print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
1422
+                print "\n".'<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
1423
+                print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
1424 1424
             }
1425 1425
 
1426 1426
             print '<tr class="oddeven">';
@@ -1429,29 +1429,29 @@  discard block
 block discarded – undo
1429 1429
             print '<td>';
1430 1430
             if (empty($strictw3c))
1431 1431
                 print '<input type="hidden" name="action" value="update">';
1432
-            print '<input type="hidden" name="rowid' . (empty($strictw3c) ? '' : '[]') . '" value="' . $obj->rowid . '">';
1433
-            print '<input type="hidden" name="constname' . (empty($strictw3c) ? '' : '[]') . '" value="' . $const . '">';
1434
-            print '<input type="hidden" name="constnote_' . $obj->name . '" value="' . nl2br(dol_escape_htmltag($obj->note)) . '">';
1435
-            print '<input type="hidden" name="consttype_' . $obj->name . '" value="' . ($obj->type ? $obj->type : 'string') . '">';
1432
+            print '<input type="hidden" name="rowid'.(empty($strictw3c) ? '' : '[]').'" value="'.$obj->rowid.'">';
1433
+            print '<input type="hidden" name="constname'.(empty($strictw3c) ? '' : '[]').'" value="'.$const.'">';
1434
+            print '<input type="hidden" name="constnote_'.$obj->name.'" value="'.nl2br(dol_escape_htmltag($obj->note)).'">';
1435
+            print '<input type="hidden" name="consttype_'.$obj->name.'" value="'.($obj->type ? $obj->type : 'string').'">';
1436 1436
 
1437
-            print ($label ? $label : $langs->trans('Desc' . $const));
1437
+            print ($label ? $label : $langs->trans('Desc'.$const));
1438 1438
 
1439 1439
             if ($const == 'ADHERENT_MAILMAN_URL') {
1440
-                print '. ' . $langs->trans("Example") . ': <a href="#" id="exampleclick1">' . img_down() . '</a><br>';
1440
+                print '. '.$langs->trans("Example").': <a href="#" id="exampleclick1">'.img_down().'</a><br>';
1441 1441
                 //print 'http://lists.exampe.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&subscribees=%EMAIL%&send_welcome_msg_to_this_batch=1';
1442 1442
                 print '<div id="example1" class="hidden">';
1443 1443
                 print 'http://lists.example.com/cgi-bin/mailman/admin/%LISTE%/members/add?subscribees_upload=%EMAIL%&amp;adminpw=%MAILMAN_ADMINPW%&amp;subscribe_or_invite=0&amp;send_welcome_msg_to_this_batch=0&amp;notification_to_list_owner=0';
1444 1444
                 print '</div>';
1445 1445
             }
1446 1446
             if ($const == 'ADHERENT_MAILMAN_UNSUB_URL') {
1447
-                print '. ' . $langs->trans("Example") . ': <a href="#" id="exampleclick2">' . img_down() . '</a><br>';
1447
+                print '. '.$langs->trans("Example").': <a href="#" id="exampleclick2">'.img_down().'</a><br>';
1448 1448
                 print '<div id="example2" class="hidden">';
1449 1449
                 print 'http://lists.example.com/cgi-bin/mailman/admin/%LISTE%/members/remove?unsubscribees_upload=%EMAIL%&amp;adminpw=%MAILMAN_ADMINPW%&amp;send_unsub_ack_to_this_batch=0&amp;send_unsub_notifications_to_list_owner=0';
1450 1450
                 print '</div>';
1451 1451
                 //print 'http://lists.example.com/cgi-bin/mailman/admin/%LISTE%/members/remove?adminpw=%MAILMAN_ADMINPW%&unsubscribees=%EMAIL%';
1452 1452
             }
1453 1453
             if ($const == 'ADHERENT_MAILMAN_LISTS') {
1454
-                print '. ' . $langs->trans("Example") . ': <a href="#" id="exampleclick3">' . img_down() . '</a><br>';
1454
+                print '. '.$langs->trans("Example").': <a href="#" id="exampleclick3">'.img_down().'</a><br>';
1455 1455
                 print '<div id="example3" class="hidden">';
1456 1456
                 print 'mymailmanlist<br>';
1457 1457
                 print 'mymailmanlist1,mymailmanlist2<br>';
@@ -1468,31 +1468,31 @@  discard block
 block discarded – undo
1468 1468
             if ($const == 'ADHERENT_CARD_TYPE' || $const == 'ADHERENT_ETIQUETTE_TYPE') {
1469 1469
                 print '<td>';
1470 1470
                 // List of possible labels (defined into $_Avery_Labels variable set into format_cards.lib.php)
1471
-                require_once DOL_BASE_PATH . '/core/lib/format_cards.lib.php';
1471
+                require_once DOL_BASE_PATH.'/core/lib/format_cards.lib.php';
1472 1472
                 $arrayoflabels = array();
1473 1473
                 foreach (array_keys($_Avery_Labels) as $codecards) {
1474 1474
                     $arrayoflabels[$codecards] = $_Avery_Labels[$codecards]['name'];
1475 1475
                 }
1476
-                print $form->selectarray('constvalue' . (empty($strictw3c) ? '' : '[]'), $arrayoflabels, ($obj->value ? $obj->value : 'CARD'), 1, 0, 0);
1476
+                print $form->selectarray('constvalue'.(empty($strictw3c) ? '' : '[]'), $arrayoflabels, ($obj->value ? $obj->value : 'CARD'), 1, 0, 0);
1477 1477
                 print '<input type="hidden" name="consttype" value="yesno">';
1478
-                print '<input type="hidden" name="constnote' . (empty($strictw3c) ? '' : '[]') . '" value="' . nl2br(dol_escape_htmltag($obj->note)) . '">';
1478
+                print '<input type="hidden" name="constnote'.(empty($strictw3c) ? '' : '[]').'" value="'.nl2br(dol_escape_htmltag($obj->note)).'">';
1479 1479
                 print '</td>';
1480 1480
             } else {
1481 1481
                 print '<td>';
1482
-                print '<input type="hidden" name="consttype' . (empty($strictw3c) ? '' : '[]') . '" value="' . ($obj->type ? $obj->type : 'string') . '">';
1483
-                print '<input type="hidden" name="constnote' . (empty($strictw3c) ? '' : '[]') . '" value="' . nl2br(dol_escape_htmltag($obj->note)) . '">';
1482
+                print '<input type="hidden" name="consttype'.(empty($strictw3c) ? '' : '[]').'" value="'.($obj->type ? $obj->type : 'string').'">';
1483
+                print '<input type="hidden" name="constnote'.(empty($strictw3c) ? '' : '[]').'" value="'.nl2br(dol_escape_htmltag($obj->note)).'">';
1484 1484
                 if ($obj->type == 'textarea' || in_array($const, array('ADHERENT_CARD_TEXT', 'ADHERENT_CARD_TEXT_RIGHT', 'ADHERENT_ETIQUETTE_TEXT'))) {
1485
-                    print '<textarea class="flat" name="constvalue' . (empty($strictw3c) ? '' : '[]') . '" cols="50" rows="5" wrap="soft">' . "\n";
1485
+                    print '<textarea class="flat" name="constvalue'.(empty($strictw3c) ? '' : '[]').'" cols="50" rows="5" wrap="soft">'."\n";
1486 1486
                     print $obj->value;
1487 1487
                     print "</textarea>\n";
1488 1488
                 } elseif ($obj->type == 'html') {
1489
-                    require_once DOL_BASE_PATH . '/core/class/doleditor.class.php';
1490
-                    $doleditor = new DolEditor('constvalue_' . $const . (empty($strictw3c) ? '' : '[]'), $obj->value, '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%');
1489
+                    require_once DOL_BASE_PATH.'/core/class/doleditor.class.php';
1490
+                    $doleditor = new DolEditor('constvalue_'.$const.(empty($strictw3c) ? '' : '[]'), $obj->value, '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%');
1491 1491
                     $doleditor->Create();
1492 1492
                 } elseif ($obj->type == 'yesno') {
1493
-                    print $form->selectyesno('constvalue' . (empty($strictw3c) ? '' : '[]'), $obj->value, 1);
1493
+                    print $form->selectyesno('constvalue'.(empty($strictw3c) ? '' : '[]'), $obj->value, 1);
1494 1494
                 } elseif (preg_match('/emailtemplate/', $obj->type)) {
1495
-                    include_once DOL_BASE_PATH . '/core/class/html.formmail.class.php';
1495
+                    include_once DOL_BASE_PATH.'/core/class/html.formmail.class.php';
1496 1496
                     $formmail = new FormMail($db);
1497 1497
 
1498 1498
                     $tmp = explode(':', $obj->type);
@@ -1505,23 +1505,23 @@  discard block
 block discarded – undo
1505 1505
                             //var_dump($modelmail);
1506 1506
                             $moreonlabel = '';
1507 1507
                             if (!empty($arrayofmessagename[$modelmail->label]))
1508
-                                $moreonlabel = ' <span class="opacitymedium">(' . $langs->trans("SeveralLangugeVariatFound") . ')</span>';
1509
-                            $arrayofmessagename[$modelmail->label] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)) . $moreonlabel;
1508
+                                $moreonlabel = ' <span class="opacitymedium">('.$langs->trans("SeveralLangugeVariatFound").')</span>';
1509
+                            $arrayofmessagename[$modelmail->label] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)).$moreonlabel;
1510 1510
                         }
1511 1511
                     }
1512 1512
                     //var_dump($arraydefaultmessage);
1513 1513
                     //var_dump($arrayofmessagename);
1514
-                    print $form->selectarray('constvalue_' . $obj->name, $arrayofmessagename, $obj->value, 'None', 1, 0, '', 0, 0, 0, '', '', 1);
1514
+                    print $form->selectarray('constvalue_'.$obj->name, $arrayofmessagename, $obj->value, 'None', 1, 0, '', 0, 0, 0, '', '', 1);
1515 1515
                 }
1516 1516
                 else { // type = 'string' ou 'chaine'
1517
-                    print '<input type="text" class="flat" size="48" name="constvalue' . (empty($strictw3c) ? '' : '[]') . '" value="' . dol_escape_htmltag($obj->value) . '">';
1517
+                    print '<input type="text" class="flat" size="48" name="constvalue'.(empty($strictw3c) ? '' : '[]').'" value="'.dol_escape_htmltag($obj->value).'">';
1518 1518
                 }
1519 1519
                 print '</td>';
1520 1520
             }
1521 1521
             // Submit
1522 1522
             if (empty($strictw3c)) {
1523 1523
                 print '<td align="center">';
1524
-                print '<input type="submit" class="button" value="' . $langs->trans("Update") . '" name="Button">';
1524
+                print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
1525 1525
                 print "</td>";
1526 1526
             }
1527 1527
             print "</tr>\n";
@@ -1532,7 +1532,7 @@  discard block
 block discarded – undo
1532 1532
     print '</table>';
1533 1533
 
1534 1534
     if (!empty($strictw3c) && $strictw3c == 1) {
1535
-        print '<div align="center"><input type="submit" class="button" value="' . $langs->trans("Update") . '" name="update"></div>';
1535
+        print '<div align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'" name="update"></div>';
1536 1536
         print "</form>\n";
1537 1537
     }
1538 1538
 }
@@ -1565,7 +1565,7 @@  discard block
 block discarded – undo
1565 1565
             else
1566 1566
                 $text .= ' ';
1567 1567
             $i++;
1568
-            $text .= $langs->trans('Module' . $module->numero . 'Name');
1568
+            $text .= $langs->trans('Module'.$module->numero.'Name');
1569 1569
         }
1570 1570
     }
1571 1571
     return $text;
@@ -1586,10 +1586,10 @@  discard block
 block discarded – undo
1586 1586
 
1587 1587
     $db->begin();
1588 1588
 
1589
-    $sql = "INSERT INTO " . MAIN_DB_PREFIX . "document_model (nom, type, entity, libelle, description)";
1590
-    $sql .= " VALUES ('" . $db->escape($name) . "','" . $type . "'," . $conf->entity . ", ";
1591
-    $sql .= ($label ? "'" . $db->escape($label) . "'" : 'null') . ", ";
1592
-    $sql .= (!empty($description) ? "'" . $db->escape($description) . "'" : "null");
1589
+    $sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)";
1590
+    $sql .= " VALUES ('".$db->escape($name)."','".$type."',".$conf->entity.", ";
1591
+    $sql .= ($label ? "'".$db->escape($label)."'" : 'null').", ";
1592
+    $sql .= (!empty($description) ? "'".$db->escape($description)."'" : "null");
1593 1593
     $sql .= ")";
1594 1594
 
1595 1595
     dol_syslog("admin.lib::addDocumentModel", LOG_DEBUG);
@@ -1617,10 +1617,10 @@  discard block
 block discarded – undo
1617 1617
 
1618 1618
     $db->begin();
1619 1619
 
1620
-    $sql = "DELETE FROM " . MAIN_DB_PREFIX . "document_model";
1621
-    $sql .= " WHERE nom = '" . $db->escape($name) . "'";
1622
-    $sql .= " AND type = '" . $type . "'";
1623
-    $sql .= " AND entity = " . $conf->entity;
1620
+    $sql = "DELETE FROM ".MAIN_DB_PREFIX."document_model";
1621
+    $sql .= " WHERE nom = '".$db->escape($name)."'";
1622
+    $sql .= " AND type = '".$type."'";
1623
+    $sql .= " AND entity = ".$conf->entity;
1624 1624
 
1625 1625
     dol_syslog("admin.lib::delDocumentModel", LOG_DEBUG);
1626 1626
     $resql = $db->query($sql);
@@ -1671,13 +1671,13 @@  discard block
 block discarded – undo
1671 1671
     $head = array();
1672 1672
 
1673 1673
     //$head[$h][0] = DOL_URL_ROOT . "/admin/company.php";
1674
-    $head[$h][0] = BASE_URI . '?controller=admin&method=company';
1674
+    $head[$h][0] = BASE_URI.'?controller=admin&method=company';
1675 1675
     $head[$h][1] = $langs->trans("Company");
1676 1676
     $head[$h][2] = 'company';
1677 1677
     $h++;
1678 1678
 
1679 1679
     //$head[$h][0] = DOL_URL_ROOT . "/admin/accountant.php";
1680
-    $head[$h][0] = BASE_URI . '?controller=admin&method=accountant';
1680
+    $head[$h][0] = BASE_URI.'?controller=admin&method=accountant';
1681 1681
     $head[$h][1] = $langs->trans("Accountant");
1682 1682
     $head[$h][2] = 'accountant';
1683 1683
     $h++;
@@ -1700,26 +1700,26 @@  discard block
 block discarded – undo
1700 1700
     $head = array();
1701 1701
 
1702 1702
     if (!empty($user->admin) && (empty($_SESSION['leftmenu']) || $_SESSION['leftmenu'] != 'email_templates')) {
1703
-        $head[$h][0] = DOL_URL_ROOT . "/admin/mails.php";
1703
+        $head[$h][0] = DOL_URL_ROOT."/admin/mails.php";
1704 1704
         $head[$h][1] = $langs->trans("OutGoingEmailSetup");
1705 1705
         $head[$h][2] = 'common';
1706 1706
         $h++;
1707 1707
 
1708 1708
         if ($conf->mailing->enabled) {
1709
-            $head[$h][0] = DOL_URL_ROOT . "/admin/mails_emailing.php";
1709
+            $head[$h][0] = DOL_URL_ROOT."/admin/mails_emailing.php";
1710 1710
             $head[$h][1] = $langs->trans("OutGoingEmailSetupForEmailing");
1711 1711
             $head[$h][2] = 'common_emailing';
1712 1712
             $h++;
1713 1713
         }
1714 1714
     }
1715 1715
 
1716
-    $head[$h][0] = DOL_URL_ROOT . "/admin/mails_templates.php";
1716
+    $head[$h][0] = DOL_URL_ROOT."/admin/mails_templates.php";
1717 1717
     $head[$h][1] = $langs->trans("EMailTemplates");
1718 1718
     $head[$h][2] = 'templates';
1719 1719
     $h++;
1720 1720
 
1721 1721
     if ($conf->global->MAIN_FEATURES_LEVEL >= 1 && !empty($user->admin) && (empty($_SESSION['leftmenu']) || $_SESSION['leftmenu'] != 'email_templates')) {
1722
-        $head[$h][0] = DOL_URL_ROOT . "/admin/mails_senderprofile_list.php";
1722
+        $head[$h][0] = DOL_URL_ROOT."/admin/mails_senderprofile_list.php";
1723 1723
         $head[$h][1] = $langs->trans("EmailSenderProfiles");
1724 1724
         $head[$h][2] = 'senderprofiles';
1725 1725
         $h++;
Please login to merge, or discard this patch.
dolibarr/htdocs/core/boxes/box_task.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
  */
34 34
 class box_task extends ModeleBoxes
35 35
 {
36
-    public $boxcode="projet";
37
-    public $boximg="object_projecttask";
36
+    public $boxcode = "projet";
37
+    public $boximg = "object_projecttask";
38 38
     public $boxlabel;
39 39
     //public $depends = array("projet");
40 40
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     public $db;
45 45
 
46 46
     public $param;
47
-    public $enabled = 0;		// Disabled because bugged.
47
+    public $enabled = 0; // Disabled because bugged.
48 48
 
49 49
     public $info_box_head = array();
50 50
     public $info_box_contents = array();
@@ -56,17 +56,17 @@  discard block
 block discarded – undo
56 56
      *  @param  DoliDB  $db         Database handler
57 57
      *  @param  string  $param      More parameters
58 58
      */
59
-    function __construct($db,$param='')
59
+    function __construct($db, $param = '')
60 60
     {
61 61
         global $user, $langs;
62 62
 
63 63
         // Load translation files required by the page
64 64
         $langs->loadLangs(array('boxes', 'projects'));
65 65
 
66
-        $this->boxlabel="Tasks";
66
+        $this->boxlabel = "Tasks";
67 67
         $this->db = $db;
68 68
 
69
-        $this->hidden = ! ($user->rights->projet->lire);
69
+        $this->hidden = !($user->rights->projet->lire);
70 70
     }
71 71
 
72 72
 	/**
@@ -75,20 +75,20 @@  discard block
 block discarded – undo
75 75
 	 *  @param  int     $max        Maximum number of records to load
76 76
 	 *  @return void
77 77
 	 */
78
-	function loadBox($max=5)
78
+	function loadBox($max = 5)
79 79
 	{
80 80
 		global $conf, $user, $langs, $db;
81 81
 
82
-		$this->max=$max;
82
+		$this->max = $max;
83 83
 
84 84
 		$totalMnt = 0;
85 85
 		$totalnb = 0;
86
-		$totalDuree=0;
87
-		$totalplannedtot=0;
88
-		$totaldurationtot=0;
86
+		$totalDuree = 0;
87
+		$totalplannedtot = 0;
88
+		$totaldurationtot = 0;
89 89
 		
90 90
 		include_once DOL_DOCUMENT_ROOT."/projet/class/task.class.php";
91
-		$taskstatic=new Task($db);
91
+		$taskstatic = new Task($db);
92 92
 
93 93
 
94 94
 		$textHead = $langs->trans("Tasks")."&nbsp;".date("Y");
@@ -98,12 +98,12 @@  discard block
 block discarded – undo
98 98
 		if ($user->rights->projet->lire) {
99 99
 			// FIXME fk_statut on a task is not be used. We use the percent. This means this box is useless.
100 100
 			$sql = "SELECT pt.fk_statut, count(DISTINCT pt.rowid) as nb, sum(ptt.task_duration) as durationtot, sum(pt.planned_workload) as plannedtot";
101
-			$sql.= " FROM ".MAIN_DB_PREFIX."projet_task as pt, ".MAIN_DB_PREFIX."projet_task_time as ptt";
102
-			$sql.= " WHERE pt.datec BETWEEN '".$this->db->idate(dol_get_first_day(date("Y"), 1))."' AND '".$this->db->idate(dol_get_last_day(date("Y"), 12))."'";
103
-			$sql.= " AND pt.rowid = ptt.fk_task";
104
-			$sql.= " GROUP BY pt.fk_statut ";
105
-			$sql.= " ORDER BY pt.fk_statut DESC";
106
-			$sql.= $db->plimit($max, 0);
101
+			$sql .= " FROM ".MAIN_DB_PREFIX."projet_task as pt, ".MAIN_DB_PREFIX."projet_task_time as ptt";
102
+			$sql .= " WHERE pt.datec BETWEEN '".$this->db->idate(dol_get_first_day(date("Y"), 1))."' AND '".$this->db->idate(dol_get_last_day(date("Y"), 12))."'";
103
+			$sql .= " AND pt.rowid = ptt.fk_task";
104
+			$sql .= " GROUP BY pt.fk_statut ";
105
+			$sql .= " ORDER BY pt.fk_statut DESC";
106
+			$sql .= $db->plimit($max, 0);
107 107
 
108 108
 			$result = $db->query($sql);
109 109
 			if ($result)
@@ -115,22 +115,22 @@  discard block
 block discarded – undo
115 115
                     $objp = $db->fetch_object($result);
116 116
                     $this->info_box_contents[$i][] = array(
117 117
                         'td' => '',
118
-                        'text' =>$langs->trans("Task")." ".$taskstatic->LibStatut($objp->fk_statut,0),
118
+                        'text' =>$langs->trans("Task")." ".$taskstatic->LibStatut($objp->fk_statut, 0),
119 119
                     );
120 120
 
121 121
                     $this->info_box_contents[$i][] = array(
122 122
                         'td' => 'class="right"',
123 123
                         'text' => $objp->nb."&nbsp;".$langs->trans("Tasks"),
124 124
                         //'url' => DOL_URL_ROOT."/projet/tasks/list.php?leftmenu=projects&viewstatut=".$objp->fk_statut,
125
-                        'url' => BASE_URI . "?controller=projet/tasks&method=list&leftmenu=projects&viewstatut=" . $objp->fk_statut,
125
+                        'url' => BASE_URI."?controller=projet/tasks&method=list&leftmenu=projects&viewstatut=".$objp->fk_statut,
126 126
                     );
127 127
 					$totalnb += $objp->nb;
128
-					$this->info_box_contents[$i][] = array('td' => 'class="right"', 'text' => ConvertSecondToTime($objp->plannedtot,'all',25200,5));
128
+					$this->info_box_contents[$i][] = array('td' => 'class="right"', 'text' => ConvertSecondToTime($objp->plannedtot, 'all', 25200, 5));
129 129
 					$totalplannedtot += $objp->plannedtot;
130
-					$this->info_box_contents[$i][] = array('td' => 'class="right"', 'text' => ConvertSecondToTime($objp->durationtot,'all',25200,5));
130
+					$this->info_box_contents[$i][] = array('td' => 'class="right"', 'text' => ConvertSecondToTime($objp->durationtot, 'all', 25200, 5));
131 131
 					$totaldurationtot += $objp->durationtot;
132 132
 
133
-					$this->info_box_contents[$i][] = array('td' => 'align="right" width="18"', 'text' => $taskstatic->LibStatut($objp->fk_statut,3));
133
+					$this->info_box_contents[$i][] = array('td' => 'align="right" width="18"', 'text' => $taskstatic->LibStatut($objp->fk_statut, 3));
134 134
 
135 135
 					$i++;
136 136
 				}
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
 		// Add the sum at the bottom of the boxes
143 143
 		$this->info_box_contents[$i][] = array('tr' => 'class="liste_total"', 'td' => '', 'text' => $langs->trans("Total")."&nbsp;".$textHead);
144 144
 		$this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => number_format($totalnb, 0, ',', ' ')."&nbsp;".$langs->trans("Tasks"));
145
-		$this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totalplannedtot,'all',25200,5));
146
-		$this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totaldurationtot,'all',25200,5));
145
+		$this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totalplannedtot, 'all', 25200, 5));
146
+		$this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totaldurationtot, 'all', 25200, 5));
147 147
 		$this->info_box_contents[$i][] = array('td' => '', 'text' => "");
148 148
 	}
149 149
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 	 *  @param	int		$nooutput	No print, only return string
156 156
 	 *	@return	string
157 157
 	 */
158
-	function showBox($head = null, $contents = null, $nooutput=0)
158
+	function showBox($head = null, $contents = null, $nooutput = 0)
159 159
 	{
160 160
 		return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
161 161
 	}
Please login to merge, or discard this patch.
dolibarr/htdocs/core/js/lib_foot.js.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
 session_cache_limiter('public');
53 53
 
54
-require_once DOL_BASE_PATH . '/main.inc.php';
54
+require_once DOL_BASE_PATH.'/main.inc.php';
55 55
 
56 56
 // Define javascript type
57 57
 top_httphead('text/javascript; charset=UTF-8');
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 					});
80 80
             		jQuery(".classfortooltiponclicktext").dialog(
81 81
             			{ closeOnEscape: true, classes: { "ui-dialog": "highlight" },
82
-						maxHeight: window.innerHeight-60, width: ' . ($conf->browser->layout == 'phone' ? 400 : 700) . ',
82
+						maxHeight: window.innerHeight-60, width: ' . ($conf->browser->layout == 'phone' ? 400 : 700).',
83 83
 						modal: true,
84 84
 						autoOpen: false }).css("z-index: 5000");
85 85
             		jQuery(".classfortooltiponclick").click(function () {
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
                 jQuery(document).ready(function () {
141 141
 			        jQuery(".documentpreview").click(function () {
142 142
             		    console.log("We click on preview for element with href="+$(this).attr(\'href\')+" mime="+$(this).attr(\'mime\'));
143
-            		    document_preview($(this).attr(\'href\'), $(this).attr(\'mime\'), \'' . dol_escape_js($langs->transnoentities("Preview")) . '\');
143
+            		    document_preview($(this).attr(\'href\'), $(this).attr(\'mime\'), \'' . dol_escape_js($langs->transnoentities("Preview")).'\');
144 144
                 		return false;
145 145
         			});
146 146
         		});
Please login to merge, or discard this patch.
dolibarr/htdocs/core/js/lib_head.js.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
 session_cache_limiter('public');
50 50
 
51
-require_once DOL_BASE_PATH . '/main.inc.php';
51
+require_once DOL_BASE_PATH.'/main.inc.php';
52 52
 
53 53
 // Define javascript type
54 54
 top_httphead('text/javascript; charset=UTF-8');
@@ -1046,7 +1046,7 @@  discard block
 block discarded – undo
1046 1046
     }
1047 1047
     if ($thousand == 'Space')
1048 1048
         $thousand = ' ';
1049
-    print "var dec='" . dol_escape_js($dec) . "'; var thousand='" . dol_escape_js($thousand) . "';\n";    // Set var in javascript
1049
+    print "var dec='".dol_escape_js($dec)."'; var thousand='".dol_escape_js($thousand)."';\n"; // Set var in javascript
1050 1050
 
1051 1051
     ?>
1052 1052
 
Please login to merge, or discard this patch.
dolibarr/htdocs/theme/eldy/style.css.php 1 patch
Spacing   +125 added lines, -125 removed lines patch added patch discarded remove patch
@@ -48,18 +48,18 @@  discard block
 block discarded – undo
48 48
 }
49 49
 
50 50
 // Colors
51
-$colorbackhmenu1 = '60,70,100';      // topmenu
52
-$colorbackvmenu1 = '248,248,248';      // vmenu
53
-$colortopbordertitle1 = '200,200,200';    // top border of title
54
-$colorbacktitle1 = '220,220,223';      // title of tables,list
55
-$colorbacktabcard1 = '255,255,255';  // card
51
+$colorbackhmenu1 = '60,70,100'; // topmenu
52
+$colorbackvmenu1 = '248,248,248'; // vmenu
53
+$colortopbordertitle1 = '200,200,200'; // top border of title
54
+$colorbacktitle1 = '220,220,223'; // title of tables,list
55
+$colorbacktabcard1 = '255,255,255'; // card
56 56
 $colorbacktabactive = '234,234,234';
57
-$colorbacklineimpair1 = '255,255,255';    // line impair
58
-$colorbacklineimpair2 = '255,255,255';    // line impair
59
-$colorbacklinepair1 = '250,250,250';    // line pair
60
-$colorbacklinepair2 = '250,250,250';    // line pair
57
+$colorbacklineimpair1 = '255,255,255'; // line impair
58
+$colorbacklineimpair2 = '255,255,255'; // line impair
59
+$colorbacklinepair1 = '250,250,250'; // line pair
60
+$colorbacklinepair2 = '250,250,250'; // line pair
61 61
 $colorbacklinepairhover = '230,237,244'; // line hover
62
-$colorbacklinebreak = '214,218,220';  // line break
62
+$colorbacklinebreak = '214,218,220'; // line break
63 63
 $colorbackbody = '255,255,255';
64 64
 $colortexttitlenotab = '100,60,20';
65 65
 $colortexttitle = '0,0,0';
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
 
74 74
 session_cache_limiter('public');
75 75
 
76
-require_once DOL_BASE_PATH . '/main.inc.php';
77
-require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
76
+require_once DOL_BASE_PATH.'/main.inc.php';
77
+require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
78 78
 
79 79
 // Load user to have $user->conf loaded (not done into main because of NOLOGIN constant defined)
80 80
 // and permission, so we can later calculate number of top menu ($nbtopmenuentries) according to user profile.
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 }
96 96
 
97 97
 if (GETPOST('theme', 'alpha')) {
98
-    $conf->theme = GETPOST('theme', 'alpha');  // If theme was forced on URL
98
+    $conf->theme = GETPOST('theme', 'alpha'); // If theme was forced on URL
99 99
 }
100 100
 if (GETPOST('lang', 'aZ09')) {
101 101
     $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL
@@ -105,18 +105,18 @@  discard block
 block discarded – undo
105 105
 $right = ($langs->trans("DIRECTION") == 'rtl' ? 'left' : 'right');
106 106
 $left = ($langs->trans("DIRECTION") == 'rtl' ? 'right' : 'left');
107 107
 
108
-$path = '';     // This value may be used in future for external module to overwrite theme
108
+$path = ''; // This value may be used in future for external module to overwrite theme
109 109
 $theme = 'eldy'; // Value of theme
110 110
 if (!empty($conf->global->MAIN_OVERWRITE_THEME_RES)) {
111
-    $path = '/' . $conf->global->MAIN_OVERWRITE_THEME_RES;
111
+    $path = '/'.$conf->global->MAIN_OVERWRITE_THEME_RES;
112 112
     $theme = $conf->global->MAIN_OVERWRITE_THEME_RES;
113 113
 }
114 114
 
115 115
 // Define image path files and other constants
116
-$fontlist = 'roboto,arial,tahoma,verdana,helvetica';    //$fontlist='helvetica, verdana, arial, sans-serif';
116
+$fontlist = 'roboto,arial,tahoma,verdana,helvetica'; //$fontlist='helvetica, verdana, arial, sans-serif';
117 117
 //$fontlist='"open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;';
118 118
 $img_head = '';
119
-$img_button = dol_buildpath($path . '/theme/' . $theme . '/img/button_bg.png', 1);
119
+$img_button = dol_buildpath($path.'/theme/'.$theme.'/img/button_bg.png', 1);
120 120
 $dol_hide_topmenu = $conf->dol_hide_topmenu;
121 121
 $dol_hide_leftmenu = $conf->dol_hide_leftmenu;
122 122
 $dol_optimize_smallscreen = $conf->dol_optimize_smallscreen;
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 
152 152
 // Case of option editable only if option THEME_ELDY_ENABLE_PERSONALIZED is on
153 153
 if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED)) {
154
-    $conf->global->THEME_ELDY_BACKTABCARD1 = '255,255,255';     // card
154
+    $conf->global->THEME_ELDY_BACKTABCARD1 = '255,255,255'; // card
155 155
     $conf->global->THEME_ELDY_BACKTABACTIVE = '234,234,234';
156 156
     $conf->global->THEME_ELDY_TEXT = '0,0,0';
157 157
     $conf->global->THEME_ELDY_FONT_SIZE1 = '0.86em';
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 
189 189
 //$colortopbordertitle1=$colorbackhmenu1;
190 190
 // Set text color to black or white
191
-$colorbackhmenu1 = join(',', colorStringToArray($colorbackhmenu1));    // Normalize value to 'x,y,z'
191
+$colorbackhmenu1 = join(',', colorStringToArray($colorbackhmenu1)); // Normalize value to 'x,y,z'
192 192
 $tmppart = explode(',', $colorbackhmenu1);
193 193
 $tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0);
194 194
 if ($tmpval <= 460)
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 else
197 197
     $colortextbackhmenu = '000000';
198 198
 
199
-$colorbackvmenu1 = join(',', colorStringToArray($colorbackvmenu1));    // Normalize value to 'x,y,z'
199
+$colorbackvmenu1 = join(',', colorStringToArray($colorbackvmenu1)); // Normalize value to 'x,y,z'
200 200
 $tmppart = explode(',', $colorbackvmenu1);
201 201
 $tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0);
202 202
 if ($tmpval <= 460) {
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
     $colortextbackvmenu = '000000';
206 206
 }
207 207
 
208
-$colorbacktitle1 = join(',', colorStringToArray($colorbacktitle1));    // Normalize value to 'x,y,z'
208
+$colorbacktitle1 = join(',', colorStringToArray($colorbacktitle1)); // Normalize value to 'x,y,z'
209 209
 $tmppart = explode(',', $colorbacktitle1);
210 210
 if ($colortexttitle == '') {
211 211
     $tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0);
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 } else
220 220
     $colorshadowtitle = '888888';
221 221
 
222
-$colorbacktabcard1 = join(',', colorStringToArray($colorbacktabcard1));    // Normalize value to 'x,y,z'
222
+$colorbacktabcard1 = join(',', colorStringToArray($colorbacktabcard1)); // Normalize value to 'x,y,z'
223 223
 $tmppart = explode(',', $colorbacktabcard1);
224 224
 $tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0);
225 225
 if ($tmpval <= 460) {
@@ -252,9 +252,9 @@  discard block
 block discarded – undo
252 252
 $nbtopmenuentries = $menumanager->showmenu('topnb');
253 253
 
254 254
 
255
-$minwidthtmenu = 66;  /* minimum width for one top menu entry */
256
-$heightmenu = 48;   /* height of top menu, part with image */
257
-$heightmenu2 = 49;        /* height of top menu, part with login  */
255
+$minwidthtmenu = 66; /* minimum width for one top menu entry */
256
+$heightmenu = 48; /* height of top menu, part with image */
257
+$heightmenu2 = 49; /* height of top menu, part with login  */
258 258
 $disableimages = 0;
259 259
 $maxwidthloginblock = 130;
260 260
 if (!empty($conf->global->THEME_TOPMENU_DISABLE_IMAGE)) {
@@ -263,32 +263,32 @@  discard block
 block discarded – undo
263 263
     $minwidthtmenu = 0;
264 264
 }
265 265
 
266
-print '/*' . "\n";
267
-print 'colorbackbody=' . $colorbackbody . "\n";
268
-print 'colorbackvmenu1=' . $colorbackvmenu1 . "\n";
269
-print 'colorbackhmenu1=' . $colorbackhmenu1 . "\n";
270
-print 'colorbacktitle1=' . $colorbacktitle1 . "\n";
271
-print 'colorbacklineimpair1=' . $colorbacklineimpair1 . "\n";
272
-print 'colorbacklineimpair2=' . $colorbacklineimpair2 . "\n";
273
-print 'colorbacklinepair1=' . $colorbacklinepair1 . "\n";
274
-print 'colorbacklinepair2=' . $colorbacklinepair2 . "\n";
275
-print 'colorbacklinepairhover=' . $colorbacklinepairhover . "\n";
276
-print 'colorbacklinepairchecked=' . $colorbacklinepairchecked . "\n";
277
-print '$colortexttitlenotab=' . $colortexttitlenotab . "\n";
278
-print '$colortexttitle=' . $colortexttitle . "\n";
279
-print '$colortext=' . $colortext . "\n";
280
-print '$colortextlink=' . $colortextlink . "\n";
281
-print '$colortextbackhmenu=' . $colortextbackhmenu . "\n";
282
-print '$colortextbackvmenu=' . $colortextbackvmenu . "\n";
283
-print 'dol_hide_topmenu=' . $dol_hide_topmenu . "\n";
284
-print 'dol_hide_leftmenu=' . $dol_hide_leftmenu . "\n";
285
-print 'dol_optimize_smallscreen=' . $dol_optimize_smallscreen . "\n";
286
-print 'dol_no_mouse_hover=' . $dol_no_mouse_hover . "\n";
287
-print 'dol_screenwidth=' . $_SESSION['dol_screenwidth'] . "\n";
288
-print 'dol_screenheight=' . $_SESSION['dol_screenheight'] . "\n";
289
-print 'fontsize=' . $fontsize . "\n";
290
-print 'nbtopmenuentries=' . $nbtopmenuentries . "\n";
291
-print '*/' . "\n";
266
+print '/*'."\n";
267
+print 'colorbackbody='.$colorbackbody."\n";
268
+print 'colorbackvmenu1='.$colorbackvmenu1."\n";
269
+print 'colorbackhmenu1='.$colorbackhmenu1."\n";
270
+print 'colorbacktitle1='.$colorbacktitle1."\n";
271
+print 'colorbacklineimpair1='.$colorbacklineimpair1."\n";
272
+print 'colorbacklineimpair2='.$colorbacklineimpair2."\n";
273
+print 'colorbacklinepair1='.$colorbacklinepair1."\n";
274
+print 'colorbacklinepair2='.$colorbacklinepair2."\n";
275
+print 'colorbacklinepairhover='.$colorbacklinepairhover."\n";
276
+print 'colorbacklinepairchecked='.$colorbacklinepairchecked."\n";
277
+print '$colortexttitlenotab='.$colortexttitlenotab."\n";
278
+print '$colortexttitle='.$colortexttitle."\n";
279
+print '$colortext='.$colortext."\n";
280
+print '$colortextlink='.$colortextlink."\n";
281
+print '$colortextbackhmenu='.$colortextbackhmenu."\n";
282
+print '$colortextbackvmenu='.$colortextbackvmenu."\n";
283
+print 'dol_hide_topmenu='.$dol_hide_topmenu."\n";
284
+print 'dol_hide_leftmenu='.$dol_hide_leftmenu."\n";
285
+print 'dol_optimize_smallscreen='.$dol_optimize_smallscreen."\n";
286
+print 'dol_no_mouse_hover='.$dol_no_mouse_hover."\n";
287
+print 'dol_screenwidth='.$_SESSION['dol_screenwidth']."\n";
288
+print 'dol_screenheight='.$_SESSION['dol_screenheight']."\n";
289
+print 'fontsize='.$fontsize."\n";
290
+print 'nbtopmenuentries='.$nbtopmenuentries."\n";
291
+print '*/'."\n";
292 292
 
293 293
 ?>
294 294
 
@@ -304,14 +304,14 @@  discard block
 block discarded – undo
304 304
         background: rgb(<?php print $colorbackbody; ?>);
305 305
     <?php } ?>
306 306
     color: rgb(<?php echo $colortext; ?>);
307
-    font-size: <?php print is_numeric($fontsize) ? $fontsize . 'px' : $fontsize; ?>;
307
+    font-size: <?php print is_numeric($fontsize) ? $fontsize.'px' : $fontsize; ?>;
308 308
     line-height: 1.4;
309 309
     font-family: <?php print $fontlist ?>;
310 310
     margin-top: 0;
311 311
     margin-bottom: 0;
312 312
     margin-right: 0;
313 313
     margin-left: 0;
314
-    <?php print 'direction: ' . $langs->trans("DIRECTION") . ";\n"; ?>
314
+    <?php print 'direction: '.$langs->trans("DIRECTION").";\n"; ?>
315 315
     }
316 316
 
317 317
 .thumbstat { font-weight: bold !important; }
@@ -435,29 +435,29 @@  discard block
 block discarded – undo
435 435
 box-shadow: 1px 1px 8px #bbb;
436 436
 }
437 437
 input.buttonpaymentcb {
438
-background-image: url(<?php echo dol_buildpath($path . '/theme/common/credit_card.png', 1) ?>);
438
+background-image: url(<?php echo dol_buildpath($path.'/theme/common/credit_card.png', 1) ?>);
439 439
 background-size: 26px;
440 440
 background-repeat: no-repeat;
441 441
 background-position: 5px 11px;
442 442
 }
443 443
 input.buttonpaymentcheque {
444
-background-image: url(<?php echo dol_buildpath($path . '/theme/common/cheque.png', 1) ?>);
444
+background-image: url(<?php echo dol_buildpath($path.'/theme/common/cheque.png', 1) ?>);
445 445
 background-size: 24px;
446 446
 background-repeat: no-repeat;
447 447
 background-position: 5px 8px;
448 448
 }
449 449
 input.buttonpaymentpaypal {
450
-background-image: url(<?php echo dol_buildpath($path . '/paypal/img/object_paypal.png', 1) ?>);
450
+background-image: url(<?php echo dol_buildpath($path.'/paypal/img/object_paypal.png', 1) ?>);
451 451
 background-repeat: no-repeat;
452 452
 background-position: 8px 11px;
453 453
 }
454 454
 input.buttonpaymentpaybox {
455
-background-image: url(<?php echo dol_buildpath($path . '/paybox/img/object_paybox.png', 1) ?>);
455
+background-image: url(<?php echo dol_buildpath($path.'/paybox/img/object_paybox.png', 1) ?>);
456 456
 background-repeat: no-repeat;
457 457
 background-position: 8px 11px;
458 458
 }
459 459
 input.buttonpaymentstripe {
460
-background-image: url(<?php echo dol_buildpath($path . '/stripe/img/object_stripe.png', 1) ?>);
460
+background-image: url(<?php echo dol_buildpath($path.'/stripe/img/object_stripe.png', 1) ?>);
461 461
 background-repeat: no-repeat;
462 462
 background-position: 8px 11px;
463 463
 }
@@ -950,7 +950,7 @@  discard block
 block discarded – undo
950 950
 }
951 951
 
952 952
 .flexcontainer {
953
-<?php if (in_array($conf->browser->name, array('chrome', 'firefox'))) echo 'display: inline-flex;' . "\n"; ?>
953
+<?php if (in_array($conf->browser->name, array('chrome', 'firefox'))) echo 'display: inline-flex;'."\n"; ?>
954 954
 flex-flow: row wrap;
955 955
 justify-content: flex-start;
956 956
 }
@@ -1076,10 +1076,10 @@  discard block
 block discarded – undo
1076 1076
 @media only screen and (max-width: 767px)
1077 1077
 {
1078 1078
 body {
1079
-font-size: <?php print is_numeric($fontsize) ? ($fontsize + 3) . 'px' : $fontsize; ?>;
1079
+font-size: <?php print is_numeric($fontsize) ? ($fontsize + 3).'px' : $fontsize; ?>;
1080 1080
 }
1081 1081
 div.refidno {
1082
-font-size: <?php print is_numeric($fontsize) ? ($fontsize + 3) . 'px' : $fontsize; ?> !important;
1082
+font-size: <?php print is_numeric($fontsize) ? ($fontsize + 3).'px' : $fontsize; ?> !important;
1083 1083
 }
1084 1084
 }
1085 1085
 
@@ -1087,10 +1087,10 @@  discard block
 block discarded – undo
1087 1087
 @media only screen and (max-width: 570px)
1088 1088
 {
1089 1089
 body {
1090
-font-size: <?php print is_numeric($fontsize) ? ($fontsize + 3) . 'px' : $fontsize; ?>;
1090
+font-size: <?php print is_numeric($fontsize) ? ($fontsize + 3).'px' : $fontsize; ?>;
1091 1091
 }
1092 1092
 div.refidno {
1093
-font-size: <?php print is_numeric($fontsize) ? ($fontsize + 3) . 'px' : $fontsize; ?> !important;
1093
+font-size: <?php print is_numeric($fontsize) ? ($fontsize + 3).'px' : $fontsize; ?> !important;
1094 1094
 }
1095 1095
 
1096 1096
 .divmainbodylarge { margin-left: 20px !important; margin-right: 20px !important; }
@@ -1119,7 +1119,7 @@  discard block
 block discarded – undo
1119 1119
 }
1120 1120
 input, input[type=text], input[type=password], select, textarea     {
1121 1121
 min-width: 20px;
1122
-font-size: <?php print is_numeric($fontsize) ? ($fontsize + 3) . 'px' : $fontsize; ?>;
1122
+font-size: <?php print is_numeric($fontsize) ? ($fontsize + 3).'px' : $fontsize; ?>;
1123 1123
 /* min-height: 1.4em; */
1124 1124
 /* line-height: 1.4em; */
1125 1125
 /* padding: .4em .1em; */
@@ -1339,8 +1339,8 @@  discard block
 block discarded – undo
1339 1339
 div.fiche {
1340 1340
 margin-<?php print $left; ?>: <?php print (GETPOST('optioncss', 'aZ09') == 'print' ? 6 : (empty($conf->dol_optimize_smallscreen) ? '30' : '6')); ?>px;
1341 1341
 margin-<?php print $right; ?>: <?php print (GETPOST('optioncss', 'aZ09') == 'print' ? 6 : (empty($conf->dol_optimize_smallscreen) ? '29' : '6')); ?>px;
1342
-<?php if (!empty($dol_hide_leftmenu)) print 'margin-bottom: 12px;' . "\n"; ?>
1343
-<?php if (!empty($dol_hide_leftmenu)) print 'margin-top: 12px;' . "\n"; ?>
1342
+<?php if (!empty($dol_hide_leftmenu)) print 'margin-bottom: 12px;'."\n"; ?>
1343
+<?php if (!empty($dol_hide_leftmenu)) print 'margin-top: 12px;'."\n"; ?>
1344 1344
 }
1345 1345
 body.onlinepaymentbody div.fiche {	/* For online payment page */
1346 1346
 margin: 20px !important;
@@ -1359,7 +1359,7 @@  discard block
 block discarded – undo
1359 1359
 div.fichethirdleft {
1360 1360
 <?php
1361 1361
 if ($conf->browser->layout != 'phone') {
1362
-    print "float: " . $left . ";\n";
1362
+    print "float: ".$left.";\n";
1363 1363
 }
1364 1364
 
1365 1365
 ?>
@@ -1379,7 +1379,7 @@  discard block
 block discarded – undo
1379 1379
 div.fichetwothirdright {
1380 1380
 <?php
1381 1381
 if ($conf->browser->layout != 'phone') {
1382
-    print "float: " . $right . ";\n";
1382
+    print "float: ".$right.";\n";
1383 1383
 }
1384 1384
 
1385 1385
 ?>
@@ -1399,7 +1399,7 @@  discard block
 block discarded – undo
1399 1399
 div.fichehalfleft {
1400 1400
 <?php
1401 1401
 if ($conf->browser->layout != 'phone') {
1402
-    print "float: " . $left . ";\n";
1402
+    print "float: ".$left.";\n";
1403 1403
 }
1404 1404
 
1405 1405
 ?>
@@ -1413,7 +1413,7 @@  discard block
 block discarded – undo
1413 1413
 div.fichehalfright {
1414 1414
 <?php
1415 1415
 if ($conf->browser->layout != 'phone') {
1416
-    print "float: " . $right . ";\n";
1416
+    print "float: ".$right.";\n";
1417 1417
 }
1418 1418
 
1419 1419
 ?>
@@ -1427,7 +1427,7 @@  discard block
 block discarded – undo
1427 1427
 div.ficheaddleft {
1428 1428
 <?php
1429 1429
 if ($conf->browser->layout != 'phone') {
1430
-    print "padding-" . $left . ": 16px;\n";
1430
+    print "padding-".$left.": 16px;\n";
1431 1431
 } else
1432 1432
     print "margin-top: 10px;\n";
1433 1433
 
@@ -1472,7 +1472,7 @@  discard block
 block discarded – undo
1472 1472
 width: auto;
1473 1473
 }
1474 1474
 div.ficheaddleft {
1475
-<?php print "padding-" . $left . ": 0px;\n"; ?>
1475
+<?php print "padding-".$left.": 0px;\n"; ?>
1476 1476
 margin-top: 10px;
1477 1477
 }
1478 1478
 div.firstcolumn div.box {
@@ -1722,7 +1722,7 @@  discard block
 block discarded – undo
1722 1722
 ul.tmenu li {	/* We need this to have background color when menu entry wraps on new lines */
1723 1723
 }
1724 1724
 li.tmenu, li.tmenusel {
1725
-<?php print $minwidthtmenu ? 'min-width: ' . $minwidthtmenu . 'px;' : ''; ?>
1725
+<?php print $minwidthtmenu ? 'min-width: '.$minwidthtmenu.'px;' : ''; ?>
1726 1726
 text-align: center;
1727 1727
 vertical-align: bottom;
1728 1728
 <?php if (empty($conf->global->MAIN_MENU_INVERT)) { ?>
@@ -1802,7 +1802,7 @@  discard block
 block discarded – undo
1802 1802
 /* For mainmenu, we always load the img */
1803 1803
 
1804 1804
 div.mainmenu.menu {
1805
-background-image: url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/menus/menu.png', 1) ?>);
1805
+background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/menu.png', 1) ?>);
1806 1806
 <?php print $disableimages ? '' : 'top: 7px'; ?>
1807 1807
 }
1808 1808
 #mainmenutd_menu a.tmenuimage {
@@ -1817,80 +1817,80 @@  discard block
 block discarded – undo
1817 1817
 <?php if (empty($dol_hide_topmenu)) { ?>
1818 1818
 
1819 1819
     div.mainmenu.home{
1820
-    background-image: url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/menus/home_over.png', 1) ?>);
1820
+    background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/home_over.png', 1) ?>);
1821 1821
     background-position-x: center;
1822 1822
     }
1823 1823
 
1824 1824
         div.mainmenu.billing {
1825
-        background-image: url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/menus/money_over.png', 1) ?>);
1825
+        background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/money_over.png', 1) ?>);
1826 1826
         }
1827 1827
 
1828 1828
         div.mainmenu.accountancy {
1829
-        background-image: url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/menus/money_over.png', 1) ?>);
1829
+        background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/money_over.png', 1) ?>);
1830 1830
         }
1831 1831
 
1832 1832
         div.mainmenu.agenda {
1833
-        background-image: url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/menus/agenda_over.png', 1) ?>);
1833
+        background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/agenda_over.png', 1) ?>);
1834 1834
         }
1835 1835
 
1836 1836
         div.mainmenu.bank {
1837
-        background-image: url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/menus/bank_over.png', 1) ?>);
1837
+        background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/bank_over.png', 1) ?>);
1838 1838
         }
1839 1839
 
1840 1840
         div.mainmenu.cashdesk {
1841
-        background-image: url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/menus/pointofsale_over.png', 1) ?>);
1841
+        background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/pointofsale_over.png', 1) ?>);
1842 1842
         }
1843 1843
 
1844 1844
         div.mainmenu.takepos {
1845
-        background-image: url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/menus/pointofsale_over.png', 1) ?>);
1845
+        background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/pointofsale_over.png', 1) ?>);
1846 1846
         }
1847 1847
 
1848 1848
         div.mainmenu.companies {
1849
-        background-image: url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/menus/company_over.png', 1) ?>);
1849
+        background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/company_over.png', 1) ?>);
1850 1850
         }
1851 1851
 
1852 1852
         div.mainmenu.commercial {
1853
-        background-image: url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/menus/commercial_over.png', 1) ?>);
1853
+        background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/commercial_over.png', 1) ?>);
1854 1854
         }
1855 1855
 
1856 1856
         div.mainmenu.ecm {
1857
-        background-image: url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/menus/ecm_over.png', 1) ?>);
1857
+        background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/ecm_over.png', 1) ?>);
1858 1858
         }
1859 1859
 
1860 1860
         div.mainmenu.externalsite {
1861
-        background-image: url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/menus/externalsite_over.png', 1) ?>);
1861
+        background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/externalsite_over.png', 1) ?>);
1862 1862
         }
1863 1863
 
1864 1864
         div.mainmenu.ftp {
1865
-        background-image: url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/menus/tools_over.png', 1) ?>);
1865
+        background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/tools_over.png', 1) ?>);
1866 1866
         }
1867 1867
 
1868 1868
         div.mainmenu.hrm {
1869
-        background-image: url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/menus/holiday_over.png', 1) ?>);
1869
+        background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/holiday_over.png', 1) ?>);
1870 1870
         }
1871 1871
 
1872 1872
         div.mainmenu.members {
1873
-        background-image: url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/menus/members_over.png', 1) ?>);
1873
+        background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/members_over.png', 1) ?>);
1874 1874
         }
1875 1875
 
1876 1876
         div.mainmenu.products {
1877
-        background-image: url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/menus/products_over.png', 1) ?>);
1877
+        background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/products_over.png', 1) ?>);
1878 1878
         }
1879 1879
 
1880 1880
         div.mainmenu.project {
1881
-        background-image: url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/menus/project_over.png', 1) ?>);
1881
+        background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/project_over.png', 1) ?>);
1882 1882
         }
1883 1883
 
1884 1884
         div.mainmenu.ticket {
1885
-        background-image: url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/menus/ticket_over.png', 1) ?>);
1885
+        background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/ticket_over.png', 1) ?>);
1886 1886
         }
1887 1887
 
1888 1888
         div.mainmenu.tools {
1889
-        background-image: url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/menus/tools_over.png', 1) ?>);
1889
+        background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/tools_over.png', 1) ?>);
1890 1890
         }
1891 1891
 
1892 1892
         div.mainmenu.website {
1893
-        background-image: url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/menus/externalsite_over.png', 1) ?>);
1893
+        background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/externalsite_over.png', 1) ?>);
1894 1894
         }
1895 1895
 
1896 1896
         <?php
@@ -1906,7 +1906,7 @@  discard block
 block discarded – undo
1906 1906
         );
1907 1907
         $mainmenuused = 'home';
1908 1908
         foreach ($conf->modules as $val) {
1909
-            $mainmenuused .= ',' . (isset($moduletomainmenu[$val]) ? $moduletomainmenu[$val] : $val);
1909
+            $mainmenuused .= ','.(isset($moduletomainmenu[$val]) ? $moduletomainmenu[$val] : $val);
1910 1910
         }
1911 1911
 //var_dump($mainmenuused);
1912 1912
         $mainmenuusedarray = array_unique(explode(',', $mainmenuused));
@@ -1926,31 +1926,31 @@  discard block
 block discarded – undo
1926 1926
             $found = 0;
1927 1927
             $url = '';
1928 1928
             foreach ($conf->file->dol_document_root as $dirroot) {
1929
-                if (file_exists($dirroot . "/" . $val . "/img/" . $val . "_over.png")) {
1930
-                    $url = dol_buildpath('/' . $val . '/img/' . $val . '_over.png', 1);
1929
+                if (file_exists($dirroot."/".$val."/img/".$val."_over.png")) {
1930
+                    $url = dol_buildpath('/'.$val.'/img/'.$val.'_over.png', 1);
1931 1931
                     $found = 1;
1932 1932
                     break;
1933 1933
                 }
1934 1934
             }
1935 1935
             // Img file not found
1936 1936
             if (!$found) {
1937
-                $url = dol_buildpath($path . '/theme/' . $theme . '/img/menus/generic' . $generic . "_over.png", 1);
1937
+                $url = dol_buildpath($path.'/theme/'.$theme.'/img/menus/generic'.$generic."_over.png", 1);
1938 1938
                 $found = 1;
1939 1939
                 if ($generic < 4)
1940 1940
                     $generic++;
1941
-                print "/* A mainmenu entry was found but img file " . $val . ".png not found (check /" . $val . "/img/" . $val . ".png), so we use a generic one */\n";
1941
+                print "/* A mainmenu entry was found but img file ".$val.".png not found (check /".$val."/img/".$val.".png), so we use a generic one */\n";
1942 1942
             }
1943 1943
             if ($found) {
1944
-                print "div.mainmenu." . $val . " {\n";
1945
-                print "	background-image: url(" . $url . ");\n";
1944
+                print "div.mainmenu.".$val." {\n";
1945
+                print "	background-image: url(".$url.");\n";
1946 1946
                 print "}\n";
1947 1947
             }
1948 1948
         }
1949 1949
         $j = 0;
1950 1950
         while ($j++ < 4) {
1951
-            $url = dol_buildpath($path . '/theme/' . $theme . '/img/menus/generic' . $j . "_over.png", 1);
1952
-            print "div.mainmenu.generic" . $j . " {\n";
1953
-            print "	background-image: url(" . $url . ");\n";
1951
+            $url = dol_buildpath($path.'/theme/'.$theme.'/img/menus/generic'.$j."_over.png", 1);
1952
+            print "div.mainmenu.generic".$j." {\n";
1953
+            print "	background-image: url(".$url.");\n";
1954 1954
             print "}\n";
1955 1955
         }
1956 1956
 // End of part to add more div class css
@@ -2114,7 +2114,7 @@  discard block
 block discarded – undo
2114 2114
 <?php print $right; ?>: 0;
2115 2115
 top: <?php print $disableimages ? '4px' : '0'; ?>;
2116 2116
 font-weight: bold;
2117
-<?php echo (empty($disableimages) && $maxwidthloginblock) ? 'max-width: ' . $maxwidthloginblock . 'px;' : ''; ?>
2117
+<?php echo (empty($disableimages) && $maxwidthloginblock) ? 'max-width: '.$maxwidthloginblock.'px;' : ''; ?>
2118 2118
 <?php if (GETPOST('optioncss', 'aZ09') == 'print') { ?>
2119 2119
     display: none;
2120 2120
 <?php } ?>
@@ -2210,11 +2210,11 @@  discard block
 block discarded – undo
2210 2210
 background-color: #FFF;
2211 2211
 }
2212 2212
 .span-icon-user {
2213
-background-image: url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/object_user.png', 1); ?>);
2213
+background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/object_user.png', 1); ?>);
2214 2214
 background-repeat: no-repeat;
2215 2215
 }
2216 2216
 .span-icon-password {
2217
-background-image: url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/lock.png', 1); ?>);
2217
+background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/lock.png', 1); ?>);
2218 2218
 background-repeat: no-repeat;
2219 2219
 }
2220 2220
 
@@ -2271,7 +2271,7 @@  discard block
 block discarded – undo
2271 2271
 font.vsmenudisabledmargin { margin: 1px 1px 1px 6px; }
2272 2272
 li a.vsmenudisabled, li.vsmenudisabled { color: #aaa !important; }
2273 2273
 
2274
-a.help:link, a.help:visited, a.help:hover, a.help:active, span.help { font-size:<?php print is_numeric($fontsizesmaller) ? ($fontsizesmaller . 'px') : $fontsizesmaller; ?>; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #aaa; text-decoration: none; }
2274
+a.help:link, a.help:visited, a.help:hover, a.help:active, span.help { font-size:<?php print is_numeric($fontsizesmaller) ? ($fontsizesmaller.'px') : $fontsizesmaller; ?>; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #aaa; text-decoration: none; }
2275 2275
 
2276 2276
 .vmenu div.blockvmenufirst, .vmenu div.blockvmenulogo, .vmenu div.blockvmenusearchphone, .vmenu div.blockvmenubookmarks
2277 2277
 {
@@ -2546,7 +2546,7 @@  discard block
 block discarded – undo
2546 2546
 a.tab:hover
2547 2547
 {
2548 2548
 /*
2549
-background: rgba(<?php echo $colorbacktabcard1; ?>, 0.5)  url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/nav-overlay3.png', 1); ?>) 50% 0 repeat-x;
2549
+background: rgba(<?php echo $colorbacktabcard1; ?>, 0.5)  url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/nav-overlay3.png', 1); ?>) 50% 0 repeat-x;
2550 2550
 color: #<?php echo $colortextbacktab; ?>;
2551 2551
 */
2552 2552
 text-decoration: underline;
@@ -2962,7 +2962,7 @@  discard block
 block discarded – undo
2962 2962
 padding-top: 3px;
2963 2963
 font-weight: normal;
2964 2964
 color: #444;
2965
-font-size: <?php print is_numeric($fontsize) ? $fontsize . 'px' : $fontsize  ?>;
2965
+font-size: <?php print is_numeric($fontsize) ? $fontsize.'px' : $fontsize  ?>;
2966 2966
 line-height: 21px;
2967 2967
 }
2968 2968
 div.refidno form {
@@ -3736,12 +3736,12 @@  discard block
 block discarded – undo
3736 3736
 
3737 3737
 .logo_setup
3738 3738
 {
3739
-content:url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/logo_setup.svg', 1) ?>);	/* content is used to best fit the container */
3739
+content:url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/logo_setup.svg', 1) ?>);	/* content is used to best fit the container */
3740 3740
 display: inline-block;
3741 3741
 }
3742 3742
 .nographyet
3743 3743
 {
3744
-content:url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/nographyet.svg', 1) ?>);
3744
+content:url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/nographyet.svg', 1) ?>);
3745 3745
 display: inline-block;
3746 3746
 opacity: 0.1;
3747 3747
 background-repeat: no-repeat;
@@ -4127,7 +4127,7 @@  discard block
 block discarded – undo
4127 4127
 
4128 4128
 .ui-widget-content { border: solid 1px rgba(0,0,0,.3); background: #fff !important; }
4129 4129
 
4130
-.ui-autocomplete-loading { background: white url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/working.gif', 1) ?>) right center no-repeat; }
4130
+.ui-autocomplete-loading { background: white url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/working.gif', 1) ?>) right center no-repeat; }
4131 4131
 .ui-autocomplete {
4132 4132
 position:absolute;
4133 4133
 width:auto;
@@ -4158,14 +4158,14 @@  discard block
 block discarded – undo
4158 4158
 /* ============================================================================== */
4159 4159
 
4160 4160
 .editkey_textarea, .editkey_ckeditor, .editkey_string, .editkey_email, .editkey_numeric, .editkey_select, .editkey_autocomplete {
4161
-background: url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/edit.png', 1) ?>) right top no-repeat;
4161
+background: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/edit.png', 1) ?>) right top no-repeat;
4162 4162
 cursor: pointer;
4163 4163
 margin-right: 3px;
4164 4164
 margin-top: 3px;
4165 4165
 }
4166 4166
 
4167 4167
 .editkey_datepicker {
4168
-background: url(<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/calendar.png', 1) ?>) right center no-repeat;
4168
+background: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/calendar.png', 1) ?>) right center no-repeat;
4169 4169
 margin-right: 3px;
4170 4170
 cursor: pointer;
4171 4171
 margin-right: 3px;
@@ -4659,9 +4659,9 @@  discard block
 block discarded – undo
4659 4659
 float: right;
4660 4660
 }
4661 4661
 
4662
-.ecmjqft LI.directory { font-weight:normal; background: url(<?php echo dol_buildpath($path . '/theme/common/treemenu/folder2.png', 1); ?>) left top no-repeat; }
4663
-.ecmjqft LI.expanded { font-weight:normal; background: url(<?php echo dol_buildpath($path . '/theme/common/treemenu/folder2-expanded.png', 1); ?>) left top no-repeat; }
4664
-.ecmjqft LI.wait { font-weight:normal; background: url(<?php echo dol_buildpath('/theme/' . $theme . '/img/working.gif', 1); ?>) left top no-repeat; }
4662
+.ecmjqft LI.directory { font-weight:normal; background: url(<?php echo dol_buildpath($path.'/theme/common/treemenu/folder2.png', 1); ?>) left top no-repeat; }
4663
+.ecmjqft LI.expanded { font-weight:normal; background: url(<?php echo dol_buildpath($path.'/theme/common/treemenu/folder2-expanded.png', 1); ?>) left top no-repeat; }
4664
+.ecmjqft LI.wait { font-weight:normal; background: url(<?php echo dol_buildpath('/theme/'.$theme.'/img/working.gif', 1); ?>) left top no-repeat; }
4665 4665
 
4666 4666
 
4667 4667
 /* ============================================================================== */
@@ -4729,10 +4729,10 @@  discard block
 block discarded – undo
4729 4729
 table.dataTable tr.odd td.sorting_1, table.dataTable tr.even td.sorting_1 {
4730 4730
 background: none !important;
4731 4731
 }
4732
-.sorting_asc  { background: url('<?php echo dol_buildpath('/theme/' . $theme . '/img/sort_asc.png', 1); ?>') no-repeat center right !important; }
4733
-.sorting_desc { background: url('<?php echo dol_buildpath('/theme/' . $theme . '/img/sort_desc.png', 1); ?>') no-repeat center right !important; }
4734
-.sorting_asc_disabled  { background: url('<?php echo dol_buildpath('/theme/' . $theme . '/img/sort_asc_disabled.png', 1); ?>') no-repeat center right !important; }
4735
-.sorting_desc_disabled { background: url('<?php echo dol_buildpath('/theme/' . $theme . '/img/sort_desc_disabled.png', 1); ?>') no-repeat center right !important; }
4732
+.sorting_asc  { background: url('<?php echo dol_buildpath('/theme/'.$theme.'/img/sort_asc.png', 1); ?>') no-repeat center right !important; }
4733
+.sorting_desc { background: url('<?php echo dol_buildpath('/theme/'.$theme.'/img/sort_desc.png', 1); ?>') no-repeat center right !important; }
4734
+.sorting_asc_disabled  { background: url('<?php echo dol_buildpath('/theme/'.$theme.'/img/sort_asc_disabled.png', 1); ?>') no-repeat center right !important; }
4735
+.sorting_desc_disabled { background: url('<?php echo dol_buildpath('/theme/'.$theme.'/img/sort_desc_disabled.png', 1); ?>') no-repeat center right !important; }
4736 4736
 .dataTables_paginate {
4737 4737
 margin-top: 8px;
4738 4738
 }
@@ -5255,7 +5255,7 @@  discard block
 block discarded – undo
5255 5255
 min-width: .4em;
5256 5256
 padding-left: 6px;
5257 5257
 padding-right: 6px;
5258
-font-size: <?php print is_numeric($fontsize) ? $fontsize . 'px' : $fontsize; ?>;
5258
+font-size: <?php print is_numeric($fontsize) ? $fontsize.'px' : $fontsize; ?>;
5259 5259
 /* white-space: normal; */		/* Warning, enable this break the truncate feature */
5260 5260
 }
5261 5261
 .ui-btn-icon-right .ui-btn-inner {
@@ -5461,10 +5461,10 @@  discard block
 block discarded – undo
5461 5461
 /* ============================================================================== */
5462 5462
 
5463 5463
 .menu_choix1 a {
5464
-background: url('<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/menus_black/money.png', 1) ?>') top left no-repeat;
5464
+background: url('<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus_black/money.png', 1) ?>') top left no-repeat;
5465 5465
 }
5466 5466
 .menu_choix2 a {
5467
-background: url('<?php echo dol_buildpath($path . '/theme/' . $theme . '/img/menus_black/home.png', 1) ?>') top left no-repeat;
5467
+background: url('<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus_black/home.png', 1) ?>') top left no-repeat;
5468 5468
 }
5469 5469
 .menu_choix1,.menu_choix2 {
5470 5470
 font-size: 1.4em;
@@ -5838,7 +5838,7 @@  discard block
 block discarded – undo
5838 5838
 }
5839 5839
 }
5840 5840
 
5841
-/* nboftopmenuentries = <?php echo $nbtopmenuentries ?>, fontsize=<?php echo is_numeric($fontsize) ? $fontsize . 'px' : $fontsize ?> */
5841
+/* nboftopmenuentries = <?php echo $nbtopmenuentries ?>, fontsize=<?php echo is_numeric($fontsize) ? $fontsize.'px' : $fontsize ?> */
5842 5842
 /* rule to reduce top menu - 1st reduction */
5843 5843
 @media only screen and (max-width: <?php echo round($nbtopmenuentries * 91, 0) + 24; ?>px)	/* reduction 1 */
5844 5844
 {
Please login to merge, or discard this patch.