Changeset 87
- Timestamp:
- 11/26/04 17:28:19 (20 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/assign.html
r74 r87 13 13 <option>Burlington</option> 14 14 <option>Chapleau</option> 15 <option>Chelmsford</option> 15 16 <option>Espanola</option> 16 17 <option>Elliot Lake</option> … … 74 75 <td>Customer ID: </td><td><input type="text" name="custid" size="15" maxlength="15"> (Only required for Customer allocations)</td> 75 76 </tr><tr class="color1"> 76 <td>Route from this POP: </td><td>77 <td>Route from/through: </td><td> 77 78 <select name="pop"><option selected>-</option> 79 <option>Blind River</option> 80 <option>Chelmsford</option> 78 81 <option>Elliot Lake</option> 82 <option>Espanola</option> 79 83 <option>Huntsville</option> 84 <option>Little Current</option> 85 <option>Lively</option> 80 86 <option>North Bay</option> 81 87 <option>Ottawa</option> 82 88 <option>Pembroke</option> 83 89 <option>Sault Ste. Marie</option> 90 <option>Sturgeon</option> 84 91 <option>Sudbury</option> 85 92 <option>Timmins</option> 86 93 <option>Thunder Bay</option> 87 94 <option>Toronto</option> 95 <option>Valley</option> 88 96 </select> 89 97 </td> -
trunk/cgi-bin/main.cgi
r74 r87 828 828 my $city; # Shut up Perl's "strict" scoping/usage check. 829 829 $sql = "select * from poolips where available='y' and". 830 " ptype='$base' and city='$webvar{ city}'";830 " ptype='$base' and city='$webvar{pop}'"; 831 831 } 832 832 … … 839 839 $ipcount{$data[0]}++; 840 840 } 841 $sth = $ip_dbh->prepare("select city from allocations where cidr=?"); 841 842 foreach my $key (keys %ipcount) { 842 $optionlist .= "<option value='$key'>$key [$ipcount{$key} free IP(s)]</option>\n"; 843 $sth->execute($key); 844 my @data = $sth->fetchrow_array; 845 $optionlist .= "<option value='$key'>$key [$ipcount{$key} free IP(s)] in $data[0]</option>\n"; 843 846 } 844 847 $cidr = "Single static IP"; … … 931 934 $html =~ s|\$\$ALLOC_FROM\$\$|$alloc_from|g; 932 935 $html =~ s|\$\$CIDR\$\$|$cidr|g; 936 $webvar{city} = desanitize($webvar{city}); 933 937 $html =~ s|\$\$CITY\$\$|$webvar{city}|g; 934 938 $html =~ s|\$\$CUSTID\$\$|$webvar{custid}|g; 939 $webvar{circid} = desanitize($webvar{circid}); 935 940 $html =~ s|\$\$CIRCID\$\$|$webvar{circid}|g; 936 941 $webvar{desc} = desanitize($webvar{desc}); … … 1156 1161 printAndExit("Please enter a customer ID."); 1157 1162 } 1158 if ($webvar{custid} !~ /^(?:\d{10}|\d{7}|STAFF )(?:-\d\d?)?$/) {1163 if ($webvar{custid} !~ /^(?:\d{10}|\d{7}|STAFF|TEMP)(?:-\d\d?)?$/) { 1159 1164 printAndExit("Please enter a valid customer ID- this must be a 7- or 10-digit number, or STAFF for static IPs for staff."); 1160 1165 } -
trunk/fb-assign.html
r38 r87 4 4 <form method="POST" action="main.cgi" class="regular"> 5 5 <tr class="color1"><td>Free block selected for assignment: </td><td>$$BLOCK$$<input type=hidden name=block value="$$BLOCK$$"></td></tr> 6 <tr class="color 1">6 <tr class="color2"> 7 7 <td>City: </td><td> 8 8 <select name="city"><option selected>-</option> … … 14 14 <option>Burlington</option> 15 15 <option>Chapleau</option> 16 <option>Chelmsford</option> 16 17 <option>Espanola</option> 17 18 <option>Elliot Lake</option> … … 49 50 </td> 50 51 </tr> 51 <tr class="color 2">52 <tr class="color1"> 52 53 <td>Allocation type:</td><td> 53 54 <select name="alloctype"><option value="cn" selected>Customer netblock</option> … … 64 65 <input type="button" value=" ? " onclick="helpAllocTypes()" class="regular"> 65 66 </td> 66 </tr><tr class="color 1">67 </tr><tr class="color2"> 67 68 <td>Customer ID: </td><td><input type="text" name="custid" size="15" maxlength="15"> (Only required for Customer allocations)</td> 68 69 </tr><tr class="color1"> -
trunk/header.inc
r45 r87 14 14 function helpAllocTypes() { 15 15 window.open("/ip/alloctypes.html", "alloc_window", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=750,height=550") 16 } 17 function popNotes(page) { 18 window.open(page, "IPDB_notes", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=400,height=300"); 16 19 } 17 20 </script> … … 60 63 </tr> 61 64 </tbody></table> 62 <br></br> 65 <table width="98%" border=0><tr><td align=right><a href="javascript:popNotes('/ip/changes.html')">Recent Changes</a></td></tr></table> 66 <br>
Note:
See TracChangeset
for help on using the changeset viewer.