Changeset 370 for trunk/cgi-bin/IPDB.pm
- Timestamp:
- 11/27/07 12:18:27 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r350 r370 25 25 %allocated %free %routed %bigfree %IPDBacl 26 26 &initIPDBGlobals &connectDB &finish &checkDBSanity &allocateBlock &deleteBlock 27 & mailNotify27 &getBlockData &mailNotify 28 28 ); 29 29 … … 33 33 @masterblocks %allocated %free %routed %bigfree %IPDBacl 34 34 &initIPDBGlobals &connectDB &finish &checkDBSanity &allocateBlock 35 &deleteBlock & mailNotify35 &deleteBlock &getBlockData &mailNotify 36 36 )] 37 37 ); … … 492 492 $msg = "Unable to deallocate $disp_alloctypes{$type} $cidr"; 493 493 $sth = $dbh->prepare("update poolips set custid='6750400',available='y',". 494 "city=(select city from allocations where cidr >>= '$cidr'),". 494 "city=(select city from allocations where cidr >>= '$cidr'". 495 " order by masklen(cidr) desc limit 1),". 495 496 "description='',notes='',circuitid='' where ip='$cidr'"); 496 497 $sth->execute; … … 643 644 644 645 646 ## IPDB::getBlockData() 647 # Return custid, type, city, and description for a block 648 sub getBlockData { 649 my $dbh = shift; 650 my $block = shift; 651 652 my $sth = $dbh->prepare("select cidr,custid,type,city,description from searchme". 653 " where cidr='$block'"); 654 $sth->execute(); 655 return $sth->fetchrow_array(); 656 } # end getBlockData() 657 658 645 659 ## IPDB::mailNotify() 646 660 # Sends notification mail to recipients regarding an IPDB operation
Note:
See TracChangeset
for help on using the changeset viewer.