本文整理汇总了PHP中thesaurus::get_link方法的典型用法代码示例。如果您正苦于以下问题:PHP thesaurus::get_link方法的具体用法?PHP thesaurus::get_link怎么用?PHP thesaurus::get_link使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类thesaurus
的用法示例。
在下文中一共展示了thesaurus::get_link方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: descriptor
function descriptor($id, $highlight = "", $view = "")
{
echo "<div id='export'>";
$dataArray = thesaurus::get_descriptor($id);
$linkArray = thesaurus::get_link($id, session::get(descriptor));
$separator = FALSE;
$isDescriptor = thesaurus::is_descriptor($id);
//------------------------------------------------------------------------------
// icons for actions
echo "<p>";
if ($view) {
echo "<div id='box'>";
echo "<table width='100%'><tr>";
echo "<td>";
echo form::link("opentree", "[+]", "index.php?action=showhyrarchy&id={$id}", "opentree");
// open hyrarchy tree
echo " " . form::link("edit", "edit", "index.php?action=edit&id={$id}", "edit");
// link icons
echo " " . form::link("link", "OB", "index.php?linkaction=link&link={$id}&id={$id}&linktype=1", "newlink_1");
echo " " . form::link("equiv", "BS", "index.php?linkaction=link&link={$id}&id={$id}&linktype=2", "newlink_2");
echo " " . form::link("assoc", "VB", "index.php?linkaction=link&link={$id}&id={$id}&linktype=3", "newlink_3");
echo " " . form::link("add", "add", "index.php?action=add&parent={$id}", "add");
echo "</td>";
// print tree
echo "<td>";
echo " " . form::link("", "txt", "csv.php?id={$id}&type=txt", "csv");
echo "</td>";
// print csv
echo "<td>";
echo " " . form::link("", "csv", "csv.php?id={$id}&type=csv", "csv");
echo "</td>";
echo "<td align='right'>";
// export Adlib
echo "<td>";
echo " " . form::link("", "adlib", "csv.php?id={$id}&type=adlib", "adlib");
echo "</td>";
// set link
$linkType = session::get(linktype);
$linkIcon = array("", "dolink", "doequiv", "doassoc");
if (session::get(link) != $id and session::get(link)) {
echo "mit <b>'" . thesaurus::name(session::get(link)) . "'</b>' verknüpfen";
echo " " . form::link($linkIcon[$linkType], $linkType, "index.php?linkaction=linkdo&id={$id}", $linkIcon[$linkType]);
echo " " . form::link("delete", "end", "index.php?linkaction=linkend", "end-linking");
}
echo "</td>";
echo "</tr></table>";
echo "</div>";
}
echo "</p>";
//------------------------------------------------------------------------------
// display name
echo "<p>";
echo "<span class='exporthead'><b>";
$tempString = highlight($highlight, $dataArray[name], $isDescriptor);
echo "<a href='index.php?action=show&id={$id}'>";
echo $tempString;
// if javascript -> direkt edit
if (session::get(JS)) {
}
echo grafik::disp("edit", "edit", 15);
echo "</a>";
echo "</b>";
// display status of descriptor
echo " <i>(" . thesaurus::get_status_name(thesaurus::get_status($id)) . ")</i>";
// mark if kandidate
if (!thesaurus::is_visible($id)) {
echo "<br><span class='red'>versteckt</span>";
}
echo "</span>";
// display type of descriptor
echo "<br><i>" . thesaurus::get_name(thesaurus::get_thesaurus($id)) . "</i>";
echo "</p>";
//------------------------------------------------------------------------------
// display comment
echo "<p>";
if ($dataArray[comment]) {
echo "<tr><td></td>";
echo "<td class='export'>";
echo nl2br(highlight($highlight, $dataArray[comment]));
echo "</td></tr>";
}
echo "</p>";
//------------------------------------------------------------------------------
// get link data for descriptor
$parentArray = $linkArray[parent];
$childArray = $linkArray[child];
$assocArray = $linkArray[assoc];
$equivArray = $linkArray[equiv];
//------------------------------------------------------------------------------
// list synonyms
echo "<table>";
if ($equivArray) {
// sort for use and used for
$x = $y = 0;
foreach ($equivArray as $entry) {
if ($entry > 0) {
$forArray[$x++] = $entry;
} else {
$retArray[$x++] = abs($entry);
}
//.........这里部分代码省略.........