-<!-- $Id: part_svc.cgi,v 1.1 2001-07-30 07:36:04 ivan Exp $ -->
+<!-- $Id: part_svc.cgi,v 1.5 2001-08-30 15:30:26 ivan Exp $ -->
<%
my $part_svc;
if ( $cgi->param('error') ) { #error
map { $_, scalar($cgi->param($_)) } fields('part_svc')
} );
} elsif ( $cgi->keywords ) { #edit
- my $query = $cgi->keywords;
- $query =~ /^(\d+)$/;
- $part_svc=qsearchs('part_svc',{'svcpart'=>$1});
+ my($query) = $cgi->keywords;
+ $query =~ /^(\d+)$/ or die "malformed query: $query";
+ $part_svc=qsearchs('part_svc', { 'svcpart'=>$1 } )
+ or die "unknown svcpart: $1";
} else { #adding
$part_svc = new FS::part_svc {};
}
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
+ <LI>svc_acct_sm - Virtual domain mail aliasing (*depreciated*)
+ <LI>svc_forward - mail forwarding
<LI>svc_www - Virtual domain website
<!-- <LI>svc_charge - One-time charges (Partially unimplemented)
<LI>svc_wo - Work orders (Partially unimplemented)
var something = null;
function changed(what) {
svcdb = what.options[what.selectedIndex].value;
-<% foreach my $svcdb ( qw( svc_acct svc_domain svc_acct_sm svc_www ) ) { %>
+<% foreach my $svcdb ( qw( svc_acct svc_domain svc_acct_sm svc_forward svc_www ) ) { %>
if (svcdb == "<%= $svcdb %>" ) {
<% foreach my $not ( grep { $_ ne $svcdb } (
- qw(svc_acct svc_domain svc_acct_sm svc_www) ) ) { %>
+ qw(svc_acct svc_domain svc_acct_sm svc_forward svc_www) ) ) { %>
if (document.getElementById) {
document.getElementById('d<%= $not %>').style.visibility = "hidden";
} else {
<% } %>
}
</SCRIPT>
+<% my @dbs = $hashref->{svcdb}
+ ? ( $hashref->{svcdb} )
+ : qw( svc_acct svc_domain svc_acct_sm svc_forward svc_www ); %>
Table<SELECT NAME="svcdb" SIZE=1 onChange="changed(this)">
-<% foreach my $svcdb (qw( svc_acct svc_domain svc_acct_sm svc_www )) { %>
+<% foreach my $svcdb (@dbs) { %>
<OPTION VALUE="<%= $svcdb %>" <%= ' SELECTED'x($svcdb eq $hashref->{svcdb}) %>><%= $svcdb %>
<% } %>
</SELECT>
'svc_acct' => {
'dir' => 'Home directory',
'uid' => 'UID (set to fixed and blank for dial-only)',
- 'slipip' => 'IP address (set to fixed and blank to disable dialin)',
+ 'slipip' => 'IP address (Set to fixed and blank to disable dialin, or, set a value to be exported to RADIUS Framed-IP-Address. Use the special value <code>0e0</code> [zero e zero] to enable export to RADIUS without a Framed-IP-Address.)',
'popnum' => qq!<A HREF="$p/browse/svc_acct_pop.cgi/">POP number</A>!,
'username' => 'Username',
'quota' => '(unimplemented)',
'gid' => 'GID (when blank, defaults to UID)',
'shell' => 'Shell (all service definitions should have a default or fixed shell that is present in the <b>shells</b> configuration file)',
'finger' => 'GECOS',
+ 'domsvc' => 'svcnum from svc_domain',
},
'svc_domain' => {
'domain' => 'Domain',
'domuid' => 'UID where domuser@virtualdomain.com mail is forwarded',
'domsvc' => 'svcnum from svc_domain for virtualdomain.com',
},
+ 'svc_forward' => {
+ 'srcsvc' => 'service from which mail is to be forwarded',
+ 'dstsvc' => 'service to which mail is to be forwarded',
+ 'dst' => 'someone@another.domain.com to use when dstsvc is 0',
+ },
'svc_charge' => {
'amount' => 'amount',
},
# svc_acct svc_domain svc_acct_sm svc_charge svc_wo
foreach my $svcdb ( qw(
- konq_kludge svc_acct svc_domain svc_acct_sm svc_www
+ konq_kludge svc_acct svc_domain svc_acct_sm svc_forward svc_www
) ) {
my(@rows)=map { /^${svcdb}__(.*)$/; $1 }