#!/usr/bin/perl -Tw # # agent.cgi: browse agent # # ivan@sisd.com 97-dec-12 # # changes to allow pages to load from a relative location in the web tree. # bmccane@maxbaud.net 98-mar-25 # # changed 'type' to 'atype' because type is reserved word in Pg6.3 # bmccane@maxbaud.net 98-apr-3 # # agent type was linking to wrong cgi ivan@sisd.com 98-jul-18 # # lose background, FS::CGI ivan@sisd.com 98-sep-2 # # $Log: agent.cgi,v $ # Revision 1.3 1998-11-08 10:11:02 ivan # CGI.pm # # Revision 1.2 1998/11/07 10:24:22 ivan # don't use depriciated FS::Bill and FS::Invoice, other miscellania # use strict; use CGI; use FS::UID qw(cgisuidsetup swapuid); use FS::Record qw(qsearch qsearchs); use FS::CGI qw(header menubar); my($cgi) = new CGI; &cgisuidsetup($cgi); print $cgi->header, header('Agent Listing', menubar( 'Main Menu' => '../', 'Agent Types' => 'agent_type.cgi', # 'Add new agent' => '../edit/agent.cgi' )), <
END # # my($agent); foreach $agent ( sort { $a->getfield('agentnum') <=> $b->getfield('agentnum') } qsearch('agent',{}) ) { my($hashref)=$agent->hashref; my($typenum)=$hashref->{typenum}; my($agent_type)=qsearchs('agent_type',{'typenum'=>$typenum}); my($atype)=$agent_type->getfield('atype'); print < END } print <
Agent Type Freq. (unimp.) Prog. (unimp.)
Agent #Agent $hashref->{agentnum} $hashref->{agent} $atype $hashref->{freq} $hashref->{prog}
Add new agent Add new agent type
END