I'm wondering how this code can be changed to output multiple Types?:
sub html_new_records {
# --------------------------------------------------------
$in{$db_key} = "*";
# Change the number below to the number of most recent records you want to display
$in{'mh'} = 2;
$in{'so'} = "descend";
# Change the number below to the *number* of your counter field or date field
$in{'sb'} = 0;
my ($status, @hits) = &query("view");
my ($numhits) = ($#hits+1) / ($#db_cols+1);
my ($maxhits); $in{'mh'} ? ($maxhits = $in{'mh'}) : ($maxhits = $db_max_hits);
&html_print_headers;
print qq|
<html>
<head>
<title>$html_title: New Listings.</title>
</head>
<body bgcolor="#DDDDDD">
<blockquote>
<table border=1 bgcolor="#FFFFFF" cellpadding=5 cellspacing=3 width=500 valign=top>
<tr><td colspan=2 bgcolor="navy"><FONT FACE="MS Sans Serif, arial,helvetica" size=1 COLOR="#FFFFFF">
<b>$html_title: New Listings</b>
</font></td></tr>
</table>
<p>|;
if ($status ne "ok") {
print "<$font>There are no records in the database.</font>";
}
else {
print qq|<$font>These are the most recent additions to $html_title.</font>|;
# Go through each hit and convert the array to hash and send to
# html_record for printing.
for (0 .. $numhits - 1) {
print "<P>";
&html_record (&array_to_hash($_, @hits));
}
}
print qq|
<p>
<table border=0 bgcolor="#DDDDDD" cellpadding=5 cellspacing=3 width=500 valign=top>
<tr><td>|; &html_footer; print qq|</td></tr>
</table>
</blockquote>
</body>
</html>
|;
}
sub html_new_records {
# --------------------------------------------------------
$in{$db_key} = "*";
# Change the number below to the number of most recent records you want to display
$in{'mh'} = 2;
$in{'so'} = "descend";
# Change the number below to the *number* of your counter field or date field
$in{'sb'} = 0;
my ($status, @hits) = &query("view");
my ($numhits) = ($#hits+1) / ($#db_cols+1);
my ($maxhits); $in{'mh'} ? ($maxhits = $in{'mh'}) : ($maxhits = $db_max_hits);
&html_print_headers;
print qq|
<html>
<head>
<title>$html_title: New Listings.</title>
</head>
<body bgcolor="#DDDDDD">
<blockquote>
<table border=1 bgcolor="#FFFFFF" cellpadding=5 cellspacing=3 width=500 valign=top>
<tr><td colspan=2 bgcolor="navy"><FONT FACE="MS Sans Serif, arial,helvetica" size=1 COLOR="#FFFFFF">
<b>$html_title: New Listings</b>
</font></td></tr>
</table>
<p>|;
if ($status ne "ok") {
print "<$font>There are no records in the database.</font>";
}
else {
print qq|<$font>These are the most recent additions to $html_title.</font>|;
# Go through each hit and convert the array to hash and send to
# html_record for printing.
for (0 .. $numhits - 1) {
print "<P>";
&html_record (&array_to_hash($_, @hits));
}
}
print qq|
<p>
<table border=0 bgcolor="#DDDDDD" cellpadding=5 cellspacing=3 width=500 valign=top>
<tr><td>|; &html_footer; print qq|</td></tr>
</table>
</blockquote>
</body>
</html>
|;
}