diff options
author | cvs2git <cvs2git> | 2004-03-22 10:16:44 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2004-03-22 10:16:44 +0000 |
commit | 182e8303be380efce912e147b5ee3a115cf16651 (patch) | |
tree | fa3058b79a88bd03d1621240995efae137199ffa /httemplate/misc/process | |
parent | e997711c79d079eef1d7de01519545e324ad3ece (diff) | |
parent | 351b0af13ba6c449151c1bec2303294051c073d1 (diff) |
This commit was manufactured by cvs2svn to create branch
'FREESIDE_1_4_BRANCH'.
Diffstat (limited to 'httemplate/misc/process')
-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')); + +%> |