} elseif (!empty($c) && (!empty($_GET['from']) || !empty($_GET['until']))) { if (!$articles->setWorkContainer($c)) { show_error($articles->last_error); } elseif (($articles_list = $articles->getStat('time')) === false) { show_error($articles->last_error); } else { $containers = $articles->getContainers(); $from = @$_GET['from']; $until = @$_GET['until']; $result = ''; $system->config['pagename'] = __('Search results'); foreach ($articles_list as $id => $time) { $id = explode('.', $id); if ((!$from || $time >= $from) && (!$until || $time <= $until)) { if ((($cat_data = $articles->getCategory($id[0], false)) !== false || $c == '#root') && ($article = $articles->getArticle($id[0], $id[1], true, true, false, false)) !== false) { $result .= rcms_parse_module_template('art-article.tpl', $article + array('showtitle' => true, 'linktext' => $articles->linktextArticle($article['text_nonempty'], $article['comcnt'], $article['views']), 'linkurl' => '?module=' . $module . '&c=' . str_replace('#', '%23', $c) . '&b=' . $article['catid'] . '&a=' . $article['id'], 'cat_data' => @$cat_data)); } } } $title = '<a class="winheader" href="?module=' . $module . '">' . __('Sections') . '</a> → ' . '<a class="winheader" href="?module=' . $module . '&c=' . str_replace('#', '%23', $c) . '">' . $containers[$c] . '</a> → ' . __('Search results'); show_window($title, $result); } } elseif (!empty($_GET['from']) || !empty($_GET['until'])) { $result = ''; foreach ($articles->getContainers(0) as $c => $null) { if (!$articles->setWorkContainer($c)) { show_error($articles->last_error); } elseif (($articles_list = $articles->getStat('time')) === false) { show_error($articles->last_error); } else { $containers = $articles->getContainers();
$end = $total + $start; if ($end > sizeof($list)) { $end = sizeof($list); } } else { $pages = 1; $page = 0; $start = 0; $total = sizeof($list); } $keys = array_keys($list); for ($a = $start; $a < $end; $a++) { $time =& $list[$keys[$a]]; $id = explode('.', $keys[$a]); if (($category = $articles->getCategory($id[0], true)) !== false && ($article = $articles->getArticle($id[0], $id[1], true, true, false, false)) !== false) { $result .= rcms_parse_module_template('art-article.tpl', $article + array('showtitle' => true, 'linktext' => $articles->linktextArticle($article['text_nonempty'], $article['comcnt'], $article['views']), 'iconurl' => '?module=articles&c=' . $news_container . '&b=' . $id[0], 'linkurl' => '?module=articles&c=' . $news_container . '&b=' . $id[0] . '&a=' . $article['id'], 'cat_data' => $category)); } } $title = isset($category['title']) ? $category['title'] : __(file_get_contents(ARTICLES_PATH . $news_container . '/title')); if (!empty($list)) { $result .= '<div align="right">' . rcms_pagination(sizeof($list), $system->config['perpage'], $page + 1, '?module=' . $module) . '</div>'; } else { $result = __('Nothing founded'); } } show_window($title, $result); } $system->config['pagename'] = __('Latest news'); } } elseif ($system->config['index_module'] != 'empty' && !empty($system->modules['main'][$module])) { $my_module = $module;