function listUniqueTerms($p = 0, $l = 0)
{
    global $conn;
    ?>
<ul><?php 
    $lista = $conn->getUniqueTerms($p);
    foreach ($lista as $row) {
        ?>
<li><a href="<?php 
        echo getScriptName();
        ?>
?idt=<?php 
        echo $row['term_id'];
        ?>
"><?php 
        echo_utf8($row['name']);
        ?>
</a>
		<?php 
        listUniqueTerms($row['term_id']);
        ?>
</li>
	    <?php 
    }
    ?>
</ul><?php 
}
function listUniqueTerms($p = 0, $l = 0)
{
    global $conn;
    $tmpl = getTemplateContent('row_term_unique_1');
    $flds = $conn->getTemplateFields($tmpl);
    $rs = $conn->getUniqueTerms($p);
    while ($row = $rs->fetch_assoc()) {
        $list_txns = $conn->getTermTaxonomies($row['name']);
        $str_txns = "(" . count($list_txns) . ") ";
        $str_txns .= implode(', ', $list_txns);
        $term_meta = $conn->getTermMetaCSV($row['term_id']);
        $row['taxonomies'] = $str_txns;
        $row['term_meta'] = $term_meta;
        $row['indent'] = '';
        if ($l) {
            $row['indent'] = str_repeat('-', 4 * $l) . ' ';
        }
        $conn->output_row($tmpl, $flds, $row);
        listUniqueTerms($row['term_id'], $l + 1);
    }
}