diff options
author | ivan <ivan> | 2004-03-22 10:16:43 +0000 |
---|---|---|
committer | ivan <ivan> | 2004-03-22 10:16:43 +0000 |
commit | 351b0af13ba6c449151c1bec2303294051c073d1 (patch) | |
tree | a406faa651e90a9beab090ed5248bab020a33ac9 /httemplate/misc/process/expire_pkg.cgi | |
parent | 5a5242465520ef7a64a715496c31a3c17c95cc57 (diff) |
yay! remove package view entirely (closes: Bug#569)
Diffstat (limited to 'httemplate/misc/process/expire_pkg.cgi')
-rwxr-xr-x | httemplate/misc/process/expire_pkg.cgi | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/httemplate/misc/process/expire_pkg.cgi b/httemplate/misc/process/expire_pkg.cgi new file mode 100755 index 000000000..dc35592ce --- /dev/null +++ b/httemplate/misc/process/expire_pkg.cgi @@ -0,0 +1,25 @@ +<% + +#untaint date & pkgnum + +my $date; +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"; +my $pkgnum = $1; + +my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); +my %hash = $cust_pkg->hash; +$hash{expire}=$date; +my $new = new FS::cust_pkg ( \%hash ); +my $error = $new->replace($cust_pkg); +&eidiot($error) if $error; + +print $cgi->redirect(popurl(3). "view/cust_main.cgi?".$cust_pkg->getfield('custnum')); + +%> |