Changeset 7 for trunk/dnsbl/browse.cgi


Ignore:
Timestamp:
09/22/09 14:49:44 (15 years ago)
Author:
Kris Deugau
Message:

/trunk/dnsbl

export-dnsbl

  • Spit out SOA and NS records for rbldns/cidr output, Just In Case

browse.cgi:

  • Show comments for listme(block) and listme(org) ratings

dnsbl.cgi

  • Show registrar-parent browse detail on IPs submitted for listing. Copied most of browse.cgi code into dnsbl.cgi - this should really be split out

templates/report.tmpl

  • Added space for browse list data, added reference to CSS for browse listings

templates/browse.tmpl

  • Split out CSS for browse formatting into separate file instead of inline <style> header tag

templates/dnsbl.css

  • CSS for browse data
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dnsbl/browse.cgi

    r3 r7  
    1919my $template = HTML::Template->new(filename => 'templates/browse.tmpl');
    2020
    21 my $basesql = "SELECT b.block,o.orgname,b.listme,o.listme,b.comments ".
     21my $basesql = "SELECT b.block,o.orgname,b.listme,o.listme,b.comments,o.comments ".
    2222        "FROM blocks b INNER JOIN orgs o ON b.orgid=o.orgid ".
    2323        "WHERE b.block <<= ";
     
    3333
    3434$sth0->execute;
    35 while (my ($block0,$org0,$listmeb0,$listmeo0,$comments0) = $sth0->fetchrow_array) {
     35while (my ($block0,$org0,$listmeb0,$listmeo0,$bcomments0,$ocomments0) = $sth0->fetchrow_array) {
    3636  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";
    3941  $sth1->execute($block0);
    4042  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) {
    4244# lvl 1 div open
    4345      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";
    4650      $sth2->execute($block1);
    4751      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) {
    4953# lvl 2 div open
    5054          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";
    5359          $sthiplist->execute($block2);
    5460          print "      <div class=iplist>\n";
Note: See TracChangeset for help on using the changeset viewer.