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.3 1998-11-08 10:11:02 ivan
21 # Revision 1.2 1998/11/07 10:24:22 ivan
22 # don't use depriciated FS::Bill and FS::Invoice, other miscellania
27 use FS::UID qw(cgisuidsetup swapuid);
28 use FS::Record qw(qsearch qsearchs);
29 use FS::CGI qw(header menubar);
35 print $cgi->header, header('Agent Listing', menubar(
37 'Agent Types' => 'agent_type.cgi',
38 # 'Add new agent' => '../edit/agent.cgi'
40 Agents are resellers of your service. Agents may be limited to a subset of your
41 full offerings (via their type).<BR><BR>
44 <TH COLSPAN=2>Agent</TH>
46 <TH><FONT SIZE=-1>Freq. (unimp.)</FONT></TH>
47 <TH><FONT SIZE=-1>Prog. (unimp.)</FONT></TH>
50 # <TH><FONT SIZE=-1>Agent #</FONT></TH>
54 foreach $agent ( sort {
55 $a->getfield('agentnum') <=> $b->getfield('agentnum')
56 } qsearch('agent',{}) ) {
57 my($hashref)=$agent->hashref;
58 my($typenum)=$hashref->{typenum};
59 my($agent_type)=qsearchs('agent_type',{'typenum'=>$typenum});
60 my($atype)=$agent_type->getfield('atype');
63 <TD><A HREF="../edit/agent.cgi?$hashref->{agentnum}">
64 $hashref->{agentnum}</A></TD>
65 <TD><A HREF="../edit/agent.cgi?$hashref->{agentnum}">
66 $hashref->{agent}</A></TD>
67 <TD><A HREF="../edit/agent_type.cgi?$typenum">$atype</A></TD>
68 <TD>$hashref->{freq}</TD>
69 <TD>$hashref->{prog}</TD>
77 <TD COLSPAN=2><A HREF="../edit/agent.cgi"><I>Add new agent</I></A></TD>
78 <TD><A HREF="../edit/agent_type.cgi"><I>Add new agent type</I></A></TD>