1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102:
<?php
defined('ICMS_ROOT_PATH') or exit();
class icms_feeds_Rss {
public $title;
public $url;
public $description;
public $language;
public $charset;
public $category;
public $pubDate;
public $webMaster;
public $generator;
public $copyright;
public $lastbuild;
public $channelEditor;
public $width;
public $height;
public $ttl;
public $image = array();
public function __construct() {
global $icmsConfig;
$this->title = htmlspecialchars($icmsConfig['sitename'], ENT_QUOTES, _CHARSET);
$this->url = ICMS_URL;
$this->description = htmlspecialchars($icmsConfig['slogan'], ENT_QUOTES, _CHARSET);
$this->language = _LANGCODE;
$this->charset = _CHARSET;
$this->pubDate = date('r', time());
$this->lastbuild = date('r', time());
$this->webMaster = $icmsConfig['adminmail'];
$this->channelEditor = $icmsConfig['adminmail'];
$this->generator = ICMS_VERSION_NAME;
$this->copyright = _COPYRIGHT . ' ' . formatTimestamp(time(), 'Y')
. ' ' . htmlspecialchars($icmsConfig['sitename'], ENT_QUOTES, _CHARSET);
$this->width = 144;
$this->height = 50;
$this->ttl = 60;
$this->image = array(
'title' => $this->title,
'url' => ICMS_URL . '/images/logo.gif',
);
$this->feeds = array();
}
public function render() {
icms::$logger->disableLogger();
$xoopsOption['template_main'] = "db:system_rss.html";
$tpl = new icms_view_Tpl();
$tpl->assign('channel_title', $this->title);
$tpl->assign('channel_link', $this->url);
$tpl->assign('channel_desc', $this->description);
$tpl->assign('channel_webmaster', $this->webMaster);
$tpl->assign('channel_editor', $this->channelEditor);
$tpl->assign('channel_category', $this->category);
$tpl->assign('channel_generator', $this->generator);
$tpl->assign('channel_language', $this->language);
$tpl->assign('channel_lastbuild', $this->lastbuild);
$tpl->assign('channel_copyright', $this->copyright);
$tpl->assign('channel_width', $this->width);
$tpl->assign('channel_height', $this->height);
$tpl->assign('channel_ttl', $this->ttl);
$tpl->assign('image_url', $this->image['url']);
foreach ($this->feeds as $feed) {
$tpl->append('items', $feed);
}
$tpl->display('db:system_rss.html');
}
}