Changeset 48


Ignore:
Timestamp:
11/01/04 12:07:51 (20 years ago)
Author:
Kris Deugau
Message:

/branches/stable

Merge bugfixes from /trunk r46 and r47

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/cgi-bin/main.cgi

    r43 r48  
    139139    eval { $ip_dbh->rollback; };
    140140    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: $@");
    142142  }
    143143
     
    979979    my $cidr = $data[1];
    980980
    981     $sth = $ip_dbh->prepare("update poolips set custid='$webvar{custid}',city='$webvar{city}'".
    982         " available='n',description='$webvar{desc}'".
     981    $sth = $ip_dbh->prepare("update poolips set custid='$webvar{custid}',".
     982        "city='$webvar{city}',available='n',description='$webvar{desc}'".
    983983        " where ip='$cidr'");
    984984    $sth->execute;
    985985    if ($sth->err) {
    986       printAndExit("Allocation of $cidr to $webvar{custid} failed: '".$sth->errstr."'");
    987986      syslog "err", "Allocation of $cidr to $webvar{custid} by $authuser failed: ".
    988987        "'".$sth->errstr."'";
     988      printAndExit("Allocation of $cidr to $webvar{custid} failed: '".$sth->errstr."'");
    989989    }
    990990    print qq(<div class="center"><div class="heading">The IP $cidr has been allocated to customer $webvar{custid}</div></div>);
     
    11691169      if ($webvar{city} !~ /^(?:Huntsville|North Bay|Ottawa|Pembroke|Sault Ste. Marie|Sudbury|Timmins|Thunder Bay|Toronto)$/) {
    11701170        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 -".
    11721173                " Pembroke - Sault Ste. Marie - Sudbury - Timmins - Thunder Bay - Toronto");
    11731174      }
     
    12851286    eval { $ip_dbh->rollback; };
    12861287    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}: $@");
    12881289  }
    12891290
     
    14161417      @data = $sth->fetchrow_array;
    14171418      $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}'");
    14191420      $sth->execute;
    14201421      $ip_dbh->commit;
     
    14241425      eval { $ip_dbh->rollback; };
    14251426      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}: $@");
    14271428    }
    14281429    print "<div class=heading align=center>Success!  $webvar{block} deallocated.</div>\n";
     
    14421443      eval { $ip_dbh->rollback; };
    14431444      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}: $@");
    14451446    }
    14461447    print "<div class=heading align=center>Success!  Master $webvar{block} removed.</div>\n";
     
    15381539      eval { $ip_dbh->rollback; };
    15391540      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}: $@");
    15411542    }
    15421543    print "<div class=heading align=center>Success!  $webvar{block} deleted.</div>\n";
Note: See TracChangeset for help on using the changeset viewer.