diff options
author | ivan <ivan> | 1998-11-20 08:50:37 +0000 |
---|---|---|
committer | ivan <ivan> | 1998-11-20 08:50:37 +0000 |
commit | 6054e914fea75e2adee12b17167706c7a78e03db (patch) | |
tree | e4011f64f5352aa7c92610f6284d715136142584 /htdocs | |
parent | 8935cf3566726a2757c3b8f988acfcc0b7ac9352 (diff) |
s/CGI::Base/CGI.pm, visual fixes
Diffstat (limited to 'htdocs')
-rwxr-xr-x | htdocs/browse/agent.cgi | 26 | ||||
-rwxr-xr-x | htdocs/browse/part_svc.cgi | 42 |
2 files changed, 40 insertions, 28 deletions
diff --git a/htdocs/browse/agent.cgi b/htdocs/browse/agent.cgi index 2c67e837c..fe4e84abb 100755 --- a/htdocs/browse/agent.cgi +++ b/htdocs/browse/agent.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# agent.cgi: browse agent +# $Id: agent.cgi,v 1.4 1998-11-20 08:50:36 ivan Exp $ # # ivan@sisd.com 97-dec-12 # @@ -15,7 +15,10 @@ # lose background, FS::CGI ivan@sisd.com 98-sep-2 # # $Log: agent.cgi,v $ -# Revision 1.3 1998-11-08 10:11:02 ivan +# Revision 1.4 1998-11-20 08:50:36 ivan +# s/CGI::Base/CGI.pm, visual fixes +# +# Revision 1.3 1998/11/08 10:11:02 ivan # CGI.pm # # Revision 1.2 1998/11/07 10:24:22 ivan @@ -26,20 +29,22 @@ use strict; use CGI; 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); +use FS::agent; my($cgi) = new CGI; &cgisuidsetup($cgi); print $cgi->header, header('Agent Listing', menubar( - 'Main Menu' => '../', + 'Main Menu' => popurl(2), 'Agent Types' => 'agent_type.cgi', # 'Add new agent' => '../edit/agent.cgi' )), <<END; Agents are resellers of your service. Agents may be limited to a subset of your full offerings (via their type).<BR><BR> - <TABLE BORDER> +END +print table, <<END; <TR> <TH COLSPAN=2>Agent</TH> <TH>Type</TH> @@ -51,6 +56,7 @@ END # <TH>Agent</TH> my($agent); +my($p)=popurl(2); foreach $agent ( sort { $a->getfield('agentnum') <=> $b->getfield('agentnum') } qsearch('agent',{}) ) { @@ -60,11 +66,11 @@ foreach $agent ( sort { my($atype)=$agent_type->getfield('atype'); print <<END; <TR> - <TD><A HREF="../edit/agent.cgi?$hashref->{agentnum}"> + <TD><A HREF="$p/edit/agent.cgi?$hashref->{agentnum}"> $hashref->{agentnum}</A></TD> - <TD><A HREF="../edit/agent.cgi?$hashref->{agentnum}"> + <TD><A HREF="$p/edit/agent.cgi?$hashref->{agentnum}"> $hashref->{agent}</A></TD> - <TD><A HREF="../edit/agent_type.cgi?$typenum">$atype</A></TD> + <TD><A HREF="$p/edit/agent_type.cgi?$typenum">$atype</A></TD> <TD>$hashref->{freq}</TD> <TD>$hashref->{prog}</TD> </TR> @@ -74,8 +80,8 @@ END print <<END; <TR> - <TD COLSPAN=2><A HREF="../edit/agent.cgi"><I>Add new agent</I></A></TD> - <TD><A HREF="../edit/agent_type.cgi"><I>Add new agent type</I></A></TD> + <TD COLSPAN=2><A HREF="$p/edit/agent.cgi"><I>Add new agent</I></A></TD> + <TD><A HREF="$p/edit/agent_type.cgi"><I>Add new agent type</I></A></TD> </TR> </TABLE> diff --git a/htdocs/browse/part_svc.cgi b/htdocs/browse/part_svc.cgi index 71a556421..189d649b6 100755 --- a/htdocs/browse/part_svc.cgi +++ b/htdocs/browse/part_svc.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# part_svc.cgi: browse part_svc +# $Id: part_svc.cgi,v 1.2 1998-11-20 08:50:37 ivan Exp $ # # ivan@sisd.com 97-nov-14, 97-dec-9 # @@ -8,29 +8,32 @@ # bmccane@maxbaud.net 98-apr-3 # # lose background, FS::CGI ivan@sisd.com 98-sep-2 +# +# $Log: part_svc.cgi,v $ +# Revision 1.2 1998-11-20 08:50:37 ivan +# s/CGI::Base/CGI.pm, visual fixes +# use strict; -use CGI::Base; -use FS::UID qw(cgisuidsetup swapuid); +use CGI; +use CGI::Carp qw(fatalsToBrowser); +use FS::UID qw(cgisuidsetup); use FS::Record qw(qsearch); use FS::part_svc qw(fields); -use FS::CGI qw(header menubar); +use FS::CGI qw(header menubar popurl table); -my($cgi) = new CGI::Base; -$cgi->get; +my($cgi) = new CGI; &cgisuidsetup($cgi); -SendHeaders(); # one guess. -print header('Service Part Listing', menubar( - 'Main Menu' => '../', - 'Add new service' => "../edit/part_svc.cgi", +print $cgi->header, header('Service Part Listing', menubar( + 'Main Menu' => popurl(2), )),<<END; - <BR>Click on service part number to edit. - <TABLE BORDER> + Services are items you offer to your customers.<BR><BR> +END +print table, <<END; <TR> - <TH>Part #</TH> - <TH>Service</TH> + <TH COLSPAN=2>Service</TH> <TH>Table</TH> <TH>Field</TH> <TH>Action</TH> @@ -39,6 +42,7 @@ print header('Service Part Listing', menubar( END my($part_svc); +my($p)=popurl(2); foreach $part_svc ( sort { $a->getfield('svcpart') <=> $b->getfield('svcpart') } qsearch('part_svc',{}) ) { @@ -54,10 +58,9 @@ foreach $part_svc ( sort { my($rowspan)=scalar(@rows); print <<END; <TR> - <TD ROWSPAN=$rowspan><A HREF="../edit/part_svc.cgi?$hashref->{svcpart}"> - $hashref->{svcpart} - </A></TD> - <TD ROWSPAN=$rowspan>$hashref->{svc}</TD> + <TD ROWSPAN=$rowspan><A HREF="$p/edit/part_svc.cgi?$hashref->{svcpart}"> + $hashref->{svcpart}</A></TD> + <TD ROWSPAN=$rowspan><A HREF="$p/edit/part_svc.cgi?$hashref->{svcpart}"> $hashref->{svc}</A></TD> <TD ROWSPAN=$rowspan>$hashref->{svcdb}</TD> END my($row); @@ -73,6 +76,9 @@ print "</TR>"; } print <<END; + <TR> + <TD COLSPAN=2><A HREF="$p/edit/part_svc.cgi"><I>Add new service</I></A></TD> + </TR> </TABLE> </CENTER> </BODY> |