Changeset 26 for trunk


Ignore:
Timestamp:
09/03/10 16:10:14 (14 years ago)
Author:
Kris Deugau
Message:

/trunk/dnsbl

Patch up a few things that got shaken out in copying to a live site

Location:
trunk/dnsbl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/dnsbl/dnsbl.cgi

    r25 r26  
    3434# multiple instances without having to duplicate the code.
    3535# This file is a Perl fragment to be processed inline.
    36 my $cfgname = $ENV{SERVER_NAME}.$ENV{SCRIPT_NAME};
     36my $cfgname = $ENV{SERVER_NAME}.$ENV{REQUEST_URI};
    3737$cfgname =~ s|[./-]|_|g;
    38 $cfgname =~ s|_dnsbl_cgi||;
     38$cfgname =~ s|_dnsbl_cgi.+||;
     39$cfgname =~ s|_$||;
    3940if (-e "/etc/dnsbl/$cfgname.conf") {
    4041  my $cfg = `cat /etc/dnsbl/$cfgname.conf`;
     
    6970
    7071if ($webvar{page} eq 'report') {
     72  my $dnsblsiteroot = $ENV{REQUEST_URI};
     73  $dnsblsiteroot =~ s|/dnsbl\.cgi\?.+|/|;
     74  $page->param(dnsblsiteroot => $dnsblsiteroot);
     75
    7176  $page->param(ip => $webvar{ip});
    7277  my $count = $dnsbl->ipexists($webvar{ip});
     
    8186  }
    8287} elsif ($webvar{page} eq 'dbreport') {
     88  my $dnsblsiteroot = $ENV{REQUEST_URI};
     89  $dnsblsiteroot =~ s|/dnsbl\.cgi\?.+|/|;
     90  $page->param(dnsblsiteroot => $dnsblsiteroot);
     91
    8392  my $err = '';
    8493  my $count = $dnsbl->report($webvar{ip});
  • trunk/dnsbl/templates/dbreport.tmpl

    r25 r26  
    1515<TMPL_IF block2><br>added level 2 block <TMPL_VAR NAME=block2></TMPL_IF>
    1616<TMPL_IF err><hr><TMPL_VAR NAME=err></TMPL_IF>
    17 <hr><a href="/">Back</a>
     17<hr><a href="<TMPL_VAR NAME=dnsblsiteroot>">Back</a>
    1818<TMPL_IF NAME=browsebits>
    1919<td valign=top>
  • trunk/dnsbl/templates/report.tmpl

    r25 r26  
    99<table border=1><tr><td>
    1010<TMPL_VAR NAME=ip><TMPL_IF NAME=nreports></td><td>(reported <TMPL_VAR NAME=nreports> time(s))
    11 </TMPL_IF></td><td><a href="/">Back</a></td></tr>
     11</TMPL_IF></td><td><a href="<TMPL_VAR NAME=dnsblsiteroot>">Back</a></td></tr>
    1212<form action="dnsbl.cgi">
    1313<input type=hidden name=page value=dbreport>
Note: See TracChangeset for help on using the changeset viewer.