X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=htdocs%2Fsearch%2Fsvc_domain.cgi;h=1fd6a515ba25cbef1bab4818a9df3a7ef48d4126;hp=d5277037b87cd7456c61771c960ccf43465b40fc;hb=ccc7d08bc89b58e1143a1c54de24385495e90be3;hpb=3242132c9ee04a3a3b00c0b35582bc07ed46d736 diff --git a/htdocs/search/svc_domain.cgi b/htdocs/search/svc_domain.cgi index d5277037b..1fd6a515b 100755 --- a/htdocs/search/svc_domain.cgi +++ b/htdocs/search/svc_domain.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# svc_domain.cgi: Search for domains (process form) +# $Id: svc_domain.cgi,v 1.2 1998-12-17 09:41:12 ivan Exp $ # # Usage: post form to: # http://server.name/path/svc_domain.cgi @@ -15,21 +15,26 @@ # bmccane@maxbaud.net 98-apr-3 # # display total, use FS::CGI now does browsing too ivan@sisd.com 98-jul-17 +# +# $Log: svc_domain.cgi,v $ +# Revision 1.2 1998-12-17 09:41:12 ivan +# s/CGI::(Base|Request)/CGI.pm/; +# use strict; -use CGI::Request; +use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); use FS::Record qw(qsearch qsearchs); -use FS::CGI qw(header idiot); +use FS::CGI qw(header idiot popurl); -my($req)=new CGI::Request; -&cgisuidsetup($req->cgi); +my($cgi)=new CGI; +&cgisuidsetup($cgi); my(@svc_domain); my($sortby); -my($query)=$req->cgi->var('QUERY_STRING'); +my($query)=$cgi->query_string; if ( $query eq 'svcnum' ) { $sortby=\*svcnum_sort; @svc_domain=qsearch('svc_domain',{}); @@ -49,13 +54,13 @@ if ( $query eq 'svcnum' ) { 'pkgnum' => '', }), qsearch('svc_domain',{}); } else { - $req->param('domain') =~ /^([\w\-\.]+)$/; + $cgi->param('domain') =~ /^([\w\-\.]+)$/; my($domain)=$1; push @svc_domain, qsearchs('svc_domain',{'domain'=>$domain}); } if ( scalar(@svc_domain) == 1 ) { - $req->cgi->redirect("../view/svc_domain.cgi?". $svc_domain[0]->svcnum); + print $cgi->redirect(popurl(2). "view/svc_domain.cgi?". $svc_domain[0]->svcnum); exit; } elsif ( scalar(@svc_domain) == 0 ) { idiot "No matching domains found!\n"; @@ -76,9 +81,8 @@ if ( scalar(@svc_domain) == 1 ) { END - my($lines)=16; - my($lcount)=$lines; my(%saw,$svc_domain); + my $p = popurl(2); foreach $svc_domain ( sort $sortby grep(!$saw{$_->svcnum}++, @svc_domain) ) { @@ -100,23 +104,11 @@ END } print < - $svcnum + $svcnum $domain $malias END - if ($lcount-- == 0) { # lots of little tables instead of one big one - $lcount=$lines; - print < - - - - - - -END - } } print <
Service #Domain