summaryrefslogtreecommitdiff
path: root/htdocs/misc
diff options
context:
space:
mode:
Diffstat (limited to 'htdocs/misc')
-rwxr-xr-xhtdocs/misc/bill.cgi58
-rwxr-xr-xhtdocs/misc/cancel-unaudited.cgi93
-rwxr-xr-xhtdocs/misc/cancel_pkg.cgi71
-rwxr-xr-xhtdocs/misc/delete-customer.cgi58
-rwxr-xr-xhtdocs/misc/expire_pkg.cgi61
-rwxr-xr-xhtdocs/misc/link.cgi85
-rwxr-xr-xhtdocs/misc/print-invoice.cgi51
-rwxr-xr-xhtdocs/misc/process/delete-customer.cgi46
-rwxr-xr-xhtdocs/misc/process/link.cgi76
-rwxr-xr-xhtdocs/misc/susp_pkg.cgi64
-rwxr-xr-xhtdocs/misc/unsusp_pkg.cgi61
11 files changed, 0 insertions, 724 deletions
diff --git a/htdocs/misc/bill.cgi b/htdocs/misc/bill.cgi
deleted file mode 100755
index 52323ba59..000000000
--- a/htdocs/misc/bill.cgi
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/perl -Tw
-#
-# $Id: bill.cgi,v 1.5 1999-08-12 04:32:21 ivan Exp $
-#
-# s/FS:Search/FS::Record/ and cgisuidsetup($cgi) ivan@sisd.com 98-mar-13
-#
-# Changes to allow page to work at a relative position in server
-# bmccane@maxbaud.net 98-apr-3
-#
-# $Log: bill.cgi,v $
-# Revision 1.5 1999-08-12 04:32:21 ivan
-# hidecancelledcustomers
-#
-# Revision 1.4 1999/01/19 05:14:02 ivan
-# for mod_perl: no more top-level my() variables; use vars instead
-# also the last s/create/new/;
-#
-# Revision 1.3 1998/12/23 03:01:13 ivan
-# $cgi->keywords instead of $cgi->query_string
-#
-# Revision 1.2 1998/12/17 09:12:41 ivan
-# s/CGI::(Request|Base)/CGI.pm/;
-#
-
-use strict;
-use vars qw( $cgi $query $custnum $cust_main $error );
-use CGI;
-use CGI::Carp qw(fatalsToBrowser);
-use FS::UID qw(cgisuidsetup);
-use FS::CGI qw(popurl eidiot);
-use FS::Record qw(qsearchs);
-use FS::cust_main;
-
-$cgi = new CGI;
-&cgisuidsetup($cgi);
-
-#untaint custnum
-($query) = $cgi->keywords;
-$query =~ /^(\d*)$/;
-$custnum = $1;
-$cust_main = qsearchs('cust_main',{'custnum'=>$custnum});
-die "Can't find customer!\n" unless $cust_main;
-
-$error = $cust_main->bill(
-# 'time'=>$time
- );
-&eidiot($error) if $error;
-
-$error = $cust_main->collect(
-# 'invoice-time'=>$time,
-# 'batch_card'=> 'yes',
- 'batch_card'=> 'no',
- 'report_badcard'=> 'yes',
- );
-&eidiot($error) if $error;
-
-print $cgi->redirect(popurl(2). "view/cust_main.cgi?$custnum");
-
diff --git a/htdocs/misc/cancel-unaudited.cgi b/htdocs/misc/cancel-unaudited.cgi
deleted file mode 100755
index 319ac5526..000000000
--- a/htdocs/misc/cancel-unaudited.cgi
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/usr/bin/perl -Tw
-#
-# $Id: cancel-unaudited.cgi,v 1.8 2001-04-09 23:05:16 ivan Exp $
-#
-# Usage: cancel-unaudited.cgi svcnum
-# http://server.name/path/cancel-unaudited.cgi pkgnum
-#
-# ivan@voicenet.com 97-apr-23
-#
-# rewrote for new API
-# ivan@voicenet.com 97-jul-21
-#
-# Search->Record, cgisuidsetup($cgi) ivan@sids.com 98-mar-19
-#
-# Changes to allow page to work at a relative position in server
-# bmccane@maxbaud.net 98-apr-3
-#
-# $Log: cancel-unaudited.cgi,v $
-# Revision 1.8 2001-04-09 23:05:16 ivan
-# Transactions Part I!!!
-#
-# Revision 1.7 2000/06/15 12:30:37 ivan
-# bugfix from Jeff Finucane, thanks!
-#
-# Revision 1.6 1999/02/28 00:03:48 ivan
-# removed misleading comments
-#
-# Revision 1.5 1999/02/07 09:59:34 ivan
-# more mod_perl fixes, and bugfixes Peter Wemm sent via email
-#
-# Revision 1.4 1999/01/19 05:14:03 ivan
-# for mod_perl: no more top-level my() variables; use vars instead
-# also the last s/create/new/;
-#
-# Revision 1.3 1998/12/23 03:02:05 ivan
-# $cgi->keywords instead of $cgi->query_string
-#
-# Revision 1.2 1998/12/17 09:12:42 ivan
-# s/CGI::(Request|Base)/CGI.pm/;
-#
-
-use strict;
-use vars qw( $cgi $query $svcnum $svc_acct $cust_svc $error $dbh );
-use CGI;
-use CGI::Carp qw(fatalsToBrowser);
-use FS::UID qw(cgisuidsetup);
-use FS::CGI qw(popurl eidiot);
-use FS::Record qw(qsearchs);
-use FS::cust_svc;
-use FS::svc_acct;
-
-$cgi = new CGI;
-$dbh = &cgisuidsetup($cgi);
-
-#untaint svcnum
-($query) = $cgi->keywords;
-$query =~ /^(\d+)$/;
-$svcnum = $1;
-
-$svc_acct = qsearchs('svc_acct',{'svcnum'=>$svcnum});
-die "Unknown svcnum!" unless $svc_acct;
-
-$cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum});
-&eidiot(qq!This account has already been audited. Cancel the
- <A HREF="!. popurl(2). qq!view/cust_pkg.cgi?! . $cust_svc->getfield('pkgnum') .
- qq!pkgnum"> package</A> instead.!)
- if $cust_svc->pkgnum ne '' && $cust_svc->pkgnum ne '0';
-
-local $SIG{HUP} = 'IGNORE';
-local $SIG{INT} = 'IGNORE';
-local $SIG{QUIT} = 'IGNORE';
-local $SIG{TERM} = 'IGNORE';
-local $SIG{TSTP} = 'IGNORE';
-
-local $FS::UID::AutoCommit = 0;
-
-$error = $svc_acct->cancel;
-&myeidiot($error) if $error;
-$error = $svc_acct->delete;
-&myeidiot($error) if $error;
-
-$error = $cust_svc->delete;
-&myeidiot($error) if $error;
-
-$dbh->commit or die $dbh->errstr;
-
-print $cgi->redirect(popurl(2));
-
-sub myeidiot {
- $dbh->rollback;
- &eidiot(@_);
-}
-
diff --git a/htdocs/misc/cancel_pkg.cgi b/htdocs/misc/cancel_pkg.cgi
deleted file mode 100755
index 7bbcf6e7f..000000000
--- a/htdocs/misc/cancel_pkg.cgi
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/usr/bin/perl -Tw
-#
-# $Id: cancel_pkg.cgi,v 1.6 1999-04-08 10:35:02 ivan Exp $
-#
-# Usage: cancel_pkg.cgi pkgnum
-# http://server.name/path/cancel_pkg.cgi pkgnum
-#
-# IT DOESN'T RUN THE APPROPRIATE PROGRAMS YET!!!!
-#
-# probably should generalize this to do cancels, suspensions, unsuspensions, etc.
-#
-# ivan@voicenet.com 97-jan-2
-#
-# still kludgy, but now runs /dbin/cancel $pkgnum
-# ivan@voicenet.com 97-feb-27
-#
-# doesn't run if pkgnum doesn't match regex
-# ivan@voicenet.com 97-mar-6
-#
-# now redirects to enter comments
-# ivan@voicenet.com 97-may-8
-#
-# rewrote for new API
-# ivan@voicenet.com 97-jul-21
-#
-# Changes to allow page to work at a relative position in server
-# bmccane@maxbaud.net 98-apr-3
-#
-# $Log: cancel_pkg.cgi,v $
-# Revision 1.6 1999-04-08 10:35:02 ivan
-# import necessary subroutines from FS::CGI
-#
-# Revision 1.5 1999/02/28 00:03:49 ivan
-# removed misleading comments
-#
-# Revision 1.4 1999/01/19 05:14:04 ivan
-# for mod_perl: no more top-level my() variables; use vars instead
-# also the last s/create/new/;
-#
-# Revision 1.3 1998/12/23 03:02:54 ivan
-# $cgi->keywords instead of $cgi->query_string
-#
-# Revision 1.2 1998/12/17 09:12:43 ivan
-# s/CGI::(Request|Base)/CGI.pm/;
-#
-
-use strict;
-use vars qw ( $cgi $query $pkgnum $cust_pkg $error );
-use CGI;
-use CGI::Carp qw(fatalsToBrowser);
-use FS::UID qw(cgisuidsetup);
-use FS::CGI qw(eidiot popurl);
-use FS::Record qw(qsearchs);
-use FS::CGI qw(popurl eidiot);
-use FS::cust_pkg;
-
-$cgi = new CGI;
-&cgisuidsetup($cgi);
-
-#untaint pkgnum
-($query) = $cgi->keywords;
-$query =~ /^(\d+)$/ || die "Illegal pkgnum";
-$pkgnum = $1;
-
-$cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
-
-$error = $cust_pkg->cancel;
-eidiot($error) if $error;
-
-print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum'));
-
diff --git a/htdocs/misc/delete-customer.cgi b/htdocs/misc/delete-customer.cgi
deleted file mode 100755
index 8addbd657..000000000
--- a/htdocs/misc/delete-customer.cgi
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/perl -Tw
-#
-# $Id: delete-customer.cgi,v 1.1 1999-04-15 16:44:36 ivan Exp $
-#
-# $Log: delete-customer.cgi,v $
-# Revision 1.1 1999-04-15 16:44:36 ivan
-# delete customers
-#
-
-use strict;
-use vars qw( $cgi $conf $query $custnum $new_custnum $cust_main );
-use CGI;
-use CGI::Carp qw(fatalsToBrowser);
-use FS::UID qw(cgisuidsetup);
-use FS::CGI qw(header popurl);
-use FS::Record qw(qsearch qsearchs);
-use FS::cust_main;
-
-$cgi = new CGI;
-cgisuidsetup($cgi);
-
-$conf = new FS::Conf;
-die "Customer deletions not enabled" unless $conf->exists('deletecustomers');
-
-if ( $cgi->param('error') ) {
- $custnum = $cgi->param('custnum');
- $new_custnum = $cgi->param('new_custnum');
-} else {
- ($query) = $cgi->keywords;
- $query =~ /^(\d+)$/ or die "Illegal query: $query";
- $custnum = $1;
- $new_custnum = '';
-}
-$cust_main = qsearchs( 'cust_main', { 'custnum' => $custnum } )
- or die "Customer not found: $custnum";
-
-print $cgi->header ( '-expires' => 'now' ), header('Delete customer');
-
-print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
- "</FONT>"
- if $cgi->param('error');
-
-print
- qq!<form action="!, popurl(1), qq!process/delete-customer.cgi" method=post>!,
- qq!<input type="hidden" name="custnum" value="$custnum">!;
-
-if ( qsearch('cust_pkg', { 'custnum' => $custnum, 'cancel' => '' } ) ) {
- print "Move uncancelled packages to customer number ",
- qq!<input type="text" name="new_custnum" value="$new_custnum"><br><br>!;
-}
-
-print <<END;
-This will <b>completely remove</b> all traces of this customer record.
-<br>Are you <b>absolutely sure</b> you want to delete this customer?
-<br><input type="submit" value="Yes">
-</form></body></html>
-END
-
diff --git a/htdocs/misc/expire_pkg.cgi b/htdocs/misc/expire_pkg.cgi
deleted file mode 100755
index cf1f23153..000000000
--- a/htdocs/misc/expire_pkg.cgi
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/perl -Tw
-#
-# $Id: expire_pkg.cgi,v 1.4 1999-02-28 00:03:50 ivan Exp $
-#
-# Usage: post form to:
-# http://server.name/path/expire_pkg.cgi
-#
-# based on susp_pkg
-# ivan@voicenet.com 97-jul-29
-#
-# ivan@sisd.com 98-mar-17 FS::Search->FS::Record
-#
-# Changes to allow page to work at a relative position in server
-# bmccane@maxbaud.net 98-apr-3
-#
-# $Log: expire_pkg.cgi,v $
-# Revision 1.4 1999-02-28 00:03:50 ivan
-# removed misleading comments
-#
-# Revision 1.3 1999/01/19 05:14:05 ivan
-# for mod_perl: no more top-level my() variables; use vars instead
-# also the last s/create/new/;
-#
-# Revision 1.2 1998/12/17 09:12:44 ivan
-# s/CGI::(Request|Base)/CGI.pm/;
-#
-
-use strict;
-use vars qw ( $cgi $date $pkgnum $cust_pkg %hash $new $error );
-use Date::Parse;
-use CGI;
-use CGI::Carp qw(fatalsToBrowser);
-use FS::UID qw(cgisuidsetup);
-use FS::CGI qw(popurl eidiot);
-use FS::Record qw(qsearchs);
-use FS::cust_pkg;
-
-$cgi = new CGI;
-&cgisuidsetup($cgi);
-
-#untaint date & pkgnum
-
-if ( $cgi->param('date') ) {
- str2time($cgi->param('date')) =~ /^(\d+)$/ or die "Illegal date";
- $date=$1;
-} else {
- $date='';
-}
-
-$cgi->param('pkgnum') =~ /^(\d+)$/ or die "Illegal pkgnum";
-$pkgnum = $1;
-
-$cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
-%hash = $cust_pkg->hash;
-$hash{expire}=$date;
-$new = new FS::cust_pkg ( \%hash );
-$error = $new->replace($cust_pkg);
-&eidiot($error) if $error;
-
-print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum'));
-
diff --git a/htdocs/misc/link.cgi b/htdocs/misc/link.cgi
deleted file mode 100755
index eb1780711..000000000
--- a/htdocs/misc/link.cgi
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/usr/bin/perl -Tw
-#
-# $Id: link.cgi,v 1.7 1999-04-08 11:31:40 ivan Exp $
-#
-# ivan@voicenet.com 97-feb-5
-#
-# rewrite ivan@sisd.com 98-mar-17
-#
-# can also link on some other fields now (about time) ivan@sisd.com 98-jun-24
-#
-# $Log: link.cgi,v $
-# Revision 1.7 1999-04-08 11:31:40 ivan
-# *** empty log message ***
-#
-# Revision 1.6 1999/02/28 00:03:51 ivan
-# removed misleading comments
-#
-# Revision 1.5 1999/01/19 05:14:06 ivan
-# for mod_perl: no more top-level my() variables; use vars instead
-# also the last s/create/new/;
-#
-# Revision 1.4 1999/01/18 09:41:36 ivan
-# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
-# (good idea anyway)
-#
-# Revision 1.3 1998/12/23 03:03:39 ivan
-# $cgi->keywords instead of $cgi->query_string
-#
-# Revision 1.2 1998/12/17 09:12:45 ivan
-# s/CGI::(Request|Base)/CGI.pm/;
-#
-
-use strict;
-use vars qw ( %link_field $cgi $pkgnum $svcpart $query $part_svc $svc $svcdb
- $link_field );
-use CGI;
-use CGI::Carp qw(fatalsToBrowser);
-use FS::UID qw(cgisuidsetup);
-use FS::CGI qw(popurl header);
-use FS::Record qw(qsearchs);
-
-%link_field = (
- 'svc_acct' => 'username',
- 'svc_domain' => 'domain',
- 'svc_acct_sm' => '',
- 'svc_charge' => '',
- 'svc_wo' => '',
-);
-
-$cgi = new CGI;
-cgisuidsetup($cgi);
-
-($query) = $cgi->keywords;
-foreach $_ (split(/-/,$query)) { #get & untaint pkgnum & svcpart
- $pkgnum=$1 if /^pkgnum(\d+)$/;
- $svcpart=$1 if /^svcpart(\d+)$/;
-}
-
-$part_svc = qsearchs('part_svc',{'svcpart'=>$svcpart});
-$svc = $part_svc->getfield('svc');
-$svcdb = $part_svc->getfield('svcdb');
-$link_field = $link_field{$svcdb};
-
-print $cgi->header( '-expires' => 'now' ), header("Link to existing $svc"),
- qq!<FORM ACTION="!, popurl(1), qq!process/link.cgi" METHOD=POST>!;
-
-if ( $link_field ) {
- print <<END;
- <INPUT TYPE="hidden" NAME="svcnum" VALUE="">
- <INPUT TYPE="hidden" NAME="link_field" VALUE="$link_field">
- $link_field of existing service: <INPUT TYPE="text" NAME="link_value">
-END
-} else {
- print qq!Service # of existing service: <INPUT TYPE="text" NAME="svcnum" VALUE="">!;
-}
-
-print <<END;
-<INPUT TYPE="hidden" NAME="pkgnum" VALUE="$pkgnum">
-<INPUT TYPE="hidden" NAME="svcpart" VALUE="$svcpart">
-<P><CENTER><INPUT TYPE="submit" VALUE="Link"></CENTER>
- </FORM>
- </BODY>
-</HTML>
-END
-
diff --git a/htdocs/misc/print-invoice.cgi b/htdocs/misc/print-invoice.cgi
deleted file mode 100755
index 213f15406..000000000
--- a/htdocs/misc/print-invoice.cgi
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/perl -Tw
-#
-# $Id: print-invoice.cgi,v 1.4 1999-01-19 05:14:07 ivan Exp $
-#
-# just a kludge for now, since this duplicates in a way it shouldn't stuff from
-# Bill.pm (like $lpr) ivan@sisd.com 98-jun-16
-#
-# $Log: print-invoice.cgi,v $
-# Revision 1.4 1999-01-19 05:14:07 ivan
-# for mod_perl: no more top-level my() variables; use vars instead
-# also the last s/create/new/;
-#
-# Revision 1.3 1998/12/23 03:04:24 ivan
-# $cgi->keywords instead of $cgi->query_string
-#
-# Revision 1.2 1998/12/17 09:12:47 ivan
-# s/CGI::(Request|Base)/CGI.pm/;
-#
-
-use strict;
-use vars qw($conf $cgi $lpr $query $invnum $cust_bill $custnum );
-use CGI;
-use CGI::Carp qw(fatalsToBrowser);
-use FS::UID qw(cgisuidsetup);
-use FS::CGI qw(popurl);
-use FS::Record qw(qsearchs);
-use FS::cust_bill;
-
-$cgi = new CGI;
-&cgisuidsetup($cgi);
-
-$conf = new FS::Conf;
-$lpr = $conf->config('lpr');
-
-#untaint invnum
-($query) = $cgi->keywords;
-$query =~ /^(\d*)$/;
-$invnum = $1;
-$cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
-die "Can't find invoice!\n" unless $cust_bill;
-
- open(LPR,"|$lpr") or die "Can't open $lpr: $!";
- print LPR $cust_bill->print_text; #( date )
- close LPR
- or die $! ? "Error closing $lpr: $!"
- : "Exit status $? from $lpr";
-
-$custnum = $cust_bill->getfield('custnum');
-
-print $cgi->redirect(popurl(2). "view/cust_main.cgi?$custnum#history");
-
diff --git a/htdocs/misc/process/delete-customer.cgi b/htdocs/misc/process/delete-customer.cgi
deleted file mode 100755
index 0a939c559..000000000
--- a/htdocs/misc/process/delete-customer.cgi
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/perl -Tw
-#
-# $Id: delete-customer.cgi,v 1.1 1999-04-15 16:44:36 ivan Exp $
-#
-# $Log: delete-customer.cgi,v $
-# Revision 1.1 1999-04-15 16:44:36 ivan
-# delete customers
-#
-
-use strict;
-use vars qw ( $cgi $conf $custnum $new_custnum $cust_main $error );
-use CGI;
-use CGI::Carp qw(fatalsToBrowser);
-use FS::UID qw(cgisuidsetup);
-use FS::Record qw(qsearchs);
-use FS::CGI qw(popurl);
-use FS::cust_main;
-
-$cgi = new CGI;
-cgisuidsetup($cgi);
-
-$conf = new FS::Conf;
-die "Customer deletions not enabled" unless $conf->exists('deletecustomers');
-
-$cgi->param('custnum') =~ /^(\d+)$/;
-$custnum = $1;
-if ( $cgi->param('new_custnum') ) {
- $cgi->param('new_custnum') =~ /^(\d+)$/
- or die "Illegal new customer number: ". $cgi->param('new_custnum');
- $new_custnum = $1;
-} else {
- $new_custnum = '';
-}
-$cust_main = qsearchs( 'cust_main', { 'custnum' => $custnum } )
- or die "Customer not found: $custnum";
-
-$error = $cust_main->delete($new_custnum);
-
-if ( $error ) {
- $cgi->param('error', $error);
- print $cgi->redirect(popurl(2). "delete-customer.cgi?". $cgi->query_string );
-} elsif ( $new_custnum ) {
- print $cgi->redirect(popurl(3). "view/cust_main.cgi?$new_custnum");
-} else {
- print $cgi->redirect(popurl(3));
-}
diff --git a/htdocs/misc/process/link.cgi b/htdocs/misc/process/link.cgi
deleted file mode 100755
index 7d6bd506f..000000000
--- a/htdocs/misc/process/link.cgi
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/usr/bin/perl -Tw
-#
-# $Id: link.cgi,v 1.6 2000-07-17 17:59:33 ivan Exp $
-#
-# ivan@voicenet.com 97-feb-5
-#
-# rewrite ivan@sisd.com 98-mar-18
-#
-# Changes to allow page to work at a relative position in server
-# bmccane@maxbaud.net 98-apr-3
-#
-# can also link on some other fields now (about time) ivan@sisd.com 98-jun-24
-#
-# $Log: link.cgi,v $
-# Revision 1.6 2000-07-17 17:59:33 ivan
-# oops
-#
-# Revision 1.5 1999/04/15 14:09:17 ivan
-# get rid of top-level my() variables
-#
-# Revision 1.4 1999/02/07 09:59:35 ivan
-# more mod_perl fixes, and bugfixes Peter Wemm sent via email
-#
-# Revision 1.3 1999/01/19 05:14:10 ivan
-# for mod_perl: no more top-level my() variables; use vars instead
-# also the last s/create/new/;
-#
-# Revision 1.2 1998/12/17 09:15:00 ivan
-# s/CGI::Request/CGI.pm/;
-#
-
-use strict;
-use vars qw ( $cgi $old $new $error $pkgnum $svcpart $svcnum );
-use CGI;
-use CGI::Carp qw(fatalsToBrowser);
-use FS::CGI qw(popurl idiot eidiot);
-use FS::UID qw(cgisuidsetup);
-use FS::cust_svc;
-use FS::Record qw(qsearchs);
-
-$cgi = new CGI;
-cgisuidsetup($cgi);
-
-$cgi->param('pkgnum') =~ /^(\d+)$/;
-$pkgnum = $1;
-$cgi->param('svcpart') =~ /^(\d+)$/;
-$svcpart = $1;
-$cgi->param('svcnum') =~ /^(\d*)$/;
-$svcnum = $1;
-
-unless ( $svcnum ) {
- my($part_svc) = qsearchs('part_svc',{'svcpart'=>$svcpart});
- my($svcdb) = $part_svc->getfield('svcdb');
- $cgi->param('link_field') =~ /^(\w+)$/; my($link_field)=$1;
- my($svc_acct)=qsearchs($svcdb,{$link_field => $cgi->param('link_value') });
- eidiot("$link_field not found!") unless $svc_acct;
- $svcnum=$svc_acct->svcnum;
-}
-
-$old = qsearchs('cust_svc',{'svcnum'=>$svcnum});
-die "svcnum not found!" unless $old;
-$new = new FS::cust_svc ({
- 'svcnum' => $svcnum,
- 'pkgnum' => $pkgnum,
- 'svcpart' => $svcpart,
-});
-
-$error = $new->replace($old);
-
-unless ($error) {
- #no errors, so let's view this customer.
- print $cgi->redirect(popurl(3). "view/cust_pkg.cgi?$pkgnum");
-} else {
- idiot($error);
-}
-
diff --git a/htdocs/misc/susp_pkg.cgi b/htdocs/misc/susp_pkg.cgi
deleted file mode 100755
index abe4f70b0..000000000
--- a/htdocs/misc/susp_pkg.cgi
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/perl -Tw
-#
-# $Id: susp_pkg.cgi,v 1.6 1999-04-08 10:35:02 ivan Exp $
-#
-# Usage: susp_pkg.cgi pkgnum
-# http://server.name/path/susp_pkg.cgi pkgnum
-#
-# probably should generalize this to do cancels, suspensions, unsuspensions, etc.
-#
-# ivan@voicenet.com 97-feb-27
-#
-# now redirects to enter comments
-# ivan@voicenet.com 97-may-8
-#
-# rewrote for new API
-# ivan@voicenet.com 97-jul-21
-#
-# FS::Search -> FS::Record ivan@sisd.com 98-mar-17
-#
-# Changes to allow page to work at a relative position in server
-# bmccane@maxbaud.net 98-apr-3
-#
-# $Log: susp_pkg.cgi,v $
-# Revision 1.6 1999-04-08 10:35:02 ivan
-# import necessary subroutines from FS::CGI
-#
-# Revision 1.5 1999/02/28 00:03:52 ivan
-# removed misleading comments
-#
-# Revision 1.4 1999/01/19 05:14:08 ivan
-# for mod_perl: no more top-level my() variables; use vars instead
-# also the last s/create/new/;
-#
-# Revision 1.3 1998/12/23 03:04:56 ivan
-# $cgi->keywords instead of $cgi->query_string
-#
-# Revision 1.2 1998/12/17 09:12:48 ivan
-# s/CGI::(Request|Base)/CGI.pm/;
-#
-
-use strict;
-use vars qw( $cgi $query $pkgnum $cust_pkg $error );
-use CGI;
-use CGI::Carp qw(fatalsToBrowser);
-use FS::UID qw(cgisuidsetup);
-use FS::Record qw(qsearchs);
-use FS::CGI qw(popurl eidiot);
-use FS::cust_pkg;
-
-$cgi = new CGI;
-&cgisuidsetup($cgi);
-
-#untaint pkgnum
-($query) = $cgi->keywords;
-$query =~ /^(\d+)$/ || die "Illegal pkgnum";
-$pkgnum = $1;
-
-$cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
-
-$error = $cust_pkg->suspend;
-&eidiot($error) if $error;
-
-print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum'));
-
diff --git a/htdocs/misc/unsusp_pkg.cgi b/htdocs/misc/unsusp_pkg.cgi
deleted file mode 100755
index 9e60064c3..000000000
--- a/htdocs/misc/unsusp_pkg.cgi
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/perl -Tw
-#
-# $Id: unsusp_pkg.cgi,v 1.5 1999-02-28 00:03:53 ivan Exp $
-#
-# Usage: susp_pkg.cgi pkgnum
-# http://server.name/path/susp_pkg.cgi pkgnum
-#
-# probably should generalize this to do cancels, suspensions, unsuspensions, etc.
-#
-# ivan@voicenet.com 97-feb-27
-#
-# now redirects to enter comments
-# ivan@voicenet.com 97-may-8
-#
-# rewrote for new API
-# ivan@voicenet.com 97-jul-21
-#
-# FS::Search -> FS::Record ivan@sisd.com 98-mar-17
-#
-# Changes to allow page to work at a relative position in server
-# bmccane@maxbaud.net 98-apr-3
-#
-# $Log: unsusp_pkg.cgi,v $
-# Revision 1.5 1999-02-28 00:03:53 ivan
-# removed misleading comments
-#
-# Revision 1.4 1999/01/19 05:14:09 ivan
-# for mod_perl: no more top-level my() variables; use vars instead
-# also the last s/create/new/;
-#
-# Revision 1.3 1998/12/23 03:05:25 ivan
-# $cgi->keywords instead of $cgi->query_string
-#
-# Revision 1.2 1998/12/17 09:12:49 ivan
-# s/CGI::(Request|Base)/CGI.pm/;
-#
-
-use strict;
-use vars qw( $cgi $query $pkgnum $cust_pkg $error );
-use CGI;
-use CGI::Carp qw(fatalsToBrowser);
-use FS::UID qw(cgisuidsetup);
-use FS::CGI qw(popurl eidiot);
-use FS::Record qw(qsearchs);
-use FS::cust_pkg;
-
-$cgi = new CGI;
-&cgisuidsetup($cgi);
-
-#untaint pkgnum
-($query) = $cgi->keywords;
-$query =~ /^(\d+)$/ || die "Illegal pkgnum";
-$pkgnum = $1;
-
-$cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
-
-$error = $cust_pkg->unsuspend;
-&eidiot($error) if $error;
-
-print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum'));
-