cvs: php-news-web / article.php

From: Date: Wed, 31 Dec 2008 17:04:14 +0000
Subject: cvs: php-news-web / article.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-3404@lists.php.net to get a copy of this message
philip Wed Dec 31 17:04:14 2008 UTC Modified files: /php-news-web article.php Log: Added prev/next links to articles http://cvs.php.net/viewvc.cgi/php-news-web/article.php?r1=1.37&r2=1.38&diff_format=u Index: php-news-web/article.php diff -u php-news-web/article.php:1.37 php-news-web/article.php:1.38 --- php-news-web/article.php:1.37 Sun Jul 27 10:33:17 2008 +++ php-news-web/article.php Wed Dec 31 17:04:14 2008 @@ -260,4 +260,30 @@ echo " <pre>\n"; } +// Does not check existence of next, so consider this the super duper fast [broken] version +// Based off navbar() in group.php +function navbar($group, $current) { + + $group = htmlspecialchars($group, ENT_QUOTES); + + echo ' <table border="0" cellpadding="2" cellspacing="2" width="100%">' . "\n"; + echo ' <tr class="alisthead">' . "\n"; + echo ' <td class="nav">'; + + if ($current > 1) { + echo ' <a href="/' , $group , '/' , ($current-1) , '"><b>&laquo; previous</b></a>'; + } else { + echo '&nbsp;'; + } + + echo ' </td>' . "\n"; + echo ' <td align="center" class="alisthead">' . "$group (#$current)</td>\n"; + echo ' <td align="right" class="nav">'; + echo ' <a href="/' , $group , '/' , ($current+1) , '"><b>&laquo; next</b></a>'; + echo ' </td>' . "\n"; + echo ' </tr>' . "\n"; + echo ' </table>' . "\n"; +} + +navbar($group, $article); foot();

« previous php.webmaster (#3404) next »