25 require
'../main.inc.php';
28 $langs->loadLangs(array(
'admin',
'companies'));
35 $hookmanager->initHooks(array(
'homesetup'));
44 $wikihelp =
'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
51 if (!empty($conf->global->MAIN_MOTD_SETUPPAGE)) {
52 $conf->global->MAIN_MOTD_SETUPPAGE = preg_replace(
'/<br(\s[\sa-zA-Z_="]*)?\/?>/i',
'<br>', $conf->global->MAIN_MOTD_SETUPPAGE);
53 if (!empty($conf->global->MAIN_MOTD_SETUPPAGE)) {
56 while (preg_match(
'/__\(([a-zA-Z|@]+)\)__/i', $conf->global->MAIN_MOTD_SETUPPAGE, $reg) && $i < 100) {
57 $tmp = explode(
'|', $reg[1]);
58 if (!empty($tmp[1])) {
59 $langs->load($tmp[1]);
61 $conf->global->MAIN_MOTD_SETUPPAGE = preg_replace(
'/__\('.preg_quote($reg[1]).
'\)__/i', $langs->trans($tmp[0]), $conf->global->MAIN_MOTD_SETUPPAGE);
65 print
"\n<!-- Start of welcome text for setup page -->\n";
66 print
'<table width="100%" class="notopnoleftnoright"><tr><td>';
68 print
'</td></tr></table><br>';
69 print
"\n<!-- End of welcome text for setup page -->\n";
73 print
'<span class="opacitymedium hideonsmartphone">';
74 print $langs->trans(
"SetupDescription1").
' ';
75 print $langs->trans(
"AreaForAdminOnly").
' ';
76 print $langs->trans(
"SetupDescription2", $langs->transnoentities(
"MenuCompanySetup"), $langs->transnoentities(
"Modules"));
83 if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY)) {
84 $setupcompanynotcomplete = 1;
87 print
'<section class="setupsection">';
89 print
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"));
91 print $langs->trans(
"SetupDescription3b");
92 if (!empty($setupcompanynotcomplete)) {
93 $langs->load(
"errors");
94 $warnpicto =
img_warning($langs->trans(
"WarningMandatorySetupNotComplete"),
'style="padding-right: 6px;"');
95 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>';
103 print
'<section class="setupsection">';
106 print
img_picto(
'',
'cog',
'class="paddingright valignmiddle double"').
' '.$langs->trans(
"SetupDescriptionLink", DOL_URL_ROOT.
'/admin/modules.php?mainmenu=home', $langs->transnoentities(
"Setup"), $langs->transnoentities(
"Modules"));
107 print
'<br><br>'.$langs->trans(
"SetupDescription4b");
108 if (count($conf->modules) <= (empty($conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING) ? 1 : $conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)) {
109 $langs->load(
"errors");
110 $warnpicto =
img_warning($langs->trans(
"WarningEnableYourModulesApplications"),
'style="padding-right: 6px;"');
111 print
'<br><div class="warning"><a href="'.DOL_URL_ROOT.
'/admin/modules.php?mainmenu=home">'.$warnpicto.$langs->trans(
"WarningEnableYourModulesApplications").
'</a></div>';
121 $parameters = array();
122 $reshook = $hookmanager->executeHooks(
'addHomeSetup', $parameters, $object, $action);
123 print $hookmanager->resPrint;
124 if (empty($reshook)) {
126 print
'<span class="opacitymedium hideonsmartphone">'.$langs->trans(
"SetupDescription5").
"</span><br>";
127 print
'<br class="hideonsmartphone">';
130 print
'<div class="center"><div class="logo_setup"></div></div>';
if($actionsave) if(!isset($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) $wikihelp
View.
if($cancel &&!$id) if($action== 'add'&&!$cancel) if($action== 'delete') if($id) $form
Actions.
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
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.
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 ...
newToken()
Return the value of token currently saved into session with name 'newtoken'.