26require
'../main.inc.php';
29$langs->loadLangs(array(
'admin',
'companies'));
38$hookmanager->initHooks(array(
'homesetup'));
47$wikihelp =
'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
48llxHeader(
'', $langs->trans(
"Setup"), $wikihelp);
55 $conf->global->MAIN_MOTD_SETUPPAGE = preg_replace(
'/<br(\s[\sa-zA-Z_="]*)?\/?>/i',
'<br>', $conf->global->MAIN_MOTD_SETUPPAGE);
59 while (preg_match(
'/__\(([a-zA-Z|@]+)\)__/i', $conf->global->MAIN_MOTD_SETUPPAGE, $reg) && $i < 100) {
60 $tmp = explode(
'|', $reg[1]);
61 if (!empty($tmp[1])) {
62 $langs->load($tmp[1]);
64 $conf->global->MAIN_MOTD_SETUPPAGE = preg_replace(
'/__\('.preg_quote($reg[1]).
'\)__/i', $langs->trans($tmp[0]), $conf->global->MAIN_MOTD_SETUPPAGE);
68 print
"\n<!-- Start of welcome text for setup page -->\n";
69 print
'<table width="100%" class="notopnoleftnoright"><tr><td>';
71 print
'</td></tr></table><br>';
72 print
"\n<!-- End of welcome text for setup page -->\n";
76print
'<span class="opacitymedium hideonsmartphone">';
77print $langs->trans(
"SetupDescription1").
' ';
78print $langs->trans(
"AreaForAdminOnly").
' ';
79print $langs->trans(
"SetupDescription2", $langs->transnoentities(
"MenuCompanySetup"), $langs->transnoentities(
"Modules"));
87 $setupcompanynotcomplete = 1;
90print
'<section class="setupsection">';
92print
img_picto(
'',
'company',
'class="paddingright valignmiddle double"').
' '.$langs->trans(
"SetupDescriptionLink", DOL_URL_ROOT.
'/admin/company.php?mainmenu=home'.(empty($setupcompanynotcomplete) ?
'' :
'&action=edit&token='.newToken()), $langs->transnoentities(
"Setup"), $langs->transnoentities(
"MenuCompanySetup"));
94print $langs->trans(
"SetupDescription3b");
95if (!empty($setupcompanynotcomplete)) {
96 $langs->load(
"errors");
97 $warnpicto =
img_warning($langs->trans(
"WarningMandatorySetupNotComplete"),
'style="padding-right: 6px;"');
98 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>';
106print
'<section class="setupsection">';
108$nbmodulesnotautoenabled = count($conf->modules);
109if (in_array(
'fckeditor', $conf->modules)) {
110 $nbmodulesnotautoenabled--;
112if (in_array(
'export', $conf->modules)) {
113 $nbmodulesnotautoenabled--;
115if (in_array(
'import', $conf->modules)) {
116 $nbmodulesnotautoenabled--;
120print
img_picto(
'',
'cog',
'class="paddingright valignmiddle double"').
' '.$langs->trans(
"SetupDescriptionLink", DOL_URL_ROOT.
'/admin/modules.php?mainmenu=home', $langs->transnoentities(
"Setup"), $langs->transnoentities(
"Modules"));
121print
'<br><br>'.$langs->trans(
"SetupDescription4b");
122if ($nbmodulesnotautoenabled <=
getDolGlobalInt(
'MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING', 1)) {
123 $langs->load(
"errors");
124 $warnpicto =
img_warning($langs->trans(
"WarningEnableYourModulesApplications"),
'style="padding-right: 6px;"');
125 print
'<br><div class="warning"><a href="'.DOL_URL_ROOT.
'/admin/modules.php?mainmenu=home">'.$warnpicto.$langs->trans(
"WarningEnableYourModulesApplications").
'</a></div>';
135$parameters = array();
137$reshook = $hookmanager->executeHooks(
'addHomeSetup', $parameters, $object, $action);
138print $hookmanager->resPrint;
139if (empty($reshook)) {
142 print
'<br class="hideonsmartphone">';
145 print
'<div class="center"><div class="logo_setup"></div></div>';
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
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...
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.