當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Institution::getInstsBySearch方法代碼示例

本文整理匯總了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
開發者ID:azeckoski,項目名稱:az-php-sandbox,代碼行數:31,代碼來源:admin_insts.php

示例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) {
        ?>
	&nbsp;&nbsp;- LDAP: <?php 
        echo $user_count['ldap'];
        ?>
<br/>
<?php 
    }
開發者ID:azeckoski,項目名稱:az-php-sandbox,代碼行數:31,代碼來源:index.php


注:本文中的Institution::getInstsBySearch方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。