summaryrefslogtreecommitdiff
path: root/httemplate/edit
diff options
context:
space:
mode:
authorivan <ivan>2001-09-04 14:44:07 +0000
committerivan <ivan>2001-09-04 14:44:07 +0000
commit1e4aa8069f25e1b4101da20bb9e0d3f60357ea52 (patch)
tree15f9087d887b3767656a2336673ba928610ff407 /httemplate/edit
parentfeafaf45ee709ef15b6cf7892abf89e4878c627b (diff)
new admin documentation, quick one-pkg order
Diffstat (limited to 'httemplate/edit')
-rwxr-xr-xhttemplate/edit/part_svc.cgi8
-rw-r--r--httemplate/edit/process/quick-cust_pkg.cgi34
-rwxr-xr-xhttemplate/edit/svc_acct.cgi14
3 files changed, 50 insertions, 6 deletions
diff --git a/httemplate/edit/part_svc.cgi b/httemplate/edit/part_svc.cgi
index 5696e43f8..01574e992 100755
--- a/httemplate/edit/part_svc.cgi
+++ b/httemplate/edit/part_svc.cgi
@@ -1,4 +1,4 @@
-<!-- $Id: part_svc.cgi,v 1.5 2001-08-30 15:30:26 ivan Exp $ -->
+<!-- $Id: part_svc.cgi,v 1.6 2001-09-04 14:44:06 ivan Exp $ -->
<%
my $part_svc;
if ( $cgi->param('error') ) { #error
@@ -31,7 +31,7 @@ function visualize(what) {
<%= header("$action Service Definition",
menubar( 'Main Menu' => $p,
- 'View all services' => "${p}browse/part_svc.cgi"
+ 'View all service definitions' => "${p}browse/part_svc.cgi"
),
" onLoad=\"visualize()\""
)
@@ -50,8 +50,8 @@ Service <INPUT TYPE="text" NAME="svc" VALUE="<%= $hashref->{svc} %>">
</PRE>
Services are items you offer to your customers.
<UL><LI>svc_acct - Shell accounts, POP mailboxes, SLIP/PPP and ISDN accounts
- <LI>svc_domain - Virtual domains
- <LI>svc_acct_sm - Virtual domain mail aliasing (*depreciated*)
+ <LI>svc_domain - Domains
+ <LI>svc_acct_sm - <B>depreciated</B> (use svc_forward for new installations) Virtual domain mail aliasing.
<LI>svc_forward - mail forwarding
<LI>svc_www - Virtual domain website
<!-- <LI>svc_charge - One-time charges (Partially unimplemented)
diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi
new file mode 100644
index 000000000..5ac315d87
--- /dev/null
+++ b/httemplate/edit/process/quick-cust_pkg.cgi
@@ -0,0 +1,34 @@
+<%
+#<!-- $Id: quick-cust_pkg.cgi,v 1.1 2001-09-04 14:44:07 ivan Exp $ -->
+
+use strict;
+use vars qw( $cgi $custnum $pkgpart $error ); #@remove_pkgnums @pkgparts
+use CGI;
+use CGI::Carp qw(fatalsToBrowser);
+use FS::UID qw(cgisuidsetup);
+use FS::CGI qw(popurl);
+use FS::cust_pkg;
+
+$cgi = new CGI; # create form object
+&cgisuidsetup($cgi);
+$error = '';
+
+#untaint custnum
+$cgi->param('custnum') =~ /^(\d+)$/
+ or die 'illegal custnum '. $cgi->param('custnum');
+$custnum = $1;
+$cgi->param('pkgpart') =~ /^(\d+)$/
+ or die 'illegal pkgpart '. $cgi->param('pkgpart');
+$pkgpart = $1;
+
+my @cust_pkg = ();
+$error ||= FS::cust_pkg::order($custnum, [ $pkgpart ], [], \@cust_pkg, );
+
+if ($error) {
+ eidiot($error);
+} else {
+ print $cgi->redirect(popurl(3). "view/cust_pkg.cgi?". $cust_pkg[0]->pkgnum );
+}
+
+%>
+
diff --git a/httemplate/edit/svc_acct.cgi b/httemplate/edit/svc_acct.cgi
index 2154bf22c..8a2cb802e 100755
--- a/httemplate/edit/svc_acct.cgi
+++ b/httemplate/edit/svc_acct.cgi
@@ -1,5 +1,5 @@
<%
-#<!-- $Id: svc_acct.cgi,v 1.5 2001-08-21 10:27:11 ivan Exp $ -->
+#<!-- $Id: svc_acct.cgi,v 1.6 2001-09-04 14:44:06 ivan Exp $ -->
use strict;
use vars qw( $conf $cgi @shells $action $svcnum $svc_acct $pkgnum $svcpart
@@ -118,10 +118,20 @@ END
#domain
$domsvc = $svc_acct->domsvc || 0;
-if ( $part_svc->svc_acct__domsvc_flag eq "F" ) {
+if ( $part_svc->svc_acct__domsvc_flag eq 'F' ) {
print qq!<INPUT TYPE="hidden" NAME="domsvc" VALUE="$domsvc">!;
} else {
my @svc_domain = ();
+ if ( $part_svc->svc_acct__domsvc_flag eq 'D' ) {
+ my $svc_domain =
+ qsearchs('svc_domain', { 'svcnum' => $part_svc->svc_acct__domsvc } );
+ if ( $svc_domain ) {
+ push @svc_domain, $svc_domain;
+ } else {
+ warn "unknown svc_domain.svcnum for part_svc.svc_acct__domsvc: ".
+ $part_svc->svc_acct__domsvc;
+ }
+ }
my $cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $pkgnum } );
if ($cust_pkg) {
my @cust_svc =