42 global $TEXT, $MENU, $HEADING, $MESSAGE, $section_id;
44 $oLEPTON = LEPTON_frontend::getInstance();
47 if ($oLEPTON->page_access_denied ===
true)
49 echo $MESSAGE[
'FRONTEND_SORRY_NO_VIEWING_PERMISSIONS'];
54 if ($oLEPTON->page_no_active_sections ===
true)
56 echo $MESSAGE[
'FRONTEND_SORRY_NO_ACTIVE_SECTIONS'];
61 $sFrontendMessage = LEPTON_core::getValue(
"page_content",
"string",
"session") ??
"";
62 if (str_starts_with($sFrontendMessage,
"@LEPTON_FE_"))
64 unset($_SESSION[
'PAGE_CONTENT']);
65 echo LEPTON_frontend::displayMessage();
70 if (!defined(
'PAGE_CONTENT') || $block != 1)
72 $page_id = intval( $oLEPTON->page_id );
75 $_SESSION[
'PAGE_ID' ] = !isset( $_SESSION[
'PAGE_ID' ] ) ? $page_id : $_SESSION[
'PAGE_ID' ];
78 if (($page_id != 0 ) && ($_SESSION[
'PAGE_ID' ] <> $page_id))
80 $_SESSION[
'PAGE_ID' ] = $page_id;
86 "SELECT section_id, module, publ_start, publ_end from ".TABLE_PREFIX.
"sections WHERE page_id = ".$page_id.
" AND block = '".$block.
"' ORDER BY position",
93 foreach ($aSections as $section)
97 if ( !( ( $now <= $section[
'publ_end' ] || $section[
'publ_end' ] == 0 ) && ( $now >= $section[
'publ_start' ] || $section[
'publ_start' ] == 0 ) ) )
101 $section_id = $section[
'section_id' ];
102 $module = $section[
'module' ];
105 if ( defined(
'SEC_ANCHOR' ) && SEC_ANCHOR !=
'' )
107 echo
'<a class="section_anchor" id="' . SEC_ANCHOR . $section_id .
'"></a>';
110 if ( file_exists( LEPTON_PATH .
'/modules/' . $module .
'/view.php' ) )
114 require LEPTON_PATH .
'/modules/' . $module .
'/view.php';
115 $content = ob_get_clean();
128 if (!is_null($sSearchResult) && is_null($sNoHighlight) && $sString !=
"" )
130 $arr_string = explode(
" ", $sString );
131 if ( intval($sSearchResult) == 2 )
133 $arr_string[ 0 ] = str_replace(
"_",
" ", $arr_string[ 0 ] );
145 require PAGE_CONTENT;
page_content(int $block=1)