get_parms( "bid" , "piv" , "tid" ); ?> <?php echo p4string::MakeString(_('thesaurus:: Lier la branche de thesaurus au champ')) ?> get_databox((int) $parm['bid']); $domstruct = $databox->get_dom_structure(); $domth = $databox->get_dom_thesaurus(); if ($domstruct && $domth) { $xpathth = new DOMXPath($domth); $xpathstruct = new DOMXPath($domstruct); if ($parm["tid"] !== "") $q = "//te[@id='" . $parm["tid"] . "']"; else $q = "//te[not(@id)]"; $nodes = $xpathth->query($q); $fullBranch = ""; if ($nodes->length == 1) { for ($n = $nodes->item(0); $n && $n->nodeType == XML_ELEMENT_NODE && $n->getAttribute("id") !== ""; $n = $n->parentNode) { $sy = $xpathth->query("sy", $n)->item(0); $sy = $sy ? $sy->getAttribute("v") : ""; if ( ! $sy) $sy = $sy = "..."; $fullBranch = " / " . $sy . $fullBranch; } } ?>
"> "> "> " . $fullBranch . "
"; printf(_('thesaurus:: Lier la branche de thesaurus au champ %s'), $fbhtml); ?>
query("/record/description/*"); for ($i = 0; $i < $nodes->length; $i ++ ) { $fieldname = $nodes->item($i)->nodeName; $tbranch = $nodes->item($i)->getAttribute("tbranch"); $ck = ""; if ($tbranch) { // ce champ a deje un tbranch, est-ce qu'il pointe sur la branche selectionnee ? $thnodes = $xpathth->query($tbranch); for ($j = 0; $j < $thnodes->length; $j ++ ) { if ($thnodes->item($j)->getAttribute("id") == $parm["tid"]) { $ck = "checked"; } } } printf("\t\t%s
\n" , $fieldname, $ck, $ck ? "1" : "0", $fieldname); } ?>