Changeset 284 for trunk/cgi-bin/IPDB.pm
- Timestamp:
- 09/21/05 16:30:31 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r256 r284 184 184 # Does all of the magic of actually allocating a netblock 185 185 # Requires database handle, block to allocate, custid, type, city, 186 # description, notes, circuit ID, block to allocate from, 186 # description, notes, circuit ID, block to allocate from, private data 187 187 # Returns a success code and optional error message. 188 188 sub allocateBlock { 189 my ($dbh,undef,undef,$custid,$type,$city,$desc,$notes,$circid ) = @_;190 189 my ($dbh,undef,undef,$custid,$type,$city,$desc,$notes,$circid,$privdata) = @_; 190 191 191 my $cidr = new NetAddr::IP $_[1]; 192 192 my $alloc_from = new NetAddr::IP $_[2]; … … 220 220 $sth = $dbh->prepare("update poolips set custid='$custid',". 221 221 "city='$city',available='n',description='$desc',notes='$notes',". 222 "circuitid='$circid' ".222 "circuitid='$circid',privdata='$privdata'". 223 223 " where ip='$cidr'"); 224 224 $sth->execute; … … 263 263 } 264 264 $sth = $dbh->prepare("insert into allocations". 265 " (cidr,custid,type,city,description,notes,maskbits,circuitid )".265 " (cidr,custid,type,city,description,notes,maskbits,circuitid,privdata)". 266 266 " values ('$cidr','$custid','$type','$city','$desc','$notes',". 267 $cidr->masklen.",'$circid' )");267 $cidr->masklen.",'$circid','$privdata')"); 268 268 $sth->execute; 269 269 … … 361 361 # Insert the allocations entry 362 362 $sth = $dbh->prepare("insert into allocations (cidr,custid,type,city,". 363 "description,notes,maskbits,circuitid )".363 "description,notes,maskbits,circuitid,privdata)". 364 364 " values ('$cidr','$custid','$type','$city','$desc','$notes',". 365 $cidr->masklen.",'$circid' )");365 $cidr->masklen.",'$circid','$privdata')"); 366 366 $sth->execute; 367 367
Note:
See TracChangeset
for help on using the changeset viewer.