Exemplo n.º 1
0
                $description = $row['excerpt'] != '' ? htmlspecialchars($row['excerpt']) : htmlspecialchars(mb_substr(strip_tags($row[$params['comment']]), 0, 120, 'UTF-8')) . '...';
            } else {
                $description = htmlspecialchars(mb_substr(strip_tags($row[$params['comment']]), 0, 120, 'UTF-8')) . '...';
            }
            // Enclosure
            $item['enclosure'] = stristr(isset($id), 'dl_') ? '<enclosure url="' . $theRss->getRootUri() . $dir . 'dl.php?id=' . $row['id'] . '" length="' . $row['file_size'] . '" type="' . $row['file_type'] . '" />' . "\n" : $theRss->getEnclosure($row[$params['comment']]);
            $item['description'] = $theRss->setBBCode($description);
            $item['content_encoded'] = $row[$params['comment']];
            $item['link'] = $link;
            $item['title'] = htmlspecialchars($row[$params['title']]);
            $item['date'] = date($theRss->getRssTimeFormat('2.0'), strtotime($row[$params['date']])) . $theRss->getTimeZone();
            $items[] = $item;
        }
        $xml['loggix_title'] = $config['loggix_title'];
        $xml['root_uri'] = $theRss->getRootUri() . 'index.php';
        $xml['rss_uri'] = $theRss->getRssUri('2.0');
        header("Content-type: application/xml");
        $rssVersion2 = new Loggix_View();
        $rssVersion2->assign('items', $items);
        $rssVersion2->assign('xml', $xml);
        $rssVersion2->display($pathToIndex . '/modules/rss/theme/rss.2.0.xml');
    }
} else {
    // Loggix Expander RSS
    // Get Loggix Expander Directory
    $expanderDir = str_replace('_', '/', str_replace('_index', '', str_replace('_modules', 'modules', $_GET['mode'])));
    // Resource Path
    $resourcePath = $expanderDir . '/data/' . (isset($_GET['id']) ? $_GET['id'] : 'default');
    // Resource URI
    $resourceUri = str_replace('/data/', '/index.php?id=', $resourcePath);
    // Resource