29 require
'../main.inc.php';
32 $langs->load(
"other");
35 $mainmenu =
GETPOST(
'mainmenu',
"aZ09");
36 $leftmenu =
GETPOST(
'leftmenu',
"aZ09");
37 $idmenu =
GETPOST(
'idmenu',
'int');
38 $theme =
GETPOST(
'theme',
'aZ09');
39 $codelang =
GETPOST(
'lang',
'aZ09');
40 $keyforcontent =
GETPOST(
'keyforcontent',
'aZ09');
47 if (empty($keyforcontent) && empty($conf->global->EXTERNALSITE_URL)) {
49 print
'<div class="error">'.$langs->trans(
'ExternalSiteModuleNotComplete').
'</div>';
54 if (!empty($keyforcontent)) {
57 print
'<div class="framecontent" style="height: '.($_SESSION[
'dol_screenheight'] - 90).
'px">';
59 if (!preg_match(
'/EXTERNAL_SITE_CONTENT_/', $keyforcontent)
60 && !preg_match(
'/EXTERNAL_SITE_URL_/', $keyforcontent)) {
61 $langs->load(
"errors");
62 print $langs->trans(
"ErrorBadSyntaxForParamKeyForContent",
'EXTERNAL_SITE_CONTENT_',
'EXTERNAL_SITE_URL_');
63 } elseif (empty($conf->global->$keyforcontent)) {
64 $langs->load(
"errors");
65 print $langs->trans(
"ErrorVariableKeyForContentMustBeSet",
'EXTERNAL_SITE_CONTENT_'.$keyforcontent,
'EXTERNAL_SITE_URL_'.$keyforcontent);
67 if (preg_match(
'/EXTERNAL_SITE_CONTENT_/', $keyforcontent)) {
68 print $conf->global->$keyforcontent;
69 } elseif (preg_match(
'/EXTERNAL_SITE_URL_/', $keyforcontent)) {
101 print
'<iframe src="'.$conf->global->$keyforcontent.
'"></iframe>';
108 if (preg_match(
'/^\//', $conf->global->EXTERNALSITE_URL) || preg_match(
'/^http/i', $conf->global->EXTERNALSITE_URL)) {
112 <title>Dolibarr frame for external web site</title>
115 <frameset ".(empty($conf->global->MAIN_MENU_INVERT) ?
"rows" :
"cols").
"=\"".$heightforframes.
",*\" border=0 framespacing=0 frameborder=0>
116 <frame name=\"barre\" src=\"frametop.php?mainmenu=".$mainmenu.
"&leftmenu=".$leftmenu.
"&idmenu=".$idmenu.($theme ?
'&theme='.$theme :
'').($codelang ?
'&lang='.$codelang :
'').
"&nobackground=1\" noresize scrolling=\"NO\" noborder>
118 print
'<frame name="main" src="';
119 print $conf->global->EXTERNALSITE_URL;
131 <br><div class=\"center\">
132 Sorry, your browser is too old or not correctly configured to view this area.<br>
133 Your browser must support frames.<br>
142 print
'<div class="framecontent" style="height: '.($_SESSION[
'dol_screenheight'] - 90).
'px">';
143 print $conf->global->EXTERNALSITE_URL;