From: Darren S. <ds...@us...> - 2005-07-28 19:59:57
|
Update of /cvsroot/xine/xine_www/data/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17768/data/php Modified Files: Tag: experimental2 home.inc.php Log Message: Add news to the front page. Index: home.inc.php =================================================================== RCS file: /cvsroot/xine/xine_www/data/php/Attic/home.inc.php,v retrieving revision 1.1.2.2.2.1 retrieving revision 1.1.2.2.2.2 diff -u -r1.1.2.2.2.1 -r1.1.2.2.2.2 --- home.inc.php 27 Jul 2005 19:56:16 -0000 1.1.2.2.2.1 +++ home.inc.php 28 Jul 2005 19:59:46 -0000 1.1.2.2.2.2 @@ -22,6 +22,39 @@ <a href="http://www.rackcheck.com">rackcheck.com</a>. Big Thanks to <a href="http://www.myclick.de">MyClick Internet</a> for sponsoring this service!</p> + +<h3>Latest news</h3> + +<table class="news" cellspacing="4"> + <colgroup span="2"> + <col width="0*"></col> + <col width="*"></col> + </colgroup> + <tbody> +'; + +$factory = new XML_Parser_Factory (); +$parser = $factory->get_Data_Parser ('news_data'); +$news_list = $parser->parse(); + +for ($i = 0; $i < min (3, count ($news_list)); ++$i) +{ + $this->content .= +' <tr class="narrow_content"> + <td>' . htmlspecialchars (date ('d M Y', $news_list[$i]->date)) . '</td> + <td><strong>' . htmlspecialchars ($news_list[$i]->title) . '</strong></td> + </tr> + <tr class="narrow_content"> + <td></td> + <td>' . $news_list[$i]->text . '</td> + </tr> +'; +} + +$this->content .= " </tbody>\n</table>\n"; + +if (3 < count ($news_list)) + $this->content .= '<p><a ' . generate_link ('news') . '>More news...</a> '; ?> |