Ejemplo n.º 1
0
 /**
  * 获取批号卡里的详细信息
  * @param array $batchNum
  */
 public function getBatchNumData($batchNum)
 {
     $dataList = $this->select("select * from {$this->tName()} where batch_num='{$batchNum}'");
     if ($dataList) {
         $cardType = $this->_getGlobalData('frg_gold_card_type');
         $serverList = $this->_getGlobalData('gameser_list');
         foreach ($dataList as &$list) {
             Tools::import('Util_FontColor');
             $users = $this->_getGlobalData('user');
             $list['word_is_use'] = Util_FontColor::getFrgPayCardStatus($list['is_use']);
             $list['user_ip'] = $list['user_ip'] ? long2ip($list['user_ip']) : '';
             $list['word_type'] = Util_FontColor::getFrgCardType($list['type']);
             $list['word_card_type'] = $cardType[$list['card_type']];
             $list['word_use_server_id'] = $serverList[$list['use_server_id']]['full_name'];
             $list['start_time'] = $list['start_time'] ? date('Y-m-d H:i:s', $list['start_time']) : '';
             $list['end_time'] = $list['end_time'] ? date('Y-m-d H:i:s', $list['end_time']) : '';
             $list['create_time'] = date('Y-m-d H:i:s', $list['create_time']);
             $list['use_time'] = $list['use_time'] ? date('Y-m-d H:i:s', $list['use_time']) : '';
             $list['word_apply_user_id'] = $users[$list['apply_user_id']]['nick_name'];
         }
     }
     return $dataList;
 }
Ejemplo n.º 2
0
 /**
  * 我申请的卡号
  */
 public function actionMyApplyCard()
 {
     $this->_checkOperatorAct(2);
     $this->_utilRbac = $this->_getGlobalData('Util_Rbac', 'object');
     $userClass = $this->_utilRbac->getUserClass();
     $payType = Tools::getLang('CARD_TYPE', __CLASS__);
     $cardType = $this->_getGlobalData('frg_gold_card_type');
     $serverList = $this->_getGlobalData('gameser_list');
     $this->_modelGoldCard = $this->_getGlobalData('Model_GoldCard', 'object');
     $helpSqlSearch = $this->_loadCore('Help_SqlSearch');
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->_modelGoldCard->tName());
     $helpSqlSearch->set_conditions('game_type=' . self::GAME_ID);
     $helpSqlSearch->set_conditions("apply_user_id={$userClass['_id']}");
     if ($_GET['is_use'] != '') {
         $helpSqlSearch->set_conditions("is_use='{$_GET['is_use']}'");
         $this->_view->assign('selectedIsUse', $_GET['is_use']);
     }
     if ($_GET['card_type']) {
         $helpSqlSearch->set_conditions("card_type={$_GET['card_type']}");
         $this->_view->assign('selectedCardType', $_GET['card_type']);
     }
     if ($_GET['type'] != '') {
         $helpSqlSearch->set_conditions("type={$_GET['type']}");
         $this->_view->assign('selectedPayType', $_GET['type']);
     }
     if ($_GET['operator_id']) {
         $helpSqlSearch->set_conditions("operator_id={$_GET['operator_id']}");
         $this->_view->assign('selectedOperatorId', $_GET['operator_id']);
     }
     if ($_GET['card']) {
         $helpSqlSearch->set_conditions("card='{$_GET['card']}'");
         $this->_view->assign('selectedCard', $_GET['card']);
     }
     if ($_GET['batch_num']) {
         $helpSqlSearch->set_conditions("batch_num='{$_GET['batch_num']}'");
         $this->_view->assign('selectedBatchnum', $_GET['batch_num']);
     }
     if ($_GET['group_batch']) {
         $helpSqlSearch->set_groupBy("batch_num");
         $this->_view->assign('selectedGroupBatch', true);
     }
     $helpSqlSearch->setPageLimit($_GET['page'], PAGE_SIZE);
     $conditions = $helpSqlSearch->get_conditions();
     $helpSqlSearch->set_orderBy('Id desc');
     $sql = $helpSqlSearch->createSql();
     $dataList = $this->_modelGoldCard->select($sql);
     if ($dataList) {
         $operatorList = Model::getTtwoArrConvertOneArr($this->_getGlobalData('operator_list'), 'Id', 'operator_name');
         foreach ($dataList as &$list) {
             Tools::import('Util_FontColor');
             $list['word_operator_id'] = $operatorList[$list['operator_id']];
             $list['word_is_use'] = Util_FontColor::getFrgPayCardStatus($list['is_use']);
             $list['user_ip'] = $list['user_ip'] ? long2ip($list['user_ip']) : '';
             $list['word_type'] = Util_FontColor::getFrgCardType($list['type']);
             $list['word_card_type'] = $cardType[$list['card_type']];
             $list['word_use_server_id'] = $serverList[$list['use_server_id']]['full_name'];
             $list['start_time'] = $list['start_time'] ? date('Y-m-d H:i:s', $list['start_time']) : '';
             $list['end_time'] = $list['end_time'] ? date('Y-m-d H:i:s', $list['end_time']) : '';
             $list['create_time'] = date('Y-m-d H:i:s', $list['create_time']);
             $list['use_time'] = $list['use_time'] ? date('Y-m-d H:i:s', $list['use_time']) : '';
             $list['url_export'] = Tools::url(CONTROL, 'Export', array('batch_num' => $list['batch_num']));
             $list['word_apply_user_id'] = $userClass['_nickName'];
         }
         $this->_view->assign('dataList', $dataList);
         $this->_loadCore('Help_Page');
         $helpPage = new Help_Page(array('total' => $this->_modelGoldCard->findCount($conditions), 'perpage' => PAGE_SIZE));
         $this->_view->assign('pageBox', $helpPage->show());
     }
     $this->_view->assign('cardStatus', array('0' => Tools::getLang('NOT_USE', 'Common'), '1' => Tools::getLang('USE', 'Common'), '' => Tools::getLang('ALL', 'Common')));
     $this->_view->assign('payType', $payType);
     $cardType[''] = Tools::getLang('ALL', 'Common');
     $this->_view->assign('cardType', $cardType);
     $this->_view->set_tpl(array('body' => self::PACKAGE . '/' . self::GOLD . '/Card.html'));
     $this->_utilMsg->createPackageNavBar();
     $this->_view->display();
 }