Changeset 33
- Timestamp:
- 10/27/04 17:01:02 (20 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/main.cgi
r31 r33 1226 1226 # We'll just show what type of block it is. 1227 1227 1228 $html =~ s/\$\$TYPE\$\$/$data[2]/g; 1229 $html =~ s/\$\$FULLTYPE\$\$/$full_alloc_types{$data[2]}/g; 1228 # this has now been Requested, so here goes. 1229 1230 if ($data[2] =~ /^d[nyc]|cn|ee|ii$/) { 1231 # Block that can be changed 1232 my $blockoptions = "<select name=alloctype><option". 1233 (($data[2] eq 'dn') ? ' selected' : '') ." value='dn'>Dialup netblock</option>\n<option". 1234 (($data[2] eq 'dy') ? ' selected' : '') ." value='dy'>Dynamic DSL netblock</option>\n<option". 1235 (($data[2] eq 'dc') ? ' selected' : '') ." value='dc'>Dynamic cable netblock</option>\n<option". 1236 (($data[2] eq 'cn') ? ' selected' : '') ." value='cn'>Customer netblock</option>\n<option". 1237 (($data[2] eq 'ee') ? ' selected' : '') ." value='ee'>End-use netblock</option>\n<option". 1238 (($data[2] eq 'ii') ? ' selected' : '') ." value='ii'>Internal netblock</option>\n". 1239 "</select>\n"; 1240 $html =~ s/\$\$TYPESELECT\$\$/$blockoptions/g; 1241 } else { 1242 $html =~ s/\$\$TYPESELECT\$\$/$full_alloc_types{$data[2]}<input type=hidden name=alloctype value="$data[2]">/g; 1243 } 1230 1244 1231 1245 # These can be modified, although CustID changes may get ignored. … … 1258 1272 } else { 1259 1273 $sql = "update allocations set custid='$webvar{custid}',". 1260 "description='$webvar{desc}',notes='$webvar{notes}',city='$webvar{city}' 1261 " where cidr='$webvar{block}'";1274 "description='$webvar{desc}',notes='$webvar{notes}',city='$webvar{city}',". 1275 "type='$webvar{alloctype}' where cidr='$webvar{block}'"; 1262 1276 } 1263 1277 syslog "debug", $sql; -
trunk/editDisplay.html
r20 r33 11 11 <input type=text name=city value="$$CITY$$"></td></tr> 12 12 13 <tr class="color1"><td class=heading>Type:</td><td colspan=2 class=regular>$$FULLTYPE$$ 14 <input type=hidden name=alloctype value="$$TYPE$$"></td></tr> 13 <tr class="color1"><td class=heading>Type:</td><td colspan=2 class=regular>$$TYPESELECT$$</td></tr> 15 14 16 15 <tr class="color2"><td class=heading>CustID:</td><td colspan=2 class="regular">
Note:
See TracChangeset
for help on using the changeset viewer.