Changeset 166 for trunk/cgi-bin
- Timestamp:
- 02/22/05 12:23:36 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/main.cgi
r161 r166 799 799 if ($base =~ /^[ds]$/) { 800 800 $sql = "select * from poolips where available='y' and". 801 " ptype='$base' and (city='Sudbury' or city='North Bay')";801 " type='$webvar{alloctype}' and (city='Sudbury' or city='North Bay')"; 802 802 } else { 803 803 $sql = "select * from poolips where available='y' and". 804 " ptype='$base' and city='$webvar{pop}'";804 " type='$webvar{alloctype}' and city='$webvar{pop}'"; 805 805 } 806 806 … … 1040 1040 # because I'm lazy, we'll try to make the SELECT's bring out identical)ish) data 1041 1041 if ($webvar{block} =~ /\/32$/) { 1042 $sql = "select ip,custid, ptype,city,circuitid,description,notes from poolips where ip='$webvar{block}'";1042 $sql = "select ip,custid,type,city,circuitid,description,notes from poolips where ip='$webvar{block}'"; 1043 1043 } else { 1044 1044 $sql = "select cidr,custid,type,city,circuitid,description,notes from allocations where cidr='$webvar{block}'" … … 1134 1134 }; 1135 1135 if ($@) { 1136 carp "Transaction aborted because $@"; 1136 my $msg = $@; 1137 carp "Transaction aborted because $msg"; 1137 1138 eval { $ip_dbh->rollback; }; 1138 syslog "err", "$authuser could not update block/IP '$webvar{block}': '$ @'";1139 printError("Could not update block/IP $webvar{block}: $ @");1139 syslog "err", "$authuser could not update block/IP '$webvar{block}': '$msg'"; 1140 printError("Could not update block/IP $webvar{block}: $msg"); 1140 1141 return; 1141 1142 } … … 1209 1210 1210 1211 # Unassigning a static IP 1211 my $sth = $ip_dbh->prepare("select ip,custid,city, ptype,notes,circuitid from poolips".1212 my $sth = $ip_dbh->prepare("select ip,custid,city,type,notes,circuitid from poolips". 1212 1213 " where ip='$webvar{block}'"); 1213 1214 $sth->execute(); … … 1216 1217 $sth->bind_columns(\$cidr, \$custid, \$city, \$alloctype, \$notes, \$circid); 1217 1218 $sth->fetch() || croak $sth->errstr; 1218 1219 $alloctype .="i";1220 1219 1221 1220 } else { # done with alloctype=~ /^.i$/
Note:
See TracChangeset
for help on using the changeset viewer.