Changeset 439


Ignore:
Timestamp:
Jul 20, 2010, 5:25:07 PM (11 years ago)
Author:
Kris Deugau
Message:

/trunk

History-conversion fixup - replace $$EXTRA0$$ in header in search.cgi

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/search.cgi

    r427 r439  
    2424use MyIPDB;
    2525
     26# Don't formally need a username or syslog here.  syslog left active for debugging.
     27use Sys::Syslog;
     28openlog "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.
     33my $authuser;
     34if (!defined($ENV{'REMOTE_USER'})) {
     35  $authuser = '__temptest';
     36} else {
     37  $authuser = $ENV{'REMOTE_USER'};
     38}
     39
    2640# Why not a global DB handle?  (And a global statement handle, as well...)
    2741# Use the connectDB function, otherwise we end up confusing ourselves
     
    4963}
    5064
    51 printHeader('Searching...');
     65# Headerize!  Make sure we replace the $$EXTRA0$$ bit as needed.
     66printHeader('', ($IPDBacl{$authuser} =~ /a/ ?
     67        '<td align=right><a href="/ip/cgi-bin/main.cgi?action=assign">Add new assignment</a></td>' : ''
     68        ));
    5269
    5370if ($webvar{stype} eq 'q') {
Note: See TracChangeset for help on using the changeset viewer.