%
use FS::Record qw(qsearch dbdef);
use DBIx::DBSchema;
use DBIx::DBSchema::Table;
my $error;
my $p2 = popurl(2);
my ($table) = $cgi->keywords;
my $dbdef = dbdef or die "Cannot fetch dbdef!";
my $dbdef_table = $dbdef->table($table) or die "Cannot fetch schema for $table";
my $pkey = $dbdef_table->primary_key or die "Cannot fetch pkey for $table";
print header("Browse $table", menubar('Main Menu' => $p));
my @rec = qsearch($table, {});
my @col = $dbdef_table->columns;
if ($cgi->param('error')) { %>
Error: <%=$cgi->param('error')%>
<% }
%>
Add a new <%=$table%>
<%=table()%>