summaryrefslogtreecommitdiff
path: root/httemplate/view
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/view')
-rwxr-xr-xhttemplate/view/cust_main.cgi61
-rwxr-xr-xhttemplate/view/cust_pkg.cgi2
-rwxr-xr-xhttemplate/view/svc_acct.cgi19
-rwxr-xr-xhttemplate/view/svc_domain.cgi2
-rwxr-xr-xhttemplate/view/svc_forward.cgi12
-rw-r--r--httemplate/view/svc_www.cgi18
6 files changed, 87 insertions, 27 deletions
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi
index 52d85deff..0610bc324 100755
--- a/httemplate/view/cust_main.cgi
+++ b/httemplate/view/cust_main.cgi
@@ -206,8 +206,7 @@ print '<BR>';
if ( $cust_main->payby eq 'CARD' ) {
my $payinfo = $cust_main->payinfo;
- $payinfo = substr($payinfo,0,4). 'x'x(length($payinfo)-4);
-
+ $payinfo = 'x'x(length($payinfo)-4). substr($payinfo,(length($payinfo)-4));
print 'Credit card</TD></TR>',
'<TR><TD ALIGN="right">Card number</TD><TD BGCOLOR="#ffffff">',
$payinfo, '</TD></TR>',
@@ -242,9 +241,10 @@ print '</TD></TR></TABLE>';
if ( defined $cust_main->dbdef_table->column('comments')
&& $cust_main->comments )
{
- print "<BR>Comments", &ntable("#cccccc"), "<TR><TD>",
- &ntable("#cccccc",2),
- '<TR><TD BGCOLOR="#ffffff"><PRE>', $cust_main->comments,
+ print "<BR>Comments". &ntable("#cccccc"). "<TR><TD>".
+ &ntable("#cccccc",2).
+ '<TR><TD BGCOLOR="#ffffff"><PRE>'.
+ encode_entities($cust_main->comments).
'</PRE></TD></TR></TABLE></TABLE>';
}
@@ -266,12 +266,41 @@ foreach my $type_pkgs ( qsearch('type_pkgs',{'typenum'=> $agent->typenum }) ) {
$part_pkg->comment;
}
-print '</SELECT><INPUT TYPE="submit" VALUE="Order Package"><BR>';
+print '</SELECT><INPUT TYPE="submit" VALUE="Order Package"></FORM><BR>';
+
+print '<BR>'.
+ qq!<FORM ACTION="${p}edit/process/quick-charge.cgi" METHOD="POST">!.
+ qq!<INPUT TYPE="hidden" NAME="custnum" VALUE="$custnum">!.
+ qq!Description:<INPUT TYPE="text" NAME="pkg">!.
+ qq!&nbsp;Amount:<INPUT TYPE="text" NAME="amount" SIZE=6>!.
+ qq!&nbsp;!;
+
+#false laziness w/ edit/part_pkg.cgi
+if ( $conf->exists('enable_taxclasses') ) {
+ print '<SELECT NAME="taxclass">';
+ my $sth = dbh->prepare('SELECT DISTINCT taxclass FROM cust_main_county')
+ or die dbh->errstr;
+ $sth->execute or die $sth->errstr;
+ foreach my $taxclass ( map $_->[0], @{$sth->fetchall_arrayref} ) {
+ print qq!<OPTION VALUE="$taxclass"!;
+ #print ' SELECTED' if $taxclass eq $hashref->{taxclass};
+ print qq!>$taxclass</OPTION>!;
+ }
+ print '</SELECT>';
+} else {
+ print '<INPUT TYPE="hidden" NAME="taxclass" VALUE="">';
+}
+
+print qq!<INPUT TYPE="submit" VALUE="One-time charge"></FORM><BR>!;
print <<END;
<SCRIPT>
function cust_pkg_areyousure(href) {
- if (confirm("Permanantly delete included services and cancel this package?") == true)
+ if (confirm("Permanently delete included services and cancel this package?") == true)
+ window.location.href = href;
+}
+function svc_areyousure(href) {
+ if (confirm("Permanently unprovision and delete this service?") == true)
window.location.href = href;
}
</SCRIPT>
@@ -364,7 +393,8 @@ foreach my $package (@packages) {
for ( qw( setup bill susp expire cancel ) ) {
print "<TD ROWSPAN=$rowspan><FONT SIZE=-1>", ( $package->getfield($_)
- ? time2str("%D", $package->getfield($_) )
+ ? time2str("%D</FONT><BR><FONT SIZE=-3>%l:%M:%S%P&nbsp;%z</FONT>",
+ $package->getfield($_) )
: '&nbsp'
), '</FONT></TD>',
;
@@ -375,6 +405,7 @@ foreach my $package (@packages) {
#foreach my $cust_svc ( @cust_svc ) {
foreach my $svcpart ( sort { $a<=>$b } keys %pkg_svc ) {
my $svc = qsearchs('part_svc',{'svcpart'=>$svcpart})->getfield('svc');
+ $svc =~ s/ /&nbsp;/g;
my(@cust_svc)=qsearch('cust_svc',{'pkgnum'=>$pkgnum,
'svcpart'=>$svcpart,
});
@@ -385,13 +416,13 @@ foreach my $package (@packages) {
my($svcnum) = $cust_svc->svcnum;
my($sview) = popurl(2). "view";
print $n2,qq!<TD><A HREF="$sview/$svcdb.cgi?$svcnum"><FONT SIZE=-1>$label</FONT></A></TD>!,
- qq!<TD><A HREF="$sview/$svcdb.cgi?$svcnum"><FONT SIZE=-1>$value</FONT></A></TD>!;
+ qq!<TD><FONT SIZE=-1><A HREF="$sview/$svcdb.cgi?$svcnum">$value</A><BR>(&nbsp;<A HREF="javascript:svc_areyousure('${p}misc/unprovision.cgi?$svcnum')">Unprovision</A>&nbsp;)</FONT></TD>!;
} else {
print $n2, qq!<TD COLSPAN=2><A HREF="$uiadd{$svcpart}?pkgnum$pkgnum-svcpart$svcpart"><b><font size="+1" color="#ff0000">!.
- qq!Provision $svc</A></b></font>!;
+ qq!Provision&nbsp;$svc</A></b></font>!;
print qq!<BR><A HREF="../misc/link.cgi?pkgnum$pkgnum-svcpart$svcpart">!.
- qq!<b><font size="+1" color="#ff0000">Link to legacy $svc</A></b></font>!
+ qq!<b><font size="+1" color="#ff0000">Link&nbsp;to&nbsp;legacy&nbsp;$svc</A></b></font>!
if $conf->exists('legacy_link');
print '</TD>';
@@ -459,7 +490,7 @@ foreach my $bill (@bills) {
$payment->payinfo,
$cust_bill_pay->amount,
);
- $payinfo = substr($payinfo,0,4). 'x'x(length($payinfo)-4)
+ $payinfo = 'x'x(length($payinfo)-4). substr($payinfo,(length($payinfo)-4))
if $payby eq 'CARD';
my $target = "$payby$payinfo";
$payby =~ s/^BILL$/Check #/ if $payinfo;
@@ -542,7 +573,7 @@ foreach my $payment (@unapplied_payments) {
my $payby = $payment->payby;
my $payinfo = $payment->payinfo;
#false laziness w/above
- $payinfo = substr($payinfo,0,4). 'x'x(length($payinfo)-4)
+ $payinfo = 'x'x(length($payinfo)-4). substr($payinfo,(length($payinfo)-4))
if $payby eq 'CARD';
my $target = "$payby$payinfo";
$payby =~ s/^BILL$/Check #/ if $payinfo;
@@ -597,10 +628,10 @@ foreach my $item (sort keyfield_numerically @history) {
( $charge ? "\$".sprintf("%.2f",$charge) : '' ),
"</FONT></TD>",
"<TD><FONT SIZE=-1>",
- ( $payment ? "- \$".sprintf("%.2f",$payment) : '' ),
+ ( $payment ? "-&nbsp;\$".sprintf("%.2f",$payment) : '' ),
"</FONT></TD>",
"<TD><FONT SIZE=-1>",
- ( $credit ? "- \$".sprintf("%.2f",$credit) : '' ),
+ ( $credit ? "-&nbsp;\$".sprintf("%.2f",$credit) : '' ),
"</FONT></TD>",
"<TD><FONT SIZE=-1>",
( $refund ? "\$".sprintf("%.2f",$refund) : '' ),
diff --git a/httemplate/view/cust_pkg.cgi b/httemplate/view/cust_pkg.cgi
index 75fe983b4..09a2a7a8b 100755
--- a/httemplate/view/cust_pkg.cgi
+++ b/httemplate/view/cust_pkg.cgi
@@ -38,7 +38,7 @@ my $otaker = $cust_pkg->getfield('otaker');
print <<END;
<SCRIPT>
function areyousure(href) {
- if (confirm("Permanantly delete included services and cancel this package?") == true)
+ if (confirm("Permanently delete included services and cancel this package?") == true)
window.location.href = href;
}
</SCRIPT>
diff --git a/httemplate/view/svc_acct.cgi b/httemplate/view/svc_acct.cgi
index fd2a32547..19953bafd 100755
--- a/httemplate/view/svc_acct.cgi
+++ b/httemplate/view/svc_acct.cgi
@@ -39,16 +39,27 @@ if ( $svc_acct->domsvc ) {
$domain = $mydomain;
}
-print header('Account View', menubar(
+%>
+
+<SCRIPT>
+function areyousure(href) {
+ if (confirm("Permanently delete this account?") == true)
+ window.location.href = href;
+}
+</SCRIPT>
+
+<%= header('Account View', menubar(
( ( $pkgnum || $custnum )
? ( "View this package (#$pkgnum)" => "${p}view/cust_pkg.cgi?$pkgnum",
"View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
)
: ( "Cancel this (unaudited) account" =>
- "${p}misc/cancel-unaudited.cgi?$svcnum" )
+ "javascript:areyousure(\'${p}misc/cancel-unaudited.cgi?$svcnum\')" )
),
"Main menu" => $p,
-));
+)) %>
+
+<%
#print qq!<BR><A HREF="../misc/sendconfig.cgi?$svcnum">Send account information</A>!;
@@ -72,7 +83,7 @@ if ( $password =~ /^\*\w+\* (.*)$/ ) {
print "<I>(login disabled)</I> ";
}
if ( $conf->exists('showpasswords') ) {
- print "$password";
+ print '<PRE>'. encode_entities($password). '</PRE>';
} else {
print "<I>(hidden)</I>";
}
diff --git a/httemplate/view/svc_domain.cgi b/httemplate/view/svc_domain.cgi
index b70ac8f90..cc3cdb6bf 100755
--- a/httemplate/view/svc_domain.cgi
+++ b/httemplate/view/svc_domain.cgi
@@ -46,7 +46,7 @@ my $domain = $svc_domain->domain;
Service #<%= $svcnum %>
<BR>Service: <B><%= $part_svc->svc %></B>
<BR>Domain name: <B><%= $domain %></B>
-<BR>Catch all email <A HREF="${p}misc/catchall.cgi?<%= $svcnum %>">(change)</A>:
+<BR>Catch all email <A HREF="<%= ${p} %>misc/catchall.cgi?<%= $svcnum %>">(change)</A>:
<%= $email ? "<B>$email</B>" : "<I>(none)<I>" %>
<BR><BR><A HREF="http://www.geektools.com/cgi-bin/proxy.cgi?query=<%=$domain%>;targetnic=auto">View whois information.</A>
<BR><BR>
diff --git a/httemplate/view/svc_forward.cgi b/httemplate/view/svc_forward.cgi
index 8d2afc823..c8d1d6213 100755
--- a/httemplate/view/svc_forward.cgi
+++ b/httemplate/view/svc_forward.cgi
@@ -53,9 +53,15 @@ if ($dstsvc) {
}
print qq!<A HREF="${p}edit/svc_forward.cgi?$svcnum">Edit this information</A>!.
- "<BR>Service #$svcnum".
- "<BR>Service: <B>$svc</B>".
- qq!<BR>Mail to <B>$source</B> forwards to <B>$destination</B> mailbox.!.
+ ntable("#cccccc",2).
+ '<TR><TD ALIGN="right">Service number</TD>'.
+ qq!<TD BGCOLOR="#ffffff">$svcnum</TD></TR>!.
+ '<TR><TD ALIGN="right">Service</TD>'.
+ qq!<TD BGCOLOR="#ffffff">$svc</TD></TR>!.
+ qq!<TR><TD ALIGN="right">Email to</TD>!.
+ qq!<TD BGCOLOR="#ffffff">$source</TD></TR>!.
+ qq!<TR><TD ALIGN="right">Forwards to </TD>!.
+ qq!<TD BGCOLOR="#ffffff">$destination</TD></TR></TABLE>!.
'<BR>'. joblisting({'svcnum'=>$svcnum}, 1).
'</BODY></HTML>'
;
diff --git a/httemplate/view/svc_www.cgi b/httemplate/view/svc_www.cgi
index 70a7a1be4..9fa9661b1 100644
--- a/httemplate/view/svc_www.cgi
+++ b/httemplate/view/svc_www.cgi
@@ -20,8 +20,13 @@ if ($pkgnum) {
}
#eofalse
+my $usersvc = $svc_www->usersvc;
+my $svc_acct = qsearchs('svc_acct', { 'svcnum' => $usersvc } )
+ or die "svc_www: Unknown usersvc $usersvc";
+my $email = $svc_acct->email;
+
my $domain_record = qsearchs('domain_record', { 'recnum' => $svc_www->recnum } )
- or die "svc_www: Unknown recnum". $svc_www->recnum;
+ or die "svc_www: Unknown recnum ". $svc_www->recnum;
my $www = $domain_record->reczone;
unless ( $www =~ /\.$/ ) {
@@ -39,8 +44,15 @@ print header('Website View', menubar(
),
"Main menu" => $p,
)).
- "Service #$svcnum".
- qq!<BR>Website name: <B><A HREF="http://$www">$www</A></B>!.
+ qq!<A HREF="${p}edit/svc_www.cgi?$svcnum">Edit this information</A><BR>!.
+ ntable("#cccccc"). '<TR><TD>'. ntable("#cccccc",2).
+ qq!<TR><TD ALIGN="right">Service number</TD>!.
+ qq!<TD BGCOLOR="#ffffff">$svcnum</TD></TR>!.
+ qq!<TR><TD ALIGN="right">Website name</TD>!.
+ qq!<TD BGCOLOR="#ffffff"><A HREF="http://$www">$www<A></TD></TR>!.
+ qq!<TR><TD ALIGN="right">Account</TD>!.
+ qq!<TD BGCOLOR="#ffffff"><A HREF="${p}view/svc_acct.cgi?$usersvc">$email</A></TD></TR>!.
+ '</TABLE></TD></TR></TABLE>'.
'<BR>'. joblisting({'svcnum'=>$svcnum}, 1).
'</BODY></HTML>'
;