当前位置: 首页>>代码示例>>PHP>>正文


PHP UserList::is_filtered方法代码示例

本文整理汇总了PHP中UserList::is_filtered方法的典型用法代码示例。如果您正苦于以下问题:PHP UserList::is_filtered方法的具体用法?PHP UserList::is_filtered怎么用?PHP UserList::is_filtered使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UserList的用法示例。


在下文中一共展示了UserList::is_filtered方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

    $UserList->cols[] = array('th' => T_('Actions'), 'th_class' => 'small', 'td_class' => 'shrinkwrap small', 'td' => action_icon(T_('Edit this user...'), 'edit', '%regenerate_url( \'ctrl,action\', \'ctrl=user&user_ID=$user_ID$&user_tab=profile\' )%') . action_icon(T_('Duplicate this user...'), 'copy', '%regenerate_url( \'ctrl,action\', \'ctrl=user&action=new&user_ID=$user_ID$&user_tab=profile\' )%') . '~conditional( (#user_ID# != 1) && (#user_ID# != ' . $current_User->ID . '), \'' . action_icon(T_('Delete this user!'), 'delete', '%regenerate_url( \'action\', \'action=delete&user_ID=$user_ID$&' . url_crumb('user') . '\' )%') . '\', \'' . get_icon('delete', 'noimg') . '\' )~');
}
if ($action == 'show_recent') {
    // Sort an users list by "Registered" field
    $UserList->set_order('user_created_datetime');
}
// Execute query
$UserList->query();
$filter_presets = array('all' => array(T_('All users'), get_dispctrl_url('users&filter=new')), 'men' => array(T_('Men'), get_dispctrl_url('users', 'gender_men=1&filter=new')), 'women' => array(T_('Women'), get_dispctrl_url('users', 'gender_women=1&filter=new')));
if (is_admin_page()) {
    // Add show only activated users filter only on admin interface
    $filter_presets['activated'] = array(T_('Activated users'), get_dispctrl_url('users', 'status_activated=1&filter=new'));
    if ($current_User->check_perm('users', 'edit')) {
        // Show "Reported Users" filter only for users with edit user permission
        $filter_presets['reported'] = array(T_('Reported users'), get_dispctrl_url('users', 'reported=1&filter=new'));
    }
}
if ($UserList->is_filtered()) {
    // Display link to reset filters only if some filter is applied
    $filter_presets['reset'] = array(T_('Reset Filters'), get_dispctrl_url('users&filter=reset'), 'class="floatright"');
}
$UserList->filter_area = array('callback' => 'callback_filter_userlist', 'url_ignore' => 'users_paged,u_paged,keywords', 'presets' => $filter_presets);
// Display result :
$UserList->display($display_params);
if ($current_User->check_perm('users', 'edit') && $UserList->result_num_rows > 0) {
    // Newsletter button
    echo '<p class="center">';
    echo '<input type="button" value="' . T_('Send newsletter to the current selection') . '" onclick="location.href=\'' . $admin_url . '?ctrl=newsletter\'" />';
    echo '</p>';
}
load_funcs('users/model/_user_js.funcs.php');
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:_user_list.view.php


注:本文中的UserList::is_filtered方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。