- Timestamp:
- 09/10/09 12:48:42 (15 years ago)
- Location:
- trunk/dnsbl
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dnsbl/DNSBL.pm
r4 r5 123 123 } 124 124 125 # return true if the IP has been reported 125 126 ## DNSBL::ipexists() 127 # return report count if the IP has been reported, otherwise return undef 126 128 sub ipexists { 127 129 my $self = shift; 128 130 my $ip = shift; 129 my $sth = $dbh->prepare("SELECT count (*)FROM iplist WHERE ip=?");131 my $sth = $dbh->prepare("SELECT count FROM iplist WHERE ip=?"); 130 132 $sth->execute($ip); 131 133 my ($ret) = $sth->fetchrow_array(); 132 134 return $ret; 133 } 135 } # end ipexists() 134 136 135 137 -
trunk/dnsbl/dnsbl.cgi
r2 r5 37 37 if ($webvar{page} eq 'report') { 38 38 $page->param(ip => $webvar{ip}); 39 my $count = $dnsbl->ipexists($webvar{ip}); 40 $page->param(nreports => $count) if $count; 39 41 for (my $i=0; $i<3; $i++) { 40 42 my ($block,$org) = $dnsbl->getcontainer($webvar{ip},$i); -
trunk/dnsbl/templates/report.tmpl
r2 r5 5 5 <body> 6 6 <table border=1><tr><td> 7 adding <TMPL_VAR NAME=ip></td></tr>7 <TMPL_VAR NAME=ip><TMPL_IF NAME=nreports></td><td>(reported <TMPL_VAR NAME=nreports> time(s)) <a href="/">Back</a></TMPL_IF></td></tr> 8 8 <form action="dnsbl.cgi"> 9 9 <input type=hidden name=page value=dbreport>
Note:
See TracChangeset
for help on using the changeset viewer.