Exemple #1
0
<?php  
defined('C5_EXECUTE') or die("Access Denied.");

Loader::block('page_list');

$previewMode = true;
$nh = Loader::helper('navigation');
$controller = new PageListBlockController($b);


$_REQUEST['num'] = ($_REQUEST['num'] > 0) ? $_REQUEST['num'] : 0;
$_REQUEST['cThis'] = ($_REQUEST['cParentID'] == $controller->cID) ? '1' : '0';
$_REQUEST['cParentID'] = ($_REQUEST['cParentID'] == 'OTHER') ? $_REQUEST['cParentIDValue'] : $_REQUEST['cParentID'];

$controller->num 		= $_REQUEST['num'];
$controller->cParentID 	= $_REQUEST['cParentID'];
$controller->cThis 		= $_REQUEST['cThis'];
$controller->orderBy	= $_REQUEST['orderBy'];
$controller->ctID 		= $_REQUEST['ctID'];
$controller->rss 		= $_REQUEST['rss'];
$controller->displayFeaturedOnly = $_REQUEST['displayFeaturedOnly'];

$cArray = $controller->getPages();


//echo var_dump($cArray);
require(dirname(__FILE__) . '/../view.php');
exit;
<?php

defined('C5_EXECUTE') or die("Access Denied.");
//Permissions Check
$nh = Loader::helper('validation/numbers');
if ($_GET['bID'] && $_GET['cID'] && $nh->integer($_GET['bID']) && $nh->integer($_GET['cID'])) {
    $c = Page::getByID($_GET['cID']);
    if (is_object($c) && !$c->isError()) {
        $a = Area::get($c, $_GET['arHandle']);
        //edit survey mode
        $b = Block::getByID($_GET['bID'], $c, $a);
        if ($b->getBlockTypeHandle() == BLOCK_HANDLE_SCRAPBOOK_PROXY) {
            $cnt = $b->getController();
            $b = Block::getByID($cnt->getOriginalBlockID());
        }
        $controller = new PageListBlockController($b);
        $rssUrl = $controller->getRssUrl($b);
        $bp = new Permissions($b);
        if ($bp->canViewBlock() && $controller->rss) {
            $cArray = $controller->getPages();
            $nh = Loader::helper('navigation');
            header('Content-type: text/xml');
            echo "<" . "?" . "xml version=\"1.0\"?>\n";
            ?>
			<rss version="2.0">
			  <channel>
				<title><?php 
            echo $controller->rssTitle;
            ?>
</title>
				<link><?php 
Exemple #3
0
<?php

defined('C5_EXECUTE') or die("Access Denied.");
//Permissions Check
$vnh = Loader::helper('validation/numbers');
if ($_GET['bID'] && $_GET['cID'] && $vnh->integer($_GET['bID']) && $vnh->integer($_GET['cID'])) {
    $c = Page::getByID($_GET['cID']);
    if (is_object($c) && !$c->isError()) {
        $a = Area::get($c, $_GET['arHandle']);
        $b = Block::getByID($_GET['bID'], $c, $a);
        $controller = new PageListBlockController($b);
        $teaserBlockCount = $controller->truncateSummaries ? 1 : null;
        $teaserTruncateChars = $controller->truncateSummaries ? $controller->truncateChars : 0;
        $plth = Loader::helper('page_list_teasers', 'page_list_teasers');
        $rssUrl = $plth->getRssUrl($b);
        $bp = new Permissions($b);
        if ($bp->canRead() && $controller->rss) {
            $pages = $controller->getPages();
            $nh = Loader::helper('navigation');
            $th = Loader::helper('text');
            header('Content-type: text/xml');
            echo "<" . "?" . "xml version=\"1.0\"?>\n";
            ?>
			
			<rss version="2.0">
				<channel>
					<title><?php 
            echo $controller->rssTitle;
            ?>
</title>
					<link><?php