/** * 我的查证处理 */ 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(); }