-<%
-#<!-- $Id: agent_type.cgi,v 1.2 2001-08-21 02:31:56 ivan Exp $ -->
-
-use strict;
-use vars qw( $cgi $agent_type $action $hashref $p $part_pkg );
-use CGI;
-use CGI::Carp qw(fatalsToBrowser);
-use FS::UID qw(cgisuidsetup);
-use FS::Record qw(qsearch qsearchs fields);
-use FS::agent_type;
-use FS::CGI qw(header menubar popurl);
-use FS::agent_type;
-use FS::part_pkg;
-use FS::type_pkgs;
-
-$cgi = new CGI;
-
-&cgisuidsetup($cgi);
-
-if ( $cgi->param('error') ) {
- $agent_type = new FS::agent_type ( {
- map { $_, scalar($cgi->param($_)) } fields('agent')
- } );
-} elsif ( $cgi->keywords ) { #editing
- my( $query ) = $cgi->keywords;
- $query =~ /^(\d+)$/;
- $agent_type=qsearchs('agent_type',{'typenum'=>$1});
-} else { #adding
- $agent_type = new FS::agent_type {};
-}
-$action = $agent_type->typenum ? 'Edit' : 'Add';
-$hashref = $agent_type->hashref;
-
-$p = popurl(2);
-print $cgi->header( '-expires' => 'now' ), header("$action Agent Type", menubar(
+%
+%
+%my($agent_type);
+%if ( $cgi->param('error') ) {
+% $agent_type = new FS::agent_type ( {
+% map { $_, scalar($cgi->param($_)) } fields('agent')
+% } );
+%} elsif ( $cgi->keywords ) { #editing
+% my( $query ) = $cgi->keywords;
+% $query =~ /^(\d+)$/;
+% $agent_type=qsearchs('agent_type',{'typenum'=>$1});
+%} else { #adding
+% $agent_type = new FS::agent_type {};
+%}
+%my $action = $agent_type->typenum ? 'Edit' : 'Add';
+%
+%
+<% include("/elements/header.html","$action Agent Type", menubar(