25 require
'../main.inc.php';
28 $langs->loadLangs(array(
'admin',
'companies'));
33 $hookmanager->initHooks(array(
'homesetup'));
40 $form =
new Form($db);
42 $wikihelp =
'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
48 if (!empty($conf->global->MAIN_MOTD_SETUPPAGE))
50 $conf->global->MAIN_MOTD_SETUPPAGE = preg_replace(
'/<br(\s[\sa-zA-Z_="]*)?\/?>/i',
'<br>', $conf->global->MAIN_MOTD_SETUPPAGE);
51 if (!empty($conf->global->MAIN_MOTD_SETUPPAGE))
54 while (preg_match(
'/__\(([a-zA-Z|@]+)\)__/i', $conf->global->MAIN_MOTD_SETUPPAGE, $reg) && $i < 100)
56 $tmp = explode(
'|', $reg[1]);
57 if (!empty($tmp[1])) $langs->load($tmp[1]);
58 $conf->global->MAIN_MOTD_SETUPPAGE = preg_replace(
'/__\('.preg_quote($reg[1]).
'\)__/i', $langs->trans($tmp[0]), $conf->global->MAIN_MOTD_SETUPPAGE);
62 print "\n<!-- Start of welcome text for setup page -->\n";
63 print '<table width="100%" class="notopnoleftnoright"><tr><td>';
65 print '</td></tr></table><br>';
66 print "\n<!-- End of welcome text for setup page -->\n";
70 print '<span class="opacitymedium hideonsmartphone">';
71 print $langs->trans(
"SetupDescription1").
' ';
72 print $langs->trans(
"AreaForAdminOnly").
' ';
73 print $langs->trans(
"SetupDescription2", $langs->transnoentities(
"MenuCompanySetup"), $langs->transnoentities(
"Modules"));
80 if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY)) $setupcompanynotcomplete = 1;
81 print img_picto(
'',
'puce').
' '.$langs->trans(
"SetupDescription3", DOL_URL_ROOT.
'/admin/company.php?mainmenu=home'.(empty($setupcompanynotcomplete) ?
'' :
'&action=edit'), $langs->transnoentities(
"Setup"), $langs->transnoentities(
"MenuCompanySetup"));
82 if (!empty($setupcompanynotcomplete))
84 $langs->load(
"errors");
85 $warnpicto =
img_warning($langs->trans(
"WarningMandatorySetupNotComplete"),
'style="padding-right: 6px;"');
86 print '<br><div class="warning"><a href="'.DOL_URL_ROOT.
'/admin/company.php?mainmenu=home'.(empty($setupcompanynotcomplete) ?
'' :
'&action=edit').
'">'.$warnpicto.$langs->trans(
"WarningMandatorySetupNotComplete").
'</a></div>';
93 print img_picto(
'',
'puce').
' '.$langs->trans(
"SetupDescription4", DOL_URL_ROOT.
'/admin/modules.php?mainmenu=home', $langs->transnoentities(
"Setup"), $langs->transnoentities(
"Modules"));
94 if (count($conf->modules) <= (empty($conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING) ? 1 : $conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING))
96 $langs->load(
"errors");
97 $warnpicto =
img_warning($langs->trans(
"WarningEnableYourModulesApplications"),
'style="padding-right: 6px;"');
98 print '<br><div class="warning"><a href="'.DOL_URL_ROOT.
'/admin/modules.php?mainmenu=home">'.$warnpicto.$langs->trans(
"WarningEnableYourModulesApplications").
'</a></div>';
106 $parameters = array();
107 $reshook = $hookmanager->executeHooks(
'addHomeSetup', $parameters, $object, $action);
108 print $hookmanager->resPrint;
112 print '<span class="opacitymedium">'.$langs->trans(
"SetupDescription5").
"</span><br>";
116 print '<div class="center"><div class="logo_setup"></div></div>';
dol_htmlentitiesbr($stringtoencode, $nl2brmode=0, $pagecodefrom= 'UTF-8', $removelasteolbr=1)
This function is called to encode a string into a HTML string but differs from htmlentities because a...
img_warning($titlealt= 'default', $moreatt= '', $morecss= 'pictowarning')
Show warning logo.
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save"&&empty($cancel)) $wikihelp
View.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
print
Draft customers invoices.