后台会员管理增加已分类会员和未分类会员搜索

2016-07-07 15:02 来源:www.chinab4c.com 作者:ecshop专家

首先在users.php文件的底36行加入
$ranks[-1] ='未分配等级';
$ranks[-2] ='已分配等级';

然后在function user_list() 函数
把这里改一下
if ($filter['rank'])
{
$sql = "SELECT min_points, max_points, special_rank FROM ".$GLOBALS['ecs']->table('user_rank')." WHERE rank_id = '$filter[rank]'";
$row = $GLOBALS['db']->getRow($sql);
if ($row['special_rank'] > 0)
{
/* 特殊等级 */
$ex_where .= " AND user_rank = '$filter[rank]' ";
}
else
{
$ex_where .= " AND rank_points >= " . intval($row['min_points']) . " AND rank_points < " . intval($row['max_points']);
}
}

改成

if ($filter['rank'])
{
if($filter['rank']==-1){
$sql = "SELECT min_points, max_points, special_rank FROM ".$GLOBALS['ecs']->table('user_rank')." WHERE rank_id ='0'";
}
else if($filter['rank']==-2)
{$sql = "SELECT min_points, max_points, special_rank FROM ".$GLOBALS['ecs']->table('user_rank')." WHERE rank_id <>'0'";
}
else{
$sql = "SELECT min_points, max_points, special_rank FROM ".$GLOBALS['ecs']->table('user_rank')." WHERE rank_id = '$filter[rank]'";
}
$row = $GLOBALS['db']->getRow($sql);
if ($row['special_rank'] > 0)
{
/* 特殊等级 */
if($filter['rank']==-2){
$ex_where .= " AND user_rank <>'0' ";
}
else{
$ex_where .= " AND user_rank = '$filter[rank]' ";
}
}
else
{
if($filter['rank']==-1){
$ex_where .= " AND user_rank ='0' ";
}

else{
$ex_where .= " AND rank_points >= " . intval($row['min_points']) . " AND rank_points < " . intval($row['max_points']);
}
}
}

回答:
支持共享支持楼主

支持楼主很实用的功能,学习中!

收藏一下,感谢LZ共享



不知这个有什么用途?
2.72版的后台已经有注册用户、VIP用户、代销用户的分类搜索。

2.72后台——》会员注册项设置
增加了添加会员注册项的功能,如果我添加了“真实姓名”的注册项,请问如何在后台的会员管理增加真实姓名的搜索?