svc_broadband rewrite
authorkhoff <khoff>
Wed, 5 Feb 2003 23:23:00 +0000 (23:23 +0000)
committerkhoff <khoff>
Wed, 5 Feb 2003 23:23:00 +0000 (23:23 +0000)
14 files changed:
FS/FS/ac.pm [deleted file]
FS/FS/ac_block.pm [deleted file]
FS/FS/ac_field.pm [deleted file]
FS/FS/ac_type.pm [deleted file]
FS/FS/part_ac_field.pm [deleted file]
httemplate/browse/ac.cgi [deleted file]
httemplate/browse/ac_type.cgi [deleted file]
httemplate/edit/ac.cgi [deleted file]
httemplate/edit/ac_type.cgi [deleted file]
httemplate/edit/process/ac.cgi [deleted file]
httemplate/edit/process/ac_block.cgi [deleted file]
httemplate/edit/process/ac_field.cgi [deleted file]
httemplate/edit/process/ac_type.cgi [deleted file]
httemplate/edit/process/part_ac_field.cgi [deleted file]

diff --git a/FS/FS/ac.pm b/FS/FS/ac.pm
deleted file mode 100644 (file)
index 5a2b360..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-package FS::ac;
-
-use strict;
-use vars qw( @ISA );
-use FS::Record qw( qsearchs qsearch );
-use FS::ac_type;
-use FS::ac_block;
-
-@ISA = qw( FS::Record );
-
-=head1 NAME
-
-FS::ac - Object methods for ac records
-
-=head1 SYNOPSIS
-
-  use FS::ac;
-
-  $record = new FS::ac \%hash;
-  $record = new FS::ac { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-
-=head1 DESCRIPTION
-
-An FS::ac record describes a broadband Access Concentrator, such as a DSLAM
-or a wireless access point.  FS::ac inherits from FS::Record.  The following 
-fields are currently supported:
-
-narf
-
-=over 4
-
-=item acnum - primary key
-
-=item actypenum - AC type, see L<FS::ac_type>
-
-=item acname - descriptive name for the AC
-
-=back
-
-=head1 METHODS
-
-=over 4
-
-=item new HASHREF
-
-Create a new record.  To add the record to the database, see L<"insert">.
-
-=cut
-
-sub table { 'ac'; }
-
-=item insert
-
-Adds this record to the database.  If there is an error, returns the error,
-otherwise returns false.
-
-=item delete
-
-Deletes this record from the database.  If there is an error, returns the
-error, otherwise returns false.
-
-=item replace OLD_RECORD
-
-Replaces OLD_RECORD with this one in the database.  If there is an error,
-returns the error, otherwise returns false.
-
-=item check
-
-Checks all fields to make sure this is a valid record.  If there is an error,
-returns the error, otherwise returns false.  Called by the insert and replace
-methods.
-
-=cut
-
-sub check {
-  my $self = shift;
-
-  my $error =
-    $self->ut_numbern('acnum')
-    || $self->ut_number('actypenum')
-    || $self->ut_text('acname');
-  return $error if $error;
-
-  return "Unknown actypenum"
-    unless $self->ac_type;
-  '';
-}
-
-=item ac_type
-
-Returns the L<FS::ac_type> object corresponding to this object.
-
-=cut
-
-sub ac_type {
-  my $self = shift;
-  return qsearchs('ac_type', { actypenum => $self->actypenum });
-}
-
-=item ac_block
-
-Returns a list of L<FS::ac_block> objects (address blocks) associated
-with this object.
-
-=cut
-
-sub ac_block {
-  my $self = shift;
-  return qsearch('ac_block', { acnum => $self->acnum });
-}
-
-=item ac_field
-
-Returns a hash of L<FS::ac_field> objects assigned to this object.
-
-=cut
-
-sub ac_field {
-  my $self = shift;
-
-  return qsearch('ac_field', { acnum => $self->acnum });
-}
-
-=back
-
-=head1 VERSION
-
-$Id:
-
-=head1 BUGS
-
-=head1 SEE ALSO
-
-L<FS::svc_broadband>, L<FS::ac>, L<FS::ac_block>, L<FS::ac_field>,  schema.html
-from the base documentation.
-
-=cut
-
-1;
-
diff --git a/FS/FS/ac_block.pm b/FS/FS/ac_block.pm
deleted file mode 100755 (executable)
index 09de6a4..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-package FS::ac_block;
-
-use strict;
-use vars qw( @ISA );
-use FS::Record qw( qsearchs qsearch );
-use FS::ac_type;
-use FS::ac;
-use FS::svc_broadband;
-use NetAddr::IP;
-
-@ISA = qw( FS::Record );
-
-=head1 NAME
-
-FS::ac - Object methods for ac records
-
-=head1 SYNOPSIS
-
-  use FS::ac_block;
-
-  $record = new FS::ac_block \%hash;
-  $record = new FS::ac_block { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-
-=head1 DESCRIPTION
-
-An FS::ac_block record describes an address block assigned for broadband 
-access.  FS::ac_block inherits from FS::Record.  The following fields are 
-currently supported:
-
-=over 4
-
-=item acnum - the access concentrator (see L<FS::ac_type>) to which this 
-block is assigned.
-
-=item ip_gateway - the gateway address used by customers within this block.  
-This functions as the primary key.
-
-=item ip_netmask - the netmask of the block, expressed as an integer.
-
-=back
-
-=head1 METHODS
-
-=over 4
-
-=item new HASHREF
-
-Create a new record.  To add the record to the database, see L<"insert">.
-
-=cut
-
-sub table { 'ac_block'; }
-
-=item insert
-
-Adds this record to the database.  If there is an error, returns the error,
-otherwise returns false.
-
-=item delete
-
-Deletes this record from the database.  If there is an error, returns the
-error, otherwise returns false.
-
-=item replace OLD_RECORD
-
-Replaces OLD_RECORD with this one in the database.  If there is an error,
-returns the error, otherwise returns false.
-
-=item check
-
-Checks all fields to make sure this is a valid record.  If there is an error,
-returns the error, otherwise returns false.  Called by the insert and replace
-methods.
-
-=cut
-
-sub check {
-  my $self = shift;
-
-  my $error =
-    $self->ut_number('acnum')
-    || $self->ut_ip('ip_gateway')
-    || $self->ut_number('ip_netmask')
-  ;
-  return $error if $error;
-
-  return "Unknown acnum"
-    unless $self->ac;
-
-  my $self_addr = new NetAddr::IP ($self->ip_gateway, $self->ip_netmask);
-  return "Cannot parse address: ". $self->ip_gateway . '/' . $self->ip_netmask
-    unless $self_addr;
-
-  my @block = grep {
-    my $block_addr = new NetAddr::IP ($_->ip_gateway, $_->ip_netmask);
-    if($block_addr->contains($self_addr) 
-    or $self_addr->contains($block_addr)) { $_; };
-  } qsearch( 'ac_block', {});
-
-  foreach(@block) {
-    return "Block intersects existing block ".$_->ip_gateway."/".$_->ip_netmask;
-  }
-
-  '';
-}
-
-
-=item ac
-
-Returns the L<FS::ac> object corresponding to this object.
-
-=cut
-
-sub ac {
-  my $self = shift;
-  return qsearchs('ac', { acnum => $self->acnum });
-}
-
-=item svc_broadband
-
-Returns a list of L<FS::svc_broadband> objects associated
-with this object.
-
-=cut
-
-#sub svc_broadband {
-#  my $self = shift;
-#  my @svc = qsearch('svc_broadband', { actypenum => $self->ac->ac_type->actypenum });
-#  return grep { 
-#    my $svc_addr = new NetAddr::IP($_->ip_addr, $_->ip_netmask);
-#    $self_addr->contains($svc_addr);
-#  } @svc;
-#}
-
-=back
-
-=cut
-
-1;
-
diff --git a/FS/FS/ac_field.pm b/FS/FS/ac_field.pm
deleted file mode 100755 (executable)
index f601119..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-package FS::ac_field;
-
-use strict;
-use vars qw( @ISA );
-use FS::Record qw( qsearchs );
-use FS::part_ac_field;
-use FS::ac;
-
-use UNIVERSAL qw( can );
-
-@ISA = qw( FS::Record );
-
-=head1 NAME
-
-FS::ac_field - Object methods for ac_field records
-
-=head1 SYNOPSIS
-
-  use FS::ac_field;
-
-  $record = new FS::ac_field \%hash;
-  $record = new FS::ac_field { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-
-=head1 DESCRIPTION
-
-L<FS::ac_field> contains values of fields defined by L<FS::part_ac_field>
-for an L<FS::ac>.  Values must be of the data type defined by ut_type in
-L<FS::part_ac_field>.
-Supported fields as follows:
-
-=over 4
-
-=item acfieldpart - Type of ac_field as defined by L<FS::part_ac_field>
-
-=item acnum - The L<FS::ac> to which this value belongs.
-
-=item value - The contents of the field.
-
-=back
-
-=head1 METHODS
-
-=over 4
-
-=item new HASHREF
-
-Create a new record.  To add the record to the database, see L<"insert">.
-
-=cut
-
-sub table { 'ac_field'; }
-
-=item insert
-
-Adds this record to the database.  If there is an error, returns the error,
-otherwise returns false.
-
-=item delete
-
-Deletes this record from the database.  If there is an error, returns the
-error, otherwise returns false.
-
-=item replace OLD_RECORD
-
-Replaces OLD_RECORD with this one in the database.  If there is an error,
-returns the error, otherwise returns false.
-
-=item check
-
-Checks all fields to make sure this is a valid record.  If there is an error,
-returns the error, otherwise returns false.  Called by the insert and replace
-methods.
-
-=cut
-
-sub check {
-  my $self = shift;
-
-  return "acnum must be defined" unless $self->acnum;
-  return "acfieldpart must be defined" unless $self->acfieldpart;
-
-  my $ut_func = $self->can("ut_" . $self->part_ac_field->ut_type);
-  my $error = $self->$ut_func('value');
-
-  return $error if $error;
-
-  ''; #no error
-}
-
-=item part_ac_field
-
-Returns a reference to the L<FS:part_ac_field> that defines this L<FS::ac_field>
-
-=cut
-
-sub part_ac_field {
-  my $self = shift;
-
-  return qsearchs('part_ac_field', { acfieldpart => $self->acfieldpart });
-}
-
-=item ac
-
-Returns a reference to the L<FS::ac> to which this L<FS::ac_field> belongs.
-
-=cut
-
-sub ac {
-  my $self = shift;
-
-  return qsearchs('ac', { acnum => $self->acnum });
-}
-
-=back
-
-=head1 VERSION
-
-$Id: 
-
-=head1 BUGS
-
-=head1 SEE ALSO
-
-L<FS::svc_broadband>, L<FS::ac>, L<FS::ac_block>, L<FS::ac_field>,  schema.html
-from the base documentation.
-
-=cut
-
-1;
-
diff --git a/FS/FS/ac_type.pm b/FS/FS/ac_type.pm
deleted file mode 100755 (executable)
index e83c5c5..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-package FS::ac_type;
-
-use strict;
-use vars qw( @ISA );
-use FS::Record qw( qsearchs );
-use FS::ac;
-
-@ISA = qw( FS::Record );
-
-=head1 NAME
-
-FS::ac_type - Object methods for ac_type records
-
-=head1 SYNOPSIS
-
-  use FS::ac_type;
-
-  $record = new FS::ac_type \%hash;
-  $record = new FS::ac_type { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-
-=head1 DESCRIPTION
-
-L<FS::ac_type> refers to a type of access concentrator.  L<FS::svc_broadband>
-records refer to a specific L<FS::ac_type> limiting the choice of access
-concentrator to one of the chosen type.  This should be set as a fixed
-default in part_svc to prevent provisioning the wrong type of service for
-a given package or service type.  Supported fields as follows:
-
-=over 4
-
-=item actypenum - Primary key.  see L<FS::ac>
-
-=item actypename - Text identifier for access concentrator type.
-
-=back
-
-=head1 METHODS
-
-=over 4
-
-=item new HASHREF
-
-Create a new record.  To add the record to the database, see L<"insert">.
-
-=cut
-
-sub table { 'ac_type'; }
-
-=item insert
-
-Adds this record to the database.  If there is an error, returns the error,
-otherwise returns false.
-
-=item delete
-
-Deletes this record from the database.  If there is an error, returns the
-error, otherwise returns false.
-
-=item replace OLD_RECORD
-
-Replaces OLD_RECORD with this one in the database.  If there is an error,
-returns the error, otherwise returns false.
-
-=item check
-
-Checks all fields to make sure this is a valid record.  If there is an error,
-returns the error, otherwise returns false.  Called by the insert and replace
-methods.
-
-=cut
-
-sub check {
-  my $self = shift;
-
-  # What do we check?
-
-  ''; #no error
-}
-
-=item ac
-
-Returns a list of all L<FS::ac> records of this type.
-
-=cut
-
-sub ac {
-  my $self = shift;
-
-  return qsearch('ac', { actypenum => $self->actypenum });
-}
-
-=item part_ac_field
-
-Returns a list of all L<FS::part_ac_field> records of this type.
-
-=cut
-
-sub part_ac_field {
-  my $self = shift;
-
-  return qsearch('part_ac_field', { actypenum => $self->actypenum });
-}
-
-=back
-
-=head1 VERSION
-
-$Id: 
-
-=head1 BUGS
-
-=head1 SEE ALSO
-
-L<FS::svc_broadband>, L<FS::ac>, L<FS::ac_block>, L<FS::ac_field>,  schema.html
-from the base documentation.
-
-=cut
-
-1;
-
diff --git a/FS/FS/part_ac_field.pm b/FS/FS/part_ac_field.pm
deleted file mode 100755 (executable)
index dcb4452..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-package FS::part_ac_field;
-
-use strict;
-use vars qw( @ISA );
-use FS::Record qw( qsearchs );
-use FS::ac_field;
-use FS::ac;
-
-
-@ISA = qw( FS::Record );
-
-=head1 NAME
-
-FS::part_ac_field - Object methods for part_ac_field records
-
-=head1 SYNOPSIS
-
-  use FS::part_ac_field;
-
-  $record = new FS::part_ac_field \%hash;
-  $record = new FS::part_ac_field { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-
-=head1 DESCRIPTION
-
-
-=over 4
-
-=item blank
-
-=back
-
-=head1 METHODS
-
-=over 4
-
-=item new HASHREF
-
-Create a new record.  To add the record to the database, see L<"insert">.
-
-=cut
-
-sub table { 'part_ac_field'; }
-
-=item insert
-
-Adds this record to the database.  If there is an error, returns the error,
-otherwise returns false.
-
-=item delete
-
-Deletes this record from the database.  If there is an error, returns the
-error, otherwise returns false.
-
-=item replace OLD_RECORD
-
-Replaces OLD_RECORD with this one in the database.  If there is an error,
-returns the error, otherwise returns false.
-
-=item check
-
-Checks all fields to make sure this is a valid record.  If there is an error,
-returns the error, otherwise returns false.  Called by the insert and replace
-methods.
-
-=cut
-
-sub check {
-  my $self = shift;
-  my $error = '';
-
-  $self->name =~ /^([a-z0-9_\-\.]{1,15})$/i
-    or return "Invalid field name for part_ac_field";
-
-  ''; #no error
-}
-
-
-=back
-
-=head1 VERSION
-
-$Id: 
-
-=head1 BUGS
-
-=head1 SEE ALSO
-
-L<FS::svc_broadband>, L<FS::ac>, L<FS::ac_block>, L<FS::ac_field>,  schema.html
-from the base documentation.
-
-=cut
-
-1;
-
diff --git a/httemplate/browse/ac.cgi b/httemplate/browse/ac.cgi
deleted file mode 100755 (executable)
index 0ae138d..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<!-- mason kludge -->
-<%= header('Access Concentrator Listing', menubar(
-  'Main Menu'   => $p,
-  'Access Concentrator Types' => $p. 'browse/ac_type.cgi',
-)) %>
-<BR>
-<A HREF="<%= $p %>edit/ac.cgi"><I>Add a new Access Concentrator</I></A><BR><BR>
-
-<%= table() %>
-<TR>
-  <TH COLSPAN=2>AC</TH>
-  <TH>AC Type</TH>
-  <TH>Fields</TH>
-  <TH>Network/Mask</TH>
-</TR>
-<% 
-
-foreach my $ac ( qsearch('ac',{}) ) {
-  my($hashref)=$ac->hashref;
-  my($actypenum)=$hashref->{actypenum};
-  my($ac_type)=qsearchs('ac_type',{'actypenum'=>$actypenum});
-  my($actypename)=$ac_type->getfield('actypename');
-  print <<END;
-      <TR>
-        <TD><A HREF="${p}edit/ac.cgi?$hashref->{acnum}">
-          $hashref->{acnum}</A></TD>
-        <TD><A HREF="${p}edit/ac.cgi?$hashref->{acnum}">
-          $hashref->{acname}</A></TD>
-        <TD><A HREF="${p}edit/ac_type.cgi?$actypenum">$actypename</A></TD>
-        <TD>
-END
-
-  foreach my $ac_field ( qsearch('ac_field', { acnum => $hashref->{acnum} }) ) {
-    my $part_ac_field = qsearchs('part_ac_field',
-                         { acfieldpart => $ac_field->getfield('acfieldpart') });
-    print $part_ac_field->getfield('name') . ' ';
-    print $ac_field->getfield('value') . '<BR>';
-  }
-  print '</TD><TD>';
-
-  foreach (qsearch('ac_block', { acnum => $hashref->{acnum} })) {
-    my $net_addr = new NetAddr::IP($_->getfield('ip_gateway'),
-                                   $_->getfield('ip_netmask'));
-    print $net_addr->network->addr . '/' . $net_addr->network->mask . '<BR>';
-  }
-
-  print "<TR>\n";
-
-}
-
-print <<END;
-    </TABLE>
-  </BODY>
-</HTML>
-END
-
-%>
diff --git a/httemplate/browse/ac_type.cgi b/httemplate/browse/ac_type.cgi
deleted file mode 100755 (executable)
index 0ad8271..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<!-- mason kludge -->
-<%
-
-print header('Access Concentrator Types', menubar(
-  'Main Menu' => $p,
-  'Access Concentrators' => $p. 'browse/ac.cgi',
-)) %>
-<BR>
-<A HREF="<%= $p %>edit/ac_type.cgi"><I>Add new AC Type</I></A><BR><BR>
-<%= table() %>
-      <TR>
-        <TH></TH>
-        <TH>Type</TH>
-        <TH>Fields</TH>
-      </TR>
-
-<%
-foreach my $ac_type ( qsearch('ac_type',{}) ) {
-  my($hashref)=$ac_type->hashref;
-  print <<END;
-      <TR>
-        <TD><A HREF="${p}edit/ac_type.cgi?$hashref->{actypenum}">
-          $hashref->{actypenum}</A></TD>
-        <TD><A HREF="${p}edit/ac_type.cgi?$hashref->{actypenum}">
-          $hashref->{actypename}</A></TD>
-        <TD>
-END
-
-  foreach ( qsearch('part_ac_field', { actypenum => $hashref->{actypenum} }) ) {
-    my ($part_ac_field) = $_->hashref;
-    print $part_ac_field->{'name'} .
-          ' (' . $part_ac_field->{'ut_type'} . ')<BR>';
-  }
-
-}
-
-print <<END;
-       </TD>
-      </TR>
-      <TR>
-      </TR>
-    </TABLE>
-  </BODY>
-</HTML>
-END
-
-%>
diff --git a/httemplate/edit/ac.cgi b/httemplate/edit/ac.cgi
deleted file mode 100755 (executable)
index 86b05a4..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-<!-- mason kludge -->
-<%
-
-my($ac);
-if ( $cgi->param('error') ) {
-  $ac = new FS::ac ( {
-    map { $_, scalar($cgi->param($_)) } fields('ac')
-  } );
-} elsif ( $cgi->keywords ) { #editing
-  my( $query ) = $cgi->keywords;
-  $query =~ /^(\d+)$/;
-  $ac=qsearchs('ac',{'acnum'=>$1});
-} else { #adding
-  $ac = new FS::ac {};
-}
-my $action = $ac->acnum ? 'Edit' : 'Add';
-my $hashref = $ac->hashref;
-
-print header("$action Access Concentrator", menubar(
-  'Main Menu' => "$p",
-  'View all access concentrators' => "${p}browse/ac.cgi",
-));
-
-print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
-      "</FONT>"
-  if $cgi->param('error');
-
-print '<FORM ACTION="', popurl(1), 'process/ac.cgi" METHOD=POST>',
-      qq!<INPUT TYPE="hidden" NAME="acnum" VALUE="$hashref->{acnum}">!,
-      "Access Concentrator #", $hashref->{acnum} ? $hashref->{acnum} : "(NEW)";
-
-print <<END;
-
-<TABLE COLOR="#cccccc">
-  <TR>
-    <TH ALIGN="RIGHT">Access Concentrator</TH>
-    <TD>
-      <INPUT TYPE="text" NAME="acname" SIZE=15 VALUE="$hashref->{acname}">
-    </TD>
-  </TD>
-END
-
-
-if (! $ac->acnum) {
-  print <<END;
-  <TR>
-    <TH ALIGN="RIGHT">Access Concentrator Type</TH>
-    <TD><SELECT NAME="actypenum" SIZE="1"><OPTION VALUE=""></OPTION>
-END
-
-  foreach (qsearch('ac_type', {})) {
-    my $narf = $_->hashref;
-    print qq!<OPTION! .
-          ($narf->{actypenum} eq $hashref->{actypenum} ? ' SELECTED' : '') .
-          qq! VALUE="$narf->{actypenum}">$narf->{actypenum}: $narf->{actypename}! .
-          qq!</OPTION>!;
-  }
-
-  print '</TD></TR></TABLE>';
-} else {
-  print '</TABLE>';
-  print qq!<INPUT TYPE="hidden" NAME="actypenum" VALUE="$hashref->{actypenum}">!;
-}
-
-print qq!</TABLE><BR><BR><INPUT TYPE="submit" VALUE="!,
-      $hashref->{acnum} ? "Apply changes" : "Add access concentrator",
-      qq!"></FORM>!;
-
-if ($hashref->{acnum}) {
-  print table();
-  print <<END;
-    Additional Fields:<BR>
-    <TH>
-      <TD>Field Name</TD>
-      <TD COLSPAN=2>Field Value</TD>
-    </TH>
-END
-
-  #my @ac_fields = qsearch('ac_field', { acnum => $hashref->{acnum} });
-  my @ac_fields = $ac->ac_field;
-  foreach (@ac_fields) {
-    print qq!\n<TR><TD></TD>!;
-    my $part_ac_field = qsearchs('part_ac_field',
-                          { acfieldpart => $_->getfield('acfieldpart') });
-    print '<TD>' . $part_ac_field->getfield('name') .
-          '</TD><TD>' . $_->getfield('value') . '</TD></TR>';
-    print "\n";
-  }
-
-  print '<FORM ACTION="', popurl(1), 'process/ac_field.cgi" METHOD=POST>';
-  print <<END;
-    <TR>
-      <TD><INPUT TYPE="hidden" NAME="acnum" VALUE="$hashref->{acnum}">
-          <INPUT TYPE="hidden" NAME="acname" VALUE="$hashref->{acname}">
-          <INPuT TYPE="hidden" NAME="actypenum" VALUE="$hashref->{actypenum}">
-          <SMALL>(NEW)</SMALL>
-      </TD>
-      <TD><SELECT NAME="acfieldpart"><OPTION></OPTION>
-END
-
-  my @part_ac_fields = qsearch('part_ac_field',
-                         { actypenum => $hashref->{actypenum} });
-  foreach my $part_ac_field (@part_ac_fields) {
-    my $acfieldpart = $part_ac_field->getfield('acfieldpart');
-    if (grep {$_->getfield('acfieldpart') eq $acfieldpart} @ac_fields) {next;}
-    print qq!<OPTION VALUE="${acfieldpart}">! .
-          $part_ac_field->getfield('name') . '</OPTION>';
-  }
-
-  print <<END;
-        </SELECT>
-      </TD>
-      <TD><INPUT TYPE="text" SIZE="15" NAME="value"></TD>
-      <TD><INPUT TYPE="submit" VALUE="Add"></TD>
-    </TR>
-    </FORM>
-  </TABLE>
-END
-
-}
-
-if ($hashref->{acnum}) {
-
-  print qq!<BR><BR>IP Address Blocks:<BR>! . table() .
-        qq!<TR><TH></TH><TH>Network/Mask</TH>! .
-        qq!<TH>Gateway Address</TH><TH>Mask length</TH></TR>\n!;
-
-  foreach (qsearch('ac_block', { acnum => $hashref->{acnum} })) {
-    my $ip_addr = new NetAddr::IP($_->getfield('ip_gateway'),
-                                  $_->getfield('ip_netmask'));
-    print qq!<TR><TD></TD><TD>! . $ip_addr->network->addr() . '/' .
-          $ip_addr->network->mask() . qq!</TD>!;
-
-    print qq!<TD>! . $_->getfield('ip_gateway') . qq!</TD>\n! .
-          qq!<TD>! . $_->getfield('ip_netmask') . qq!</TD></TR>!;
-
-  }
-
-  print '<FORM ACTION="', popurl(1), 'process/ac_block.cgi" METHOD=POST>';
-  print <<END;
-  <TR>
-    <TD><INPUT TYPE="hidden" NAME="acnum" VALUE="$hashref->{acnum}">
-        <INPUT TYPE="hidden" NAME="acname" VALUE="$hashref->{acname}">
-        <INPuT TYPE="hidden" NAME="actypenum" VALUE="$hashref->{actypenum}">
-       <SMALL>(NEW)</SMALL>
-    </TD>
-    <TD></TD>
-    <TD><INPUT TYPE="text" NAME="ip_gateway" SIZE="15"></TD>
-    <TD><INPUT TYPE="text" NAME="ip_netmask" SIZE="2"></TD>
-    <TD><INPUT TYPE="submit" VALUE="Add"></TD>
-  </TR>
-  </FORM>
-</TABLE>
-END
-
-}
-
-print <<END;
-  </BODY>
-</HTML>
-END
-
-%>
diff --git a/httemplate/edit/ac_type.cgi b/httemplate/edit/ac_type.cgi
deleted file mode 100755 (executable)
index ccc3d57..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-<!-- mason kludge -->
-<%
-
-my $ac_type;
-if ( $cgi->param('error') ) {
-  $ac_type = new FS::ac_type ( {
-    map { $_, scalar($cgi->param($_)) } fields('ac_type')
-  } );
-} elsif ( $cgi->keywords ) { #editing
-  my($query)=$cgi->keywords;
-  $query =~ /^(\d+)$/;
-  $ac_type=qsearchs('ac_type',{'actypenum'=>$1});
-} else { #adding
-  $ac_type = new FS::ac_type {};
-}
-my $action = $ac_type->actypenum ? 'Edit' : 'Add';
-my $hashref = $ac_type->hashref;
-
-my @ut_types = qw( float number text alpha anything ip domain );
-
-my $p1 = popurl(1);
-print header("$action Access Concentrator Type", menubar(
-  'Main Menu' => popurl(2),
-  'View all Access Concentrator types' => popurl(2). "browse/ac_type.cgi",
-));
-
-print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
-      "</FONT>"
-  if $cgi->param('error');
-
-print qq!<FORM ACTION="${p1}process/ac_type.cgi" METHOD=POST>!;
-
-#display
-
-print qq!<INPUT TYPE="hidden" NAME="actypenum" VALUE="$hashref->{actypenum}">!,
-      "AC Type #", $hashref->{actypenum} ? $hashref->{actypenum} : "(NEW)";
-
-print <<TROZ;
-<PRE>
-AC Type Name <INPUT TYPE="text" NAME="actypename" SIZE=15 VALUE="$hashref->{actypename}">
-</PRE>
-
-TROZ
-
-print qq!<BR><INPUT TYPE="submit" VALUE="!,
-      $hashref->{actypenum} ? "Apply changes" : "Add AC Type",
-      qq!"></FORM>!;
-
-
-if ($hashref->{actypenum}) {
-  print qq!   <BR>Available fields:<BR>! .  table();
-
-  print qq!    <TH><TD>Field name</TD><TD>Field type</TD><TD></TD></TH>!;
-
-  my @part_ac_field = qsearch ( 'part_ac_field',
-                                { actypenum => $hashref->{actypenum} } );
-  foreach ( @part_ac_field ) {
-    my $pf_hashref = $_->hashref;
-    print <<END;
-      <TR>
-        <TD>$pf_hashref->{acfieldpart}</TD>
-        <TD>$pf_hashref->{name}</TD>
-        <TD>$pf_hashref->{ut_type}</TD>
-      </TR>
-END
-  }
-
-  my $name, $ut_type = '';
-  if ($cgi->param('error')) {
-    $name = $cgi->param('name');
-    $ut_type = $cgi->param('ut_type');
-  }
-
-  print <<END;
-      <FORM ACTION="${p1}process/part_ac_field.cgi" METHOD=GET>
-      <TR>
-       <TD><SMALL>(NEW)</SMALL>
-         <INPUT TYPE="hidden" NAME="actypenum" VALUE="$hashref->{actypenum}">
-       </TD>
-       <TD>
-         <INPUT TYPE="text" NAME="name" VALUE="${name}">
-       </TD>
-       <TD>
-         <SELECT NAME="ut_type" SIZE=1><OPTION>
-END
-
-  foreach ( @ut_types ) {
-    print qq!<OPTION! . ($ut_type ? " SELECTED>$_" : ">$_");
-  }
-
-  print <<END;
-        </SELECT>
-      </TD>
-      <TD><INPUT TYPE="submit" VALUE="Add"></TD>
-    </TR>
-    </FORM>
-  </TABLE>
-END
-
-}
-
-%>
-
- </BODY>
-</HTML>
-
diff --git a/httemplate/edit/process/ac.cgi b/httemplate/edit/process/ac.cgi
deleted file mode 100755 (executable)
index fc434a8..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<%
-
-my $acnum = $cgi->param('acnum');
-
-my $old = qsearchs('ac',{'acnum'=>$acnum}) if $acnum;
-
-my $new = new FS::ac ( {
-  map {
-    $_, scalar($cgi->param($_));
-  } fields('ac')
-} );
-
-my $error = '';
-if ( $acnum ) {
-  $error = $new->replace($old);
-} else {
-  $error = $new->insert;
-  $acnum=$new->getfield('acnum');
-}
-
-if ( $error ) {
-  $cgi->param('error', $error);
-  print $cgi->redirect(popurl(2). "ac.cgi?". $cgi->query_string );
-} else {
-  print $cgi->redirect(popurl(3). "browse/ac.cgi");
-}
-
-%>
diff --git a/httemplate/edit/process/ac_block.cgi b/httemplate/edit/process/ac_block.cgi
deleted file mode 100755 (executable)
index b1c3c72..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<%
-
-my $new = new FS::ac_block ( {
-  map {
-    $_, scalar($cgi->param($_));
-  } fields('ac_block')
-} );
-
-my $error = '';
-$error = $new->check;
-
-unless ( $error ) { $error = $new->insert; }
-
-if ( $error ) {
-  $cgi->param('error', $error);
-  print $cgi->redirect(popurl(2). "ac.cgi?". $cgi->query_string );
-} else {
-  print $cgi->redirect(popurl(2). "ac.cgi?". $cgi->param('acnum'));
-}
-
-%>
diff --git a/httemplate/edit/process/ac_field.cgi b/httemplate/edit/process/ac_field.cgi
deleted file mode 100755 (executable)
index 2bfe331..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<%
-
-my $new = new FS::ac_field ( {
-  map {
-    $_, scalar($cgi->param($_));
-  } fields('ac_field')
-} );
-
-my $error = '';
-$error = $new->check;
-
-unless ( $error ) { $error = $new->insert; }
-
-if ( $error ) {
-  $cgi->param('error', $error);
-  print $cgi->redirect(popurl(2). "ac.cgi?". $cgi->query_string );
-} else {
-  print $cgi->redirect(popurl(2). "ac.cgi?". $cgi->param('acnum'));
-}
-
-%>
diff --git a/httemplate/edit/process/ac_type.cgi b/httemplate/edit/process/ac_type.cgi
deleted file mode 100755 (executable)
index ca232ba..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<%
-
-my $actypenum = $cgi->param('actypenum');
-
-my $old = qsearchs('ac_type',{'actypenum'=>$actypenum}) if $actypenum;
-
-my $new = new FS::ac_type ( {
-  map {
-    $_, scalar($cgi->param($_));
-  } fields('ac_type')
-} );
-
-my $error = '';
-if ( $actypenum ) {
-  $error = $new->replace($old);
-} else {
-  $error = $new->insert;
-  $actypenum=$new->getfield('actypenum');
-}
-
-if ( $error ) {
-  $cgi->param('error', $error);
-  print $cgi->redirect(popurl(2). "ac_type.cgi?". $cgi->query_string );
-} else {
-  print $cgi->redirect(popurl(3). "browse/ac_type.cgi");
-}
-
-%>
diff --git a/httemplate/edit/process/part_ac_field.cgi b/httemplate/edit/process/part_ac_field.cgi
deleted file mode 100755 (executable)
index 38ad586..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<%
-
-my $new = new FS::part_ac_field ( {
-  map {
-    $_, scalar($cgi->param($_));
-  } fields('part_ac_field')
-} );
-
-my $error = '';
-$error = $new->check;
-
-unless ( $error ) { $error = $new->insert; }
-
-if ( $error ) {
-  $cgi->param('error', $error);
-  print $cgi->redirect(popurl(2). "ac_type.cgi?". $cgi->query_string );
-} else {
-  print $cgi->redirect(popurl(2). "ac_type.cgi?". $cgi->param('actypenum'));
-}
-
-%>