Changeset 595 for branches/stable/cgi-bin/IPDB.pm
- Timestamp:
- 05/15/13 17:26:55 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/cgi-bin/IPDB.pm
r594 r595 504 504 # really be specified in the call for clarity 505 505 my $tlist; 506 if ($tgroup eq 'p') { 507 # grouping 'p' - primary allocation types. These include static IP pools (_d and _p), 508 # dynamic-allocation ranges (_e), containers (_c), and the "miscellaneous" cn, in, and en types. 509 $tlist = $dbh->selectall_arrayref("SELECT type,listname FROM alloctypes WHERE listorder < 500 ". 510 "AND type NOT LIKE '_i' AND type NOT LIKE '_r' ORDER BY listorder", { Slice => {} }); 506 if ($tgroup eq 'n') { 507 # grouping 'n' - all netblock types. These include routed blocks, containers (_c) 508 # and contained (_r) types, dynamic-allocation ranges (_e), static IP pools (_d and _p), 509 # and the "miscellaneous" cn, in, and en types. 510 $tlist = $dbh->selectall_arrayref("SELECT type,listname FROM alloctypes WHERE listorder <= 500 ". 511 "AND type NOT LIKE '_i' ORDER BY listorder", { Slice => {} }); 512 } elsif ($tgroup eq 'p') { 513 # grouping 'p' - primary allocation types. As with 'n' above but without the _r contained types. 514 $tlist = $dbh->selectall_arrayref("SELECT type,listname FROM alloctypes WHERE listorder <= 500 ". 515 "AND type NOT LIKE '_i' AND type NOT LIKE '_r' ORDER BY listorder", { Slice => {} }); 511 516 } elsif ($tgroup eq 'c') { 512 517 # grouping 'c' - contained types. These include all static IPs and all _r types. 513 518 $tlist = $dbh->selectall_arrayref("SELECT type,listname FROM alloctypes WHERE listorder <= 500 ". 514 " AND (type LIKE '_i' OR type LIKE '_r') ORDER BY listorder", { Slice => {} }); 519 " AND (type LIKE '_i' OR type LIKE '_r') ORDER BY listorder", { Slice => {} }); 520 } elsif ($tgroup eq 'i') { 521 # grouping 'i' - static IP types. 522 $tlist = $dbh->selectall_arrayref("SELECT type,listname FROM alloctypes WHERE listorder <= 500 ". 523 " AND type LIKE '_i' ORDER BY listorder", { Slice => {} }); 515 524 } else { 516 525 # grouping 'a' - all standard allocation types. This includes everything 517 526 # but mm (present only as a formality). Make this the default. 518 527 $tlist = $dbh->selectall_arrayref("SELECT type,listname FROM alloctypes WHERE listorder <= 500 ". 519 528 " ORDER BY listorder", { Slice => {} }); 520 529 } 521 530 return $tlist;
Note:
See TracChangeset
for help on using the changeset viewer.