Changeset 528 for trunk/cgi-bin/IPDB.pm
- Timestamp:
- 10/24/12 16:34:36 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r527 r528 27 27 &initIPDBGlobals &connectDB &finish &checkDBSanity 28 28 &addMaster 29 &listSummary &listMaster &listRBlock &listFree 29 &listSummary &listMaster &listRBlock &listFree &listPool 30 30 &getRoutedCity 31 31 &allocateBlock &deleteBlock &getBlockData … … 40 40 &initIPDBGlobals &connectDB &finish &checkDBSanity 41 41 &addMaster 42 &listSummary &listMaster &listRBlock &listFree 42 &listSummary &listMaster &listRBlock &listFree &listPool 43 43 &getRoutedCity 44 44 &allocateBlock &deleteBlock &getBlockData … … 443 443 return \@flist; 444 444 } # end listFree() 445 446 447 ## IPDB::listPool() 448 # 449 sub listPool { 450 my $dbh = shift; 451 my $pool = shift; 452 453 my $sth = $dbh->prepare("SELECT ip,custid,available,description,type". 454 " FROM poolips WHERE pool = ? ORDER BY ip"); 455 $sth->execute($pool); 456 my @poolips; 457 while (my ($ip,$custid,$available,$desc,$type) = $sth->fetchrow_array) { 458 my %row = ( 459 ip => $ip, 460 custid => $custid, 461 available => $available, 462 desc => $desc, 463 delme => $available eq 'n' 464 ); 465 push @poolips, \%row; 466 } 467 return \@poolips; 468 } # end listPool() 445 469 446 470 … … 972 996 my $block = shift; 973 997 974 my $sth = $dbh->prepare("select cidr,custid,type,city,description from searchme". 975 " where cidr='$block'"); 976 $sth->execute(); 977 return $sth->fetchrow_array(); 998 my $binfo = $dbh->selectrow_hashref("SELECT cidr,custid,type,city,description FROM searchme". 999 " WHERE cidr = ?", undef, ($block) ); 1000 return $binfo; 978 1001 } # end getBlockData() 979 1002
Note:
See TracChangeset
for help on using the changeset viewer.