add svc_forward, depriciate svc_acct_sm
[freeside.git] / htdocs / search / svc_domain.cgi
index 0058aca..f1d4ae4 100755 (executable)
@@ -1,12 +1,10 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: svc_domain.cgi,v 1.7 1999-02-23 08:09:24 ivan Exp $
+# $Id: svc_domain.cgi,v 1.11 2000-03-03 18:22:44 ivan Exp $
 #
 # Usage: post form to:
 #        http://server.name/path/svc_domain.cgi
 #
-# Note: Should be run setuid freeside as user nobody.
-#
 # ivan@voicenet.com 97-mar-5
 #
 # rewrite ivan@sisd.com 98-mar-14
 # display total, use FS::CGI now does browsing too ivan@sisd.com 98-jul-17
 #
 # $Log: svc_domain.cgi,v $
-# Revision 1.7  1999-02-23 08:09:24  ivan
+# 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
@@ -56,6 +67,7 @@ $conf = new FS::Conf;
 $mydomain = $conf->config('domain');
 
 ($query)=$cgi->keywords;
+$query ||= ''; #to avoid use of unitialized value errors
 if ( $query eq 'svcnum' ) {
   $sortby=\*svcnum_sort;
   @svc_domain=qsearch('svc_domain',{});
@@ -77,7 +89,8 @@ if ( $query eq 'svcnum' ) {
 } else {
   $cgi->param('domain') =~ /^([\w\-\.]+)$/; 
   my($domain)=$1;
-  push @svc_domain, qsearchs('svc_domain',{'domain'=>$domain});
+  #push @svc_domain, qsearchs('svc_domain',{'domain'=>$domain});
+  @svc_domain = qsearchs('svc_domain',{'domain'=>$domain});
 }
 
 if ( scalar(@svc_domain) == 1 ) {
@@ -88,7 +101,8 @@ if ( scalar(@svc_domain) == 1 ) {
 } else {
 
   my($total)=scalar(@svc_domain);
-  print $cgi->header, header("Domain Search Results",''), <<END;
+  print $cgi->header( '-expires' => 'now' ),
+        header("Domain Search Results",''), <<END;
 
     $total matching domains found
     <TABLE BORDER=4 CELLSPACING=0 CELLPADDING=0>