91function llxFooter($comment =
'', $zone =
'private', $disabledoutputofmessages = 0)
95require
'../../master.inc.php';
96require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
100$websitekey =
GETPOST(
'website',
'alpha');
102$pageref =
GETPOST(
'pageref',
'alphanohtml') ?
GETPOST(
'pageref',
'alphanohtml') :
'';
105if (preg_match(
'/^(\w\w)\/(.*)$/', $pageref, $reg)) {
114 require_once DOL_DOCUMENT_ROOT.
'/website/class/website.class.php';
115 require_once DOL_DOCUMENT_ROOT.
'/website/class/websitepage.class.php';
118 $object->fetch(0, $websitekey);
121 if (empty($pageid)) {
123 header($_SERVER[
"SERVER_PROTOCOL"].
" 404 Not Found",
true, 404);
125 include DOL_DOCUMENT_ROOT.
'/public/error-404.php';
134 $result = $objectpage->fetch(0,
$object->id, $pageref);
136 $pageid = $objectpage->id;
137 } elseif ($result == 0) {
140 $result = $objectpage->fetch(0,
$object->id,
null, $pageref);
142 $pageid = $objectpage->id;
146 if (
$object->fk_default_home > 0) {
147 $result = $objectpage->fetch(
$object->fk_default_home);
149 $pageid = $objectpage->id;
153 if (empty($pageid)) {
154 $array = $objectpage->fetchAll(
$object->id);
155 if (is_array($array) && count($array) > 0) {
156 $firstrep = reset($array);
157 $pageid = $firstrep->id;
164 header($_SERVER[
"SERVER_PROTOCOL"].
" 404 Not Found",
true, 404);
166 $langs->load(
"website");
168 if (!GETPOSTISSET(
'pageref')) {
169 print $langs->trans(
"PreviewOfSiteNotYetAvailable", $websitekey);
172 include DOL_DOCUMENT_ROOT.
'/public/error-404.php';
175if (empty($pageref)) {
177 $result = $objectpage->fetch($pageid);
179 $pageref = $objectpage->ref;
182if (preg_match(
'/^_(library|service)_page_/', $pageref)) {
183 $originalcontentonly = 1;
186$appli = constant(
'DOL_APPLICATION_TITLE');
201global $dolibarr_main_data_root;
203if ($pageid ==
'css') {
204 header(
'Content-type: text/css');
208 header(
'Cache-Control: no-cache');
209 $original_file = $dolibarr_main_data_root.($conf->entity > 1 ?
'/'.$conf->entity :
'').
'/website/'.$websitekey.
'/styles.css.php';
211 $original_file = $dolibarr_main_data_root.($conf->entity > 1 ?
'/'.$conf->entity :
'').
'/website/'.$websitekey.
'/page'.$pageid.
'.tpl.php';
215$refname = basename(dirname($original_file).
"/");
219if (!$accessallowed) {
226if (preg_match(
'/\.\./', $original_file) || preg_match(
'/[<>|]/', $original_file)) {
227 dol_syslog(
"Refused to deliver file ".$original_file);
228 $file = basename($original_file);
235$filename = basename($original_file);
238dol_syslog(
"index.php include $original_file $filename content-type=$type");
242if (!file_exists($original_file_osencoded)) {
244 header($_SERVER[
"SERVER_PROTOCOL"].
" 404 Not Found",
true, 404);
246 $langs->load(
"website");
247 print $langs->trans(
"RequestedPageHasNoContentYet", $pageid);
249 include DOL_DOCUMENT_ROOT.
'/public/error-404.php';
255define(
'USEDOLIBARRSERVER', 1);
256if (!isset($originalcontentonly)) {
257 print
'<!-- Page content '.$original_file.
' rendered with DOLIBARR SERVER : Html with CSS link and html header + Body that was saved into tpl dir -->'.
"\n";
259include_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.