X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fsvc_domain.cgi;h=fb372db1416099d001fc6264aa606891ad410d92;hb=336d87dc8c7c105d3d9cd41c3590acc09964281d;hp=4276976a1e2a725b8a897cc58118eb9c376aeb9f;hpb=8a8c9386cbd3383b0134aae8e32b5995f8886fb2;p=freeside.git diff --git a/httemplate/search/svc_domain.cgi b/httemplate/search/svc_domain.cgi index 4276976a1..fb372db14 100755 --- a/httemplate/search/svc_domain.cgi +++ b/httemplate/search/svc_domain.cgi @@ -1,79 +1,11 @@ <% -# -# $Id: svc_domain.cgi,v 1.2 2001-08-19 15:53:36 jeff Exp $ -# -# Usage: post form to: -# http://server.name/path/svc_domain.cgi -# -# ivan@voicenet.com 97-mar-5 -# -# rewrite ivan@sisd.com 98-mar-14 -# -# Changes to allow page to work at a relative position in server -# 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 2001-08-19 15:53:36 jeff -# added user interface for svc_forward and vpopmail support -# -# Revision 1.1 2001/07/30 07:36:04 ivan -# templates!!! -# -# Revision 1.11 2000/03/03 18:22:44 ivan -# changes from 1.2.3 release, fixes from webdemo -# -# Revision 1.10 1999/07/17 10:38:52 ivan -# scott nelson noticed this mod_perl-triggered bug and -# gave me a great bugreport at the last rhythmethod -# -# Revision 1.9 1999/04/15 13:39:16 ivan -# $cgi->header( '-expires' => 'now' ) -# -# Revision 1.8 1999/02/28 00:03:57 ivan -# removed misleading comments -# -# Revision 1.7 1999/02/23 08:09:24 ivan -# beginnings of one-screen new customer entry and some other miscellania -# -# Revision 1.6 1999/02/09 09:22:59 ivan -# visual and bugfixes -# -# Revision 1.5 1999/02/07 09:59:39 ivan -# more mod_perl fixes, and bugfixes Peter Wemm sent via email -# -# Revision 1.4 1999/01/19 05:14:17 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.3 1998/12/23 03:06:50 ivan -# $cgi->keywords instead of $cgi->query_string -# -# Revision 1.2 1998/12/17 09:41:12 ivan -# s/CGI::(Base|Request)/CGI.pm/; -# - -use strict; -use vars qw ( $cgi @svc_domain $sortby $query $conf $mydomain ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearch qsearchs); -use FS::CGI qw(header eidiot popurl); -use FS::svc_domain; -use FS::cust_svc; -use FS::svc_acct; -use FS::svc_forward; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -$conf = new FS::Conf; -$mydomain = $conf->config('domain'); - -($query)=$cgi->keywords; + +my $conf = new FS::Conf; +my $mydomain = $conf->config('domain'); + +my($query)=$cgi->keywords; $query ||= ''; #to avoid use of unitialized value errors +my(@svc_domain,$sortby); if ( $query eq 'svcnum' ) { $sortby=\*svcnum_sort; @svc_domain=qsearch('svc_domain',{}); @@ -101,14 +33,18 @@ if ( $query eq 'svcnum' ) { if ( scalar(@svc_domain) == 1 ) { print $cgi->redirect(popurl(2). "view/svc_domain.cgi?". $svc_domain[0]->svcnum); - exit; + #exit; } elsif ( scalar(@svc_domain) == 0 ) { +%> + +<% eidiot "No matching domains found!\n"; } else { - +%> + +<% my($total)=scalar(@svc_domain); - print $cgi->header( '-expires' => 'now' ), - header("Domain Search Results",''), < @@ -123,9 +59,7 @@ END # my(%saw); # if we've multiple domains with the same # svcnum, then we've a corrupt database - my($svc_domain); - my $p = popurl(2); - foreach $svc_domain ( + foreach my $svc_domain ( # sort $sortby grep(!$saw{$_->svcnum}++, @svc_domain) sort $sortby (@svc_domain) ) {