diff --git a/htdocs/collab/index.php b/htdocs/collab/index.php index 7f08beff9557421885547fbab51419da10131640..3cba48cfc074987dee2d12603f03be4db7d7d45e 100644 --- a/htdocs/collab/index.php +++ b/htdocs/collab/index.php @@ -24,49 +24,6 @@ define('NOSCANPOSTFORINJECTION',1); define('NOSTYLECHECK',1); - -/** - * Show HTML header HTML + BODY + Top menu + left menu + DIV - * - * @param string $head Optionnal head lines - * @param string $title HTML title - * @param string $help_url Url links to help page - * Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage - * For other external page: http://server/url - * @param string $target Target to use on links - * @param int $disablejs More content into html header - * @param int $disablehead More content into html header - * @param array $arrayofjs Array of complementary js files - * @param array $arrayofcss Array of complementary css files - * @param string $morequerystring Query string to add to the link "print" to get same parameters (set this only if autodetect fails) - * @return void - */ -function llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='') -{ - global $conf; - - // html header - top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); - - print '<body id="mainbody">'; - - // top menu and left menu area - if (empty($conf->dol_hide_topmenu)) - { - top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss, $morequerystring, $help_url); - } - if (empty($conf->dol_hide_leftmenu)) - { - left_menu('', $help_url, '', '', 1, $title, 1); - } - - // main area - //main_area($title); - print '<!-- Begin div class="fiche" -->'."\n".'<div class="fichebutwithotherclass">'."\n"; -} - - - require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -198,7 +155,7 @@ $form = new Form($db); $help_url=''; -llxHeader('', $langs->trans("WebsiteSetup"), $help_url); +llxHeader('', $langs->trans("WebsiteSetup"), $help_url, '', 0, '', '', '', '', '<!-- Begin div class="fiche" -->'."\n".'<div class="fichebutwithotherclass">'); print "\n".'<form action="'.$_SERVER["PHP_SELF"].'" method="POST"><div>'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 65cb41a1941d1924ebe970470b1ff4f01901b086..6b2cbadd1ef7d7e556d76594b26977ae823d7d24 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -985,9 +985,10 @@ if (! function_exists("llxHeader")) * @param array $arrayofcss Array of complementary css files * @param string $morequerystring Query string to add to the link "print" to get same parameters (use only if autodetect fails) * @param string $morecssonbody More CSS on body tag. + * @param string $replacemainareaby Replace call to main_area() by a print of this string * @return void */ - function llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='') + function llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='') { global $conf; @@ -1008,6 +1009,11 @@ if (! function_exists("llxHeader")) } // main area + if ($replacemainareaby) + { + print $replacemainareaby; + return; + } main_area($title); } } diff --git a/htdocs/websites/index.php b/htdocs/websites/index.php index fdddb0edbe7fd15095aa2972be45a1bc0a61f0b6..23c915335c525ad579f89e48d746a60f63b8e015 100644 --- a/htdocs/websites/index.php +++ b/htdocs/websites/index.php @@ -24,48 +24,6 @@ define('NOSCANPOSTFORINJECTION',1); define('NOSTYLECHECK',1); - -/** - * Show HTML header HTML + BODY + Top menu + left menu + DIV - * - * @param string $head Optionnal head lines - * @param string $title HTML title - * @param string $help_url Url links to help page - * Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage - * For other external page: http://server/url - * @param string $target Target to use on links - * @param int $disablejs More content into html header - * @param int $disablehead More content into html header - * @param array $arrayofjs Array of complementary js files - * @param array $arrayofcss Array of complementary css files - * @param string $morequerystring Query string to add to the link "print" to get same parameters (set this only if autodetect fails) - * @return void - */ -function llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='') -{ - global $conf; - - // html header - top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); - - print '<body id="mainbody">'; - - // top menu and left menu area - if (empty($conf->dol_hide_topmenu)) - { - top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss, $morequerystring, $help_url); - } - if (empty($conf->dol_hide_leftmenu)) - { - left_menu('', $help_url, '', '', 1, $title, 1); - } - - // main area - //main_area($title); - print '<!-- Begin div class="fiche" -->'."\n".'<div class="fichebutwithotherclass">'."\n"; -} - - require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -1085,13 +1043,15 @@ $formwebsite = new FormWebsite($db); $help_url=''; -llxHeader('', $langs->trans("WebsiteSetup"), $help_url, '', 0, 0, - array( - '/includes/ace/ace.js', - '/includes/ace/ext-statusbar.js', - '/includes/ace/ext-language_tools.js', - //'/includes/ace/ext-chromevox.js' - ), array()); +$arrayofjs = array( + '/includes/ace/ace.js', + '/includes/ace/ext-statusbar.js', + '/includes/ace/ext-language_tools.js', + //'/includes/ace/ext-chromevox.js' +); +$arrayofcss = array(); + +llxHeader('', $langs->trans("WebsiteSetup"), $help_url, '', 0, 0, $arrayofjs, $arrayofcss, '', '', '<!-- Begin div class="fiche" -->'."\n".'<div class="fichebutwithotherclass">'); print "\n".'<form action="'.$_SERVER["PHP_SELF"].'" method="POST"><div>'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';