95function llxFooter($comment =
'', $zone =
'private', $disabledoutputofmessages = 0)
99require
'../../master.inc.php';
100require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
104$websitekey =
GETPOST(
'website',
'alpha');
106$pageref =
GETPOST(
'pageref',
'alphanohtml') ?
GETPOST(
'pageref',
'alphanohtml') :
'';
109if (preg_match(
'/^(\w\w)\/(.*)$/', $pageref, $reg)) {
118 require_once DOL_DOCUMENT_ROOT.
'/website/class/website.class.php';
119 require_once DOL_DOCUMENT_ROOT.
'/website/class/websitepage.class.php';
122 $object->fetch(0, $websitekey);
125 if (empty($pageid)) {
127 header($_SERVER[
"SERVER_PROTOCOL"].
" 404 Not Found",
true, 404);
129 include DOL_DOCUMENT_ROOT.
'/public/error-404.php';
138 $result = $objectpage->fetch(0, (
string)
$object->id, $pageref);
140 $pageid = $objectpage->id;
141 } elseif ($result == 0) {
144 $result = $objectpage->fetch(0, (
string)
$object->id,
null, $pageref);
146 $pageid = $objectpage->id;
150 if (
$object->fk_default_home > 0) {
151 $result = $objectpage->fetch(
$object->fk_default_home);
153 $pageid = $objectpage->id;
157 if (empty($pageid)) {
158 $array = $objectpage->fetchAll(
$object->id);
159 if (is_array($array) && count($array) > 0) {
160 $firstrep = reset($array);
161 $pageid = $firstrep->id;
168 header($_SERVER[
"SERVER_PROTOCOL"].
" 404 Not Found",
true, 404);
170 $langs->load(
"website");
172 if (!GETPOSTISSET(
'pageref')) {
173 print $langs->trans(
"PreviewOfSiteNotYetAvailable", $websitekey);
176 include DOL_DOCUMENT_ROOT.
'/public/error-404.php';
179if (empty($pageref)) {
181 $result = $objectpage->fetch($pageid);
183 $pageref = $objectpage->ref;
186if (preg_match(
'/^_(library|service)_page_/', $pageref)) {
187 $originalcontentonly = 1;
190$appli = constant(
'DOL_APPLICATION_TITLE');
205global $dolibarr_main_data_root;
207if ($pageid ==
'css') {
208 header(
'Content-type: text/css');
212 header(
'Cache-Control: no-cache');
213 $original_file = $dolibarr_main_data_root.($conf->entity > 1 ?
'/'.$conf->entity :
'').
'/website/'.$websitekey.
'/styles.css.php';
215 $original_file = $dolibarr_main_data_root.($conf->entity > 1 ?
'/'.$conf->entity :
'').
'/website/'.$websitekey.
'/page'.$pageid.
'.tpl.php';
219$refname = basename(dirname($original_file).
"/");
223if (!$accessallowed) {
230if (preg_match(
'/\.\./', $original_file) || preg_match(
'/[<>|]/', $original_file)) {
231 dol_syslog(
"Refused to deliver file ".$original_file);
232 $file = basename($original_file);
239$filename = basename($original_file);
242dol_syslog(
"index.php include $original_file $filename content-type=$type");
246if (!file_exists($original_file_osencoded)) {
248 header($_SERVER[
"SERVER_PROTOCOL"].
" 404 Not Found",
true, 404);
250 $langs->load(
"website");
251 print $langs->trans(
"RequestedPageHasNoContentYet", $pageid);
253 include DOL_DOCUMENT_ROOT.
'/public/error-404.php';
259define(
'USEDOLIBARRSERVER', 1);
260if (!isset($originalcontentonly)) {
261 print
'<!-- Page content '.$original_file.
' rendered with DOLIBARR SERVER : Html with CSS link and html header + Body that was saved into tpl dir -->'.
"\n";
263include_once $original_file_osencoded;
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.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.