From 23186f0338ec248d930c85db08cc997bca42525b Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 22 May 2002 18:44:01 +0000 Subject: bind export, editing zones, deleting unaudited domains, mmm --- httemplate/edit/process/domain_record.cgi | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 httemplate/edit/process/domain_record.cgi (limited to 'httemplate/edit/process/domain_record.cgi') diff --git a/httemplate/edit/process/domain_record.cgi b/httemplate/edit/process/domain_record.cgi new file mode 100755 index 000000000..8fb0368f6 --- /dev/null +++ b/httemplate/edit/process/domain_record.cgi @@ -0,0 +1,31 @@ +<% + +my $recnum = $cgi->param('recnum'); + +my $old = qsearchs('agent',{'recnum'=>$recnum}) if $recnum; + +my $new = new FS::domain_record ( { + map { + $_, scalar($cgi->param($_)); + } fields('domain_record') +} ); + +my $error; +if ( $recnum ) { + $error=$new->replace($old); +} else { + $error=$new->insert; + $recnum=$new->getfield('recnum'); +} + +if ( $error ) { +# $cgi->param('error', $error); +# print $cgi->redirect(popurl(2). "agent.cgi?". $cgi->query_string ); + #no edit screen to send them back to + eidiot($error); +} else { + my $svcnum = $new->svcnum; + print $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum"); +} + +%> -- cgit v1.2.1 From 4920ad2671d712afe23d731e25bc5b53955397b7 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 23 May 2002 13:00:08 +0000 Subject: bind: allow adding slave domains too --- httemplate/edit/process/domain_record.cgi | 3 +++ 1 file changed, 3 insertions(+) (limited to 'httemplate/edit/process/domain_record.cgi') diff --git a/httemplate/edit/process/domain_record.cgi b/httemplate/edit/process/domain_record.cgi index 8fb0368f6..b8c3f62a1 100755 --- a/httemplate/edit/process/domain_record.cgi +++ b/httemplate/edit/process/domain_record.cgi @@ -22,6 +22,9 @@ if ( $error ) { # $cgi->param('error', $error); # print $cgi->redirect(popurl(2). "agent.cgi?". $cgi->query_string ); #no edit screen to send them back to +%> + +<% eidiot($error); } else { my $svcnum = $new->svcnum; -- cgit v1.2.1