blob: 8649cc2352f72a10e7b27e236d4be166cd9e8771 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
<% 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
parse_datetime($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>
|