View file news/app/Controllers/Pages_Controller.php

File size: 588B
<?php

class Pages_Controller extends Pages_Model
{
	function index($f3)
	{

		$f3->set('title', 'Список всех новостей');
		$f3->set('content',$f3->get('TEMPLATE').'/homepage.htm');
		
		$news_count = parent::all_news_count();
		
			if($news_count > 0)
			{
				$navigator = new Paginator($news_count, 5, '?');
				
				$f3->set('rt', new ReplaceText(URL.'/design/blue/smiles'));
				$f3->set('news_sql', parent::all_news_sql($navigator->limit()));
				$f3->set('navigator', $navigator);
				
			}
		
		$f3->set('news_count', $news_count);
		
		$this->display($f3);
	}
}