示例#1
0
 public static function users($categories = array())
 {
     return \query\main::have_users($categories, array('only_count' => ''));
 }
示例#2
0
function have_users_custom($category = array())
{
    return \query\main::have_users($category);
}
示例#3
0
<form action="#" method="GET" autocomplete="off">
<input type="hidden" name="route" value="users.php" />
<input type="hidden" name="action" value="list" />';
        if (isset($_GET['orderby'])) {
            echo '<input type="hidden" name="orderby" value="' . htmlspecialchars($_GET['orderby']) . '" />';
        }
        if (isset($_GET['view'])) {
            echo '<input type="hidden" name="view" value="' . htmlspecialchars($_GET['view']) . '" />';
        }
        echo '<input type="search" name="search" value="' . (isset($_GET['search']) ? htmlspecialchars($_GET['search']) : '') . '" placeholder="' . $LANG['users_search_input'] . '" />
<button class="btn">' . $LANG['search'] . '</button>
</form>

</div>';
        $p = \query\main::have_users($options = array('per_page' => 10, 'referrer' => isset($_GET['referrer']) ? $_GET['referrer'] : '', 'show' => isset($_GET['view']) ? $_GET['view'] : '', 'search' => isset($_GET['search']) ? urldecode($_GET['search']) : ''));
        echo '<div class="results">' . ((int) $p['results'] === 1 ? sprintf($LANG['result'], $p['results']) : sprintf($LANG['results'], $p['results']));
        if (isset($_GET['referrer']) || isset($_GET['view']) || !empty($_GET['search'])) {
            echo ' / <a href="?route=users.php&amp;action=list">' . $LANG['reset_view'] . '</a>';
        }
        echo '</div>';
        if ($p['results']) {
            echo '<form action="?route=users.php&amp;action=list" method="POST">

<ul class="elements-list">

<li class="head"><input type="checkbox" checkall /> ' . $LANG['name'] . '</li>';
            $ab_edt = ab_to(array('users' => 'edit'));
            $ab_del = ab_to(array('users' => 'delete'));
            $ab_sm = ab_to(array('mail' => 'send'));
            if ($ab_edt || $ab_del) {