diff options
author | ivan <ivan> | 2002-01-30 14:18:09 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-01-30 14:18:09 +0000 |
commit | 1fd6d8cf5d7854860ef4fd10ed89828e0c04ec39 (patch) | |
tree | caee70f2707d97a43e21ea4253afe728ea6f421a /httemplate/misc/link.cgi | |
parent | ea0d3938b57a079ce4aa6db0cae316e3ac6da654 (diff) |
remove
use Module;
and
$cgi = new CGI;
&cgisuidsetup();
from all templates. should work better under Mason.
Diffstat (limited to 'httemplate/misc/link.cgi')
-rwxr-xr-x | httemplate/misc/link.cgi | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/httemplate/misc/link.cgi b/httemplate/misc/link.cgi index 801b92006..3bcb5d978 100755 --- a/httemplate/misc/link.cgi +++ b/httemplate/misc/link.cgi @@ -1,16 +1,7 @@ +<!-- $Id: link.cgi,v 1.5 2002-01-30 14:18:09 ivan Exp $ --> <% -#<!-- $Id: link.cgi,v 1.4 2001-10-30 14:54:07 ivan Exp $ --> -use strict; -use vars qw ( %link_field $cgi $pkgnum $svcpart $query $part_svc $svc $svcdb - $link_field ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(popurl header); -use FS::Record qw(qsearchs); - -%link_field = ( +my %link_field = ( 'svc_acct' => 'username', 'svc_domain' => 'domain', 'svc_acct_sm' => '', @@ -18,19 +9,17 @@ use FS::Record qw(qsearchs); 'svc_wo' => '', ); -$cgi = new CGI; -cgisuidsetup($cgi); - -($query) = $cgi->keywords; +my($query) = $cgi->keywords; +my($pkgnum, $svcpart) = ('', ''); foreach $_ (split(/-/,$query)) { #get & untaint pkgnum & svcpart $pkgnum=$1 if /^pkgnum(\d+)$/; $svcpart=$1 if /^svcpart(\d+)$/; } -$part_svc = qsearchs('part_svc',{'svcpart'=>$svcpart}); -$svc = $part_svc->getfield('svc'); -$svcdb = $part_svc->getfield('svcdb'); -$link_field = $link_field{$svcdb}; +my $part_svc = qsearchs('part_svc',{'svcpart'=>$svcpart}); +my $svc = $part_svc->getfield('svc'); +my $svcdb = $part_svc->getfield('svcdb'); +my $link_field = $link_field{$svcdb}; print header("Link to existing $svc"), qq!<FORM ACTION="!, popurl(1), qq!process/link.cgi" METHOD=POST>!; |