remove
[freeside.git] / httemplate / search / svc_domain.cgi
index 4276976..4ec5eb0 100755 (executable)
@@ -1,79 +1,12 @@
+<!-- $Id: svc_domain.cgi,v 1.6 2002-01-30 14:18:09 ivan Exp $ -->
 <%
-#
-# $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 <scott@ultimanet.com> 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',{});
@@ -107,8 +40,7 @@ if ( scalar(@svc_domain) == 1 ) {
 } else {
 
   my($total)=scalar(@svc_domain);
-  print $cgi->header( '-expires' => 'now' ),
-        header("Domain Search Results",''), <<END;
+  print header("Domain Search Results",''), <<END;
 
     $total matching domains found
     <TABLE BORDER=4 CELLSPACING=0 CELLPADDING=0>
@@ -123,9 +55,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)
   ) {