implemented referer

git-svn-id: http://yolanda.mister-muffin.de/svn@127 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
josch 2007-10-23 21:29:16 +00:00
parent 1a41016a10
commit 2e87689371
2 changed files with 25 additions and 0 deletions

View file

@ -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
{

View file

@ -487,6 +487,19 @@
</tr>
</table>
<table class="videometadata">
<xsl:for-each select="/page/referers/referer">
<tr>
<td class="leftcell">
<xsl:value-of select="@count" />
</td>
<td class="rightcell">
<xsl:value-of select="@referer" />
</td>
</tr>
</xsl:for-each>
</table>
<table class="videometadata">
<xsl:for-each select="/page/comments/comment">
<tr>