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