3 # $Id: svc_domain.cgi,v 1.4 1999-01-19 05:14:01 ivan Exp $
6 # http://server.name/path/svc_domain.cgi
8 # Note: Should br run setuid root as user nobody.
10 # lots of yucky stuff in this one... bleachlkjhui!
12 # ivan@voicenet.com 97-jan-6
14 # kludged for new domain template 3.5
15 # ivan@voicenet.com 97-jul-24
17 # moved internic bits to svc_domain.pm ivan@sisd.com 98-mar-14
19 # Changes to allow page to work at a relative position in server
20 # bmccane@maxbaud.net 98-apr-3
22 # $Log: svc_domain.cgi,v $
23 # Revision 1.4 1999-01-19 05:14:01 ivan
24 # for mod_perl: no more top-level my() variables; use vars instead
25 # also the last s/create/new/;
27 # Revision 1.3 1999/01/18 22:48:02 ivan
28 # s/create/new/g; and use fields('table_name')
30 # Revision 1.2 1998/12/17 08:40:30 ivan
31 # s/CGI::Request/CGI.pm/; etc
35 use vars qw( $cgi $svcnum $new $error );
37 use CGI::Carp qw(fatalsToBrowser);
38 use FS::UID qw(cgisuidsetup);
39 use FS::Record qw(qsearchs);
42 #remove this to actually test the domains!
43 $FS::svc_domain::whois_hack = 1;
48 $cgi->param('svcnum') =~ /^(\d*)$/ or die "Illegal svcnum!";
51 $new = new FS::svc_domain ( {
53 $_, scalar($cgi->param($_));
54 #} qw(svcnum pkgnum svcpart domain action purpose)
55 } ( fields('svc_domain'), qw( pkgnum svcpart action purpose ) )
58 if ($cgi->param('legal') ne "Yes") {
59 $error = "Customer did not agree to be bound by NSI's ".
60 qq!<A HREF="http://rs.internic.net/help/agreement.txt">!.
61 "Domain Name Resgistration Agreement</A>";
62 } elsif ($cgi->param('svcnum')) {
63 $error="Can't modify a domain!";
70 print $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum");