31require
'../main.inc.php';
45$mainmenu =
GETPOST(
'mainmenu',
"aZ09");
46$leftmenu =
GETPOST(
'leftmenu',
"aZ09");
48$theme =
GETPOST(
'theme',
'aZ09');
49$codelang =
GETPOST(
'lang',
'aZ09');
50$keyforcontent =
GETPOST(
'keyforcontent',
'aZ09');
52if (!isModEnabled(
"externalsite")) {
62 llxHeader(
'',
'',
'',
'', 0, 0,
'',
'',
'',
'mod-externalsite page-frames');
63 print
'<div class="error">'.$langs->trans(
'ExternalSiteModuleNotComplete').
'</div>';
68if (!empty($keyforcontent)) {
69 llxHeader(
'',
'',
'',
'', 0, 0,
'',
'',
'',
'mod-externalsite page-frames');
71 print
'<div class="framecontent" style="height: '.($_SESSION[
'dol_screenheight'] - 90).
'px">';
73 if (!preg_match(
'/EXTERNAL_SITE_CONTENT_/', $keyforcontent)
74 && !preg_match(
'/EXTERNAL_SITE_URL_/', $keyforcontent)) {
75 $langs->load(
"errors");
76 print $langs->trans(
"ErrorBadSyntaxForParamKeyForContent",
'EXTERNAL_SITE_CONTENT_',
'EXTERNAL_SITE_URL_');
78 $langs->load(
"errors");
79 print $langs->trans(
"ErrorVariableKeyForContentMustBeSet",
'EXTERNAL_SITE_CONTENT_'.$keyforcontent,
'EXTERNAL_SITE_URL_'.$keyforcontent);
81 if (preg_match(
'/EXTERNAL_SITE_CONTENT_/', $keyforcontent)) {
83 } elseif (preg_match(
'/EXTERNAL_SITE_URL_/', $keyforcontent)) {
115 print
'<iframe src="'.getDolGlobalString($keyforcontent).
'"></iframe>';
122 if (preg_match(
'/^\//',
$conf->global->EXTERNALSITE_URL) || preg_match(
'/^http/i',
$conf->global->EXTERNALSITE_URL)) {
126 <title>Dolibarr frame for external web site</title>
129 <frameset ".(!
getDolGlobalString(
'MAIN_MENU_INVERT') ?
"rows" :
"cols").
"=\"".$heightforframes.
",*\" border=0 framespacing=0 frameborder=0>
130 <frame name=\"barre\" src=\"frametop.php?mainmenu=".$mainmenu.
"&leftmenu=".$leftmenu.
"&idmenu=".$idmenu.($theme ?
'&theme='.$theme :
'').($codelang ?
'&lang='.$codelang :
'').
"&nobackground=1\" noresize scrolling=\"NO\" noborder>
132 print
'<frame name="main" src="';
133 print
$conf->global->EXTERNALSITE_URL;
145 <br><div class=\"center\">
146 Sorry, your browser is too old or not correctly configured to view this area.<br>
147 Your browser must support frames.<br>
155 llxHeader(
'',
'',
'',
'', 0, 0,
'',
'',
'',
'mod-externalsite page-frames');
156 print
'<div class="framecontent" style="height: '.($_SESSION[
'dol_screenheight'] - 90).
'px">';
157 print
$conf->global->EXTERNALSITE_URL;
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.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.