[php-blog-cvs] serendipity serendipity_functions.inc.php,1.6,1.7
A reliable, secure & extensible PHP blog | Not mainstream since 2002
Brought to you by:
garvinhicking,
jhermanns
From: <ber...@us...> - 2003-03-31 07:55:35
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv31105 Modified Files: serendipity_functions.inc.php Log Message: Add serendipity_displayTopExits() method. Index: serendipity_functions.inc.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- serendipity_functions.inc.php 30 Mar 2003 18:05:40 -0000 1.6 +++ serendipity_functions.inc.php 31 Mar 2003 07:55:22 -0000 1.7 @@ -1419,10 +1419,18 @@ serendipity_db_query($gc); } -function serendipity_displayTopReferrers($limit=10) { +function serendipity_displayTopReferrers($limit = 10) { + serendipity_displayTopUrlList('referrers', $limit); +} + +function serendipity_displayTopExits($limit = 10) { + serendipity_displayTopUrlList('exits', $limit); +} + +function serendipity_displayTopUrlList($list, $limit) { global $serendipity; $query = "SELECT url, sum(count) AS total - FROM $serendipity[dbPrefix]referrers + FROM $serendipity[dbPrefix]$list GROUP BY url ORDER BY total desc LIMIT $limit"; |