當前位置: 首頁>>代碼示例>>PHP>>正文


PHP AdminListBuilder::keyTime方法代碼示例

本文整理匯總了PHP中Admin\Builder\AdminListBuilder::keyTime方法的典型用法代碼示例。如果您正苦於以下問題:PHP AdminListBuilder::keyTime方法的具體用法?PHP AdminListBuilder::keyTime怎麽用?PHP AdminListBuilder::keyTime使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Admin\Builder\AdminListBuilder的用法示例。


在下文中一共展示了AdminListBuilder::keyTime方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: audit

 public function audit($page = 1, $r = 20)
 {
     $aAudit = I('audit', 0, 'intval');
     if ($aAudit == 3) {
         $map['status'] = array('in', array(-1, 2));
     } elseif ($aAudit == 2) {
         $map['dead_line'] = array('elt', time());
         $map['status'] = 2;
     } elseif ($aAudit == 1) {
         $map['status'] = -1;
     } else {
         $map['status'] = 2;
         $map['dead_line'] = array('gt', time());
     }
     list($list, $totalCount) = $this->newsModel->getListByPage($map, $page, 'update_time desc', '*', $r);
     $cates = array_column($list, 'category');
     $category = $this->newsCategoryModel->getCategoryList(array('id' => array('in', $cates), 'status' => 1), 1);
     $category = array_combine(array_column($category, 'id'), $category);
     foreach ($list as &$val) {
         $val['category'] = '[' . $val['category'] . '] ' . $category[$val['category']]['title'];
     }
     unset($val);
     $builder = new AdminListBuilder();
     $builder->title('資訊列表(審核通過的不在該列表中)')->data($list)->setStatusUrl(U('News/setNewsStatus'))->buttonEnable(null, '審核通過')->buttonModalPopup(U('News/doAudit'), null, '審核不通過', array('data-title' => '設置審核失敗原因', 'target-form' => 'ids'))->setSelectPostUrl(U('Admin/News/audit'))->select('', 'audit', 'select', '', '', '', array(array('id' => 0, 'value' => '待審核'), array('id' => 1, 'value' => '審核失敗'), array('id' => 2, 'value' => '已過期未審核'), array('id' => 3, 'value' => '全部審核')))->keyId()->keyUid()->keyText('title', '標題')->keyText('category', '分類')->keyText('description', '摘要')->keyText('sort', '排序');
     if ($aAudit == 1) {
         $builder->keyText('reason', '審核失敗原因');
     }
     $builder->keyTime('dead_line', '有效期至')->keyCreateTime()->keyUpdateTime()->keyDoActionEdit('News/editNews?id=###')->pagination($totalCount, $r)->display();
 }
開發者ID:chenyongze,項目名稱:bighaha,代碼行數:29,代碼來源:NewsController.class.php

示例2: field

 public function field($id, $page = 1, $r = 20)
 {
     $profile = D('field_group')->where('id=' . $id)->find();
     $map['status'] = array('egt', 0);
     $map['profile_group_id'] = $id;
     $field_list = D('field_setting')->where($map)->order("sort asc")->page($page, $r)->select();
     $totalCount = D('field_setting')->where($map)->count();
     $type_default = array('input' => L('_ONE-WAY_TEXT_BOX_'), 'radio' => L('_RADIO_BUTTON_'), 'checkbox' => L('_CHECKBOX_'), 'select' => L('_DROP-DOWN_BOX_'), 'time' => L('_DATE_'), 'textarea' => L('_MULTI_LINE_TEXT_BOX_'));
     $child_type = array('string' => L('_STRING_'), 'phone' => L('_PHONE_NUMBER_'), 'email' => L('_MAILBOX_'), 'number' => L('_NUMBER_'), 'join' => L('_RELATED_FIELD_'));
     foreach ($field_list as &$val) {
         $val['form_type'] = $type_default[$val['form_type']];
         $val['child_form_type'] = $child_type[$val['child_form_type']];
     }
     $builder = new AdminListBuilder();
     $builder->title('【' . $profile['profile_name'] . '】 字段管理');
     $builder->meta_title = $profile['profile_name'] . L('_FIELD_MANAGEMENT_');
     $builder->buttonNew(U('editFieldSetting', array('id' => '0', 'profile_group_id' => $id)))->buttonDelete(U('setFieldSettingStatus', array('status' => '-1')))->setStatusUrl(U('setFieldSettingStatus'))->buttonSort(U('sortField', array('id' => $id)))->button(L('_RETURN_'), array('href' => U('profile')));
     $builder->keyId()->keyText('field_name', L('_FIELD_NAME_'))->keyBool('visiable', L('_OPEN_YE_OR_NO_'))->keyBool('required', L('_WHETHER_THE_REQUIRED_'))->keyText('sort', L('_SORT_'))->keyText('form_type', L('_FORM_TYPE_'))->keyText('child_form_type', L('_TWO_FORM_TYPE_'))->keyText('form_default_value', L('_DEFAULT_'))->keyText('validation', L('_FORM_VERIFICATION_MODE_'))->keyText('input_tips', L('_USER_INPUT_PROMPT_'));
     $builder->keyTime("createTime", L('_CREATE_TIME_'))->keyStatus()->keyDoAction('User/editFieldSetting?profile_group_id=' . $id . '&id=###', L('_EDIT_'));
     $builder->data($field_list);
     $builder->pagination($totalCount, $r);
     $builder->display();
 }
開發者ID:naliduo,項目名稱:Lightweight-social-platform,代碼行數:23,代碼來源:UserController.class.php

示例3: field

 public function field($id, $page = 1, $r = 20)
 {
     $profile = D('field_group')->where('id=' . $id)->find();
     $map['status'] = array('egt', 0);
     $map['profile_group_id'] = $id;
     $field_list = D('field_setting')->where($map)->order("sort asc")->page($page, $r)->select();
     $totalCount = D('field_setting')->where($map)->count();
     $type_default = array('input' => '單行文本框', 'radio' => '單選按鈕', 'checkbox' => '多選框', 'select' => '下拉選擇框', 'time' => '日期', 'textarea' => '多行文本框');
     $child_type = array('string' => '字符串', 'phone' => '手機號碼', 'email' => '郵箱', 'number' => '數字', 'join' => '關聯字段');
     foreach ($field_list as &$val) {
         $val['form_type'] = $type_default[$val['form_type']];
         $val['child_form_type'] = $child_type[$val['child_form_type']];
     }
     $builder = new AdminListBuilder();
     $builder->title('【' . $profile['profile_name'] . '】 字段管理');
     $builder->meta_title = $profile['profile_name'] . '字段管理';
     $builder->buttonNew(U('editFieldSetting', array('id' => '0', 'profile_group_id' => $id)))->buttonDelete(U('setFieldSettingStatus', array('status' => '-1')))->setStatusUrl(U('setFieldSettingStatus'))->buttonSort(U('sortField', array('id' => $id)))->button('返回', array('href' => U('profile')));
     $builder->keyId()->keyText('field_name', "字段名稱")->keyBool('visiable', '是否公開')->keyBool('required', '是否必填')->keyText('sort', "排序")->keyText('form_type', '表單類型')->keyText('child_form_type', '二級表單類型')->keyText('form_default_value', '默認值')->keyText('validation', '表單驗證方式')->keyText('input_tips', '用戶輸入提示');
     $builder->keyTime("createTime", "創建時間")->keyStatus()->keyDoAction('User/editFieldSetting?profile_group_id=' . $id . '&id=###', '編輯');
     $builder->data($field_list);
     $builder->pagination($totalCount, $r);
     $builder->display();
 }
開發者ID:ccccy,項目名稱:wuanlife,代碼行數:23,代碼來源:UserController.class.php


注:本文中的Admin\Builder\AdminListBuilder::keyTime方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。