本文整理匯總了PHP中thesaurus::newstatus方法的典型用法代碼示例。如果您正苦於以下問題:PHP thesaurus::newstatus方法的具體用法?PHP thesaurus::newstatus怎麽用?PHP thesaurus::newstatus使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類thesaurus
的用法示例。
在下文中一共展示了thesaurus::newstatus方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: insert_entry
function insert_entry($_arg, $errorArray, $value = "")
{
if ($_arg[action] == 'add' or $_arg[action] == 'insert' and $errorArray) {
// set default value
if ($value) {
$_arg[name] = $value;
}
echo "<form name='descriptor' method='get' action='index.php'>";
$name = thesaurus::name($_arg[parent]);
if ($name) {
echo "<p><b>Neuen Unterbegriff in '<span class='red'>";
echo "<a href='index.php?action=show&id={$_arg['parent']}'>{$name}</a>";
echo "</span>' ";
if (right::link()) {
echo "anlegen";
} else {
echo "vorschlagen";
}
echo "</b></p>";
} else {
echo "<p><b>Neuen Thesaurus anlegen</b></p>";
}
$error = $errorArray[name];
// name of new descriptor
echo form::field("text", "name", $_arg[name], 30, "class='{$error}'", "<span class='small'>Name</span><br>", "", "name-field");
switch ($error) {
case exist:
echo "<br><b class='exist'>Eintrag existiert schon</b>";
echo form::link("", " Eintrag ansehen", "index.php?action=suchen&searchString={$_arg['name']}&searchtype=2", "showexist");
break;
case alike:
/* echo "<br><b class='exist'>Ähnliche Einträge existiert schon</b>";
echo form::link(""," Einträge ansehen","index.php?action=suchen&searchString=$_arg[name]&searchtype=1","showalike");
*/
break;
default:
break;
}
echo "<br>";
// type of descriptor
/* $typeArray = thesaurus::get_type_list();
$entryType = thesaurus::get_entrytype($_arg[parent]);
echo form::selector("entrytype",$typeArray,1,"",$entryType[entrytype],"<span class='small'>Begriffstype</span><br>","","entrytype");
*/
echo "<br>";
// status of descriptor
if (right::write()) {
$statusArray = thesaurus::get_status_list();
echo form::selector("status", $statusArray, 1, "", thesaurus::get_status($id), "<span class='small'>Status</span><br>", "", "statustype");
} else {
echo "<span class='small'>Status</span><br><span class='normal'>" . thesaurus::get_status_name(thesaurus::newstatus()) . "</span>";
echo form::field("hidden", "status", thesaurus::newstatus());
}
echo "</p>";
$error = $errorArray[comment];
// comment field
echo form::textfield("comment", $_arg[comment], 45, 3, "class='{$error}'", "Bemerkungen<br>", "", "comment-field");
echo form::field("submit", "", "anlegen", "", "", "", "", "new");
echo form::field("hidden", "parent", $_arg[parent]);
echo form::field("hidden", "id", $_arg[id]);
echo form::field("hidden", "action", "insert");
echo form::field("hidden", "type", 1);
echo "</form>";
}
}