Changeset 62 for trunk/uribl/uridb.cgi
- Timestamp:
- 02/12/16 15:45:59 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/uribl/uridb.cgi
r41 r62 25 25 use CGI::Simple; 26 26 use HTML::Template; 27 use Encode; 28 27 29 use URIdb; 28 30 … … 40 42 my $uridb = new URIdb; 41 43 42 print "Content-type: text/html\n\n";44 print $q->header(-charset=>'utf8'); 43 45 44 46 # default DB info - all other settings should be loaded from the DB. … … 71 73 72 74 my $page; 73 my $templatedir = $ENV{SCRIPT_FILENAME};74 $templatedir =~ s/uridb\.cgi//;75 $templatedir .= "templates";76 $ENV{HTML_TEMPLATE_ROOT} = $templatedir;77 75 78 76 my $cgiself = $ENV{SCRIPT_FILENAME}; 79 77 $cgiself =~ s|.+/([^/]+\.cgi)$|$1|; 78 79 my $templatedir = $ENV{SCRIPT_FILENAME}; 80 $templatedir =~ s/$cgiself//; 81 $templatedir .= "templates"; 82 $ENV{HTML_TEMPLATE_ROOT} = $templatedir; 80 83 81 84 my %config; … … 98 101 99 102 my $uridbsiteroot = $ENV{REQUEST_URI}; 100 $uridbsiteroot =~ s|/ uridb\.cgi\?.+|/|;103 $uridbsiteroot =~ s|/$cgiself\?.+|/|; 101 104 $page->param(uridbsiteroot => $uridbsiteroot); 102 105 … … 108 111 foreach my $domain (@dombase) { 109 112 my %row; 110 $row{domindex} = $domcount++;111 113 ($domain) = split /:/, $domain; 112 114 $domain =~ s/^\+//; 113 115 $domain =~ s/\.uribl.company.com//; 114 116 chomp $domain; 117 # now, see if it's multilisted 118 if ($domain =~ / on (\w+)\s*$/) { 119 my $sub = $1; 120 #$domain =~ s/ on \w+\s*$//; 121 $domlist[$domcount-1]->{otherlists} .= ",$sub"; 122 next; 123 } 124 $row{domindex} = $domcount++; 115 125 $row{domain} = $domain; 116 126 push @domlist, \%row; 117 127 } 128 118 129 $page->param(domlist => \@domlist); 119 130
Note:
See TracChangeset
for help on using the changeset viewer.