30require
'../main.inc.php';
36$mainmenu =
GETPOST(
'mainmenu',
"aZ09");
37$leftmenu =
GETPOST(
'leftmenu',
"aZ09");
38$idmenu =
GETPOST(
'idmenu',
'int');
39$theme =
GETPOST(
'theme',
'aZ09');
40$codelang =
GETPOST(
'lang',
'aZ09');
41$keyforcontent =
GETPOST(
'keyforcontent',
'aZ09');
43if (!isModEnabled(
"externalsite")) {
52if (empty($keyforcontent) && empty($conf->global->EXTERNALSITE_URL)) {
54 print
'<div class="error">'.$langs->trans(
'ExternalSiteModuleNotComplete').
'</div>';
59if (!empty($keyforcontent)) {
62 print
'<div class="framecontent" style="height: '.($_SESSION[
'dol_screenheight'] - 90).
'px">';
64 if (!preg_match(
'/EXTERNAL_SITE_CONTENT_/', $keyforcontent)
65 && !preg_match(
'/EXTERNAL_SITE_URL_/', $keyforcontent)) {
66 $langs->load(
"errors");
67 print $langs->trans(
"ErrorBadSyntaxForParamKeyForContent",
'EXTERNAL_SITE_CONTENT_',
'EXTERNAL_SITE_URL_');
68 } elseif (empty($conf->global->$keyforcontent)) {
69 $langs->load(
"errors");
70 print $langs->trans(
"ErrorVariableKeyForContentMustBeSet",
'EXTERNAL_SITE_CONTENT_'.$keyforcontent,
'EXTERNAL_SITE_URL_'.$keyforcontent);
72 if (preg_match(
'/EXTERNAL_SITE_CONTENT_/', $keyforcontent)) {
73 print $conf->global->$keyforcontent;
74 } elseif (preg_match(
'/EXTERNAL_SITE_URL_/', $keyforcontent)) {
106 print
'<iframe src="'.$conf->global->$keyforcontent.
'"></iframe>';
113 if (preg_match(
'/^\//', $conf->global->EXTERNALSITE_URL) || preg_match(
'/^http/i', $conf->global->EXTERNALSITE_URL)) {
117 <title>Dolibarr frame for external web site</title>
120 <frameset ".(empty($conf->global->MAIN_MENU_INVERT) ?
"rows" :
"cols").
"=\"".$heightforframes.
",*\" border=0 framespacing=0 frameborder=0>
121 <frame name=\"barre\" src=\"frametop.php?mainmenu=".$mainmenu.
"&leftmenu=".$leftmenu.
"&idmenu=".$idmenu.($theme ?
'&theme='.$theme :
'').($codelang ?
'&lang='.$codelang :
'').
"&nobackground=1\" noresize scrolling=\"NO\" noborder>
123 print
'<frame name="main" src="';
124 print $conf->global->EXTERNALSITE_URL;
136 <br><div class=\"center\">
137 Sorry, your browser is too old or not correctly configured to view this area.<br>
138 Your browser must support frames.<br>
147 print
'<div class="framecontent" style="height: '.($_SESSION[
'dol_screenheight'] - 90).
'px">';
148 print $conf->global->EXTERNALSITE_URL;
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.