示例#1
0
 /**
  * 我被质检过的回复
  */
 public function actionMyReplyQulity()
 {
     #------初始化------#
     $this->_loadCore('Help_Page');
     $this->_loadCore('Help_SqlSearch');
     $this->_helpSqlSearch = new Help_SqlSearch();
     $this->_utilRbac = $this->_getGlobalData('Util_Rbac', 'object');
     $this->_modelReplyQulity = $this->_getGlobalData('Model_ReplyQulity', 'object');
     $qualityStatus = $this->_getGlobalData('quality_status');
     $qualityOptions = $this->_getGlobalData('quality_options');
     #------初始化------#
     $allUser = $this->_getGlobalData('user');
     $userClass = $this->_utilRbac->getUserClass();
     $this->_helpSqlSearch->set_tableName($this->_modelReplyQulity->tName());
     $this->_helpSqlSearch->set_conditions("user_id='{$userClass['_id']}'");
     if ($_GET['option']) {
         $this->_helpSqlSearch->set_conditions("option_id={$_GET['option']}");
         $this->_view->assign('selectedOption', $_GET['option']);
     }
     if ($_GET['status']) {
         $this->_helpSqlSearch->set_conditions("status={$_GET['status']}");
         $this->_view->assign('selectedStatus', $_GET['status']);
     }
     if ($_GET['is_timeout'] != '') {
         $this->_helpSqlSearch->set_conditions("is_timeout={$_GET['is_timeout']}");
         $this->_view->assign('selectedTimeout', $_GET['is_timeout']);
     }
     if ($_GET['scores']) {
         $this->_view->assign('selectedSource', $_GET['scores']);
         if ($_GET['scores'] == 1) {
             $this->_helpSqlSearch->set_conditions("scores<0");
         } else {
             $this->_helpSqlSearch->set_conditions("scores>=0");
         }
     }
     $this->_helpSqlSearch->set_orderBy('create_time desc');
     $this->_helpSqlSearch->setPageLimit($_GET['page'], 20);
     $allConditions = $this->_helpSqlSearch->get_conditions();
     //返回所有条件
     $helpPage = new Help_Page(array('total' => $this->_modelReplyQulity->findCount($allConditions), 'perpage' => 20));
     $sql = $this->_helpSqlSearch->createSql();
     $dataList = $this->_modelReplyQulity->select($sql);
     if ($dataList) {
         Tools::import('Util_FontColor');
         foreach ($dataList as &$value) {
             $value['create_time'] = date('Y-m-d H:i:s', $value['create_time']);
             $value['url_detail'] = Tools::url('QualityCheck', 'QualityDetail', array('work_order_id' => $value['work_order_id'], 'qa_id' => $value['qa_id']));
             $value['word_quality_user_id'] = $allUser[$value['quality_user_id']]['nick_name'];
             $value['word_status'] = Util_FontColor::getQualityStatus($value['status'], $qualityStatus[$value['status']]);
             $value['content'] = strip_tags($value['content']);
             $value['word_option_id'] = $qualityOptions[$value['option_id']];
         }
         $this->_view->assign('dataList', $dataList);
     }
     $qualityStatus[''] = Tools::getLang('ALL', 'Common');
     $qualityOptions[''] = Tools::getLang('ALL', 'Common');
     $this->_view->assign('qualityStatus', $qualityStatus);
     $this->_view->assign('qualityOptions', $qualityOptions);
     $this->_view->assign('scores', Tools::getLang('SOURCE', __CLASS__));
     $this->_view->assign('timeout', Tools::getLang('TIMEOUT', __CLASS__));
     $this->_view->assign('pageBox', $helpPage->show());
     $this->_view->assign('js', $this->_view->get_curJs());
     $this->_utilMsg->createNavBar();
     $this->_view->display();
 }
示例#2
0
 /**
  * 礼包卡号列表
  */
 public function actionCardList()
 {
     $this->_createServerList();
     if ($_REQUEST['server_id']) {
         $this->_utilFRGInterface = $this->_getGlobalData('Util_FRGInterface', 'object');
         $this->_utilFRGInterface->setServerUrl($_REQUEST['server_id']);
         $sendParams = Tools::getFilterRequestParam(array('page'));
         $this->_utilFRGInterface->setGet(array('c' => 'Card', 'a' => 'CardList', 'Page' => $_GET['page']));
         $this->_utilFRGInterface->setPost($sendParams);
         $data = $this->_utilFRGInterface->callInterface();
         if ($data) {
             $currUrl = Tools::url(CONTROL, ACTION, $sendParams);
             $this->_loadCore('Help_Page');
             if ($data['data']['TotalNum'] == '') {
                 $data['data']['TotalNum'] = 0;
             }
             if ($data['data']['Data']) {
                 Tools::import('Util_FontColor');
                 foreach ($data['data']['Data'] as &$list) {
                     $list['word_State'] = Util_FontColor::getFrgLibaoCardStatus($list['State']);
                     $list['CardName'] = $data['data']['TypeData'][$list['TypeId']]['CardName'] ? $data['data']['TypeData'][$list['TypeId']]['CardName'] : Tools::getLang('LIBAO_ISDEL', __CLASS__);
                 }
             }
             if ($data['data']['PageSize']) {
                 $helpPage = new Help_Page(array('total' => $data['data']['TotalNum'], 'perpage' => $data['data']['PageSize'], 'url' => $currUrl));
                 $this->_view->assign('pageBox', $helpPage->show());
             }
             $selectPage = Tools::getLang('PAGE_OPTION', __CLASS__);
             $this->_view->assign('selectPage', $selectPage);
             $this->_view->assign('select', $data['data']['Items']);
             $this->_view->assign('dataList', $data['data']['Data']);
             $this->_view->assign('selectedQuery', $data['data']['query']);
             $this->_view->assign('selectedPageSize', $data['data']['PageSize']);
         } else {
             $this->_view->assign('errorConn', Tools::getLang('CONNECT_SERVER_ERROR', 'Common'));
         }
     }
     $this->_utilMsg->createPackageNavBar();
     $this->_view->display();
 }
示例#3
0
 /**
  * 工单显示列表
  */
 public function actionIndex()
 {
     #------初始化------#
     $this->_utilOnline = $this->_getGlobalData('Util_Online', 'object');
     $workOrderStatusArr = $this->_modelSysconfig->getValueToCache('workorder_status');
     $gameTypeArr = Model::getTtwoArrConvertOneArr($this->_modelSysconfig->getValueToCache('game_type'), 'Id', 'name');
     $operatorList = $this->_getGlobalData('operator_list');
     $operatorList = Model::getTtwoArrConvertOneArr($operatorList, 'Id', 'operator_name');
     $this->_modelUser = $this->_getGlobalData('Model_User', 'object');
     $orgList = $this->_getGlobalData('org');
     foreach ($orgList as &$value) {
         $curOrgUser = $this->_modelUser->findByOrgId($value['Id']);
         if ($curOrgUser) {
             $curOrgUser = Model::getTtwoArrConvertOneArr($curOrgUser, 'Id', 'nick_name');
             $value['user'] = $curOrgUser;
         }
     }
     #------初始化------#
     $onlineUsers = $this->_utilOnline->getOnlineUser('user_id');
     //在线用户,一维数组,value值为user_id
     #------分页生成sql------#
     $helpSqlSearch = $this->_loadCore('Help_SqlSearch');
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->_modelWorkOrder->tName());
     if ($_GET['game_type_id'] != '') {
         $helpSqlSearch->set_conditions("game_type={$_GET['game_type_id']}");
         $this->_view->assign('selectedGameTypeId', $_GET['game_type_id']);
     }
     if ($_GET['operator_id'] != '') {
         $helpSqlSearch->set_conditions("operator_id={$_GET['operator_id']}");
         $this->_view->assign('selectedOperatorId', $_GET['operator_id']);
     }
     if ($_GET['Id']) {
         $helpSqlSearch->set_conditions("Id={$_GET['Id']}");
         $this->_view->assign('selectedId', $_GET['Id']);
     }
     if ($_GET['vip_level'] != '') {
         //如果设置了vip等级,将显示等级
         $helpSqlSearch->set_conditions("vip_level={$_GET['vip_level']}");
         $this->_view->assign('selectedVipLevel', $_GET['vip_level']);
     }
     $helpSqlSearch->setPageLimit($_GET['page'], 20);
     if ($_GET['order_status']) {
         $helpSqlSearch->set_conditions("status={$_GET['order_status']}");
         $this->_view->assign('selectedOrderStatus', $_GET['order_status']);
     }
     if ($_GET['user_nickname']) {
         $helpSqlSearch->set_conditions("user_nickname='{$_GET['user_nickname']}'");
         $this->_view->assign('selectedUserNickname', $_GET['user_nickname']);
         $_GET['user_nickname'] = urlencode($_GET['user_nickname']);
     }
     if ($_GET['user_account']) {
         $helpSqlSearch->set_conditions("user_account='{$_GET['user_account']}'");
         $this->_view->assign('selectedUserAccount', $_GET['user_account']);
         $_GET['user_account'] = urlencode($_GET['user_account']);
     }
     if ($_GET['title']) {
         $helpSqlSearch->set_conditions("title like '%{$_GET['title']}%'");
         $this->_view->assign('selectedTitle', $_GET['title']);
         $_GET['title'] = urlencode($_GET['title']);
     }
     if ($_GET['service_ids']) {
         //如果选择了客服
         $this->_view->assign('selectedServiceIds', $_GET['service_ids']);
         $serviceIds = implode(',', $_GET['service_ids']);
         $helpSqlSearch->set_conditions("owner_user_id in ({$serviceIds})");
     }
     $helpSqlSearch->set_orderBy('create_time desc');
     $sql = $helpSqlSearch->createSql();
     $conditions = $helpSqlSearch->get_conditions();
     $this->_loadCore('Help_Page');
     $helpPage = new Help_Page(array('total' => $this->_modelWorkOrder->findCount($conditions), 'perpage' => 20));
     $this->_view->assign('pageBox', $helpPage->show());
     #------分页生成sql------#
     $dataList = $this->_modelWorkOrder->select($sql);
     #------载入缓存------#
     $workOrderSourceArr = $this->_modelSysconfig->getValueToCache('workorder_source');
     $vipLevel = array('0' => '普通', '1' => '一级', '2' => '二级', '3' => '三级', '4' => '四级', '5' => '五级', '6' => '六级', '' => '所有');
     $users = $this->_getGlobalData('user');
     //		$users=Model::getTtwoArrConvertOneArr($users,'Id','full_name');
     $serverList = $this->_getGlobalData('gameser_list');
     $serverList = Model::getTtwoArrConvertOneArr($serverList, 'Id', 'server_name');
     #------载入缓存------#
     if ($dataList) {
         Tools::import('Util_FontColor');
         foreach ($dataList as &$list) {
             $list['url_dialog'] = Tools::url('QualityCheck', 'OrderDialog', array('Id' => $list['Id']));
             $list['word_game_type'] = Util_FontColor::getGameTypeColor($list['game_type'], $gameTypeArr[$list['game_type']]);
             $list['word_source'] = Util_FontColor::getWorkOrderSource($list['source'], $workOrderSourceArr[$list['source']]);
             $list['word_status'] = Util_FontColor::getWorkOrderStatus($list['status'], $workOrderStatusArr[$list['status']]);
             $list['word_operator_id'] = $operatorList[$list['operator_id']];
             $questionArr = $this->_modelQuestionType->findById($list['question_type']);
             $list['word_question_type'] = $questionArr['title'] ? $questionArr['title'] : '游戏提问';
             $list['url_detail'] = Tools::url('WorkOrder', 'Detail', array('Id' => $list['Id']));
             $list['word_owner_user_id'] = $users[$list['owner_user_id']]['nick_name'];
             $list['word_game_server_id'] = $serverList[$list['game_server_id']];
             if ($list['status'] == 1) {
                 $isTimeout = Tools::isTimeOut($list['create_time'], $list['timeout']);
                 if ($isTimeout === true) {
                     //已超时
                     $list['time_out_true'] = true;
                 } else {
                     //未超时
                     $list['lost_time'] = Tools::getTimeFormat($isTimeout);
                 }
             }
             $list['create_time'] = date('Y-m-d H:i:s', $list['create_time']);
             if ($list['word_owner_user_id']) {
                 $list['word_owner_user_id'] .= in_array($list['owner_user_id'], $onlineUsers) ? Util_FontColor::getOnline(1) : Util_FontColor::getOnline(0);
             }
         }
         $this->_view->assign('dataList', $dataList);
     }
     $gameTypeArr[''] = '所有';
     $this->_view->assign('gameTypeList', $gameTypeArr);
     $operatorList[''] = '所有';
     $this->_view->assign('operatorList', $operatorList);
     $this->_view->assign('orgList', $orgList);
     $this->_view->assign('vipLevel', $vipLevel);
     $workOrderStatusArr[''] = '所有';
     $this->_view->assign('workOrderStatusArr', $workOrderStatusArr);
     $this->_view->assign('js', $this->_view->get_curJs());
     $this->_utilMsg->createNavBar();
     $this->_view->display();
 }
示例#4
0
 /**
  * 投票
  */
 private function _voteIndex()
 {
     $this->_loadCore('Help_SqlSearch');
     $this->_loadCore('Help_Page');
     $users = $this->_getGlobalData('user');
     $this->_modelVote = $this->_getGlobalData('Model_Vote', 'object');
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->_modelVote->tName());
     $helpSqlSearch->set_orderBy('start_time desc,end_time desc');
     $helpSqlSearch->setPageLimit($_GET['page']);
     $sql = $helpSqlSearch->createSql();
     $dataList = $this->_modelVote->select($sql);
     if ($dataList) {
         $this->_utilRbac = $this->_getGlobalData('Util_Rbac', 'object');
         $userClass = $this->_utilRbac->getUserClass();
         Tools::import('Util_FontColor');
         foreach ($dataList as &$list) {
             $list['word_user_id'] = $users[$list['user_id']]['nick_name'];
             $list['word_is_open'] = Util_FontColor::getVoteOpen($list['is_open']);
             $list['start_time'] = date('Y-m-d H:i:s', $list['start_time']);
             $list['end_time'] = date('Y-m-d H:i:s', $list['end_time']);
             $list['my_status'] = $this->_modelVote->getUserStatus($userClass['_id'], unserialize($list['vote_user']));
             $list['word_my_status'] = Util_FontColor::getVoteUserStatus($list['my_status']);
             $list['url_show'] = Tools::url(CONTROL, 'Vote', array('Id' => $list['Id'], 'doaction' => 'show'));
         }
         $this->_view->assign('dataList', $dataList);
         $helpPage = new Help_Page(array('total' => $this->_modelVote->findCount(), 'prepage' => PAGE_SIZE));
         $this->_view->assign('pageBox', $helpPage->show());
     }
     $this->_view->set_tpl(array('body' => 'ServiceTools/Vote.html'));
     $this->_utilMsg->createNavBar();
     $this->_view->display();
 }
示例#5
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;
 }
示例#6
0
 /**
  * 所有被质检的回复
  */
 public function actionAllReply()
 {
     $this->_modelQuality = $this->_getGlobalData('Model_Quality', 'object');
     $qualityOptions = $this->_getGlobalData('quality_options');
     //评价
     $this->_modelQuality = $this->_getGlobalData('Model_Quality', 'object');
     $this->_loadCore('Help_Page');
     #------生成sql------#
     $this->_loadCore('Help_SqlSearch');
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->_modelQuality->tName());
     if ($_REQUEST['quality_option']) {
         $helpSqlSearch->set_conditions("option_id={$_REQUEST['quality_option']}");
         $this->_view->assign('selectedQualityOption', $_REQUEST['quality_option']);
     }
     if ($_REQUEST['status_option']) {
         $helpSqlSearch->set_conditions("status={$_REQUEST['status_option']}");
         $this->_view->assign('selectedStatusOption', $_REQUEST['status_option']);
     }
     $conditions = $helpSqlSearch->get_conditions();
     $helpSqlSearch->set_orderBy("Id desc");
     $helpPage = new Help_Page(array('total' => $this->_modelQuality->findCount($conditions), 'perpage' => PAGE_SIZE));
     $sql = $helpSqlSearch->createSql();
     #------生成sql------#
     $dataList = $this->_modelQuality->select($sql);
     if ($dataList) {
         Tools::import('Util_FontColor');
         foreach ($dataList as &$value) {
             $value['quality_time'] = date('Y-m-d H:i:s', $value['quality_time']);
             $value['complain_time'] = $value['complain_time'] ? date('Y-m-d H:i:s', $value['complain_time']) : '';
             $value['word_option_id'] = $qualityOptions[$value['option_id']];
             $value['word_status'] = Util_FontColor::getQualityStatus($value['status'], $this->_statusOptions[$value['status']]);
             $value['url_detail'] = Tools::url(CONTROL, 'QualityDetail', array('work_order_id' => $value['work_order_id'], 'qa_id' => $value['qa_id']));
             $value['reply_time'] = $value['reply_time'] ? date('Y-m-d H:i:s', $value['reply_time']) : '';
             $users = $this->_getGlobalData('user');
             $users = Model::getTtwoArrConvertOneArr($users, 'Id', 'full_name');
             $value['word_quality_user_id'] = $users[$value['quality_user_id']];
         }
         $this->_view->assign('dataList', $dataList);
     }
     $this->_statusOptions[''] = '所有';
     $qualityOptions[''] = '所有';
     $this->_view->assign('qualityOptions', $qualityOptions);
     $this->_view->assign('statusOptions', $this->_statusOptions);
     $this->_view->assign('js', $this->_view->get_curJs());
     $this->_view->assign('pageBox', $helpPage->show());
     $this->_utilMsg->createNavBar();
     $this->_view->display();
 }
示例#7
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();
 }
示例#8
0
 /**
  * 复检列表
  */
 public function actionAgainList()
 {
     #------初始化------#
     $this->_loadCore('Help_Page');
     $this->_loadCore('Help_SqlSearch');
     $helpSqlSearch = new Help_SqlSearch();
     $this->_utilRbac = $this->_getGlobalData('Util_Rbac', 'object');
     $this->_modelQuality = $this->_getGlobalData('Model_Quality', 'object');
     $qualityStatus = $this->_getGlobalData('quality_status');
     $qualityOptions = $this->_getGlobalData('quality_options');
     $gameTypes = $this->_getGlobalData('game_type');
     $gameTypes = Model::getTtwoArrConvertOneArr($gameTypes, 'Id', 'name');
     $operatorList = Model::getTtwoArrConvertOneArr($this->_getGlobalData('operator_list'), 'Id', 'operator_name');
     $againStatus = array('0' => '未通过', '1' => '通过');
     #------初始化------#
     $selected = array();
     //模板默认值
     $users = $this->_getGlobalData('user');
     $helpSqlSearch->set_tableName($this->_modelQuality->tName());
     $helpSqlSearch->set_conditions('again_user_id is not null');
     if ($_REQUEST['quality_user_id'] != '') {
         //质检
         $helpSqlSearch->set_conditions("quality_user_id={$_REQUEST['quality_user_id']}");
         $selected['quality_user_id'] = $_REQUEST['quality_user_id'];
     }
     if ($_REQUEST['again_user_id'] != '') {
         //复检
         $helpSqlSearch->set_conditions("again_user_id={$_REQUEST['again_user_id']}");
         $selected['again_user_id'] = $_REQUEST['again_user_id'];
     }
     if ($_REQUEST['again_status'] != '') {
         //复检状态
         $helpSqlSearch->set_conditions("again_status={$_REQUEST['again_status']}");
         $selected['again_status'] = $_REQUEST['again_status'];
     }
     if ($_REQUEST['start_time'] && $_REQUEST['end_time']) {
         $startTime = strtotime($_REQUEST['start_time']);
         $endTime = strtotime($_REQUEST['end_time']);
         $helpSqlSearch->set_conditions("again_time between {$startTime} and {$endTime}");
         $selected['start_time'] = $_REQUEST['start_time'];
         $selected['end_time'] = $_REQUEST['end_time'];
     }
     $helpSqlSearch->set_orderBy('again_time desc');
     $helpSqlSearch->setPageLimit($_GET['page']);
     $allConditions = $helpSqlSearch->get_conditions();
     //返回所有条件
     $helpPage = new Help_Page(array('total' => $this->_modelQuality->findCount($allConditions), 'perpage' => PAGE_SIZE));
     $sql = $helpSqlSearch->createSql();
     $dataList = $this->_modelQuality->select($sql);
     if ($dataList) {
         Tools::import('Util_FontColor');
         foreach ($dataList as &$value) {
             $value['word_game_type_id'] = $gameTypes[$value['game_type_id']];
             $value['word_operator_id'] = $operatorList[$value['operator_id']];
             $value['again_time'] = date('Y-m-d H:i:s', $value['again_time']);
             $value['quality_time'] = date('Y-m-d H:i:s', $value['quality_time']);
             $value['complain_time'] = $value['complain_time'] ? date('Y-m-d H:i:s', $value['complain_time']) : '';
             $value['word_option_id'] = $qualityOptions[$value['option_id']];
             $value['word_status'] = Util_FontColor::getQualityStatus($value['status'], $this->_statusOptions[$value['status']]);
             $value['url_detail'] = Tools::url(CONTROL, 'QualityDetail', array('work_order_id' => $value['work_order_id'], 'qa_id' => $value['qa_id']));
             $value['url_document'] = Tools::url(CONTROL, 'Document', array('doaction' => 'add', 'Id' => $value['Id'], 'qa_id' => $value['qa_id'], 'work_order_id' => $value['work_order_id']));
             $value['word_quality_user_id'] = $users[$value['quality_user_id']]['nick_name'];
             $value['word_again_user_id'] = $users[$value['again_user_id']]['nick_name'];
             $value['word_reply_user_id'] = $users[$value['reply_user_id']]['nick_name'];
             $value['reply_content'] = strip_tags($value['reply_content']);
             $value['quality_content'] = strip_tags($value['quality_content']);
             $value['complain_content'] = strip_tags($value['complain_content']);
             $value['again_content'] = strip_tags($value['again_content']);
             $value['word_again_status'] = $againStatus[$value['again_status']];
         }
         $this->_view->assign('dataList', $dataList);
     }
     $againStatus[''] = '所有';
     $gameTypes[''] = '所有';
     $this->_view->assign('againStatus', $againStatus);
     $this->_view->assign('gameTypes', $gameTypes);
     $this->_view->assign('users', $users);
     $this->_view->assign('selected', $selected);
     $this->_view->assign('pageBox', $helpPage->show());
     $this->_utilMsg->createNavBar();
     $this->_view->display();
 }
示例#9
0
 /**
  * 我的查证处理
  */
 public function actionMyVerify()
 {
     $this->_loadCore('Help_SqlSearch');
     $this->_loadCore('Help_Page');
     $this->_helpSqlSearch = new Help_SqlSearch();
     $this->_modelVerify = $this->_getGlobalData('Model_Verify', 'object');
     $this->_utilRbac = $this->_getGlobalData('Util_Rbac', 'object');
     $userClass = $this->_utilRbac->getUserClass();
     $users = $this->_getGlobalData('user');
     $users = Model::getTtwoArrConvertOneArr($users, 'Id', 'nick_name');
     $verifyStatus = $this->_getGlobalData('verify_status');
     $verifyType = $this->_getGlobalData('verify_type');
     $verifyLevel = $this->_getGlobalData('verify_level');
     $verifySource = $this->_getGlobalData('verify_source');
     $gameType = $this->_getGlobalData('game_type');
     $gameType = Model::getTtwoArrConvertOneArr($gameType, 'Id', 'name');
     $operatorList = $this->_getGlobalData('operator_list');
     $operatorList = Model::getTtwoArrConvertOneArr($operatorList, 'Id', 'operator_name');
     $gameServerList = $this->_getGlobalData('gameser_list');
     $gameServerListOneArr = Model::getTtwoArrConvertOneArr($gameServerList, 'Id', 'server_name');
     $department = $this->_modelVerify->getDep();
     $this->_helpSqlSearch->set_tableName($this->_modelVerify->tName());
     $this->_helpSqlSearch->set_conditions("user_id={$userClass['_id']}");
     if ($_REQUEST['Id']) {
         $this->_view->assign('selectedId', $_REQUEST['Id']);
         $this->_helpSqlSearch->set_conditions("Id={$_REQUEST['Id']}");
     }
     if ($_REQUEST['department_id']) {
         $this->_view->assign('selectedDepartment', $_REQUEST['department_id']);
         $this->_helpSqlSearch->set_conditions("department_id={$_REQUEST['department_id']}");
     }
     if ($_REQUEST['game_type_id']) {
         $this->_view->assign('selectedGameTypeId', $_REQUEST['game_type_id']);
         $this->_helpSqlSearch->set_conditions("game_type_id={$_REQUEST['game_type_id']}");
     }
     if ($_REQUEST['operator_id']) {
         $this->_view->assign('selectedOperatorId', $_REQUEST['operator_id']);
         $this->_helpSqlSearch->set_conditions("operator_id={$_REQUEST['operator_id']}");
     }
     if ($_REQUEST['game_server_id']) {
         $this->_view->assign('selectedGameServerId', $_REQUEST['game_server_id']);
         $this->_helpSqlSearch->set_conditions("game_server_id={$_REQUEST['game_server_id']}");
     }
     if ($_REQUEST['status']) {
         $this->_view->assign('selectedStatus', $_REQUEST['status']);
         $this->_helpSqlSearch->set_conditions("status={$_REQUEST['status']}");
     }
     if ($_REQUEST['type']) {
         $this->_view->assign('selectedType', $_REQUEST['type']);
         $this->_helpSqlSearch->set_conditions("type={$_REQUEST['type']}");
     }
     if ($_REQUEST['level']) {
         $this->_view->assign('selectedLevel', $_REQUEST['level']);
         $this->_helpSqlSearch->set_conditions("level={$_REQUEST['level']}");
     }
     $this->_helpSqlSearch->set_orderBy("Id desc");
     $this->_helpSqlSearch->setPageLimit($_GET['page'], 20);
     $helpPage = new Help_Page(array('total' => $this->_modelVerify->findCount($this->_helpSqlSearch->get_conditions()), 'perpage' => 20));
     $sql = $this->_helpSqlSearch->createSql();
     $dataList = $this->_modelVerify->select($sql);
     if ($dataList) {
         Tools::import('Util_FontColor');
         foreach ($dataList as &$value) {
             $verifyTypeToGameType = $this->_getVerifyTypeByGameType($value['game_type_id']);
             $value['word_game_type_id'] = $gameType[$value['game_type_id']];
             $value['word_operator_id'] = $operatorList[$value['operator_id']];
             $value['word_game_server_id'] = $gameServerListOneArr[$value['game_server_id']];
             $value['word_status'] = $verifyStatus[$value['status']];
             $value['word_type'] = $verifyTypeToGameType[$value['type']];
             $value['word_level'] = Util_FontColor::getVerifyLevel($value['level'], $verifyLevel[$value['level']]);
             $value['create_time'] = date('Y-m-d H:i:s', $value['create_time']);
             $value['word_department_id'] = $department[$value['department_id']];
             $value['url_detail'] = Tools::url(CONTROL, 'Detail', array('Id' => $value['Id'], 'work_order_id' => $value['work_order_id']));
             $value['url_order_detail'] = Tools::url('WorkOrder', 'Detail', array('Id' => $value['work_order_id']));
             $value['work_user_id'] = $users[$value['user_id']];
             $value['word_source'] = Util_FontColor::getVerifySource($value['source'], $verifySource[$value['source']]);
             $value['content'] = strpos($value['content'], '\\') ? str_replace('\\', '', $value['content']) : $value['content'];
             if ($value['log']) {
                 $value['log'] = unserialize($value['log']);
             }
         }
         $this->_view->assign('dataList', $dataList);
     }
     $this->_view->set_tpl(array('body' => 'Verify/Index.html'));
     $this->_view->assign('gameServerList', json_encode($gameServerList));
     $this->_view->assign('department', $department);
     $this->_view->assign('verifyStatus', $verifyStatus);
     $this->_view->assign('verifyTypeJson', json_encode($verifyType));
     $this->_view->assign('verifyLevel', $verifyLevel);
     $this->_view->assign('gameType', $gameType);
     $this->_view->assign('operatorList', $operatorList);
     $this->_view->assign('js', 'Verify/Index.js.html');
     $this->_view->assign('pageBox', $helpPage->show());
     $this->_utilMsg->createNavBar();
     $this->_view->display();
 }
示例#10
0
 /**
  * 显示页面
  * @param 可显示的参数 $options
  */
 private function _view($options, $apply_id_of_mine = 0, $myOperator = array())
 {
     $this->_modelApplyDataFrg = $this->_getGlobalData('Model_ApplyDataFrg', 'object');
     $auditType = $this->_getGlobalData('frg_audit_type');
     foreach ($auditType as $key => &$value) {
         if (!in_array($key, $options)) {
             unset($auditType[$key]);
         }
     }
     $user = $this->_getGlobalData('user');
     $this->_loadCore('Help_SqlSearch');
     $this->_loadCore('Help_Page');
     $gameServerList = $this->_getGlobalData('gameser_list');
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->_modelApplyDataFrg->tName());
     if ($myOperator) {
         $myOperator = implode(',', $myOperator);
         if (strpos($myOperator, ',')) {
             $helpSqlSearch->set_conditions("operator_id in ({$myOperator})");
         } else {
             $helpSqlSearch->set_conditions("operator_id={$myOperator}");
         }
     }
     if ($_GET['type'] && in_array($_GET['type'], $options)) {
         $helpSqlSearch->set_conditions("type={$_GET['type']}");
         $this->_view->assign('selectedType', $_GET['type']);
     } else {
         $helpSqlSearch->set_conditions("type in (" . implode(',', $options) . ")");
     }
     if ($_GET['send'] != '') {
         $helpSqlSearch->set_conditions("is_send={$_GET['send']}");
         $this->_view->assign('selectedSend', $_GET['send']);
     }
     if ($_GET['audit_user_id']) {
         $helpSqlSearch->set_conditions("audit_user_id='{$_GET['audit_user_id']}'");
         $this->_view->assign('selectedAuditUserId', $_GET['audit_user_id']);
     }
     if ($_GET['apply_user_id']) {
         $helpSqlSearch->set_conditions("apply_user_id='{$_GET['apply_user_id']}'");
         $this->_view->assign('selectedApplyUserId', $_GET['apply_user_id']);
     } elseif ($apply_id_of_mine > 0) {
         $helpSqlSearch->set_conditions("apply_user_id='{$apply_id_of_mine}'");
         $this->_view->assign('selectedApplyUserId', $apply_id_of_mine);
     }
     //搜索玩家
     if ($_GET['user_info'] != '') {
         $helpSqlSearch->set_conditions("user_info Like '%{$_GET['user_info']}%'");
         $this->_view->assign('user_info', $_GET['user_info']);
     }
     $helpSqlSearch->set_orderBy('is_send asc , create_time desc');
     if (!$_POST['xls']) {
         $helpSqlSearch->setPageLimit($_GET['page'], 10);
     }
     //如果为引出excel
     $conditions = $helpSqlSearch->get_conditions();
     $sql = $helpSqlSearch->createSql();
     $dataList = $this->_modelApplyDataFrg->select($sql);
     Tools::import('Util_FontColor');
     if ($dataList) {
         foreach ($dataList as $key => &$list) {
             if (!in_array($list['type'], $options)) {
                 unset($dataList[$key]);
             }
             //如果不是在选项中的,就unset掉
             $list['word_type'] = Util_FontColor::getFRGauditType($list['type'], $auditType[$list['type']]);
             $list['word_apply_user_id'] = $user[$list['apply_user_id']]['nick_name'];
             $list['word_audit_user_id'] = $user[$list['audit_user_id']]['nick_name'];
             $list['send_action'] = unserialize($list['send_action']);
             $list['create_time'] = date('Y-m-d H:i:s', $list['create_time']);
             $list['word_is_send'] = Util_FontColor::getFRGsendType($list['is_send']);
             $list['word_server_id'] = $list['server_id'] ? $gameServerList[$list['server_id']]['full_name'] : Tools::getLang('AUDIT_MANYSERVER', __CLASS__);
             $list['url_view'] = $this->_createAuditDetailUrl($list);
             $list['send_time'] = $list['send_time'] ? date('Y-m-d H:i:s', $list['send_time']) : '';
             $list['cause'] = stripcslashes($list['cause']);
             $list['audit_ip'] = $list['audit_ip'] ? long2ip($list['audit_ip']) : '';
             $list['apply_ip'] = $list['apply_ip'] ? long2ip($list['apply_ip']) : '';
         }
         $this->_view->assign('dataList', $dataList);
         $helpPage = new Help_Page(array('total' => $this->_modelApplyDataFrg->findCount($conditions), 'prepage' => 10));
         $this->_view->assign('pageBox', $helpPage->show());
     }
     $auditType[''] = Tools::getLang('ALL', 'Common');
     $this->_view->assign('auditType', $auditType);
     $sendType = Util_FontColor::$frgSendString;
     $sendType[''] = Tools::getLang('ALL', 'Common');
     $this->_view->assign('sendType', $sendType);
     $users = Model::getTtwoArrConvertOneArr($user, 'Id', 'full_name');
     $this->_view->assign('users', $users);
     if ($apply_id_of_mine > 0) {
         $this->_view->set_tpl(array('body' => 'FrgAudit/MyApplication.html'));
     } else {
         $this->_view->set_tpl(array('body' => 'FrgAudit/Audit.html'));
     }
     $this->_utilMsg->createNavBar();
     if ($_GET['xls']) {
         Tools::import('Util_ExportExcel');
         $this->_utilExportExcel = new Util_ExportExcel(Tools::getLang('AUDIT_EXCELNAME', __CLASS__), 'Excel/FrgAudit', $dataList);
         $this->_utilExportExcel->outPutExcel();
     } else {
         $this->_view->display();
     }
 }
示例#11
0
 /**
  * 用户邮件
  */
 private function _mailIndex()
 {
     #------初始化------#
     $this->_utilRbac = $this->_getGlobalData('Util_Rbac', 'object');
     $this->_modelUserMail = $this->_getGlobalData('Model_UserMail', 'object');
     $this->_loadCore('Help_SqlSearch');
     $this->_loadCore('Help_Page');
     $mailType = $this->_getGlobalData('mail_type');
     #------初始化------#
     $userClass = $this->_utilRbac->getUserClass();
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->_modelUserMail->tName());
     $helpSqlSearch->set_conditions("user_id={$userClass['_id']}");
     if ($_GET['mail_type'] != '') {
         $helpSqlSearch->set_conditions("type={$_GET['mail_type']}");
         $this->_view->assign('selectedMailType', $_GET['mail_type']);
     }
     if ($_GET['read'] != '') {
         $helpSqlSearch->set_conditions("is_read='{$_GET['read']}'");
         $this->_view->assign('selectedRead', $_GET['read']);
     }
     if ($_GET['is_read'] != '') {
         $helpSqlSearch->set_orderBy('is_read asc,create_time desc');
     } else {
         $helpSqlSearch->set_orderBy('create_time desc');
     }
     $helpSqlSearch->setPageLimit($_GET['page'], PAGE_SIZE);
     $sql = $helpSqlSearch->createSql();
     $dataList = $this->_modelUserMail->select($sql);
     if ($dataList) {
         Tools::import('Util_FontColor');
         foreach ($dataList as &$list) {
             $list['word_is_read'] = Util_FontColor::getMailRead($list['is_read']);
             $list['create_time'] = date('Y-m-d H:i:s', $list['create_time']);
             $list['word_type'] = Util_FontColor::getMailType($list['type'], $mailType[$list['type']]);
         }
         $conditions = $helpSqlSearch->get_conditions();
         $helpPage = new Help_Page(array('total' => $this->_modelUserMail->findCount($conditions), 'perpage' => PAGE_SIZE));
         $this->_view->assign('pageBox', $helpPage->show());
         $this->_view->assign('dataList', $dataList);
     }
     $mailType[''] = '所有';
     $this->_view->assign('selectMailType', $mailType);
     $this->_view->assign('selectRead', array('1' => '已读', '0' => '未读', '' => '所有'));
     $this->_view->set_tpl(array('body' => 'User/MailIndex.html'));
     $this->_utilMsg->createNavBar();
     $this->_view->display();
 }
示例#12
0
 /**
  * 工单显示列表
  */
 public function actionIndex()
 {
     #------初始化------#
     $this->_utilOnline = $this->_getGlobalData('Util_Online', 'object');
     $workOrderStatusArr = $this->_modelSysconfig->getValueToCache('workorder_status');
     $verifyStatusArr = $this->_getGlobalData('verify_status');
     //bug 状态
     $gameTypeArr = Model::getTtwoArrConvertOneArr($this->_modelSysconfig->getValueToCache('game_type'), 'Id', 'name');
     $operatorList = $this->_getGlobalData('operator_list');
     $operatorList = Model::getTtwoArrConvertOneArr($operatorList, 'Id', 'operator_name');
     $this->_modelUser = $this->_getGlobalData('Model_User', 'object');
     $orgList = $this->_getGlobalData('org');
     $evArr = $this->_modelWorkOrder->getEvArr();
     //获取评价数组
     $badEvArr = $this->_getGlobalData('player_evaluation');
     $badEvArr = $badEvArr[3]['Description'];
     //差评数组
     $questionTypes = $this->_getGlobalData('question_types');
     foreach ($orgList as &$value) {
         $curOrgUser = $this->_modelUser->findByOrgId($value['Id']);
         if ($curOrgUser) {
             $curOrgUser = Model::getTtwoArrConvertOneArr($curOrgUser, 'Id', 'nick_name');
             $value['user'] = $curOrgUser;
         }
     }
     $this->_modelRooms = $this->_getGlobalData('Model_Rooms', 'object');
     $roomList = $this->_modelRooms->findAll();
     $roomList = Model::getTtwoArrConvertOneArr($roomList, 'Id', 'name');
     $roomList[''] = Tools::getLang('All', 'Common');
     $this->_utilWorkOrder = $this->_getGlobalData('Util_WorkOrder', 'object');
     $orderManage = $this->_utilWorkOrder->getOrderManage();
     $orderVipNum = $orderManage['_orderNum'];
     $orderVipNum[''] = array_sum($orderVipNum);
     #------初始化------#
     $onlineUsers = $this->_utilOnline->getOnlineUser('user_id');
     //在线用户,一维数组,value值为user_id
     #------分页生成sql------#
     $helpSqlSearch = $this->_loadCore('Help_SqlSearch');
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->_modelWorkOrder->tName());
     if ($_GET['game_type_id'] != '') {
         $helpSqlSearch->set_conditions("game_type={$_GET['game_type_id']}");
         $this->_view->assign('selectedGameTypeId', $_GET['game_type_id']);
         #------提问类型------#
         $qTypes = array();
         foreach ($questionTypes as $key => $list) {
             if ($list['game_type_id'] == $_GET['game_type_id']) {
                 $qTypes[$key] = $list['title'];
             }
         }
         $qTypes[''] = Tools::getLang('ALL', 'Common');
         $this->_view->assign('qType', $qTypes);
         if ($_GET['question_type']) {
             $helpSqlSearch->set_conditions("question_type={$_GET['question_type']}");
             $this->_view->assign('selectedQtype', $_GET['question_type']);
         }
         #------提问类型------#
         #------运营商------#
         $operatorListTemp = array();
         $gameOperatorIndex = $this->_getGlobalData('Model_GameOperator', 'object')->findByGameTypeId($_GET['game_type_id']);
         foreach ($gameOperatorIndex as $value) {
             if (array_key_exists($value['operator_id'], $operatorList)) {
                 $operatorListTemp[$value['operator_id']] = $operatorList[$value['operator_id']];
             }
         }
         $operatorList = $operatorListTemp;
         unset($operatorListTemp);
         #------运营商------#
     }
     if ($_GET['operator_id'] != '') {
         $helpSqlSearch->set_conditions("operator_id={$_GET['operator_id']}");
         $this->_view->assign('selectedOperatorId', $_GET['operator_id']);
     }
     //增加服务器选择列表
     if ($_GET['game_type_id'] != '' && $_GET['operator_id'] != '') {
         $gameOptServerLists = $this->_getServers($_GET['game_type_id'], $_GET['operator_id']);
         if ($_GET['server_id'] != '') {
             $helpSqlSearch->set_conditions('game_server_id=' . intval($_GET['server_id']));
         }
         $this->_view->assign('gameOptServerLists', $gameOptServerLists);
     }
     if ($_GET['Id']) {
         $helpSqlSearch->set_conditions("Id={$_GET['Id']}");
         $this->_view->assign('selectedId', $_GET['Id']);
     }
     if ($_GET['room_id']) {
         $helpSqlSearch->set_conditions("room_id={$_GET['room_id']}");
         $this->_view->assign('selectedRoomId', $_GET['room_id']);
     }
     if ($_GET['evaluation_status'] != '') {
         $helpSqlSearch->set_conditions("evaluation_status={$_GET['evaluation_status']}");
         $this->_view->assign('selectedEv', $_GET['evaluation_status']);
         if ($_GET['evaluation_status'] == 3) {
             //如果为差评
             $this->_view->assign('badev_display', true);
         }
     }
     if ($_GET['is_verify'] != '') {
         $helpSqlSearch->set_conditions("is_verify={$_GET['is_verify']}");
         $this->_view->assign('selectedIsVerify', $_GET['is_verify']);
     }
     if ($_GET['evaluation_desc'] != '') {
         $helpSqlSearch->set_conditions("evaluation_desc={$_GET['evaluation_desc']}");
         $this->_view->assign('selectedBadEv', $_GET['evaluation_desc']);
     }
     if ($_GET['vip_level'] != '') {
         //如果设置了vip等级,将显示等级
         $helpSqlSearch->set_conditions("vip_level={$_GET['vip_level']}");
         $this->_view->assign('selectedVipLevel', $_GET['vip_level']);
     }
     $helpSqlSearch->setPageLimit($_GET['page'], 20);
     if ($_GET['order_status']) {
         $helpSqlSearch->set_conditions("status={$_GET['order_status']}");
         $this->_view->assign('selectedOrderStatus', $_GET['order_status']);
     }
     if ($_GET['user_nickname']) {
         $helpSqlSearch->set_conditions("user_nickname='{$_GET['user_nickname']}'");
         $this->_view->assign('selectedUserNickname', $_GET['user_nickname']);
         $_GET['user_nickname'] = urlencode($_GET['user_nickname']);
     }
     if ($_GET['user_account']) {
         $helpSqlSearch->set_conditions("user_account='{$_GET['user_account']}'");
         $this->_view->assign('selectedUserAccount', $_GET['user_account']);
         $_GET['user_account'] = urlencode($_GET['user_account']);
     }
     if ($_GET['title']) {
         $helpSqlSearch->set_conditions("title like '%{$_GET['title']}%'");
         $this->_view->assign('selectedTitle', $_GET['title']);
         $_GET['title'] = urlencode($_GET['title']);
     }
     if ($_GET['service_ids']) {
         //如果选择了客服
         $this->_view->assign('selectedServiceIds', $_GET['service_ids']);
         $serviceIds = implode(',', $_GET['service_ids']);
         $helpSqlSearch->set_conditions("owner_user_id in ({$serviceIds})");
     }
     if ($_GET['start_time'] && $_GET['end_time']) {
         $this->_view->assign('selectedStartTime', $_GET['start_time']);
         $this->_view->assign('selectedEndTime', $_GET['end_time']);
         $helpSqlSearch->set_conditions('create_time between ' . strtotime($_GET['start_time']) . ' and ' . strtotime($_GET['end_time']));
     }
     $helpSqlSearch->set_orderBy('status asc,create_time desc');
     $sql = $helpSqlSearch->createSql();
     $conditions = $helpSqlSearch->get_conditions();
     $this->_loadCore('Help_Page');
     $helpPage = new Help_Page(array('total' => $this->_modelWorkOrder->findCount($conditions), 'perpage' => 20));
     $this->_view->assign('pageBox', $helpPage->show());
     #------分页生成sql------#
     $dataList = $this->_modelWorkOrder->select($sql);
     #------载入缓存------#
     $workOrderSourceArr = $this->_modelSysconfig->getValueToCache('workorder_source');
     $vipLevel = Tools::getLang('VIP_LEVEL', 'Common');
     foreach ($vipLevel as $key => &$vipCount) {
         $vipCount .= " [<font color='#ff0000'>" . intval($orderVipNum[$key]) . "</font>]";
     }
     $users = $this->_getGlobalData('user_all');
     $serverList = $this->_getGlobalData('gameser_list');
     #------载入缓存------#
     if ($dataList) {
         Tools::import('Util_FontColor');
         $timeInterval = array();
         //定时器计时
         foreach ($dataList as &$list) {
             $TimeDifference = intval($serverList[$list['game_server_id']]['time_zone']);
             //时差
             $list['url_dialog'] = Tools::url('QualityCheck', 'OrderDialog', array('Id' => $list['Id'], 'TimeDifference' => $TimeDifference));
             $list['word_game_type'] = Util_FontColor::getGameTypeColor($list['game_type'], $gameTypeArr[$list['game_type']]);
             $list['word_source'] = Util_FontColor::getWorkOrderSource($list['source'], $workOrderSourceArr[$list['source']]);
             $list['word_status'] = Util_FontColor::getWorkOrderStatus($list['status'], $workOrderStatusArr[$list['status']]);
             $list['word_status'] .= $list['is_verify'] ? Tools::getLang('VERIFY_STATUS', 'Common') : '';
             $list['word_operator_id'] = $operatorList[$list['operator_id']];
             $list['word_question_type'] = $questionTypes[$list['question_type']]['title'] ? $questionTypes[$list['question_type']]['title'] : Tools::getLang('NOT_QUESTION_TYPE', 'Common');
             $list['url_detail'] = Tools::url('WorkOrder', 'Detail', array('Id' => $list['Id']));
             $list['word_owner_user_id'] = $users[$list['owner_user_id']]['nick_name'];
             $list['word_game_server_id'] = $serverList[$list['game_server_id']]['server_name'];
             $list['word_ev'] = Util_FontColor::getPlayerEvaluation($list['evaluation_status'], $evArr[$list['evaluation_status']]);
             //提问类型
             $list['url_reply_detail'] = Tools::url(CONTROL, 'ReplyIndex', array('user_id' => $list['owner_user_id']));
             $list['word_room_id'] = $list['room_id'] ? $roomList[$list['room_id']] : '<font color="#666666">' . Tools::getLang('NOT', 'Common') . '</font>';
             if ($list['evaluation_status'] == 3) {
                 $list['word_ev_desc'] = $badEvArr[$list['evaluation_desc']];
             }
             if ($list['status'] == 1) {
                 $isTimeout = Tools::isTimeOut($list['create_time'], $list['timeout']);
                 if ($isTimeout === true) {
                     //已超时
                     $list['time_out_true'] = true;
                 } else {
                     //未超时
                     $list['lost_time'] = Tools::getTimeFormat($isTimeout);
                     $timeInterval[$list['Id']]['div'] = $list['Id'];
                     $timeInterval[$list['Id']]['time'] = $isTimeout;
                 }
             }
             if ($TimeDifference != 0) {
                 $list['create_time'] = date('Y-m-d H:i:s', $list['create_time'] + $TimeDifference * 3600);
                 $list['create_time'] .= '(' . Tools::getLang('GAME_SERVER_TIME', 'Common') . ')';
             } else {
                 $list['create_time'] = date('Y-m-d H:i:s', $list['create_time']);
             }
             if ($list['word_owner_user_id']) {
                 $list['word_owner_user_id'] .= in_array($list['owner_user_id'], $onlineUsers) ? Util_FontColor::getOnline(1) : Util_FontColor::getOnline(0);
             }
             $verifyInfo = $this->_modelWorkOrder->select('select status from ' . DB_PREFIX . 'verify ' . 'where work_order_id =' . $list['Id'], 1);
             $verifyStatus = $verifyInfo['status'];
             $list['word_verify_status'] = $verifyStatusArr[$verifyStatus];
         }
         $this->_view->assign('dataList', $dataList);
     }
     $evArr[''] = Tools::getLang('ALL', 'Common');
     $this->_view->assign('statusurl', Tools::url(CONTROL, 'ChangetheStatus'));
     $badEvArr[''] = Tools::getLang('ALL', 'Common');
     $this->_view->assign('verify', $this->_modelWorkOrder->getVerify());
     $this->_view->assign('badEvArr', $badEvArr);
     $this->_view->assign('evArr', $evArr);
     $this->_view->assign('roomList', $roomList);
     $this->_view->assign('timeInterval', json_encode($timeInterval));
     $gameTypeArr[''] = Tools::getLang('ALL', 'Common');
     $this->_view->assign('gameTypeList', $gameTypeArr);
     $operatorList[''] = Tools::getLang('ALL', 'Common');
     $this->_view->assign('operatorList', $operatorList);
     $this->_view->assign('orgList', $orgList);
     $this->_view->assign('vipLevel', $vipLevel);
     $workOrderStatusArr[''] = Tools::getLang('ALL', 'Common');
     $this->_view->assign('workOrderStatusArr', $workOrderStatusArr);
     $this->_view->assign('js', $this->_view->get_curJs());
     $this->_utilMsg->createNavBar();
     $this->_view->display();
 }
示例#13
0
 /**
  * 返回邮件列表
  * @param array $limit
  * @param int $type
  */
 public function getMail($limit, $where)
 {
     $this->_loadCore('Help_Page');
     $this->_loadCore('Help_SqlSearch');
     $this->_modelUserMail = $this->_getGlobalData('Model_UserMail', 'object');
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->_modelUserMail->tName());
     $helpSqlSearch->set_conditions("user_id={$this->_id}");
     if ($where !== null) {
         foreach ($where as $key => $value) {
             $helpSqlSearch->set_conditions("{$key}='{$value}'");
         }
     }
     $helpSqlSearch->set_orderBy('create_time desc');
     $helpSqlSearch->setPageLimit($limit[0], $limit[1]);
     $conditions = $helpSqlSearch->get_conditions();
     $sql = $helpSqlSearch->createSql();
     $dataList = $this->_modelUserMail->select($sql);
     if (count($dataList)) {
         Tools::import('Util_FontColor');
         foreach ($dataList as &$list) {
             $list['word_is_read'] = Util_FontColor::getMailRead($list['is_read']);
             if ($list['href']) {
                 $list['title'] = "<a href='javascript:void(0)' is_read='{$list['is_read']}' url='{$list['href']}' cur_id='{$list['Id']}' onclick='readMail(\$(this))'>{$list['title']}</a>";
             } else {
                 $list['title'] = "<a href='javascript:void(0)' is_read='{$list['is_read']}' cur_id='{$list['Id']}' onclick='readMail(\$(this))'>{$list['title']}</a>";
             }
         }
         $helpPage = new Help_Page(array('total' => $this->_modelUserMail->findCount($conditions), 'perpage' => $limit[1]));
         $pageBox = $helpPage->show();
         return array('data' => $dataList, 'pageBox' => $pageBox);
     } else {
         return false;
     }
 }