29 require
'../main.inc.php';
32 $langs->load(
"externalsite");
35 $mainmenu =
GETPOST(
'mainmenu',
"aZ09");
36 $leftmenu =
GETPOST(
'leftmenu',
"aZ09");
37 $idmenu =
GETPOST(
'idmenu',
'int');
38 $theme =
GETPOST(
'theme',
'alpha');
39 $codelang =
GETPOST(
'lang',
'aZ09');
40 $keyforcontent =
GETPOST(
'keyforcontent',
'aZ09');
47 if (empty($keyforcontent) && empty($conf->global->EXTERNALSITE_URL))
50 print '<div class="error">'.$langs->trans(
'ExternalSiteModuleNotComplete').
'</div>';
55 if (!empty($keyforcontent))
59 print '<div class="framecontent" style="height: '.($_SESSION[
'dol_screenheight'] - 90).
'px">';
61 if (!preg_match(
'/EXTERNAL_SITE_CONTENT_/', $keyforcontent)
62 && !preg_match(
'/EXTERNAL_SITE_URL_/', $keyforcontent))
64 $langs->load(
"errors");
65 print $langs->trans(
"ErrorBadSyntaxForParamKeyForContent",
'EXTERNAL_SITE_CONTENT_',
'EXTERNAL_SITE_URL_');
66 } elseif (empty($conf->global->$keyforcontent))
68 $langs->load(
"errors");
69 print $langs->trans(
"ErrorVariableKeyForContentMustBeSet",
'EXTERNAL_SITE_CONTENT_'.$keyforcontent,
'EXTERNAL_SITE_URL_'.$keyforcontent);
71 if (preg_match(
'/EXTERNAL_SITE_CONTENT_/', $keyforcontent))
73 print $conf->global->$keyforcontent;
74 } elseif (preg_match(
'/EXTERNAL_SITE_URL_/', $keyforcontent))
107 print '<iframe src="'.$conf->global->$keyforcontent.
'"></iframe>';
114 if (preg_match(
'/^\//', $conf->global->EXTERNALSITE_URL) || preg_match(
'/^http/i', $conf->global->EXTERNALSITE_URL))
119 <title>Dolibarr frame for external web site</title>
122 <frameset ".(empty($conf->global->MAIN_MENU_INVERT) ?
"rows" :
"cols").
"=\"".$heightforframes.
",*\" border=0 framespacing=0 frameborder=0>
123 <frame name=\"barre\" src=\"frametop.php?mainmenu=".$mainmenu.
"&leftmenu=".$leftmenu.
"&idmenu=".$idmenu.($theme ?
'&theme='.$theme :
'').($codelang ?
'&lang='.$codelang :
'').
"&nobackground=1\" noresize scrolling=\"NO\" noborder>
125 print '<frame name="main" src="';
126 print $conf->global->EXTERNALSITE_URL;
138 <br><div class=\"center\">
139 Sorry, your browser is too old or not correctly configured to view this area.<br>
140 Your browser must support frames.<br>
149 print '<div class="framecontent" style="height: '.($_SESSION[
'dol_screenheight'] - 90).
'px">';
150 print $conf->global->EXTERNALSITE_URL;
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
print
Draft customers invoices.