diff options
author | ivan <ivan> | 1998-12-17 04:36:59 +0000 |
---|---|---|
committer | ivan <ivan> | 1998-12-17 04:36:59 +0000 |
commit | f1073fbef03471ec5ad4ed76347a4368cb0be586 (patch) | |
tree | 85336f87c1e0b780e5da7c1c582b1f23300281bc | |
parent | 9870a7af8859d7e7b8c562a96a193e5992688885 (diff) |
use CGI;, use CGI::Carp, visual changes, relative URLs
-rwxr-xr-x | htdocs/browse/svc_acct_pop.cgi | 45 |
1 files changed, 27 insertions, 18 deletions
diff --git a/htdocs/browse/svc_acct_pop.cgi b/htdocs/browse/svc_acct_pop.cgi index a8a3a9224..f7627c1ef 100755 --- a/htdocs/browse/svc_acct_pop.cgi +++ b/htdocs/browse/svc_acct_pop.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# svc_acct_pop.cgi: browse pops +# $Id: svc_acct_pop.cgi,v 1.2 1998-12-17 04:36:59 ivan Exp $ # # ivan@sisd.com 98-mar-8 # @@ -8,27 +8,28 @@ # bmccane@maxbaud.net 98-apr-3 # # lose background, FS::CGI ivan@sisd.com 98-sep-2 +# +# $Log: svc_acct_pop.cgi,v $ +# Revision 1.2 1998-12-17 04:36:59 ivan +# use CGI;, use CGI::Carp, visual changes, relative URLs +# use strict; -use CGI::Base; +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); +use FS::CGI qw(header menubar table popurl); -my($cgi) = new CGI::Base; -$cgi->get; +my($cgi) = new CGI; &cgisuidsetup($cgi); -SendHeaders(); # one guess. -print header('POP Listing', menubar( - 'Main Menu' => '../', - 'Add new POP' => "../edit/svc_acct_pop.cgi", -)), <<END; - <BR>Click on pop number to edit. - <TABLE BORDER> +print $cgi->header, header('POP Listing', menubar( + 'Main Menu' => popurl(2), +)), table, <<END; <TR> - <TH><FONT SIZE=-1>POP #</FONT></TH> + <TH></TH> <TH>City</TH> <TH>State</TH> <TH>Area code</TH> @@ -37,24 +38,32 @@ print header('POP Listing', menubar( END my($svc_acct_pop); +my($p)=popurl(2); foreach $svc_acct_pop ( sort { $a->getfield('popnum') <=> $b->getfield('popnum') } qsearch('svc_acct_pop',{}) ) { my($hashref)=$svc_acct_pop->hashref; print <<END; <TR> - <TD><A HREF="../edit/svc_acct_pop.cgi?$hashref->{popnum}"> + <TD><A HREF="$p/edit/svc_acct_pop.cgi?$hashref->{popnum}"> $hashref->{popnum}</A></TD> - <TD>$hashref->{city}</TD> - <TD>$hashref->{state}</TD> - <TD>$hashref->{ac}</TD> - <TD>$hashref->{exch}</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> </TR> END } print <<END; + <TR> + <TD COLSPAN=5><A HREF="$p/edit/svc_acct_pop.cgi"><I>Add new POP</I></A></TD> + </TR> </TABLE> </CENTER> </BODY> |