</language> <copyright><?php echo @$rss_cfg['copyright']; ?> </copyright> <lastBuildDate><?php echo date('r'); ?> </lastBuildDate> <generator><?php echo $lang['copyright']['powered'] . ' ' . RCMS_VERSION_BRANCH . '.' . RCMS_VERSION_SECOND . '-' . RCMS_VERSION_SUFFIX; ?> </generator> <ttl>40</ttl> <?php $articles = articles_parse_list(1, true, DATA_PATH . $dir . '/'); $result = ''; if (!empty($articles)) { foreach ($articles as $article) { if (!empty($article)) { ?> <item> <title><?php echo htmlspecialchars($article['title']); ?> </title> <description><?php echo htmlspecialchars($article['desc']); ?> </description> <link><?php
function articles_register_last($catid, $artid, $total_number, $time, $dir = ARTICLES_PATH) { $last_articles = articles_parse_list(false, false, $dir); $last_articles_file = ''; reset($last_articles); for ($i = 0; $i < $total_number; $i++) { $line = current($last_articles); if ($time > (int) $line['time']) { $last_articles_file .= $catid . '.' . $artid . "\n"; $time = 0; } else { if (!empty($line)) { $last_articles_file .= $line['catid'] . '.' . $line['id'] . "\n"; } next($last_articles); } } file_write_contents($dir . '0.last', $last_articles_file); return true; }
<?php //////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2004 ReloadCMS Development Team // // http://reloadcms.sf.net // // // // This program is distributed in the hope that it will be useful, // // but WITHOUT ANY WARRANTY, without even the implied warranty of // // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // // // // This product released under GNU General Public License v2 // //////////////////////////////////////////////////////////////////////////////// $system->showModuleWindow('', file_get_contents(DATA_PATH . 'intro.html'), 'left'); $articles = articles_parse_list(1, true, NEWS_PATH); $result = ''; if (!empty($articles)) { foreach ($articles as $article) { $cat_data = articles_get_category($article['catid'], false, NEWS_PATH); if (!empty($article)) { $cat_data = articles_get_category($article['catid'], false, NEWS_PATH); $result .= rcms_parse_module_template('article.tpl', $article + array('showdesc' => true, 'showtitle' => true, 'linktext' => ($article['text_nonempty'] ? $lang['articles']['readmore'] : $lang['articles']['comments']) . ' (' . $article['comcnt'] . '/' . $article['views'] . ')', 'linkurl' => './index.php?module=articles&catid=' . $article['catid'] . '&id=' . $article['id'] . '&work_dir=news', 'cat_data' => $cat_data)); } } } $system->showModuleWindow($lang['articles']['latestnews'], $result, 'center'); $system->config['pagename'] = $lang['pages']['index'];
<?php //////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2004 ReloadCMS Development Team // // http://reloadcms.sf.net // // // // This program is distributed in the hope that it will be useful, // // but WITHOUT ANY WARRANTY, without even the implied warranty of // // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // // // // This product released under GNU General Public License v2 // //////////////////////////////////////////////////////////////////////////////// $articles = articles_parse_list(0, false); $result = '<table cellspacing="0" cellpadding="0" border="0" width="100%">'; $i = 2; if (!empty($articles)) { foreach ($articles as $article) { $result .= '<tr><td class="row' . $i . '"><a href="index.php?module=articles&catid=' . $article['catid'] . '&id=' . $article['id'] . '"><abbr title="' . $lang['articles']['poster'] . ': ' . $article['author_nick'] . ', ' . $lang['articles']['date'] . ': ' . rcms_format_time('d.m.Y H:i:s', $article['time']) . '">' . $article['title'] . ' (' . $article['comcnt'] . ')</abbr></a></td></tr>'; $i++; if ($i > 3) { $i = 2; } } } $result .= '</table>'; $system->showMenuWindow($lang['articles']['latestarts'], $result, 'center');