Changeset 439 for trunk/cgi-bin
- Timestamp:
- 07/20/10 17:25:07 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/search.cgi
r427 r439 24 24 use MyIPDB; 25 25 26 # Don't formally need a username or syslog here. syslog left active for debugging. 27 use Sys::Syslog; 28 openlog "IPDBsearch","pid","$IPDB::syslog_facility"; 29 30 # ... but we do *use* the username on ACLs now. 31 # Collect the username from HTTP auth. If undefined, we're in 32 # a test environment, or called without a username. 33 my $authuser; 34 if (!defined($ENV{'REMOTE_USER'})) { 35 $authuser = '__temptest'; 36 } else { 37 $authuser = $ENV{'REMOTE_USER'}; 38 } 39 26 40 # Why not a global DB handle? (And a global statement handle, as well...) 27 41 # Use the connectDB function, otherwise we end up confusing ourselves … … 49 63 } 50 64 51 printHeader('Searching...'); 65 # Headerize! Make sure we replace the $$EXTRA0$$ bit as needed. 66 printHeader('', ($IPDBacl{$authuser} =~ /a/ ? 67 '<td align=right><a href="/ip/cgi-bin/main.cgi?action=assign">Add new assignment</a></td>' : '' 68 )); 52 69 53 70 if ($webvar{stype} eq 'q') {
Note:
See TracChangeset
for help on using the changeset viewer.