<p>
<br />
<?php
$result = db_query('SELECT v.vid, v.path, v.view, v.node_count, v.type, v.enabled, vv.name FROM vocabindex v LEFT JOIN vocabulary vv ON v.vid = vv.vid LEFT JOIN vocabulary_node_types vn ON vv.vid = vn.vid WHERE enabled = 1 AND (vn.type = "toponimo" OR vn.type = "lekukotasun") GROUP BY vv.vid');
$views = array();
while($row = db_fetch_object($result)){
$views[] = l($row->name, $_GET['q'], array('query' => "sail=$row->vid"));
}
$title = 'Toponimia sailkapenak';
$output = '<div class="links">'. join($views, '| ').'</div>';
if(isset($_GET['sail'])){
$vocabulary = taxonomy_vocabulary_load($_GET['sail']);
include(drupal_get_path('module', 'vocabindex').'/vocabindex.view.inc');
$output .= vocabindex_view_page($_GET['sail'], VOCABINDEX_VOC);
$title .= ": $vocabulary->name";
}
drupal_set_title($title);
print $output;
?></p>