2 <%= header("Agent Type Listing", menubar(
4 'Agents' => $p. 'browse/agent.cgi',
6 Agent types define groups of packages that you can then assign to particular
8 <A HREF="<%= $p %>edit/agent_type.cgi"><I>Add a new agent type</I></A><BR><BR>
12 <TH COLSPAN=2>Agent Type</TH>
13 <TH COLSPAN=2>Packages</TH>
17 foreach my $agent_type ( sort {
18 $a->getfield('typenum') <=> $b->getfield('typenum')
19 } qsearch('agent_type',{}) ) {
20 my($hashref)=$agent_type->hashref;
21 my(@type_pkgs)=qsearch('type_pkgs',{'typenum'=> $hashref->{typenum} });
22 my($rowspan)=scalar(@type_pkgs);
23 $rowspan = int($rowspan/2+0.5) ;
26 <TD ROWSPAN=$rowspan><A HREF="${p}edit/agent_type.cgi?$hashref->{typenum}">
29 <TD ROWSPAN=$rowspan><A HREF="${p}edit/agent_type.cgi?$hashref->{typenum}">$hashref->{atype}</A></TD>
34 foreach $type_pkgs ( @type_pkgs ) {
35 my($pkgpart)=$type_pkgs->getfield('pkgpart');
36 my($part_pkg) = qsearchs('part_pkg',{'pkgpart'=> $pkgpart });
37 print qq!<TR>! if ($tdcount == 0) ;
38 $tdcount = 0 if ($tdcount == -1) ;
39 print qq!<TD><A HREF="${p}edit/part_pkg.cgi?$pkgpart">!,
40 $part_pkg->getfield('pkg'),"</A></TD>";