X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fmisc%2Fprocess%2Fexpire_pkg.cgi;h=d1963e2f57450817bb9ba304f5bedc9f5fd03195;hp=dc35592cef1ffb45b66cadd6f9b9c478e9a12858;hb=3ce7691203a7737406bf2d4442f7fd84b81f847e;hpb=15e561850b61b10a92a46d8f3e316d53d4970087 diff --git a/httemplate/misc/process/expire_pkg.cgi b/httemplate/misc/process/expire_pkg.cgi index dc35592ce..d1963e2f5 100755 --- a/httemplate/misc/process/expire_pkg.cgi +++ b/httemplate/misc/process/expire_pkg.cgi @@ -1,25 +1,26 @@ -<% +% +% +%#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')); +% +% -#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')); - -%>