[freeside-commits] freeside/httemplate/misc/process delay_susp_pkg.html, NONE, 1.1
Jeff Finucane,420,,
jeff at wavetail.420.am
Thu Sep 25 20:54:27 PDT 2008
Update of /home/cvs/cvsroot/freeside/httemplate/misc/process
In directory wavetail.420.am:/tmp/cvs-serv13053/httemplate/misc/process
Added Files:
delay_susp_pkg.html
Log Message:
push out event triggered suspensions
--- NEW FILE: delay_susp_pkg.html ---
<% header("Package suspension delayed") %>
<SCRIPT TYPE="text/javascript">
window.top.location.reload();
</SCRIPT>
</BODY>
</HTML>
<%once>
my $right = 'Delay suspension events';
</%once>
<%init>
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right($right);
my ($pkgnum, $date, $cust_pkg, $cust_main, $error);
#untaint pkgnum
$cgi->param('pkgnum') =~ /^(\d+)$/ or die "Illegal pkgnum";
$pkgnum = $1;
#untaint date
str2time($cgi->param('date')) =~ /^(\d+)$/ or die "Illegal date";
my $date = $1;
$cust_pkg = qsearchs( 'cust_pkg', {'pkgnum'=>$pkgnum} );
if ($cust_pkg) {
$cust_main = $cust_pkg->cust_main;
$cust_main->dundate( $date );
$error = $cust_main->replace;
} else {
$error = "Invalid pkgnum";
}
if ($error) {
$cgi->param('error', $error);
print $cgi->redirect(popurl(2). "cancel_pkg.html?". $cgi->query_string );
}
</%init>
More information about the freeside-commits
mailing list