diff options
Diffstat (limited to 'httemplate/edit')
-rw-r--r-- | httemplate/edit/process/svc_www.cgi | 36 | ||||
-rwxr-xr-x | httemplate/edit/svc_acct.cgi | 1 |
2 files changed, 36 insertions, 1 deletions
diff --git a/httemplate/edit/process/svc_www.cgi b/httemplate/edit/process/svc_www.cgi new file mode 100644 index 000000000..38d5e1c79 --- /dev/null +++ b/httemplate/edit/process/svc_www.cgi @@ -0,0 +1,36 @@ +<% + +$cgi->param('svcnum') =~ /^(\d*)$/ or die "Illegal svcnum!"; +my $svcnum = $1; + +my $old; +if ( $svcnum ) { + $old = qsearchs('svc_acct', { 'svcnum' => $svcnum } ) + or die "fatal: can't find account (svcnum $svcnum)!"; +} else { + $old = ''; +} + +my $new = new FS::svc_www ( { + map { + ($_, scalar($cgi->param($_))); + #} qw(svcnum pkgnum svcpart recnum usersvc) + } ( fields('svc_www'), qw( pkgnum svcpart ) ) +} ); + +my $error; +if ( $svcnum ) { + $error = $new->replace($old); +} else { + $error = $new->insert; + $svcnum = $new->svcnum; +} + +if ( $error ) { + $cgi->param('error', $error); + print $cgi->redirect(popurl(2). "svc_www.cgi?". $cgi->query_string ); +} else { + print $cgi->redirect(popurl(3). "view/svc_www.cgi?" . $svcnum ); +} + +%> diff --git a/httemplate/edit/svc_acct.cgi b/httemplate/edit/svc_acct.cgi index e42745cf7..3fa7019eb 100755 --- a/httemplate/edit/svc_acct.cgi +++ b/httemplate/edit/svc_acct.cgi @@ -105,7 +105,6 @@ print 'Service # '. ( $svcnum ? "<B>$svcnum</B>" : " (NEW)" ). '<BR>'. END print &ntable("#cccccc",2), <<END; -<TR><TD> <TR><TD ALIGN="right">Username</TD> <TD><INPUT TYPE="text" NAME="username" VALUE="$username" SIZE=$ulen2 MAXLENGTH=$ulen></TD></TR> <TR><TD ALIGN="right">Password</TD> |