Changeset 7 for trunk/dnsbl/browse.cgi
- Timestamp:
- 09/22/09 14:49:44 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dnsbl/browse.cgi
r3 r7 19 19 my $template = HTML::Template->new(filename => 'templates/browse.tmpl'); 20 20 21 my $basesql = "SELECT b.block,o.orgname,b.listme,o.listme,b.comments ".21 my $basesql = "SELECT b.block,o.orgname,b.listme,o.listme,b.comments,o.comments ". 22 22 "FROM blocks b INNER JOIN orgs o ON b.orgid=o.orgid ". 23 23 "WHERE b.block <<= "; … … 33 33 34 34 $sth0->execute; 35 while (my ($block0,$org0,$listmeb0,$listmeo0,$ comments0) = $sth0->fetchrow_array) {35 while (my ($block0,$org0,$listmeb0,$listmeo0,$bcomments0,$ocomments0) = $sth0->fetchrow_array) { 36 36 print "<div class=\"lvl0".($dnsbl->autolist_block($block0) ? ' auto0"' : '"'). 37 "><span".($listmeb0 ? ' class=b0list' : '').">$block0</span> ". 38 "<span".($listmeo0 ? ' class=b0org' : '').">$org0</span>\n"; 37 "><span".($listmeb0 ? ' class=b0list' : '').">$block0". 38 ($listmeb0 ? " ($bcomments0)" : '')."</span> ". 39 "<span".($listmeo0 ? ' class=b0org' : '').">$org0". 40 ($listmeo0 ? " ($ocomments0)" : '')."</span>\n"; 39 41 $sth1->execute($block0); 40 42 if ($sth1->rows > 0) { 41 while (my ($block1,$org1,$listmeb1,$listmeo1,$ comments1) = $sth1->fetchrow_array) {43 while (my ($block1,$org1,$listmeb1,$listmeo1,$bcomments1,$ocomments1) = $sth1->fetchrow_array) { 42 44 # lvl 1 div open 43 45 print " <div class=\"lvl1".($dnsbl->autolist_block($block1) ? ' auto1"' : '"'). 44 "><span".($listmeb1 ? ' class=b1list' : '').">$block1</span> ". 45 "<span".($listmeo1 ? ' class=b1org' : '').">$org1</span>\n"; 46 "><span".($listmeb1 ? ' class=b1list' : '').">$block1". 47 ($listmeb1 ? " ($bcomments1)" : '')."</span> ". 48 "<span".($listmeo1 ? ' class=b1org' : '').">$org1". 49 ($listmeo1 ? " ($ocomments1)" : '')."</span>\n"; 46 50 $sth2->execute($block1); 47 51 if ($sth2->rows > 0) { 48 while (my ($block2,$org2,$listmeb2,$listmeo2,$ comments2) = $sth2->fetchrow_array) {52 while (my ($block2,$org2,$listmeb2,$listmeo2,$bcomments2,$ocomments2) = $sth2->fetchrow_array) { 49 53 # lvl 2 div open 50 54 print " <div class=\"lvl2".($dnsbl->autolist_block($block2) ? ' auto2"' : '"'). 51 "><span".($listmeb2 ? ' class=b2list' : '').">$block2</span> ". 52 "<span".($listmeo2 ? ' class=b2org' : '').">$org2</span>\n"; 55 "><span".($listmeb2 ? ' class=b2list' : '').">$block2". 56 ($listmeb2 ? " ($bcomments2)" : '')."</span> ". 57 "<span".($listmeo2 ? ' class=b2org' : '').">$org2". 58 ($listmeo2 ? " ($ocomments2)" : '')."</span>\n"; 53 59 $sthiplist->execute($block2); 54 60 print " <div class=iplist>\n";
Note:
See TracChangeset
for help on using the changeset viewer.