31require
'../main.inc.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/class/menubase.class.php';
50$mainmenu =
GETPOST(
'mainmenu',
"aZ09");
51$leftmenu =
GETPOST(
'leftmenu',
"aZ09");
53$theme =
GETPOST(
'theme',
'aZ09');
54$codelang =
GETPOST(
'lang',
'aZ09');
59if (!$menu->id || empty($menu->showtopmenuinframe)) {
60 accessforbidden(
'Parameter idmenu is wrong. Must be the ID of a menu entry allowed to be output into a frame');
73 print
'<body id="mainbody">'.
"\n";
85if (preg_match(
'/^__[(.+)]__$/', $menu->url, $reg)) {
86 $keyforcontent = $reg[1];
90 llxHeader(
'',
'',
'',
'', 0, 0,
'',
'',
'',
'mod-externalsite page-frames');
92 print
'<div class="framecontent" style="height: '.($_SESSION[
'dol_screenheight'] - 90).
'px">';
95 $langs->load(
"errors");
96 print $langs->trans(
"ErrorVariableKeyForContentMustBeSet", $keyforcontent, $keyforcontent);
98 if (preg_match(
'/EXTERNAL_SITE_URL_/', $keyforcontent)) {
99 print
'<iframe src="'.getDolGlobalString($keyforcontent).
'"></iframe>';
108 if (preg_match(
'/^\//', $menu->url) || preg_match(
'/^http/i', $menu->url)) {
113 <title>Dolibarr frame for external web site</title>
116 <frameset ".(!
getDolGlobalString(
'MAIN_MENU_INVERT') ?
"rows" :
"cols").
"=\"".$heightforframes.
",*\" border=0 framespacing=0 frameborder=0>
117 <frame name=\"barre\" src=\"".$_SERVER[
"PHP_SELF"].
"?top=1&mainmenu=".$mainmenu.
"&leftmenu=".$leftmenu.
"&idmenu=".$idmenu.($theme ?
'&theme='.$theme :
'').($codelang ?
'&lang='.$codelang :
'').
"&nobackground=1\" noresize scrolling=\"NO\" noborder>
119 print
'<frame name="main" src="';
132 <br><div class=\"center\">
133 Sorry, your browser is too old or not correctly configured to view this area.<br>
134 Your browser must support frames.<br>
143 llxHeader(
'',
'',
'',
'', 0, 0,
'',
'',
'',
'mod-externalsite page-frames');
144 print
'<div class="framecontent" style="height: '.($_SESSION[
'dol_screenheight'] - 90).
'px">';
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs=array(), $arrayofcss=array(), $disableforlogin=0, $disablenofollow=0, $disablenoindex=0)
Output html header of a page.
top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $arrayofjs=array(), $arrayofcss=array(), $morequerystring='', $helppagename='')
Show an HTML header + a BODY + The top menu bar.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.