$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
Beispiel #2
0
    </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 
    }