本文整理匯總了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();
}