本文整理匯總了PHP中thesaurus::validate方法的典型用法代碼示例。如果您正苦於以下問題:PHP thesaurus::validate方法的具體用法?PHP thesaurus::validate怎麽用?PHP thesaurus::validate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類thesaurus
的用法示例。
在下文中一共展示了thesaurus::validate方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: action
//.........這裏部分代碼省略.........
session::destroy("searchshow");
$_arg[linkaction] = "";
if ($_arg[id] == NULL) {
break;
} elseif ($_arg[id] > 0) {
session::set("show", $_arg[id]);
break;
} else {
session::delete("show");
break;
}
break;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
case swap:
if ($_arg[id]) {
thesaurus::swap_link($_arg[id], $_arg[_ID]);
}
break;
case change:
if ($_arg[id]) {
// thesaurus::change_link($_arg);
}
break;
case add:
// add new descriptor
session::destroy("show");
session::destroy("searchshow");
// session::set("",1);
break;
// clean database
// clean database
case correct:
thesaurus::validate(true);
echoalert("Datenbank bereinigt");
break;
//------------------------------------------------------------------------------
// open hyrarchy down to selected entry
//------------------------------------------------------------------------------
// open hyrarchy down to selected entry
case showhyrarchy:
if ($_arg[id]) {
$hyrarchyArray = thesaurus::get_hyrarchy($_arg[id]);
// don't open selected entry
// array_pop($hyrarchyArray);
foreach ($hyrarchyArray as $entry) {
// echo $entry . " ";
echo session::open($entry);
}
session::set("hyrarchy", TRUE);
// hide search window
session::destroy("searchshow");
// if nothing selected for display, show ID
if (!session::get(show)) {
session::set("show", $_arg[id]);
}
break;
}
//------------------------------------------------------------------------------
// debug on/off
//------------------------------------------------------------------------------
// debug on/off
case debugon:
system::setval(debug, TRUE);
break;
case debugoff:
示例2: database
?>
</noscript>
</head>
<body>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>
<?php
//echoalert($_JS);
// connect database
$daba = new database();
$daba->connect("localhost", "iggmp", "1s87J37r0");
$daba->select("thesaurus");
if (right::link()) {
thesaurus::validate();
}
// show login or logged user
user::show();
// headline
?>
<div id='header'>
<a href='index.php'>OpenThesaurus</a><br>
<?php
// show count of entries
echo " <i class='normal'>(";
echo database::count() . " Einträge mit ";
echo database::linkcount() . " Verknüpfungen";
echo ")</i>";
?>