19 include_once
$GLOBALS[
'xoops']->path(
'include/cp_functions.php');
39 if (is_dir(XOOPS_ROOT_PATH .
'/install/')) {
44 if (is_writable(XOOPS_ROOT_PATH .
'/mainfile.php')) {
63 if (strpos(XOOPS_PATH .
'/', XOOPS_ROOT_PATH .
'/') !==
false || strpos(XOOPS_PATH .
'/',
$_SERVER[
'DOCUMENT_ROOT'] .
'/') !==
false) {
68 if (strpos(XOOPS_VAR_PATH .
'/', XOOPS_ROOT_PATH .
'/') !==
false || strpos(XOOPS_VAR_PATH .
'/',
$_SERVER[
'DOCUMENT_ROOT'] .
'/') !==
false) {
74 if (!empty(
$_GET[
'xoopsorgnews'])) {
78 $rssurl[] =
'http://sourceforge.net/export/rss2_projnews.php?group_id=41586&rss_fulltext=1';
79 $rssurl[] =
'http://www.xoops.org/backend.php';
81 $rssurl = array_unique(array_merge($rssurl, $URLs));
87 require_once
$GLOBALS[
'xoops']->path(
'class/snoopy.php');
88 include_once
$GLOBALS[
'xoops']->path(
'class/xml/rss/xmlrss2parser.php');
93 foreach ($rssurl as
$url) {
94 if ($snoopy->fetch($url)) {
95 $rssdata = $snoopy->results;
97 if (
false != $rss2parser->parse()) {
98 $_items = $rss2parser->getItems();
99 $count = count($_items);
100 for (
$i = 0;
$i < $count;
$i ++) {
103 $items[strval(strtotime($_items[
$i][
'pubdate'])) .
"-" . strval(++$cnt)] = $_items[
$i];
106 echo $rss2parser->getErrors();
114 $ret =
'<table class="outer width100">';
115 foreach(array_keys($items) as
$i) {
116 $ret .=
'<tr class="head"><td><a href="' . htmlspecialchars($items[$i][
'link']) .
'" rel="external">';
117 $ret .= htmlspecialchars($items[$i][
'title']) .
'</a> (' . htmlspecialchars($items[$i][
'pubdate']) .
')</td></tr>';
118 if ($items[$i][
'description'] !=
"") {
119 $ret .=
'<tr><td class="odd">' . $items[
$i][
'description'];
120 if (! empty($items[$i][
'guid'])) {
121 $ret .=
' <a href="' . htmlspecialchars($items[$i][
'guid']) .
'" rel="external" title="">' .
_MORE .
'</a>';
123 $ret .=
'</td></tr>';
124 }
else if ($items[$i][
'guid'] !=
"") {
125 $ret .=
'<tr><td class="even aligntop"></td><td colspan="2" class="odd"><a href="' . htmlspecialchars($items[$i][
'guid']) .
'" rel="external">' .
_MORE .
'</a></td></tr>';