if ($dir_topic !== 'all') { $title .= ': ' . $dir_topicName; } $headerCode = DIR_canonicalLink($dir_topic, $year); $directory = DIR_displayYear($template, $dir_topic, $year); $page_navigation = DIR_navBar($dir_topic, $year); $block_title = $year; $val_year = $year; $val_month = 0; } else { $title = $LANG_DIR['title']; if ($dir_topic !== 'all') { $title .= ': ' . $dir_topicName; } $headerCode = DIR_canonicalLink($dir_topic); $directory = DIR_displayAll($template, $dir_topic); $page_navigation = ''; $block_title = $LANG_DIR['title']; $val_year = 0; $val_month = 0; if ($conf_list_current_month) { $currentTime = time(); $currentYear = date('Y', $currentTime); $currentMonth = date('n', $currentTime); $thisMonth = COM_startBlock($LANG_MONTH[$currentMonth]) . DIR_displayMonth($template, $dir_topic, $currentYear, $currentMonth) . COM_endBlock(); if (TEMPLATE_EXISTS) { $template->set_var('current_month', $thisMonth); } else { $display .= $thisMonth; } }
if ($topic != 'all') { $topicName = DB_getItem($_TABLES['topics'], 'topic', "tid = '" . addslashes($topic) . "'"); } if ($year != 0 && $month != 0) { $title = sprintf($LANG_DIR['title_month_year'], $LANG_MONTH[$month], $year); if ($topic != 'all') { $title .= ': ' . $topicName; } $display .= COM_siteHeader('menu', $title, DIR_canonicalLink($topic, $year, $month)); $display .= DIR_displayMonth($topic, $year, $month, true); $display .= DIR_navBar($topic, $year, $month); } else { if ($year != 0) { $title = sprintf($LANG_DIR['title_year'], $year); if ($topic != 'all') { $title .= ': ' . $topicName; } $display .= COM_siteHeader('menu', $title, DIR_canonicalLink($topic, $year)); $display .= DIR_displayYear($topic, $year, true); $display .= DIR_navBar($topic, $year); } else { $title = $LANG_DIR['title']; if ($topic != 'all') { $title .= ': ' . $topicName; } $display .= COM_siteHeader('menu', $title, DIR_canonicalLink($topic)); $display .= DIR_displayAll($topic, $conf_list_current_month); } } $display .= COM_siteFooter(true); COM_output($display);