DateGenerator.class.php (626B)
1 <?php 2 3 class DateGenerator extends GeneratorBase 4 { 5 var $category; 6 7 function __construct( $from,$to ) 8 { 9 $this->from = $from; 10 $this->to = $to; 11 } 12 13 function generate() 14 { 15 global $PAGES_BY_DATE; 16 17 $html = '<ul>'; 18 foreach( $PAGES_BY_DATE as $pageOfDate ) 19 foreach( $pageOfDate as $page ) 20 if ( $page['date'] >= $this->from && $page['date'] <= $this->to ) 21 $html.='<li><a href="'.SITE_UP.$page['url'].'">'.$page['config']['title'].'</a></li>'; 22 $html .= '</ul>'; 23 define('CONTENT',$html); 24 define('TITLE' ,'from '.date('r',$this->from).' to '.date('r',$this->to)); 25 26 $this->outputTheme(); 27 } 28 } 29 30 31 ?>