X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Fsvc_acct_pop.cgi;h=949bfa790c066c629fd7573d706e3ff297b98c62;hb=633c48448d9468690b7ad77eb6ff7c660a286658;hp=05f8a3031518c483e0d094fb2d934b9e30dbf087;hpb=51984ac3d3da3006809c6866fdecd4ad83610731;p=freeside.git diff --git a/httemplate/browse/svc_acct_pop.cgi b/httemplate/browse/svc_acct_pop.cgi index 05f8a3031..949bfa790 100755 --- a/httemplate/browse/svc_acct_pop.cgi +++ b/httemplate/browse/svc_acct_pop.cgi @@ -1,60 +1,14 @@ -<% -# -# $Id: svc_acct_pop.cgi,v 1.1 2001-07-30 07:36:03 ivan Exp $ -# -# ivan@sisd.com 98-mar-8 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# lose background, FS::CGI ivan@sisd.com 98-sep-2 -# -# $Log: svc_acct_pop.cgi,v $ -# Revision 1.1 2001-07-30 07:36:03 ivan -# templates!!! -# -# Revision 1.8 2000/01/28 22:56:13 ivan -# track full phone number -# -# Revision 1.7 1999/04/09 04:22:34 ivan -# also table() -# -# Revision 1.6 1999/04/09 03:52:55 ivan -# explicit & for table/itable/ntable -# -# Revision 1.5 1999/01/19 05:13:30 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.4 1999/01/18 09:41:20 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.3 1998/12/17 05:25:22 ivan -# fix visual and other bugs -# -# Revision 1.2 1998/12/17 04:36:59 ivan -# use CGI;, use CGI::Carp, visual changes, relative URLs -# + +% +% my $accounts_sth = dbh->prepare("SELECT COUNT(*) FROM svc_acct +% WHERE popnum = ? ") +% or die dbh->errstr; +% -use strict; -use vars qw( $cgi $p $svc_acct_pop ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup swapuid); -use FS::Record qw(qsearch qsearchs); -use FS::CGI qw(header menubar table popurl); -use FS::svc_acct_pop; - -$cgi = new CGI; - -&cgisuidsetup($cgi); - -$p = popurl(2); - -print $cgi->header( '-expires' => 'now' ), header('POP Listing', menubar( - 'Main Menu' => $p, -)), "Points of Presence

", &table(), < $p )) %> +Points of Presence

+Add new Access Number

+<% table() %> City @@ -62,40 +16,56 @@ print $cgi->header( '-expires' => 'now' ), header('POP Listing', menubar( Area code Exchange Local + Accounts -END +% +%foreach my $svc_acct_pop ( sort { +% #$a->getfield('popnum') <=> $b->getfield('popnum') +% $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 $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; +% +% -foreach $svc_acct_pop ( sort { - $a->getfield('popnum') <=> $b->getfield('popnum') -} qsearch('svc_acct_pop',{}) ) { - my($hashref)=$svc_acct_pop->hashref; - print < - - $hashref->{popnum} - - $hashref->{city} - - $hashref->{state} - - $hashref->{ac} - - $hashref->{exch} - - $hashref->{loc} + + <% $svc_acct_pop->popnum %> + + <% $svc_acct_pop->city %> + + <% $svc_acct_pop->state %> + + <% $svc_acct_pop->ac %> + + <% $svc_acct_pop->exch %> + + <% $svc_acct_pop->loc %> + + <% $num_accounts %> +% if ( $num_accounts ) { + +% } + + active +% if ( $num_accounts ) { + +% } + + -END +% } -} -print < - Add new POP - -END -%>