Changeset 62
- Timestamp:
- 02/12/16 15:45:59 (9 years ago)
- Location:
- trunk/uribl
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/uribl/Makefile
r42 r62 7 7 8 8 PKGNAME=uridb 9 VERSION=0.1 9 VERSION=0.1.2 10 10 11 11 # bloody stupid Debian config puts OS-provided packaged sitelib under … … 29 29 rm -rf $(PKGNAME)-$(VERSION) 30 30 # gpg --detach-sign $(PKGNAME)-$(VERSION).tar.gz 31 -
trunk/uribl/templates/index.tmpl
r27 r62 6 6 <TMPL_VAR NAME=pgcomment> 7 7 <!-- <TMPL_VAR NAME=uridbsiteroot> --> 8 <form action="<TMPL_VAR NAME=cgiself>" >8 <form action="<TMPL_VAR NAME=cgiself>" method="POST"> 9 9 <input type=hidden name=page value=report> 10 10 <table> -
trunk/uribl/templates/report.tmpl
r27 r62 7 7 <TMPL_VAR NAME=pgcomment><br> 8 8 <a href="<TMPL_VAR NAME=uridbsiteroot>">Back</a> 9 <form action="<TMPL_VAR NAME=cgiself>" >9 <form action="<TMPL_VAR NAME=cgiself>" method="POST"> 10 10 <input type=hidden name=page value="dbreport"> 11 11 <table border=1> 12 <tr><td > </td><td colspan=4 align=center>List as:</td></tr>13 <tr><td>Domain</td><td> Don't list</td><td>Black</td><td>Grey</td><td>URL shortener</td><td>Comment</td></tr>12 <tr><td colspan=2> </td><td colspan=4 align=center>List as:</td></tr> 13 <tr><td>Domain</td><td>Other lists</td><td>Don't list</td><td>Black</td><td>Grey</td><td>URL shortener</td><td>Comment</td></tr> 14 14 <TMPL_LOOP NAME=domlist> 15 15 <tr> 16 16 <td><TMPL_VAR NAME=domain><input type=hidden name=dom<TMPL_VAR NAME=domindex> value="<TMPL_VAR NAME=domain>"></td> 17 <td><TMPL_VAR NAME=otherlists></td> 17 18 <td align="center"><input type=radio name=dom<TMPL_VAR NAME=domindex>type value="0"></td> 18 19 <td align="center"><input type=radio name=dom<TMPL_VAR NAME=domindex>type value="2" checked></td> -
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.