<%
my $router;
if ( $cgi->keywords ) {
my($query) = $cgi->keywords;
$query =~ /^(\d+)$/;
$router = qsearchs('router', { routernum => $1 })
or print $cgi->redirect(popurl(2)."browse/router.cgi") ;
} else {
$router = new FS::router ( {
map { $_, scalar($cgi->param($_)) } fields('router')
} );
}
my $routernum = $router->routernum;
my $action = $routernum ? 'Edit' : 'Add';
print header("$action Router", menubar(
'Main Menu' => "$p",
'View all routers' => "${p}browse/router.cgi",
));
my $p3 = popurl(3);
if($cgi->param('error')) {
%> Error: <%=$cgi->param('error')%>
<% } %>