Changeset 155
- Timestamp:
- 02/04/05 17:35:56 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/sql-cleanup/cgi-bin/main.cgi
r154 r155 325 325 # Fix up types from pools (which are single-char) 326 326 # Fixing the database would be... painful. :( 327 ##fixme LEGACY CODE 327 328 if ($data[2] =~ /^[cdsmw]$/) { 328 329 $data[2] .= 'i'; … … 787 788 # + Different flavours of netblock 788 789 789 if ($webvar{alloctype} =~ /^ [cdsmw]i$/) {790 if ($webvar{alloctype} =~ /^.i$/) { 790 791 my ($base,undef) = split //, $webvar{alloctype}; # split into individual chars 791 792 my $sql; … … 849 850 ##fixme 850 851 # This section needs serious Pondering. 851 if ($webvar{alloctype} =~ /^ [cdsmw]p$/) {852 if ($webvar{alloctype} =~ /^.[pd]$/) { 852 853 if (($webvar{city} !~ /^(Sudbury|North Bay)$/) && ($webvar{alloctype} eq 'dp')) { 853 854 printError("You must chose Sudbury or North Bay for DSL pools."); … … 894 895 $cidr = $subblocks[0]; 895 896 } 896 } # if ($webvar{alloctype} =~ /^ [cdsmw]i$/)897 } # if ($webvar{alloctype} =~ /^.i$/) 897 898 898 899 open HTML, "../confirm.html" … … 1052 1053 $data[2] =~ s/\s//; 1053 1054 1055 ##fixme LEGACY CODE 1054 1056 # Postfix "i" on pool IP types 1055 1057 if ($data[2] =~ /^[cdsmw]$/) { … … 1114 1116 # Relatively simple SQL transaction here. 1115 1117 my $sql; 1116 if (my $pooltype = ($webvar{alloctype} =~ /^( [cdsmw])i$/) ) {1118 if (my $pooltype = ($webvar{alloctype} =~ /^(.)i$/) ) { 1117 1119 # Note the hack ( available='n' ) to work around "update" additions 1118 1120 # to static IP space. Eww. … … 1204 1206 $desc = "N/A"; 1205 1207 $notes = "N/A"; 1206 } elsif ($webvar{alloctype} =~ /^ [cdsmw]i$/) { # done with alloctype=rr1208 } elsif ($webvar{alloctype} =~ /^.i$/) { # done with alloctype=rr 1207 1209 1208 1210 # Unassigning a static IP … … 1217 1219 $alloctype .="i"; 1218 1220 1219 } else { # done with alloctype= [cdsmw]i1221 } else { # done with alloctype=~ /^.i$/ 1220 1222 1221 1223 my $sth = $ip_dbh->prepare("select cidr,custid,type,city,circuitid,description,notes from ". … … 1242 1244 1243 1245 # Set the warning text. 1244 if ($alloctype =~ /^ [cdsmw]p$/) {1246 if ($alloctype =~ /^.[pd]$/) { 1245 1247 $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>|; 1246 1248 } else {
Note:
See TracChangeset
for help on using the changeset viewer.