3 # agent.cgi: browse agent
5 # ivan@sisd.com 97-dec-12
7 # changes to allow pages to load from a relative location in the web tree.
8 # bmccane@maxbaud.net 98-mar-25
10 # changed 'type' to 'atype' because type is reserved word in Pg6.3
11 # bmccane@maxbaud.net 98-apr-3
13 # agent type was linking to wrong cgi ivan@sisd.com 98-jul-18
15 # lose background, FS::CGI ivan@sisd.com 98-sep-2
18 # Revision 1.2 1998-11-07 10:24:22 ivan
19 # don't use depriciated FS::Bill and FS::Invoice, other miscellania
24 use FS::UID qw(cgisuidsetup swapuid);
25 use FS::Record qw(qsearch qsearchs);
26 use FS::CGI qw(header menubar);
28 my($cgi) = new CGI::Base;
33 SendHeaders(); # one guess.
34 print header('Agent Listing', menubar(
36 'Agent Types' => 'agent_type.cgi',
37 # 'Add new agent' => '../edit/agent.cgi'
39 Agents are resellers of your service. Agents may be limited to a subset of your
40 full offerings (via their type).<BR><BR>
43 <TH COLSPAN=2>Agent</TH>
45 <TH><FONT SIZE=-1>Freq. (unimp.)</FONT></TH>
46 <TH><FONT SIZE=-1>Prog. (unimp.)</FONT></TH>
49 # <TH><FONT SIZE=-1>Agent #</FONT></TH>
53 foreach $agent ( sort {
54 $a->getfield('agentnum') <=> $b->getfield('agentnum')
55 } qsearch('agent',{}) ) {
56 my($hashref)=$agent->hashref;
57 my($typenum)=$hashref->{typenum};
58 my($agent_type)=qsearchs('agent_type',{'typenum'=>$typenum});
59 my($atype)=$agent_type->getfield('atype');
62 <TD><A HREF="../edit/agent.cgi?$hashref->{agentnum}">
63 $hashref->{agentnum}</A></TD>
64 <TD><A HREF="../edit/agent.cgi?$hashref->{agentnum}">
65 $hashref->{agent}</A></TD>
66 <TD><A HREF="../edit/agent_type.cgi?$typenum">$atype</A></TD>
67 <TD>$hashref->{freq}</TD>
68 <TD>$hashref->{prog}</TD>
76 <TD COLSPAN=2><A HREF="../edit/agent.cgi"><I>Add new agent</I></A></TD>
77 <TD><A HREF="../edit/agent_type.cgi"><I>Add new agent type</I></A></TD>