summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorivan <ivan>2010-02-12 01:35:33 +0000
committerivan <ivan>2010-02-12 01:35:33 +0000
commite19cf74e68ef0ebad22df8a4165a93b897d863b9 (patch)
tree5afd7b934a9b22957a325877bba4c498fa65af8a /httemplate
parentc79fddf94eb1ee76858a83fdb0f6b2e23d93a874 (diff)
add ticket creation to self-service API, RT#7007
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/view/cust_svc.cgi23
1 files changed, 23 insertions, 0 deletions
diff --git a/httemplate/view/cust_svc.cgi b/httemplate/view/cust_svc.cgi
new file mode 100644
index 000000000..8ccfce3ff
--- /dev/null
+++ b/httemplate/view/cust_svc.cgi
@@ -0,0 +1,23 @@
+<% $cgi->redirect(popurl(1)."$svcdb.cgi?". $svcnum ) %>
+<%init>
+
+#needed here? we're just redirecting. i guess it could reveal the svcdb of a
+#svcnum... oooooo scary. not.
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('View customer services');
+
+#some false laziness w/svc_*.cgi
+
+my($query) = $cgi->keywords;
+$query =~ /^(\d+)$/;
+my $svcnum = $1;
+my $cust_svc = qsearchs( 'cust_svc', { 'svcnum' => $svcnum } );
+die "Unknown svcnum" unless $cust_svc;
+
+my $part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } );
+die "Unknown svcpart" unless $part_svc;
+
+my $svcdb = $part_svc->svcdb;
+
+</%init>
+