本文整理汇总了PHP中thesaurus::get_status方法的典型用法代码示例。如果您正苦于以下问题:PHP thesaurus::get_status方法的具体用法?PHP thesaurus::get_status怎么用?PHP thesaurus::get_status使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类thesaurus
的用法示例。
在下文中一共展示了thesaurus::get_status方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: record
function record($id, $termType)
{
$uses = "";
$term = thesaurus::get_name($id);
$uses = extract_pattern($term, "/\\(BS[: ](?<use>.*)\\)/");
$recordArray = array();
$record = new simpleXmlElement("<record />");
// check if term already exists
// define array for record creation
$recordArray['input.name'] = "Thesaurus Redaktion";
$recordArray['input.date'] = date("Y-m-d", time());
$recordArray['input.time'] = date("h:i:s", time());
$recordArray['term.type'] = $termType;
$recordArray['term.status'] = thesaurus::get_status_name(thesaurus::get_status($id));
$recordArray['term'] = $term;
$recordArray['notes'] = thesaurus::get_comment($id);
$recordArray['broader_term'] = thesaurus::get_parent($id);
// $recordArray['narrower_term'] = thesaurus::get_child($id);
$recordArray['related_term'] = thesaurus::get_assoc($id);
$recordArray['used_for'] = $uses;
xml_insert($record->record, create_record($recordArray, $termType));
return $record;
}
示例2: display
//.........这里部分代码省略.........
}
}
// entry name
$textLength = strlen($entry[name]) * 15;
$textString = $entry[name];
// set style for selection
$styleString = "";
if (thesaurus::is_equivalent($id)) {
$styleString = "class='bright'";
}
if (thesaurus::is_descriptor($id)) {
$textString = strtoupper($textString);
}
if ($id == session::get("show")) {
$styleString = "class='select'";
} elseif ($cntParents > 1) {
$styleString = "class='multiple'";
}
if (!thesaurus::is_visible($id)) {
$styleString = "class='red'";
}
if (thesaurus::is_deleted($id)) {
$styleString = "class='through'";
}
// draw name with link
if ($pos == 0) {
$tempString .= form::link("", "<b><span {$styleString}>" . $textString . "</span></b>", "index.php?id={$id}&action=show", "name", "", $id);
} else {
$tempString .= form::link("", "<span {$styleString}>" . $textString . "</span>", "index.php?id={$id}&action=show", "name", "", $id);
}
// number of sub-objects
if ($cntChildren) {
$subText = "";
$listCnt = 0;
foreach ($childrenArray as $entry) {
$subText .= thesaurus::get_name($entry) . "<br>";
}
$tempString .= "<span ";
$tempString .= help::show("elementcount", $subText) . ">";
$tempString .= "<i class='small'>";
if ($cntChildren) {
$tempString .= " ({$cntChildren} UB)</i>";
}
$tempString .= "</span>";
}
// number of equiv-objects
if ($cntEquiv) {
$equivText = "";
$listCnt = 0;
foreach ($equivArray as $entry) {
$equivText .= thesaurus::get_name($entry) . "<br>";
}
$tempString .= "<span ";
$tempString .= help::show("equivcount", $equivText) . ">";
$tempString .= "<i class='small'>";
if ($cntEquiv) {
$tempString .= " ({$cntEquiv} BS)</i>";
}
$tempString .= "</span>";
}
// Count of containing elements
// show owner
$ownerID = thesaurus::get_owner($entry[ID]);
$infoText = "ID: " . $id;
$infoText .= "<br>Status: " . thesaurus::get_status_name(thesaurus::get_status($id));
// $infoText .= "<br>Begriffstyp: " . thesaurus::get_entrytype_name(thesaurus::get_entrytype($id));
$infoText .= "<br>Ersteller: " . user::name($ownerID);
$tempString .= " " . form::link("", "?", "", "owner", $infoText);
// Edit Link
$tempString .= form::link("add", "add", "index.php?parent={$id}&action=add", "add");
// Delete Link
if ($cntChildren == 0) {
$javaText = "Wollen Sie " . $entry[name] . " wirklich löschen? Es werden auch alle Links zu diesem Eintrag gelöscht";
$tempString .= form::link("delete", "x", "javascript:get_confirm("{$javaText}","index.php?action=deleteid&id={$id}");", "delete");
}
// Link Link
if (session::get("link") and $id != session::get("link")) {
if (!thesaurus::is_parent_of(session::get("link"), $id) or session::get(linkaction) == "change") {
$linkType = "do" . thesaurus::get_type_name(session::get("linktype"));
$tempString .= form::link($linkType, "L", "index.php?id={$id}&linkaction=linkdo", "{$linkType}");
}
}
$line->insert($tempString);
// Insert text in line
$tempString = "";
// recursive display subtree
if (thesaurus::is_open($id)) {
// recursive call of level
if (thesaurus::child_num($id, 1)) {
hyrarchy::display_line($line);
hyrarchy::display($id, $depth, $pos + 1, $errorArray);
}
}
}
// display line
hyrarchy::display_line($line);
}
}
}
}
示例3: 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);
}
//.........这里部分代码省略.........
示例4: descriptor
function descriptor($id, $name, $error)
{
echo "<fieldset><legend>";
//-----------------
if (!thesaurus::is_descriptor($id)) {
$checkString = "";
echo "kein ";
} else {
$checkString = " checked";
}
echo "Begriff";
if (!thesaurus::is_visible($id)) {
echo " <span class='red'>(versteckt)</span>";
}
echo "</legend>";
// descriptor value
echo form::field("text", "name", $name, 30, "class='{$error}'", "", "", $help = "name-field");
// display ID
echo "<span class='small'>ID = {$id}</span>";
// open tree
echo form::link("opentree", "[+]", "index.php?action=showhyrarchy&id={$id}", "opentree");
// exit edit mode
if (right::write()) {
action::edit();
}
// delete entry
if (thesaurus::child_num($id, 1) == 0) {
$javaText = "Wollen Sie " . $name . " wirklich löschen? Es werden auch alle Links zu diesem Eintrag gelöscht";
echo form::link("delete", "x", "javascript:get_confirm("{$javaText}","index.php?action=deleteid&id={$id}");", "delete");
}
echo "<br>";
// type of descriptor
/* $typeArray = thesaurus::get_type_list();
$entryType = thesaurus::get_entrytype($id);
$entryTypeName = thesaurus::get_entrytype_name($entryType);
$javaText = "Wollen Sie wirklich allen Unterbegriffen von " . $name . " den Begriffstyp " . $entryTypeName . " zuweisen?";
echo form::selector("entrytype",$typeArray,1,"",$entryType,"<span class='small'>Begriffstype</span><br>","","entrytype");
// herite to all childs
echo form::link("inheritance"," Begriffstyp vererben","javascript:get_confirm("$javaText","index.php?id=$id&entrytype=$entryType&action=inherit");","inheritance");
*/
echo "<span class='normal'><i>" . thesaurus::get_name(thesaurus::get_thesaurus($id)) . "</i></span>";
echo "<br>";
// status of descriptor
$statusArray = thesaurus::get_status_list();
echo form::selector("status", $statusArray, 1, "", thesaurus::get_status($id), "<span class='small'>Status</span><br>", "", "statustype");
echo "<br>";
// descriptor is default value for ordered entries
// default place for kandidates defined
$orderDefault = system::getval("val_orderdefault");
if ($orderDefault) {
if (intval($orderDefault) == $id) {
$checkedString = "checked='checked'";
} else {
$defaultString = "<br>(derzeit: <i>'";
$defaultString .= "<a href='index.php?id={$orderDefault}&action=show'>";
$defaultString .= thesaurus::get_name($orderDefault);
$defaultString .= "</a>";
$defaultString .= "'</i>)";
}
} else {
$defaultString = "<br>(Kein Ort für Kandidaten festgelegt)";
}
echo form::field("checkbox", "orderdefault", $id, "", $checkedString, "", "als Standard für Kandidaten festlegen {$defaultString}", "orderdefault");
echo "</fieldset>";
}