1 <FONT SIZE=4>Setup services</FONT><BR><BR>
3 <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 BGCOLOR="#ffffff">
8 grep { scalar(@{$_->{part_svc}})
9 || scalar(@{$_->{cust_svc}})
13 my $susp = $pkg->{'susp'} || '';
16 push @pkg_actions, [ 'customer_change_pkg' => 'change' ] unless $pkg->{'immutable'};
17 push @pkg_actions, [ 'process_suspend_pkg' => 'suspend' ]
18 if $self_suspend_reason;
21 my $bgcolor = $susp ? '"#ff9900"' : '"#8888ff"';
22 $OUT .= #'<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 BGCOLOR="#ffffff">'.
23 '<TR><TH BGCOLOR='.$bgcolor.' COLSPAN=2>'.
24 $pkg->{'pkg'}. ($susp && ' (suspended)').
25 '</TH><TH ALIGN="left" BGCOLOR='.$bgcolor.'>';
26 foreach my $action (@pkg_actions) {
27 $OUT .= '(<A style="font-size: smaller;color: #000000" HREF="' .
28 $url . $action->[0] . ';pkgnum=' . $pkg->{'pkgnum'} . ';pkg=' .
29 $pkg->{'pkg'} . '">' . $action->[1] . '</A>) ';
37 foreach my $cust_svc ( @{ $pkg->{cust_svc} } ) {
38 my $td = qq!<TD BGCOLOR="#$col"!;
41 "$td ALIGN=right>". $cust_svc->{label}[0]. ': </TD>'.
42 "$td><B>". $cust_svc->{label}[1]. '</B>';
43 $OUT .= '<BR><I>password: '. encode_entities($cust_svc->{_password}). '</I>'
44 if exists($cust_svc->{_password});
45 if ( exists($cust_svc->{svchash}) ) {
46 $OUT .= '<BR><I>Email: '. encode_entities($cust_svc->{svchash}->{email}). '</I>'
47 if exists($cust_svc->{svchash}->{email})
48 && length($cust_svc->{svchash}->{email});
49 $OUT .= '<BR><I>Forward to: '. encode_entities($cust_svc->{svchash}->{forwarddst}). '</I>'
50 if exists($cust_svc->{svchash}->{forwarddst})
51 && length($cust_svc->{svchash}->{forwarddst});
56 #if ( $cust_svc->{label}[2] eq 'svc_acct' ) {
57 # $OUT .= qq!(<A HREF="${url}changepw;svcnum=$cust_svc->{'svcnum'}">!.
61 unless ( $cust_svc->{'svcnum'} == $svcnum ) {
62 $OUT .= qq!(<A HREF="javascript:areyousure('${url}delete_svc;svcnum=$cust_svc->{svcnum}', 'This will permanently delete the $cust_svc->{label}[1] $cust_svc->{label}[0]. Are you sure?')">!.
64 $OUT .= qq!<BR>(<A HREF="${url}provision_svc;pkgnum=$pkg->{pkgnum};svcpart=$cust_svc->{'svcpart'};svcnum=$cust_svc->{'svcnum'}">modify</A>)!
65 if ( exists($cust_svc->{svchash}) && $cust_svc->{label}[2] eq 'svc_phone' );
67 $OUT .= '</FONT></TD></TR>';
68 $col = $col eq $col1 ? $col2 : $col1;
71 $OUT .= '<TR><TD COLSPAN=3 BGCOLOR="#000000"></TD></TR>'
72 if scalar(@{$pkg->{part_svc}}) && scalar(@{$pkg->{cust_svc}});
76 foreach my $part_svc ( @{ $pkg->{part_svc} } ) {
78 my $td = qq!<TD BGCOLOR="#$col"!;
82 if ( $part_svc->{'svcdb'} eq 'svc_external'
83 #&& $conf->exists('svc_external-skip_manual')
85 $link = "${url}process_svc_external;".
86 "pkgnum=$pkg->{'pkgnum'};".
87 "svcpart=$part_svc->{'svcpart'}";
89 $link = "${url}provision_svc;".
90 "pkgnum=$pkg->{'pkgnum'};".
91 "svcpart=$part_svc->{'svcpart'}";
94 $OUT .= "<TR>$td COLSPAN=3 ALIGN=center>".
95 qq!<A HREF="$link">!. 'Setup '. $part_svc->{'svc'}. '</A> '.
96 '('. $part_svc->{'num_avail'}. ' available)'.
98 #self-service only supports these services so far
99 if grep { $part_svc->{'svcdb'} eq $_ } qw( svc_acct svc_external svc_forward );
101 $col = $col eq $col1 ? $col2 : $col1;
104 #$OUT .= '</TABLE><BR>';
105 $OUT .= '<TR><TD BGCOLOR="#eeeeee" COLSPAN=3> </TD></TR>';