Select Subject Area:


0) {
$myarray[] = $taxo_id;
$myarray[] = $sid;
$result = taxonomy_select_nodes($myarray , 'and');
} else {
$result = taxonomy_select_nodes(array($taxo_id));
}

function my_taxonomy_render_nodes($result) {

if (db_num_rows($result) > 0) {
while ($node = db_fetch_object($result)) {
$output .= node_view(node_load(array('nid' => $node->nid)), 1);
}
$output .= theme('pager', NULL, variable_get('default_nodes_main', 10), 0);
}
else {
$output .= t('There are currently no posts in this category.');
}
return $output;
}

function my_taxonomy_term_page($str_tids = '', $tagid, $sid, $featured = 0) {

$depth = 0;
$op = 'page';
$operator = 'and';

if (!is_array($str_tids)) {
$tids = explode(',', $str_tids);
}

echo "";

if ($tids) {
// Build title:

$result = db_query('SELECT name FROM {term_data} WHERE tid IN (%s)', implode(',', $tids));
$names = array();
while ($term = db_fetch_object($result)) {
$names[] = $term->name;
}

if ($names) {

$output = my_taxonomy_render_nodes(taxonomy_select_nodes($tids, $operator, $depth, TRUE));
$output = str_replace("?from=", "?sid=$sid&from=", $output);
if ($featured == 1) {
$output = str_replace('','Featured Report:', $output);
}
echo $output;
echo "

";

}
}
else {
drupal_not_found();
}
}

echo "
";
if ($sid == -1) {
my_taxonomy_term_page($featured_id, $tagid, $sid,1);
}
elseif ($sid == 0) {
my_taxonomy_term_page($taxo_id, $tagid, $sid);
} else {
my_taxonomy_term_page("$taxo_id, $sid", $tagid, $sid);
}
?>