|
@@ -28,8 +28,6 @@ $langs->load("companies");
|
|
|
|
|
|
if (!$user->admin) accessforbidden();
|
|
|
|
|
|
-$mesg='';
|
|
|
-
|
|
|
|
|
|
/*
|
|
|
* View
|
|
@@ -43,7 +41,28 @@ $form = new Form($db);
|
|
|
|
|
|
print_fiche_titre($langs->trans("SetupArea"),'','setup');
|
|
|
|
|
|
-if ($mesg) print $mesg.'<br>';
|
|
|
+
|
|
|
+if (! empty($conf->global->MAIN_MOTD_SETUPPAGE))
|
|
|
+{
|
|
|
+ $conf->global->MAIN_MOTD_SETUPPAGE=preg_replace('/<br(\s[\sa-zA-Z_="]*)?\/?>/i','<br>',$conf->global->MAIN_MOTD_SETUPPAGE);
|
|
|
+ if (! empty($conf->global->MAIN_MOTD_SETUPPAGE))
|
|
|
+ {
|
|
|
+ $i=0;
|
|
|
+ while (preg_match('/__\(([a-zA-Z|@]+)\)__/i',$conf->global->MAIN_MOTD_SETUPPAGE,$reg) && $i < 100)
|
|
|
+ {
|
|
|
+ $tmp=explode('|',$reg[1]);
|
|
|
+ if (! empty($tmp[1])) $langs->load($tmp[1]);
|
|
|
+ $conf->global->MAIN_MOTD_SETUPPAGE=preg_replace('/__\('.preg_quote($reg[1]).'\)__/i',$langs->trans($tmp[0]),$conf->global->MAIN_MOTD_SETUPPAGE);
|
|
|
+ $i++;
|
|
|
+ }
|
|
|
+
|
|
|
+ print "\n<!-- Start of welcome text for setup page -->\n";
|
|
|
+ print '<table width="100%" class="notopnoleftnoright"><tr><td>';
|
|
|
+ print dol_htmlentitiesbr($conf->global->MAIN_MOTD_SETUPPAGE);
|
|
|
+ print '</td></tr></table><br>';
|
|
|
+ print "\n<!-- End of welcome text for setup page -->\n";
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
print $langs->trans("SetupDescription1").' ';
|
|
|
print $langs->trans("AreaForAdminOnly").' ';
|