remove
[freeside.git] / httemplate / misc / expire_pkg.cgi
index 21e220d..739fb51 100755 (executable)
@@ -1,21 +1,9 @@
+<!-- $Id: expire_pkg.cgi,v 1.3 2002-01-30 14:18:09 ivan Exp $ -->
 <%
-#<!-- $Id: expire_pkg.cgi,v 1.2 2001-08-21 02:31:56 ivan Exp $ -->
-
-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
 
+my $date;
 if ( $cgi->param('date') ) {
   str2time($cgi->param('date')) =~ /^(\d+)$/ or die "Illegal date";
   $date=$1;
@@ -24,13 +12,13 @@ if ( $cgi->param('date') ) {
 }
 
 $cgi->param('pkgnum') =~ /^(\d+)$/ or die "Illegal pkgnum";
-$pkgnum = $1;
+my $pkgnum = $1;
 
-$cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
-%hash = $cust_pkg->hash;
+my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
+my %hash = $cust_pkg->hash;
 $hash{expire}=$date;
-$new = new FS::cust_pkg ( \%hash );
-$error = $new->replace($cust_pkg);
+my $new = new FS::cust_pkg ( \%hash );
+my $error = $new->replace($cust_pkg);
 &eidiot($error) if $error;
 
 print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum'));