Changeset 48 for branches/stable/cgi-bin
- Timestamp:
- 11/01/04 12:07:51 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/cgi-bin/main.cgi
r43 r48 139 139 eval { $ip_dbh->rollback; }; 140 140 syslog "err", "Could not add master block '$webvar{cidr}' to database: '$@'"; 141 printAndExit("Could not add master block $webvar{cidr} to database ");141 printAndExit("Could not add master block $webvar{cidr} to database: $@"); 142 142 } 143 143 … … 979 979 my $cidr = $data[1]; 980 980 981 $sth = $ip_dbh->prepare("update poolips set custid='$webvar{custid}', city='$webvar{city}'".982 " 981 $sth = $ip_dbh->prepare("update poolips set custid='$webvar{custid}',". 982 "city='$webvar{city}',available='n',description='$webvar{desc}'". 983 983 " where ip='$cidr'"); 984 984 $sth->execute; 985 985 if ($sth->err) { 986 printAndExit("Allocation of $cidr to $webvar{custid} failed: '".$sth->errstr."'");987 986 syslog "err", "Allocation of $cidr to $webvar{custid} by $authuser failed: ". 988 987 "'".$sth->errstr."'"; 988 printAndExit("Allocation of $cidr to $webvar{custid} failed: '".$sth->errstr."'"); 989 989 } 990 990 print qq(<div class="center"><div class="heading">The IP $cidr has been allocated to customer $webvar{custid}</div></div>); … … 1169 1169 if ($webvar{city} !~ /^(?:Huntsville|North Bay|Ottawa|Pembroke|Sault Ste. Marie|Sudbury|Timmins|Thunder Bay|Toronto)$/) { 1170 1170 printAndExit("Please choose a valid POP location for a routed netblock. Valid ". 1171 "POP locations are currently:<br>\n Huntsville - North Bay - Ottawa -". 1171 "POP locations are currently:<br>\n Elliot Lake - Huntsville - North Bay -". 1172 " Ottawa -". 1172 1173 " Pembroke - Sault Ste. Marie - Sudbury - Timmins - Thunder Bay - Toronto"); 1173 1174 } … … 1285 1286 eval { $ip_dbh->rollback; }; 1286 1287 syslog "err", "$authuser could not update block/IP '$webvar{block}': '$@'"; 1287 printAndExit("Could not update block/IP $webvar{block} ");1288 printAndExit("Could not update block/IP $webvar{block}: $@"); 1288 1289 } 1289 1290 … … 1416 1417 @data = $sth->fetchrow_array; 1417 1418 $sth = $ip_dbh->prepare("update poolips set custid='6750400', available='y',". 1418 " city='$data[0]' where ip='$webvar{block}'");1419 " city='$data[0]', description='' where ip='$webvar{block}'"); 1419 1420 $sth->execute; 1420 1421 $ip_dbh->commit; … … 1424 1425 eval { $ip_dbh->rollback; }; 1425 1426 syslog "err", "$authuser could not deallocate static IP '$webvar{block}': '$@'"; 1426 printAndExit("Could not deallocate static IP $webvar{block} ");1427 printAndExit("Could not deallocate static IP $webvar{block}: $@"); 1427 1428 } 1428 1429 print "<div class=heading align=center>Success! $webvar{block} deallocated.</div>\n"; … … 1442 1443 eval { $ip_dbh->rollback; }; 1443 1444 syslog "err", "$authuser could not remove master block '$webvar{block}': '$@'"; 1444 printAndExit("Could not remove master block $webvar{block} ");1445 printAndExit("Could not remove master block $webvar{block}: $@"); 1445 1446 } 1446 1447 print "<div class=heading align=center>Success! Master $webvar{block} removed.</div>\n"; … … 1538 1539 eval { $ip_dbh->rollback; }; 1539 1540 syslog "err", "$authuser could not deallocate netblock '$webvar{block}': '$@'"; 1540 printAndExit("Could not deallocate netblock $webvar{block} ");1541 printAndExit("Could not deallocate netblock $webvar{block}: $@"); 1541 1542 } 1542 1543 print "<div class=heading align=center>Success! $webvar{block} deleted.</div>\n";
Note:
See TracChangeset
for help on using the changeset viewer.