summaryrefslogtreecommitdiff
path: root/httemplate/view/svc_domain.cgi
diff options
context:
space:
mode:
authorivan <ivan>2002-01-30 14:18:09 +0000
committerivan <ivan>2002-01-30 14:18:09 +0000
commit1fd6d8cf5d7854860ef4fd10ed89828e0c04ec39 (patch)
treecaee70f2707d97a43e21ea4253afe728ea6f421a /httemplate/view/svc_domain.cgi
parentea0d3938b57a079ce4aa6db0cae316e3ac6da654 (diff)
remove
use Module; and $cgi = new CGI; &cgisuidsetup(); from all templates. should work better under Mason.
Diffstat (limited to 'httemplate/view/svc_domain.cgi')
-rwxr-xr-xhttemplate/view/svc_domain.cgi36
1 files changed, 11 insertions, 25 deletions
diff --git a/httemplate/view/svc_domain.cgi b/httemplate/view/svc_domain.cgi
index 4add200b9..c980b1c25 100755
--- a/httemplate/view/svc_domain.cgi
+++ b/httemplate/view/svc_domain.cgi
@@ -1,29 +1,15 @@
+<!-- $Id: svc_domain.cgi,v 1.6 2002-01-30 14:18:09 ivan Exp $ -->
<%
-# <!-- $Id: svc_domain.cgi,v 1.5 2001-10-30 14:54:07 ivan Exp $ -->
-use strict;
-use vars qw( $cgi $query $svcnum $svc_domain $domain $cust_svc $pkgnum
- $cust_pkg $custnum $part_svc $p $svc_acct $email);
-use CGI;
-use FS::UID qw(cgisuidsetup);
-use FS::CGI qw(header menubar popurl menubar);
-use FS::Record qw(qsearchs);
-use FS::svc_domain;
-use FS::cust_svc;
-use FS::cust_pkg;
-use FS::part_svc;
-
-$cgi = new CGI;
-cgisuidsetup($cgi);
-
-($query) = $cgi->keywords;
+my($query) = $cgi->keywords;
$query =~ /^(\d+)$/;
-$svcnum = $1;
-$svc_domain = qsearchs('svc_domain',{'svcnum'=>$svcnum});
+my $svcnum = $1;
+my $svc_domain = qsearchs('svc_domain',{'svcnum'=>$svcnum});
die "Unknown svcnum" unless $svc_domain;
-$cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum});
-$pkgnum = $cust_svc->getfield('pkgnum');
+my $cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum});
+my $pkgnum = $cust_svc->getfield('pkgnum');
+my($cust_pkg, $custnum);
if ($pkgnum) {
$cust_pkg=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
$custnum=$cust_pkg->getfield('custnum');
@@ -32,18 +18,18 @@ if ($pkgnum) {
$custnum = '';
}
-$part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } );
+my $part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } );
die "Unknown svcpart" unless $part_svc;
+my $email = '';
if ($svc_domain->catchall) {
- $svc_acct = qsearchs('svc_acct',{'svcnum'=> $svc_domain->catchall } );
+ my $svc_acct = qsearchs('svc_acct',{'svcnum'=> $svc_domain->catchall } );
die "Unknown svcpart" unless $svc_acct;
$email = $svc_acct->email;
}
-$domain = $svc_domain->domain;
+my $domain = $svc_domain->domain;
-$p = popurl(2);
print header('Domain View', menubar(
( ( $pkgnum || $custnum )
? ( "View this package (#$pkgnum)" => "${p}view/cust_pkg.cgi?$pkgnum",