Changeset 33


Ignore:
Timestamp:
10/27/04 17:01:02 (20 years ago)
Author:
Kris Deugau
Message:

/trunk

Allow changing "whole" netblock types (dynamic DSL, cable,
and dialup; customer netblock, end-use netblock, and internal
netblock) to each other.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/main.cgi

    r31 r33  
    12261226# We'll just show what type of block it is.
    12271227
    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  }
    12301244
    12311245  # These can be modified, although CustID changes may get ignored.
     
    12581272    } else {
    12591273      $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}'";
    12621276    }
    12631277syslog "debug", $sql;
  • trunk/editDisplay.html

    r20 r33  
    1111<input type=text name=city value="$$CITY$$"></td></tr>
    1212
    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>
    1514
    1615<tr class="color2"><td class=heading>CustID:</td><td colspan=2 class="regular">
Note: See TracChangeset for help on using the changeset viewer.