Changeset 32 for branches/stable
- Timestamp:
- 10/27/04 12:42:03 (20 years ago)
- Location:
- branches/stable
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/assign.html
r28 r32 85 85 </select> 86 86 </td> 87 </tr><tr class="color2"> 88 <td>Route/allocate from this master: </td><td>$$MASTERLIST$$</td> 87 89 </tr><tr class="color1"> 88 <td valign="top">Description/Name: </td><td><input name="desc" size=40></td>90 <td>Description/Name: </td><td><input name="desc" size=40></td> 89 91 </tr><tr class="color2"> 90 92 <td>Notes: </td><td><textarea name="notes" rows="3" cols="40"></textarea></td> -
branches/stable/cgi-bin/main.cgi
r29 r32 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.