From: cvs2git Date: Mon, 28 Sep 1998 05:16:13 +0000 (+0000) Subject: This commit was manufactured by cvs2svn to create branch 'freeside_import'. X-Git-Tag: freeside_current~8 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=d4bc3be6e0440caadc9d4cb34dd8494a302c8843;hp=f63a5d0d7db19cec9ef910445b0f78187416bc5e This commit was manufactured by cvs2svn to create branch 'freeside_import'. --- diff --git a/htdocs/edit/process/svc_domain.cgi b/htdocs/edit/process/svc_domain.cgi new file mode 100755 index 000000000..0782772dd --- /dev/null +++ b/htdocs/edit/process/svc_domain.cgi @@ -0,0 +1,78 @@ +#!/usr/bin/perl -Tw +# +# process/svc_domain.cgi: Add a domain (process form) +# +# Usage: post form to: +# http://server.name/path/svc_domain.cgi +# +# Note: Should br run setuid root as user nobody. +# +# lots of yucky stuff in this one... bleachlkjhui! +# +# ivan@voicenet.com 97-jan-6 +# +# kludged for new domain template 3.5 +# ivan@voicenet.com 97-jul-24 +# +# moved internic bits to svc_domain.pm ivan@sisd.com 98-mar-14 +# +# Changes to allow page to work at a relative position in server +# bmccane@maxbaud.net 98-apr-3 + +use strict; +use CGI::Request; +use CGI::Carp qw(fatalsToBrowser); +use FS::UID qw(cgisuidsetup); +use FS::Record qw(qsearchs); +use FS::svc_domain; + +#remove this to actually test the domains! +$FS::svc_domain::whois_hack = 1; + +my($req) = new CGI::Request; +&cgisuidsetup($req->cgi); + +$req->param('svcnum') =~ /^(\d*)$/ or die "Illegal svcnum!"; +my($svcnum)=$1; + +my($new) = create FS::svc_domain ( { + map { + $_, $req->param($_); + } qw(svcnum pkgnum svcpart domain action purpose) +} ); + +my($error); +if ($req->param('legal') ne "Yes") { + $error = "Customer did not agree to be bound by NSI's ". + qq!!. + "Domain Name Resgistration Agreement"; +} elsif ($req->param('svcnum')) { + $error="Can't modify a domain!"; +} else { + $error=$new->insert; + $svcnum=$new->svcnum; +} + +unless ($error) { + $req->cgi->redirect("../../view/svc_domain.cgi?$svcnum"); +} else { + CGI::Base::SendHeaders(); # one guess + print < + + Error adding domain + + +
+

Error adding domain

+
+ Your update did not occur because of the following error: +

$error +

Hit the Back button in your web browser, correct this mistake, and submit the form again. + + +END + +} + +