Ignore:
Timestamp:
11/15/11 18:08:14 (12 years ago)
Author:
Kris Deugau
Message:

/branches/stable

Make the fixed web path at least configurable in one place rather
than completely hardcoded across many files.
Update initial database tabledef SQL
Bump version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/cgi-bin/search.cgi

    r445 r507  
    99# Last update by $Author$
    1010###
    11 # Copyright 2005-2010 - Kris Deugau
     11# Copyright 2005-2011 - Kris Deugau
    1212
    1313use strict;             
     
    6464
    6565# 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>' : ''
     66printHeader('', $IPDB::webpath, ($IPDBacl{$authuser} =~ /a/ ?
     67        '<td align=right><a href="'.$IPDB::webpath.'/cgi-bin/main.cgi?action=assign">Add new assignment</a></td>' : ''
    6868        ));
    6969
     
    244244  $html = join('',<HTML>);
    245245  close HTML;
     246  $html =~ s/\$\$WEBPATH\$\$/$IPDB::webpath/g;
    246247
    247248# Generate table of types
     
    446447    # Another bit of HairyPerl(TM) to prefix subblocks with "Sub"
    447448    my @row = (($data[2] =~ /^.r$/ ? 'Sub ' : '').
    448         qq(<a href="/ip/cgi-bin/main.cgi?action=edit&block=$data[0]">$data[0]</a>),
     449        qq(<a href="$IPDB::webpath/cgi-bin/main.cgi?action=edit&block=$data[0]">$data[0]</a>),
    449450        $data[1], $disp_alloctypes{$data[2]}, $data[3], $data[4]);
    450451    # Allow listing of pool if desired/required.
    451452    if ($data[2] =~ /^.[pd]$/) {
    452       $row[0] .= ' &nbsp; <a href="/ip/cgi-bin/main.cgi?action=listpool'.
     453      $row[0] .= ' &nbsp; <a href="'.$IPDB::webpath.'/cgi-bin/main.cgi?action=listpool'.
    453454        "&pool=$data[0]\">List IPs</a>";
    454455    }
     
    474475        print "<b>$i&nbsp;</b>\n";
    475476      } else {
    476         print qq(<a href="/ip/cgi-bin/search.cgi?page=$i&stype=$webvar{stype}&);
     477        print qq(<a href="$IPDB::webpath/cgi-bin/search.cgi?page=$i&stype=$webvar{stype}&);
    477478        if ($webvar{stype} eq 'c') {
    478479          print "cidr=$webvar{cidr}&custid=$webvar{custid}&desc=$webvar{desc}&".
Note: See TracChangeset for help on using the changeset viewer.