- Timestamp:
- 10/25/04 17:29:26 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/main.cgi
r9 r12 50 50 "si","Server pool IP", 51 51 "mi","Static dialup IP", 52 "wi","Static wireless IP", 52 53 "cp","Cable pool", 53 54 "dp","DSL pool", 54 55 "sp","Server pool", 55 56 "mp","Static dialup pool", 57 "wp","Static wireless pool", 56 58 "dn","Dialup netblock", 57 59 "dy","Dynamic DSL netblock", … … 364 366 $data[1], $full_alloc_types{$data[2]}, $data[3], $data[4]); 365 367 # Allow listing of pool if desired/required. 366 if ($data[2] =~ /^[sdcm ]p$/) {368 if ($data[2] =~ /^[sdcmw]p$/) { 367 369 $row[0] .= ' <a href="/ip/cgi-bin/main.cgi?action=listpool'. 368 370 "&pool=$data[0]\">List IPs</a>"; … … 653 655 $data[3], $full_alloc_types{$data[2]}, $data[1], $data[4]); 654 656 # If the allocation is a pool, allow listing of the IPs in the pool. 655 if ($data[2] =~ /^[sdc ]p$/) {657 if ($data[2] =~ /^[sdcmw]p$/) { 656 658 $row[0] .= ' <a href="/ip/cgi-bin/main.cgi?action=listpool'. 657 659 "&pool=$data[0]\">List IPs</a>"; … … 1122 1124 } 1123 1125 print "<!-- [ In validateInput(). Insert customer ID cross-check here. ] -->\n"; 1124 } elsif ($webvar{alloctype} =~ /^([sdc ]p|si|dn|dy|dc|ee|rr|ii)$/){1126 } elsif ($webvar{alloctype} =~ /^([sdcmw]p|si|dn|dy|dc|ee|rr|ii)$/){ 1125 1127 # All non-customer allocations MUST be entered with "our" customer ID. 1126 1128 # I have Defined this as 6750400 for consistency. … … 1293 1295 $desc = "N/A"; 1294 1296 $notes = "N/A"; 1295 } elsif ($webvar{alloctype} =~ /^[sdcm ]i$/) { # done with alloctype=rr1297 } elsif ($webvar{alloctype} =~ /^[sdcmw]i$/) { # done with alloctype=rr 1296 1298 1297 1299 # Unassigning a static IP … … 1306 1308 $alloctype .="i"; 1307 1309 1308 } else { # done with alloctype=[sdcm ]i1310 } else { # done with alloctype=[sdcmw]i 1309 1311 1310 1312 my $sth = $ip_dbh->prepare("select cidr,custid,type,city,description,notes from ". … … 1330 1332 1331 1333 # Set the warning text. 1332 if ($alloctype =~ /^[sdcm ]p$/) {1334 if ($alloctype =~ /^[sdcmw]p$/) { 1333 1335 $html =~ s|<!--warn-->|<tr bgcolor="black"><td colspan="2"><div class="red">Warning: clicking confirm will remove this record entirely.<br>Any IPs allocated from this pool will also be removed!</div></td></tr>|; 1334 1336 } else { … … 1352 1354 local $ip_dbh->{RaiseError} = 1; 1353 1355 1354 if ($webvar{alloctype} =~ /^[sdcm ]i$/) {1356 if ($webvar{alloctype} =~ /^[sdcmw]i$/) { 1355 1357 1356 1358 eval { … … 1375 1377 syslog "notice", "$authuser deallocated static IP $webvar{block}"; 1376 1378 1377 } elsif ($webvar{alloctype} eq 'mm') { # end alloctype = [sdcm ]i1379 } elsif ($webvar{alloctype} eq 'mm') { # end alloctype = [sdcmw]i 1378 1380 1379 1381 eval { … … 1419 1421 $sth = $ip_dbh->prepare("delete from allocations where cidr='$webvar{block}'"); 1420 1422 $sth->execute; 1421 1422 1423 # Special case - delete pool IPs 1423 if ($webvar{alloctype} =~ /^[sdcm ]p$/) {1424 if ($webvar{alloctype} =~ /^[sdcmw]p$/) { 1424 1425 # We have to delete the IPs from the pool listing. 1425 1426 $sth = $ip_dbh->prepare("delete * from poolips where pool='$webvar{block}'");
Note:
See TracChangeset
for help on using the changeset viewer.