Changeset 169 for branches/stable
- Timestamp:
- 02/22/05 17:00:37 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/cgi-bin/checkcusts.pl
r156 r169 7 7 # Last update by $Author$ 8 8 ### 9 # Copyright (C) 2004 Kris Deugau <kdeugau@vianet.ca>9 # Copyright (C) 2004,2005 Kris Deugau <kdeugau@vianet.ca> 10 10 11 11 use DBI; … … 27 27 ($dbh,$errstr) = connectDB("ipdb", "ipdb", "ipdbpwd"); 28 28 $IDH = DBI->connect ("DBI:Pg:host=newbilling;dbname=custids", "cidcheck", "c1dch4ck"); 29 30 $sth = $dbh->prepare("select distinct def_custid from alloctypes where listorder >=40"); 31 $sth->execute; 32 while (@data = $sth->fetchrow_array) { 33 push @def_custids, $data[0]; 34 } 29 35 $sth = $dbh->prepare("select cidr,custid from searchme where not (custid='6750400') ". 30 36 "and not (custid='STAFF') order by cidr"); … … 35 41 $count = $bad = 0; 36 42 while (@data = $sth->fetchrow_array) { 37 $count++;38 43 $cidr = new NetAddr::IP $data[0]; 39 if ($cidr->within($priv1) or $cidr->within($priv2) or $cidr->within($priv3)) { 44 if ($cidr->within($priv1) or $cidr->within($priv2) or $cidr->within($priv3) or 45 (grep /$data[1]/, @def_custids)) { 40 46 # no-op. we ignore these. 41 47 } else { 48 $count++; 42 49 $IDS->execute($data[1]); 43 50 $hr = $IDS->fetchrow_hashref();
Note:
See TracChangeset
for help on using the changeset viewer.