#!/usr/bin/perl -wT # -*- Mode: perl; tab-width: 4; indent-tabs-mode: nil; -*- # # Referrer Tracking: Stats use strict; use CGI::Carp; use HTML::Entities; use lib 'lib'; use vars '@ISA'; @ISA = qw(TheCommon); require TheCommon; sub main { my $self = shift; # /stats # show the top 10 referrers and other stats my $data = $self->{database}->getTopReferralStats($self->{query}->param('count') || 10); $self->{http}->page('Statistics'); if (@$data == 0) { $self->{http}->print('
No referrals yet.
'); } else { $self->{http}->print(<