From 2e87689371b32ac8a8a68bd51b24b4e1da4253b9 Mon Sep 17 00:00:00 2001 From: josch Date: Tue, 23 Oct 2007 21:29:16 +0000 Subject: [PATCH] implemented referer git-svn-id: http://yolanda.mister-muffin.de/svn@127 7eef14d0-6ed0-489d-bf55-20463b2d70db --- trunk/video.pl | 12 ++++++++++++ trunk/xsl/xhtml.xsl | 13 +++++++++++++ 2 files changed, 25 insertions(+) diff --git a/trunk/video.pl b/trunk/video.pl index 8d65d46..64a596f 100644 --- a/trunk/video.pl +++ b/trunk/video.pl @@ -139,6 +139,18 @@ if($query->param('title') or $query->param('id')) 'user' => $username }; } + + #get referers + $sth = $dbh->prepare(qq{select count, referer from referer where videoid=?}); + $sth->execute($id); + while (my ($count, $referer) = $sth->fetchrow_array()) + { + $referer or $referer = 'no referer (refreshed, manually entered url or bookmark)'; + push @{ $page->{'referers'}->{'referer'} }, { + 'count' => $count, + 'referer' => $referer + }; + } } else { diff --git a/trunk/xsl/xhtml.xsl b/trunk/xsl/xhtml.xsl index 9f76797..16f7d1c 100755 --- a/trunk/xsl/xhtml.xsl +++ b/trunk/xsl/xhtml.xsl @@ -487,6 +487,19 @@ + + + + + + + +
+ + + +
+