Changeset 318
- Timestamp:
- 04/03/06 16:20:54 (19 years ago)
- Location:
- branches/stable
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/cgi-bin/CustIDCK.pm
r310 r318 49 49 50 50 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; 53 53 # Not certain if this is needed here. It doesn't seem to be. 54 54 # $dbh->ping; # Gotta do this to "force" a "failure". NRGH. … … 58 58 }; 59 59 alarm 0; # avoid race conditions. May not be needed here. (Hah!) 60 if ($@ && $@ !~ /failed connection to newbilling!!/) {60 if ($@ && $@ !~ /failed connection to billing!!/) { 61 61 $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."; 63 63 return 0; 64 64 } -
branches/stable/cgi-bin/checkcusts.pl
r169 r318 26 26 27 27 ($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"); 29 29 30 30 $sth = $dbh->prepare("select distinct def_custid from alloctypes where listorder >=40"); … … 35 35 $sth = $dbh->prepare("select cidr,custid from searchme where not (custid='6750400') ". 36 36 "and not (custid='STAFF') order by cidr"); 37 #$sth = $dbh->prepare("select cidr,custid from searchme order by cidr"); 37 38 $sth->execute; 38 39 -
branches/stable/cgi-bin/main.cgi
r315 r318 987 987 # because I'm lazy, we'll try to make the SELECT's bring out identical)ish) data 988 988 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}'"; 990 990 } 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}'" 992 992 } 993 993 … … 1036 1036 $html =~ s/\$\$TYPESELECT\$\$/$disp_alloctypes{$data[2]}<input type=hidden name=alloctype value="$data[2]">/g; 1037 1037 } 1038 $html =~ s/\$\$OLDCUSTID\$\$/$data[9]/g; 1038 1039 $html =~ s/\$\$CITY\$\$/<input type=text name=city value="$data[3]">/g; 1039 1040 $html =~ s/\$\$CIRCID\$\$/<input type="text" name="circid" value="$data[4]" maxlength=64 size=64 class="regular">/g; … … 1042 1043 } else { 1043 1044 $html =~ s/\$\$CUSTID\$\$/$data[1]/g; 1045 $html =~ s/\$\$OLDCUSTID\$\$/$data[9]/g; 1044 1046 $html =~ s/\$\$TYPESELECT\$\$/$disp_alloctypes{$data[2]}/g; 1045 1047 $html =~ s/\$\$CITY\$\$/$data[3]/g; … … 1055 1057 $html =~ s/\$\$SWIP\$\$/N\/A/; 1056 1058 } 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>' : 1058 1060 '<input type=checkbox name=swip checked=yes>'); 1059 1061 $html =~ s/\$\$SWIP\$\$/$tmp/; -
branches/stable/cgi-bin/search.cgi
r309 r318 106 106 # First chunk of SQL. Filter on custid, description, and notes as necessary. 107 107 my $sql = "(select $cols from searchme where $webvar{custexclude} custid ilike '%$webvar{custid}%')". 108 " $sqlconcat $webvar{custexclude} oldcustid ilike '%$webvar{custid}%')". 108 109 " $sqlconcat (select $cols from searchme where $webvar{descexclude} description ilike '%$webvar{desc}%')". 109 110 " $sqlconcat (select $cols from searchme where $webvar{notesexclude} notes ilike '%$webvar{notes}%')"; … … 286 287 # Query for a customer ID. Note that we can't restrict to "numeric-only" 287 288 # 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%'"; 289 290 my $count = countRows($sql); 290 291 $sql .= " order by cidr limit $RESULTS_PER_PAGE offset $offset"; -
branches/stable/editDisplay.html
r286 r318 13 13 14 14 <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> 15 16 16 17 <tr class="color2"><td class=heading>SWIPed?:</td><td class=regular>$$SWIP$$</td></tr>
Note:
See TracChangeset
for help on using the changeset viewer.