本文整理汇总了PHP中Institution::getInstsBySearch方法的典型用法代码示例。如果您正苦于以下问题:PHP Institution::getInstsBySearch方法的具体用法?PHP Institution::getInstsBySearch怎么用?PHP Institution::getInstsBySearch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Institution
的用法示例。
在下文中一共展示了Institution::getInstsBySearch方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Institution
$opInst = new Institution();
// get the search
$searchtext = "";
if ($_REQUEST["searchtext"]) {
$searchtext = $_REQUEST["searchtext"];
}
// sorting
$sortorder = "name";
if ($_REQUEST["sortorder"]) {
$sortorder = $_REQUEST["sortorder"];
}
// show all
if ($_REQUEST["showall"]) {
$searchtext = "*";
}
$totalItems = $opInst->getInstsBySearch("*", "", "pk", true, "db");
// get count of items
$output = "";
$items = array();
if ($searchtext) {
// no results without doing a search
$returnItems = "pk,name,type,rep_pk,repvote_pk";
$search = $searchtext;
if (strpos($searchtext, "=") === false) {
// there is not a specific search
$search = "name=*{$searchtext}*,type={$searchtext}*";
}
$items = $opInst->getInstsBySearch($search, $sortorder, $returnItems);
$output = "Returned " . count($items) . " items out of " . $totalItems['count'];
} else {
// end use ldap check
示例2: Institution
</div>
</td>
<td valign="top" width="20%">
<?php
if ($User->checkPerm("admin_accounts")) {
?>
<br/><br/><div class="login" style="padding:5px 15px;"><h3 align=center>Statistics:</h3>
<div class="loginheader">Accounts Admin</div>
<div class="padded">
<?php
$user_count = $User->getUsersBySearch("*", "", "pk", true);
$Inst = new Institution();
$inst_count = $Inst->getInstsBySearch("*", "", "pk", true);
?>
<strong>Accounts:</strong> <?php
echo $user_count['db'];
?>
<br/>
<?php
if ($USE_LDAP) {
?>
- LDAP: <?php
echo $user_count['ldap'];
?>
<br/>
<?php
}