2 #<!-- $Id: link.cgi,v 1.2 2001-08-21 02:31:56 ivan Exp $ -->
5 use vars qw ( %link_field $cgi $pkgnum $svcpart $query $part_svc $svc $svcdb
8 use CGI::Carp qw(fatalsToBrowser);
9 use FS::UID qw(cgisuidsetup);
10 use FS::CGI qw(popurl header);
11 use FS::Record qw(qsearchs);
14 'svc_acct' => 'username',
15 'svc_domain' => 'domain',
24 ($query) = $cgi->keywords;
25 foreach $_ (split(/-/,$query)) { #get & untaint pkgnum & svcpart
26 $pkgnum=$1 if /^pkgnum(\d+)$/;
27 $svcpart=$1 if /^svcpart(\d+)$/;
30 $part_svc = qsearchs('part_svc',{'svcpart'=>$svcpart});
31 $svc = $part_svc->getfield('svc');
32 $svcdb = $part_svc->getfield('svcdb');
33 $link_field = $link_field{$svcdb};
35 print $cgi->header( '-expires' => 'now' ), header("Link to existing $svc"),
36 qq!<FORM ACTION="!, popurl(1), qq!process/link.cgi" METHOD=POST>!;
40 <INPUT TYPE="hidden" NAME="svcnum" VALUE="">
41 <INPUT TYPE="hidden" NAME="link_field" VALUE="$link_field">
42 $link_field of existing service: <INPUT TYPE="text" NAME="link_value">
45 print qq!Service # of existing service: <INPUT TYPE="text" NAME="svcnum" VALUE="">!;
49 <INPUT TYPE="hidden" NAME="pkgnum" VALUE="$pkgnum">
50 <INPUT TYPE="hidden" NAME="svcpart" VALUE="$svcpart">
51 <P><CENTER><INPUT TYPE="submit" VALUE="Link"></CENTER>