bee

Unnamed repository; edit this file 'description' to name the repository.
git clone http://git.code.weiherhei.de/bee.git
Log | Files | Refs

CategoryGenerator.class.php (587B)


      1 <?php
      2 
      3 class CategoryGenerator extends GeneratorBase
      4 {
      5 	var $category;
      6 	
      7 	function __construct( $category )
      8 	{
      9 		$this->category = $category;
     10 	}
     11 	function generate()
     12 	{
     13 		global $PAGES_BY_CATEGORY;
     14 	
     15 		if	( ! isset($PAGES_BY_CATEGORY[$this->category]) ) 
     16 			HttpUtil::sendStatus(404,"Category not found");
     17 				
     18 		$html = '<ul>';
     19 		foreach( $PAGES_BY_CATEGORY[$this->category] as $page )
     20 			$html.='<li><a href="'.SITE_UP.$page['url'].'">'.$page['config']['title'].'</a></li>';
     21 		$html .= '</ul>';
     22 		define('CONTENT',$html);
     23 		define('TITLE'  ,$keyword);
     24 		$this->outputTheme();
     25 	}
     26 }
     27 
     28 
     29 ?>