23 include __DIR__ .
'/mainfile.php';
27 include_once
$xoops->path(
'include/cp_functions.php');
35 if (!
$xoops->user->isAdmin(-1)) {
49 if (
$xoops->getConfig(
'admin_warnings_enable')) {
52 $install_dir =
$xoops->path(
'install');
53 if (is_dir($install_dir)) {
62 $cache_path =
$xoops->path(
'var/caches');
63 if (!is_writable($cache_path)) {
66 $upload_path =
$xoops->path(
'uploads');
67 if (!is_writable($upload_path)) {
70 $compile_path =
$xbc->get(
'smarty-compile');
71 if (!is_writable($compile_path)) {
76 $xoops_path =
$xbc->get(
'lib-path');
82 $var_path =
$xoops->path(
'var');
86 $xoops->tpl()->assign(
'error_msg', $error_msg);
94 $rssurl[] =
'http://sourceforge.net/export/rss2_projnews.php?group_id=41586&rss_fulltext=1';
95 $rssurl[] =
'http://www.xoops.org/backend.php';
97 $rssfile =
'admin/rss/adminnews-' .
$xoops->getConfig(
'locale');
99 $items =
$xoops->cache()->cacheRead($rssfile,
'buildRssFeedCache', 24*60*60, $rssurl);
102 $ret =
'<table class="outer width100">';
103 foreach (array_keys($items) as
$i) {
104 $ret .=
'<tr class="head"><td><a href="' . htmlspecialchars($items[$i][
'link']) .
'" rel="external">';
105 $ret .= htmlspecialchars($items[$i][
'title']) .
'</a> (' . htmlspecialchars($items[$i][
'pubdate']) .
')</td></tr>';
106 if ($items[$i][
'description'] !=
"") {
107 $ret .=
'<tr><td class="odd">' . $items[
$i][
'description'];
108 if (!empty($items[$i][
'guid'])) {
109 $ret .=
' <a href="' . htmlspecialchars($items[$i][
'guid']) .
'" rel="external" title="">' .
XoopsLocale::MORE .
'</a>';
111 $ret .=
'</td></tr>';
113 if ($items[$i][
'guid'] !=
"") {
114 $ret .=
'<tr><td class="even aligntop"></td><td colspan="2" class="odd"><a href="' . htmlspecialchars($items[$i][
'guid']) .
'" rel="external">' . _MORE .
'</a></td></tr>';
128 foreach ($rssurl as
$url) {
129 if ($snoopy->fetch($url)) {
130 $rssdata = $snoopy->results;
132 if (
false != $rss2parser->parse()) {
133 $_items = $rss2parser->getItems();
135 for ($i = 0; $i <
$count; $i++) {
138 $items[strval(strtotime($_items[$i][
'pubdate'])) .
"-" . strval(++$cnt)] = $_items[
$i];
141 echo $rss2parser->getErrors();
if($xoops->getConfig('admin_warnings_enable')) $xoopsorgnews
const EF_DIRECTORY_EXISTS
if(!function_exists('xoopseditor_get_rootpath')) $mainfile
buildRssFeedCache($rssurl)
const EF_FOLDER_NOT_WRITABLE
if(DIRECTORY_SEPARATOR!="/") $xoops_root_path
static convert_encoding($text, $to= 'utf-8', $from= '')
const EF_FILE_IS_WRITABLE
const E_NO_ACCESS_PERMISSION
static getInstance($config= '')
const EF_FOLDER_IS_INSIDE_DOCUMENT_ROOT