Ignore:
Timestamp:
08/12/10 12:00:28 (14 years ago)
Author:
Kris Deugau
Message:

/branches/htmlform

Merge trunk bugfixes and updates

Location:
branches/htmlform
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/htmlform

  • branches/htmlform/cgi-bin/IPDB.pm

    r449 r468  
    833833  my ($action,$subj,$message) = @_;
    834834
     835  return if $smtphost eq 'smtp.example.com';   # do nothing if still using default SMTP host.
     836
    835837##fixme: need to redesign the breakdown/processing for $action for proper handling of all cases
    836838
  • branches/htmlform/cgi-bin/admin.cgi

    r459 r468  
    265265        syslog "notice", "$authuser allocated '$webvar{cidr}' to '$webvar{custid}' as ".
    266266                "'$webvar{alloctype}'";
    267         mailNotify($ip_dbh, "a$webvar{alloctype}",
    268           "$disp_alloctypes{$webvar{alloctype}} $webvar{cidr} allocated to customer".
    269           " $webvar{custid}\n".
     267        mailNotify($ip_dbh, "a$webvar{alloctype}", "ADDED: $disp_alloctypes{$webvar{alloctype}} allocation",
     268          "$disp_alloctypes{$webvar{alloctype}} $webvar{cidr} allocated to customer $webvar{custid}\n".
    270269          "Description: $webvar{desc}\n\nAllocated by: $authuser\n");
    271270      }
  • branches/htmlform/cgi-bin/extras/db2rwhois.pl

    r437 r468  
    7474        "not (cidr <<= '10.0.0.0/8') and ".
    7575        "not (type = 'wr') and ".
    76         "masklen(cidr) <=30 and ".
     76        "((masklen(cidr) <=30 and family(cidr)=4) or (masklen(cidr) <=56 and family(cidr)=6)) and ".
    7777        "cidr <<= ?");
    7878
  • branches/htmlform/cgi-bin/ipdb.psql

    r417 r468  
    7676        "pool" cidr DEFAULT '255.255.255.255/32' NOT NULL,
    7777        "ip" cidr DEFAULT '255.255.255.255/32' NOT NULL PRIMARY KEY,
    78         "oldcustid" character varying(16) DEFAULT '' NOT NULL,
    7978        "city" character varying(30) DEFAULT '' NOT NULL,
    8079        "type" character(2) DEFAULT '' NOT NULL,
     
    9594CREATE TABLE "allocations" (
    9695        "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL PRIMARY KEY,
    97         "oldcustid" character varying(16) DEFAULT '',
    9896        "type" character(2) DEFAULT '',
    9997        "city" character varying(30) DEFAULT '',
     
    112110GRANT ALL on "allocations" to "ipdb";
    113111
    114 CREATE VIEW "searchme" as SELECT allocations.cidr, allocations.custid, allocations."type", allocations.city, allocations.description, allocations.notes, allocations.oldcustid, allocations.circuitid FROM allocations UNION SELECT poolips.ip, poolips.custid, poolips.type, poolips.city, poolips.description, poolips.notes, poolips.oldcustid, poolips.circuitid FROM poolips;
     112CREATE VIEW "searchme" as SELECT allocations.cidr, allocations.custid, allocations."type", allocations.city, allocations.description, allocations.notes, allocations.circuitid FROM allocations UNION SELECT poolips.ip, poolips.custid, poolips.type, poolips.city, poolips.description, poolips.notes, poolips.circuitid FROM poolips;
    115113
    116114REVOKE ALL on "searchme" from PUBLIC;
  • branches/htmlform/cgi-bin/main.cgi

    r466 r468  
    960960  # because I'm lazy, we'll try to make the SELECT's bring out identical)ish) data
    961961  if ($webvar{block} =~ /\/32$/) {
    962     $sql = "select ip,custid,type,city,circuitid,description,notes,modifystamp,privdata,oldcustid from poolips where ip='$webvar{block}'";
     962    $sql = "select ip,custid,type,city,circuitid,description,notes,modifystamp,privdata from poolips where ip='$webvar{block}'";
    963963  } else {
    964     $sql = "select cidr,custid,type,city,circuitid,description,notes,modifystamp,privdata,oldcustid,swip from allocations where cidr='$webvar{block}'"
     964    $sql = "select cidr,custid,type,city,circuitid,description,notes,modifystamp,privdata,swip from allocations where cidr='$webvar{block}'"
    965965  }
    966966
     
    10371037  }
    10381038## end node hack
    1039     $html =~ s/\$\$OLDCUSTID\$\$/$data[9]/g;
    10401039    $html =~ s/\$\$CITY\$\$/<input type=text name=city value="$data[3]">/g;
    10411040    $html =~ s/\$\$CIRCID\$\$/<input type="text" name="circid" value="$data[4]" maxlength=64 size=64 class="regular">/g;
     
    10551054## end node hack
    10561055    $html =~ s/\$\$CUSTID\$\$/$data[1]/g;
    1057     $html =~ s/\$\$OLDCUSTID\$\$/$data[9]/g;
    10581056    $html =~ s/\$\$TYPESELECT\$\$/$disp_alloctypes{$data[2]}/g;
    10591057    $html =~ s/\$\$CITY\$\$/$data[3]/g;
  • branches/htmlform/cgi-bin/search.cgi

    r451 r468  
    139139  my $sql = "(select $cols from searchme where".
    140140        " $webvar{custexclude} (custid ilike '%$webvar{custid}%'".
    141         " OR $webvar{custexclude} oldcustid ilike '%$webvar{custid}%'))".
    142141        " $sqlconcat (select $cols from searchme where $webvar{descexclude} description ilike '%$webvar{desc}%')".
    143142        " $sqlconcat (select $cols from searchme where $webvar{notesexclude} notes ilike '%$webvar{notes}%')";
     
    353352    # Query for a customer ID.  Note that we can't restrict to "numeric-only"
    354353    # as we have non-numeric custIDs in the legacy data.  :/
    355     $sql = "select $cols from searchme where custid ilike '%$query%' or oldcustid ilike '%$query%' or description like '%$query%'";
     354    $sql = "select $cols from searchme where custid ilike '%$query%' or description like '%$query%'";
    356355    my $count = countRows($sql);
    357356    $sql .= " order by cidr limit $RESULTS_PER_PAGE offset $offset";
Note: See TracChangeset for help on using the changeset viewer.