Changeset 318 for branches/stable


Ignore:
Timestamp:
04/03/06 16:20:54 (18 years ago)
Author:
Kris Deugau
Message:

/branches/stable

Extra code changes required for new billing system rollout. Note that references
to oldcustid can be removed later; this field is NOT required long-term.

Location:
branches/stable
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/cgi-bin/CustIDCK.pm

    r310 r318  
    4949
    5050    eval {
    51       $dbh = DBI->connect ("DBI:Pg:host=newbilling;dbname=custids", "cidcheck", "c1dch4ck");
    52       die "failed connection to newbilling!!" if !$dbh;
     51      $dbh = DBI->connect ("DBI:Pg:host=billing;dbname=custids", "cidcheck", "c1dch4ck");
     52      die "failed connection to billing!!" if !$dbh;
    5353# Not certain if this is needed here.  It doesn't seem to be.
    5454#      $dbh->ping;      # Gotta do this to "force" a "failure".  NRGH.
     
    5858  };
    5959  alarm 0;      # avoid race conditions.  May not be needed here.  (Hah!)
    60   if ($@ && $@ !~ /failed connection to newbilling!!/) {
     60  if ($@ && $@ !~ /failed connection to billing!!/) {
    6161    $CustIDCK::Error = 1;
    62     $CustIDCK::ErrMsg = "Failed connection to newbilling DB host!  Unable to verify CustIDs.";
     62    $CustIDCK::ErrMsg = "Failed connection to billing DB host!  Unable to verify CustIDs.";
    6363    return 0;
    6464  }
  • branches/stable/cgi-bin/checkcusts.pl

    r169 r318  
    2626
    2727($dbh,$errstr) = connectDB("ipdb", "ipdb", "ipdbpwd");
    28 $IDH = DBI->connect ("DBI:Pg:host=newbilling;dbname=custids", "cidcheck", "c1dch4ck");
     28$IDH = DBI->connect ("DBI:Pg:host=billing;dbname=custids", "cidcheck", "c1dch4ck");
    2929
    3030$sth = $dbh->prepare("select distinct def_custid from alloctypes where listorder >=40");
     
    3535$sth = $dbh->prepare("select cidr,custid from searchme where not (custid='6750400') ".
    3636        "and not (custid='STAFF') order by cidr");
     37#$sth = $dbh->prepare("select cidr,custid from searchme order by cidr");
    3738$sth->execute;
    3839
  • branches/stable/cgi-bin/main.cgi

    r315 r318  
    987987  # because I'm lazy, we'll try to make the SELECT's bring out identical)ish) data
    988988  if ($webvar{block} =~ /\/32$/) {
    989     $sql = "select ip,custid,type,city,circuitid,description,notes,modifystamp,privdata from poolips where ip='$webvar{block}'";
     989    $sql = "select ip,custid,type,city,circuitid,description,notes,modifystamp,privdata,oldcustid from poolips where ip='$webvar{block}'";
    990990  } else {
    991     $sql = "select cidr,custid,type,city,circuitid,description,notes,modifystamp,privdata,swip from allocations where cidr='$webvar{block}'"
     991    $sql = "select cidr,custid,type,city,circuitid,description,notes,modifystamp,privdata,oldcustid,swip from allocations where cidr='$webvar{block}'"
    992992  }
    993993
     
    10361036      $html =~ s/\$\$TYPESELECT\$\$/$disp_alloctypes{$data[2]}<input type=hidden name=alloctype value="$data[2]">/g;
    10371037    }
     1038    $html =~ s/\$\$OLDCUSTID\$\$/$data[9]/g;
    10381039    $html =~ s/\$\$CITY\$\$/<input type=text name=city value="$data[3]">/g;
    10391040    $html =~ s/\$\$CIRCID\$\$/<input type="text" name="circid" value="$data[4]" maxlength=64 size=64 class="regular">/g;
     
    10421043  } else {
    10431044    $html =~ s/\$\$CUSTID\$\$/$data[1]/g;
     1045    $html =~ s/\$\$OLDCUSTID\$\$/$data[9]/g;
    10441046    $html =~ s/\$\$TYPESELECT\$\$/$disp_alloctypes{$data[2]}/g;
    10451047    $html =~ s/\$\$CITY\$\$/$data[3]/g;
     
    10551057  $html =~ s/\$\$SWIP\$\$/N\/A/;
    10561058} else {
    1057   my $tmp = (($data[8] eq 'n') ? '<input type=checkbox name=swip>' :
     1059  my $tmp = (($data[10] eq 'n') ? '<input type=checkbox name=swip>' :
    10581060        '<input type=checkbox name=swip checked=yes>');
    10591061  $html =~ s/\$\$SWIP\$\$/$tmp/;
  • branches/stable/cgi-bin/search.cgi

    r309 r318  
    106106  # First chunk of SQL.  Filter on custid, description, and notes as necessary.
    107107  my $sql = "(select $cols from searchme where $webvar{custexclude} custid ilike '%$webvar{custid}%')".
     108        " $sqlconcat $webvar{custexclude} oldcustid ilike '%$webvar{custid}%')".
    108109        " $sqlconcat (select $cols from searchme where $webvar{descexclude} description ilike '%$webvar{desc}%')".
    109110        " $sqlconcat (select $cols from searchme where $webvar{notesexclude} notes ilike '%$webvar{notes}%')";
     
    286287    # Query for a customer ID.  Note that we can't restrict to "numeric-only"
    287288    # as we have non-numeric custIDs in the legacy data.  :/
    288     $sql = "select * from searchme where custid ilike '%$query%'";
     289    $sql = "select * from searchme where custid ilike '%$query%' or oldcustid ilike '%$query%'";
    289290    my $count = countRows($sql);
    290291    $sql .= " order by cidr limit $RESULTS_PER_PAGE offset $offset";
  • branches/stable/editDisplay.html

    r286 r318  
    1313
    1414<tr class="color2"><td class=heading>CustID:</td><td class="regular">$$CUSTID$$</td></tr>
     15<tr class="color2"><td class=heading>Old CustID:</td><td class="regular">$$OLDCUSTID$$</td></tr>
    1516
    1617<tr class="color2"><td class=heading>SWIPed?:</td><td class=regular>$$SWIP$$</td></tr>
Note: See TracChangeset for help on using the changeset viewer.