template) && !$printMode) $template->LoadTemplate($content->template); // // Show the content regardless of it's actual type/content $template->OnContent($content->DisplayHTML($printMode)); if (!$printMode && check_right(USER_PUBLISHER)) { //echo '
'; $template->OnContent(" "); if(!$content->archived) $template->OnContent(""); $template->OnContent('
id}\" class=\"textbutton\">##Edit## ##NewContent##id}\" class=\"textbutton\">##ToArchive##
'); } } else { $template->OnContent('##ContentNotFound##'); if (!$printMode && check_right(USER_PUBLISHER)) { //echo '
'; $template->OnContent("
##NewContent##
"); } } } elseif (!$printMode && isset($_REQUEST['oldal']) && !empty($_REQUEST['oldal'])) { $oldal = preg_replace('|[^_A-Za-z0-9]|','',$_REQUEST['oldal']); if (!empty($oldal) && is_file("_pages/{$oldal}.php")) { $template->StartContentCapture(); include("_pages/{$oldal}.php"); $template->StopContentCapture(); } else { $template->OnContent('##ContentNotFound##'); } } elseif(!$printMode && isset($_REQUEST['cat'])) { // // Show the real category or the archived items? $cat = explode('_', strtoupper($_REQUEST['cat'])); if (isset($cat[1])) { $requestedNodes = getChildCategories($db, $cat[0]); $where_clause = '(c.ID IN (' . implode(',', $requestedNodes) . ')) AND (reg.FValidUntil IS NOT NULL) AND (reg.FValidUntil <= now())'; $title_text = ' (##Archived##)'; } else { $requestedNodes = getChildCategories($db, $cat[0]); $where_clause = '(c.ID IN (' . implode(',', $requestedNodes) . ')) AND (reg.FDate <= now()) AND ((reg.FValidUntil IS NULL) OR (reg.FValidUntil >= now()))'; $title_text = ''; } unset($cat,$requestedNodes); // // Run the query $rs = $db->Query(" SELECT reg.*, UNIX_TIMESTAMP(reg.FDate) AS StartFMT, COALESCE(am.FIntro, a.FIntro) AS Intro, COALESCE(am.FText, a.FText) AS Text, COALESCE(am.FCaption, reg.FCaption) AS Caption, a.FShowInHeadline, c.FShowDate, c.ID AS CatID FROM ###content_registry reg JOIN ###articles a ON reg.ID = a.ID JOIN ###categories c ON a.TCategories_ID = c.ID LEFT OUTER JOIN ###articles_multilingual am JOIN ###lang_languages l ON (l.FCode = '{$lang->CurrentLanguage}') AND (l.ID = am.LanguageID) ON (am.ArticleID = a.ID) WHERE {$where_clause} ORDER BY reg.FDate DESC, Caption ASC "); echo $db->GetLastError(); // // Show results... if(($row = $rs->Fetch()) !== FALSE) { $template->OnContent("

##ArticleCategory::{$row['CatID']}##{$title_text}

\n"); do { $intro = !empty($row['Intro'])?nl2br($row['Intro']):''; $print = '

'.($row['FShowDate']?'%1$s | ':'') . (strip_tags($row['Text'])==''?'%2$s

':'%2$s').'

%3$s

 

'; $template->OnContent(sprintf( $print, format_date($row['StartFMT']), $row['Caption'], $row['Intro'], make_content_url($row) )); } while (($row = $rs->Fetch()) !== FALSE); } else { $template->OnContent("

Ebben a kategóriában nincsen megjeleníthető tartalom

\n"); } } else header('Location: /'); } else echo 'Nincs kapcsolat az adatbazissal!'; $template->RenderTemplate(); $memory_usage = function_exists('memory_get_usage')?' and by consuming ' . round(memory_get_usage()/1024,1) . ' kilobytes of memory':''; echo ""; if (!$printMode && isset($_SESSION['DEBUG_SQL'])&&($_SESSION['DEBUG_SQL']===true)) { echo '
'; $db->ShowLog(); echo '
'; } ?>