diff options
author | ivan <ivan> | 2003-10-06 11:14:30 +0000 |
---|---|---|
committer | ivan <ivan> | 2003-10-06 11:14:30 +0000 |
commit | 71eb3c33da045ffdc963b5ad8111af8a8bef878d (patch) | |
tree | 6a94f6e1fa319c617f9080779bd26f486372d6bf /httemplate/browse | |
parent | 2b6242f9d8fe2d9afb3937e3eea03cd0ece1e5f8 (diff) |
agent browse shows # of active accounts & links to appropriate account search
Diffstat (limited to 'httemplate/browse')
-rwxr-xr-x | httemplate/browse/svc_acct_pop.cgi | 52 |
1 files changed, 32 insertions, 20 deletions
diff --git a/httemplate/browse/svc_acct_pop.cgi b/httemplate/browse/svc_acct_pop.cgi index 8d35cb56a..80168728c 100755 --- a/httemplate/browse/svc_acct_pop.cgi +++ b/httemplate/browse/svc_acct_pop.cgi @@ -1,4 +1,9 @@ <!-- mason kludge --> +<% + my $accounts_sth = dbh->prepare("SELECT COUNT(*) FROM svc_acct + WHERE popnum = ? ") + or die dbh->errstr; +%> <%= header('Access Number Listing', menubar( 'Main Menu' => $p )) %> Points of Presence<BR><BR> <A HREF="<%= $p %>edit/svc_acct_pop.cgi"><I>Add new Access Number</I></A><BR><BR> @@ -10,6 +15,7 @@ Points of Presence<BR><BR> <TH>Area code</TH> <TH>Exchange</TH> <TH>Local</TH> + <TH>Accounts</TH> </TR> <% @@ -18,32 +24,38 @@ foreach my $svc_acct_pop ( sort { $a->state cmp $b->state || $a->city cmp $b->city || $a->ac <=> $b->ac || $a->exch <=> $b->exch || $a->loc <=> $b->loc } qsearch('svc_acct_pop',{}) ) { - my($hashref)=$svc_acct_pop->hashref; - print <<END; + + my $svc_acct_pop_link = $p . 'edit/svc_acct_pop.cgi?'. $svc_acct_pop->popnum; + + $accounts_sth->execute($svc_acct_pop->popnum) or die $accounts_sth->errstr; + my $num_accounts = $accounts_sth->fetchrow_arrayref->[0]; + + my $svc_acct_link = $p. 'search/svc_acct.cgi?popnum='. $svc_acct_pop->popnum; + +%> <TR> - <TD><A HREF="${p}edit/svc_acct_pop.cgi?$hashref->{popnum}"> - $hashref->{popnum}</A></TD> - <TD><A HREF="${p}edit/svc_acct_pop.cgi?$hashref->{popnum}"> - $hashref->{city}</A></TD> - <TD><A HREF="${p}edit/svc_acct_pop.cgi?$hashref->{popnum}"> - $hashref->{state}</A></TD> - <TD><A HREF="${p}edit/svc_acct_pop.cgi?$hashref->{popnum}"> - $hashref->{ac}</A></TD> - <TD><A HREF="${p}edit/svc_acct_pop.cgi?$hashref->{popnum}"> - $hashref->{exch}</A></TD> - <TD><A HREF="${p}edit/svc_acct_pop.cgi?$hashref->{popnum}"> - $hashref->{loc}</A></TD> + <TD><A HREF="<%= $svc_acct_pop_link %>"> + <%= $svc_acct_pop->popnum %></A></TD> + <TD><A HREF="<%= $svc_acct_pop_link %>"> + <%= $svc_acct_pop->city %></A></TD> + <TD><A HREF="<%= $svc_acct_pop_link %>"> + <%= $svc_acct_pop->state %></A></TD> + <TD><A HREF="<%= $svc_acct_pop_link %>"> + <%= $svc_acct_pop->ac %></A></TD> + <TD><A HREF="<%= $svc_acct_pop_link %>"> + <%= $svc_acct_pop->exch %></A></TD> + <TD><A HREF="<%= $svc_acct_pop_link %>"> + <%= $svc_acct_pop->loc %></A></TD> + <TD> + <FONT COLOR="#00CC00"><B><%= $num_accounts %></B></FONT> + <A HREF="<%= $svc_acct_link %>&showcancelledcustomers=0">active</A> + </TD> </TR> -END +<% } %> -} - -print <<END; <TR> </TR> </TABLE> </BODY> </HTML> -END -%> |