Ignore:
Timestamp:
09/23/10 18:45:58 (14 years ago)
Author:
Kris Deugau
Message:

/branches/htmlform

Remove use of printError() in admin.cgi. See #15, #26

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/htmlform/cgi-bin/admin.cgi

    r488 r489  
    124124
    125125## Non-default actions.
     126
    126127elsif ($webvar{action} eq 'alloc') {
    127   # OK, we know what we're allocating.
    128128
    129129  if ($webvar{cidr} !~ /^\s*(\d{1,3}\.){3}\d{1,3}(\/\d{2})?\s*$/) {
     
    142142      my $status = CustIDCK->custid_exist($webvar{custid});
    143143      if ($CustIDCK::Error) {
    144         printError("Error verifying customer ID: ".$CustIDCK::ErrMsg);
    145         return;
     144        $page->param(errmsg => "Error verifying customer ID: ".$CustIDCK::ErrMsg);
     145        goto ERRJUMP;
    146146      }
    147147      if (!$status) {
    148         printError("Customer ID not valid.  Make sure the Customer ID ".
     148        $page->param(errmsg => "Customer ID not valid.  Make sure the Customer ID ".
    149149          "is correct.<br>\nUse STAFF for staff static IPs, and $IPDB::defcustid for any other ".
    150150          "non-customer assignments.");
    151         return;
     151        goto ERRJUMP;
    152152      }
    153153    }
     
    208208  # Only need to check city here.
    209209  if ($webvar{city} eq '-') {
    210     printError("Invalid customer location!  Go back and select customer's location.");
     210    $page->param(locerr => "Invalid customer location!  Go back and select customer's location.");
     211    goto ERRJUMP;
    211212  } else {
    212213    if ($webvar{alloctype} =~ /^.i$/) {
     
    497498}
    498499
    499 print "Content-type: text/html\n\n".$header->output;
     500ERRJUMP: print "Content-type: text/html\n\n".$header->output;
    500501print $page->output;
    501502
Note: See TracChangeset for help on using the changeset viewer.