blob: b8c3f62a12c7794b67f7304f15e1bc6a6cae4b63 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
<%
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
%>
<!-- mason kludge -->
<%
eidiot($error);
} else {
my $svcnum = $new->svcnum;
print $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum");
}
%>
|