Changeset 473 for branches/htmlform


Ignore:
Timestamp:
08/17/10 16:50:59 (14 years ago)
Author:
Kris Deugau
Message:

/branches/htmlform

Convert newmaster to template. See #3.

Location:
branches/htmlform
Files:
1 added
1 edited

Legend:

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

    r472 r473  
    9191    printError("You shouldn't have been able to get here.  Access denied.");
    9292  } else {
    93 
    9493    my $cidr = new NetAddr::IP $webvar{cidr};
    95 
    96     print "<div type=heading align=center>Adding $cidr as master block....</div>\n";
     94    $page->param(cidr => "$cidr");
    9795
    9896    my ($code,$msg) = addMaster($ip_dbh, $webvar{cidr});
    9997
    10098    if ($code eq 'FAIL') {
    101       carp "Transaction aborted because $msg";
    10299      syslog "err", "Could not add master block '$webvar{cidr}' to database: '$msg'";
    103       printError("Could not add master block $webvar{cidr} to database: $msg");
     100      $page->param(err => $msg);
    104101    } else {
    105       print "<div type=heading align=center>Success!</div>\n";
    106102      syslog "info", "$authuser added master block $webvar{cidr}";
    107103    }
Note: See TracChangeset for help on using the changeset viewer.