package IIffdf54f1494b3bf443f066e7a818a029::mod_top_ref_clicks; use strict; use base qw/II720d6e18aa34327713eb014408fc9144/; use II1d17f4bae0cdcee9878216ee8bd5ec5d; sub search { my ($class, $qh) = @_; my $limit = ($qh->{limit} + 0) || 10; my @where; if ($qh->{date_after}) { $qh->{date_after} =~ s/[^\d\-]//g; push @where, "to_days(hit.tstamp) >= to_days('$qh->{date_after}')"; } if ($qh->{date_before}) { $qh->{date_before} =~ s/[^\d\-]//g; push @where, "to_days(hit.tstamp) >= to_days('$qh->{date_before}')"; } my $where= join('', map { " and $_" } @where); my $data = II982446f8950cc3dc59e487adba22df54::lIlllIllllIlIIlI($II720d6e18aa34327713eb014408fc9144::lIIllllIllIlIIlI{$II720d6e18aa34327713eb014408fc9144::lIIlIIIIlllIlIII},114,$II720d6e18aa34327713eb014408fc9144::lIIllllIllIlIIlI{$II982446f8950cc3dc59e487adba22df54::IIIIIIlIIlIlIIlI})->dbc->getRecords(<<END);
select hit.referer as name,count(*) as clicks
from jin_package_hit as hit
left join jin_package as pack on hit.pack_id=pack.id
where hit.referer!=''
$where
group by hit.referer
order by clicks desc
END
$data; } 1; 