本文整理汇总了PHP中Admin\Builder\AdminListBuilder::search方法的典型用法代码示例。如果您正苦于以下问题:PHP AdminListBuilder::search方法的具体用法?PHP AdminListBuilder::search怎么用?PHP AdminListBuilder::search使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Admin\Builder\AdminListBuilder
的用法示例。
在下文中一共展示了AdminListBuilder::search方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: scoreLog
public function scoreLog($r = 20, $p = 1)
{
if (I('type') == 'clear') {
D('ScoreLog')->where(array('id>0'))->delete();
$this->success('清空成功。', U('scoreLog'));
exit;
} else {
$aUid = I('uid', 0, '');
if ($aUid) {
$map['uid'] = $aUid;
}
$listBuilder = new AdminListBuilder();
$listBuilder->title('积分日志');
$map['status'] = array('gt', -1);
$scoreLog = D('ScoreLog')->where($map)->order('create_time desc')->findPage($r);
$scoreTypes = D('Ucenter/Score')->getTypeListByIndex();
foreach ($scoreLog['data'] as &$v) {
$v['adjustType'] = $v['action'] == 'inc' ? '增加' : '减少';
$v['scoreType'] = $scoreTypes[$v['type']]['title'];
$class = $v['action'] == 'inc' ? 'text-success' : 'text-danger';
$v['value'] = '<span class="' . $class . '">' . ($v['action'] == 'inc' ? '+' : '-') . $v['value'] . $scoreTypes[$v['type']]['unit'] . '</span>';
$v['finally_value'] = $v['finally_value'] . $scoreTypes[$v['type']]['unit'];
}
$listBuilder->data($scoreLog['data']);
$listBuilder->keyId()->keyUid('uid', '用户')->keyText('scoreType', '积分类型')->keyText('adjustType', '调整类型')->keyHtml('value', '积分变动')->keyText('finally_value', '积分最终值')->keyText('remark', '变动描述')->keyCreateTime();
$listBuilder->pagination($scoreLog['count'], $r);
$listBuilder->search(L('_SEARCH_'), 'uid', 'text', '输入UID');
$listBuilder->button('清空日志', array('url' => U('scoreLog', array('type' => 'clear')), 'class' => 'btn ajax-get confirm'));
$listBuilder->display();
}
}
示例2: alipayList
public function alipayList($r = 15, $page = 1)
{
$aBuyerEmail = I('buyer_email', '', 'op_t');
if ($aBuyerEmail != '') {
$map['buyer_email'] = array('like', '%' . $aBuyerEmail . '%');
}
$listBuilder = new AdminListBuilder();
$recordModel = D('recharge_record_alipay');
$data = $recordModel->where($map)->order('notify_time desc')->page($page, $r)->select();
$totalCount = $recordModel->where($map)->count();
foreach ($data as &$v) {
$v['is_success'] = $v['is_success'] == 'T' ? 1 : 0;
}
unset($v);
$listBuilder->title('支付宝充值订单');
$listBuilder->keyId()->keyText('out_trade_no', '订单编号')->keyText('buyer_email', '付款人支付宝')->keyText('seller_email', '收款账户')->keyText('total_fee', '充值金额')->keyText('trade_no', '支付宝订单号')->keyBool('is_success', '支付成功')->keyTime('notify_time', '付款时间');
$listBuilder->search('付款人支付宝', 'buyer_email');
$listBuilder->data($data)->pagination($totalCount, $r);
$listBuilder->display();
}
示例3: infoTrash
public function infoTrash($entity_id = 0, $page = 1, $r = 20, $title = '')
{
$listBuilder = new AdminListBuilder();
$listBuilder->clearTrash('CatInfo');
$entity_id = intval($entity_id);
$map['status'] = array('eq', -1);
if ($title != '') {
$map['title'] = array('like', "%{$title}%");
}
if ($entity_id != 0) {
$map['entity_id'] = $entity_id;
$list = M('cat_info')->where($map)->order('create_time desc')->page($page, $r)->select();
$totalCount = M('cat_info')->where($map)->count();
$entity = M('cat_entity')->find($entity_id);
foreach ($list as &$v) {
$v['entity_alias'] = $entity['alias'];
}
unset($v);
} else {
$list = M('cat_info')->where($map)->order('create_time desc')->page($page, $r)->select();
$totalCount = M('cat_info')->where($map)->count();
}
$listBuilder->ajaxButton(U('setInfoField'), array('field' => 'status', 'value' => 1), '还原')->buttonClear('');
$listBuilder->title('信息回收站')->keyId()->keyLink('entity_alias', '信息模型', '?entity_id={$entity_id}')->keyTitle()->keyStatus()->keyBool('top', '置顶')->keyBool('recom', '推荐');
$listBuilder->search('搜索', 'title', null, '标题');
$listBuilder->data($list)->pagination($totalCount, $r)->display();
}