summaryrefslogtreecommitdiff
path: root/httemplate/misc/do_not_change_pkg.cgi
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-07-17 09:04:06 -0700
committerIvan Kohler <ivan@freeside.biz>2013-07-17 09:04:06 -0700
commit91dbe4c3834f38d428367d9a1e2c6cf9ea9d84a4 (patch)
treee4d6a63b75a2e3df13fdd35e24ae98ec8b3567cb /httemplate/misc/do_not_change_pkg.cgi
parent2101a32bdf12abdb2afdb654d6da30975ddd4fc9 (diff)
parentd0fcbc3d04250ec54cb5dea7abcc58d1f45d78b1 (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/misc/do_not_change_pkg.cgi')
-rw-r--r--httemplate/misc/do_not_change_pkg.cgi20
1 files changed, 20 insertions, 0 deletions
diff --git a/httemplate/misc/do_not_change_pkg.cgi b/httemplate/misc/do_not_change_pkg.cgi
new file mode 100644
index 000000000..c164c5c15
--- /dev/null
+++ b/httemplate/misc/do_not_change_pkg.cgi
@@ -0,0 +1,20 @@
+%if ( $error ) {
+% errorpage($error);
+%} else {
+<% $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum')) %>
+%}
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Change customer package');
+
+#untaint pkgnum
+my ($query) = $cgi->keywords;
+$query =~ /^(\d+)$/ || die "Illegal pkgnum";
+my $pkgnum = $1;
+
+my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
+
+my $error = $cust_pkg->abort_change;
+
+</%init>