Changeset 31 for trunk/cgi-bin
- Timestamp:
- 10/27/04 12:34:06 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/main.cgi
r27 r31 782 782 or croak "Could not open assign.html: $!"; 783 783 $html = join('',<HTML>); 784 my $masterlist = "<select name=allocfrom><option selected>-</option>\n"; 785 foreach my $master (@masterblocks) { 786 $masterlist .= "<option>$master</option>\n"; 787 } 788 $masterlist .= "</select>\n"; 789 $html =~ s|\$\$MASTERLIST\$\$|$masterlist|g; 784 790 close HTML; 785 791 } … … 857 863 my $failmsg; 858 864 if ($webvar{alloctype} eq 'rr') { 859 $sql = "select * from freeblocks where maskbits<=$webvar{maskbits} and routed='n'". 860 " order by maskbits desc"; 865 if ($webvar{allocfrom} ne '-') { 866 $sql = "select * from freeblocks where maskbits<=$webvar{maskbits} and routed='n'". 867 " and cidr <<= '$webvar{allocfrom}' order by maskbits desc"; 868 } else { 869 $sql = "select * from freeblocks where maskbits<=$webvar{maskbits} and routed='n'". 870 " order by maskbits desc"; 871 } 861 872 $failmsg = "No suitable free block found.<br>\nWe do not have a free". 862 873 " routeable block of that size.<br>\nYou will have to either route". … … 876 887 " chose a smaller blocksize."; 877 888 } 878 $sql = "select * from freeblocks where city='$city' and maskbits<=$webvar{maskbits}". 879 " and routed='y' order by cidr,maskbits desc"; 889 if ($webvar{allocfrom} ne '-') { 890 $sql = "select * from freeblocks where city='$city' and maskbits<=$webvar{maskbits}". 891 " and cidr <<= '$webvar{allocfrom}' and routed='y' order by cidr,maskbits desc"; 892 } else { 893 $sql = "select * from freeblocks where city='$city' and maskbits<=$webvar{maskbits}". 894 " and routed='y' order by cidr,maskbits desc"; 895 } 880 896 } 881 897 $sth = $ip_dbh->prepare($sql);
Note:
See TracChangeset
for help on using the changeset viewer.