Commit 3df9764d by 冷斌

update

parent c0843de1
......@@ -6,6 +6,11 @@
<li class="active"><a href="{:U('Vip/user_index')}">列表</a></li>
<li><a href="{:U('Vip/user_add')}">添加</a></li>
</ul>
<form class="well form-search" name="form1" method="post" action="{:U('Vip/user_index')}">
关键字:
<input type="text" name="keyword" style="width: 200px;" value="{$formget.keyword}" placeholder="请输入会员id、昵称...">
<input type="submit" class="btn btn-primary" value="搜索">
</form>
<form method="post" class="js-ajax-form" action="{:U('Vip/user_listorders')}">
<table class="table table-hover table-bordered">
<thead>
......
......@@ -128,11 +128,16 @@ class VipController extends AdminbaseController {
}
function user_index(){
$map = [];
if($_REQUEST['keyword']!=''){
$map['uid|user_nicename']=array("like","%".$_REQUEST['keyword']."%");
$_GET['keyword']=$_REQUEST['keyword'];
}
$Vip_u=M("users_vip");
$count=$Vip_u->count();
$count=$Vip_u->where($map)->count();
$page = $this->page($count, 20);
$lists = $Vip_u
->where($map)
->order("endtime desc")
->limit($page->firstRow . ',' . $page->listRows)
->select();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment