/**
  * 返回二维数组,第一维键名:游戏id,第二维键名:游戏与运营商对应的id,第二维键值:运营商名
  * @author xy
  */
 public function getGameOperator($returnOptId = false)
 {
     $dataList = $this->select("select * from {$this->tName()}");
     $game = array();
     $operatorIds = $this->_getGlobalData('operator_list');
     $operatorIds = Model::getTtwoArrConvertOneArr($operatorIds, 'Id', 'operator_name');
     //运营商
     if ($returnOptId) {
         foreach ($dataList as $val) {
             $gameId = $val['game_type_id'];
             $opeartorId = $val['operator_id'];
             if (isset($operatorIds[$opeartorId])) {
                 $game[$gameId][$opeartorId] = $operatorIds[$opeartorId];
             }
         }
     } else {
         foreach ($dataList as $val) {
             $Id = $val['Id'];
             $gameId = $val['game_type_id'];
             $opeartorId = $val['operator_id'];
             if (isset($operatorIds[$opeartorId])) {
                 $game[$gameId][$Id] = $operatorIds[$opeartorId];
             }
         }
     }
     return $game;
 }
 function actionIndex()
 {
     $this->_modelLostPassword = $this->_getGlobalData('Model_LostPassword', 'object');
     $status = $this->_modelLostPassword->getStatus();
     $this->_view->assign('statusSelect', $status);
     $status[''] = Tools::getLang('ALL', 'Common');
     $gameTypes = $this->_getGlobalData('game_type');
     $gameTypes = Model::getTtwoArrConvertOneArr($gameTypes, 'Id', 'name');
     $serverList = $this->_getGlobalData('gameser_list');
     $serverList = Model::getTtwoArrConvertOneArr($serverList, 'Id', 'server_name');
     $this->_utilMsg->createNavBar();
     $where = array();
     if ($this->_isPost()) {
         $selected['status'] = $_POST['status'];
         if (intval($_POST['status']) > 0) {
             $where['status'] = $_POST['status'];
         }
     }
     $order = 'status asc,Id desc';
     $dataList = $this->_modelLostPassword->getOrder($where, 1, $order);
     $this->_loadCore('Help_Page');
     $currUrl = Tools::url(CONTROL, 'EventList', $selected);
     $helpPage = new Help_Page(array('total' => $this->_modelLostPassword->getCount($where), 'perpage' => PAGE_SIZE, 'url' => $currUrl));
     $this->_view->assign('pageBox', $helpPage->show());
     $this->_view->assign('gameTypes', $gameTypes);
     $this->_view->assign('serverList', $serverList);
     $this->_view->assign('chargeType', $this->_modelLostPassword->getChargeType());
     $this->_view->assign('status', $this->_modelLostPassword->getStatus());
     $this->_view->assign('status', $status);
     $this->_view->assign('dataList', $dataList);
     $this->_view->assign('selected', $selected);
     $this->_view->display();
 }
 public function __construct()
 {
     $gameTypes = $this->_getGlobalData('game_type');
     $gameTypes = Model::getTtwoArrConvertOneArr($gameTypes, 'Id', 'name');
     $this->_mainKind = $gameTypes;
     $this->_mainKind[0] = '网上银行';
 }
Beispiel #4
0
 /**
  * 获取在线所有用户
  * @param string $value online表字段,user_id/user_name(default)
  * @return array
  */
 public function getOnlineUser($value = 'user_name')
 {
     $users = $this->_modelOnlineUser->findAll();
     $users = Model::getTtwoArrConvertOneArr($users, null, $value);
     if (!is_array($users)) {
         $users = array();
     }
     return $users;
 }
Beispiel #5
0
 /**
  * 建立公分类列表
  */
 public function createBulletinKind()
 {
     if (!$this->_bulletinKind) {
         $gameTypeList = $this->_getGlobalData('game_type');
         $gameType = Model::getTtwoArrConvertOneArr($gameTypeList, 'Id', 'name');
         $this->_bulletinKind = $gameType;
         $this->_bulletinKind['0'] = '公告';
     }
     return $this->_bulletinKind;
 }
Beispiel #6
0
 public function __construct()
 {
     $this->_createView();
     $this->_createUrl();
     $this->_utilMsg = $this->_getGlobalData('Util_Msg', 'object');
     $this->_modelPlayerFaq = $this->_getGlobalData('Model_PlayerFaq', 'object');
     $this->_modelPlayerKindFaq = $this->_getGlobalData('Model_PlayerKindFaq', 'object');
     $this->_modelServiceFaq = $this->_getGlobalData('Model_ServiceFaq', 'object');
     $this->_modelServiceKindFaq = $this->_getGlobalData('Model_ServiceKindFaq', 'object');
     $this->_modelSysconfig = $this->_getGlobalData('Model_Sysconfig', 'object');
     #------更改faq主分类------#
     $this->_faqKind = Model::getTtwoArrConvertOneArr($this->_modelSysconfig->getValueToCache('game_type'), 'Id', 'name');
     #------更改faq主分类------#
 }
Beispiel #7
0
 /**
  * 建立多服务器列表
  */
 private function _createMultiServerList()
 {
     $operatorList = $this->_getGlobalData('operator_list');
     $operatorList = Model::getTtwoArrConvertOneArr($operatorList, 'Id', 'operator_name');
     $gameServerList = $this->_getGlobalData('gameser_list');
     foreach ($gameServerList as $key => &$value) {
         if ($value['game_type_id'] != 3) {
             unset($gameServerList[$key]);
         }
     }
     $this->_view->assign('gameServerList', json_encode($gameServerList));
     $this->_view->assign('tplServerSelect', 'GmSftx/MultiServerSelect.html');
     $this->_view->assign('operatorList', $operatorList);
 }
Beispiel #8
0
 /**
  * 单服务器选择列表
  */
 protected function _createServerList()
 {
     $operatorList = $this->_getGlobalData('operator_list');
     $operatorList = Model::getTtwoArrConvertOneArr($operatorList, 'Id', 'operator_name');
     $gameServerList = $this->_getGlobalData('server/server_list_' . self::SFTX_ID);
     $this->_view->assign('gameServerList', json_encode($gameServerList));
     $this->_view->assign('tplServerSelect', 'Sftx/ServerSelect/ServerSelect.html');
     if ($_REQUEST['server_id']) {
         $this->_view->assign('display', true);
         $this->_view->assign('selectedServerId', $_REQUEST['server_id']);
         $this->_view->assign('selectedServername', $gameServerList[$_REQUEST['server_id']]['server_name']);
         $this->_operatorId = $gameServerList[$_REQUEST['server_id']]['operator_id'];
         $this->_view->assign('selectedOperatorId', $this->_operatorId);
     }
 }
Beispiel #9
0
 public function getMyOperator()
 {
     $operators = $this->_getGlobalData('operator_list');
     $operators = Model::getTtwoArrConvertOneArr($operators, 'Id', 'operator_name');
     if (!in_array($this->_userClass['_userName'], explode(',', MasterAccount))) {
         $returnDate = array();
         foreach ($this->_gameOperator as $sub) {
             $operator_id = $sub['operator_id'];
             if (array_key_exists($operator_id, $operators)) {
                 $returnDate[$operator_id] = $operators[$operator_id];
             }
         }
         return $returnDate;
     }
     return $operators;
 }
Beispiel #10
0
 public function getMyGame()
 {
     $gameTypes = $this->_getGlobalData('game_type');
     $gameTypes = Model::getTtwoArrConvertOneArr($gameTypes, 'Id', 'name');
     if (!in_array($this->_userClass['_userName'], explode(',', MasterAccount))) {
         $returnDate = array();
         foreach ($this->_gameOperator as $sub) {
             $gameId = $sub['game_type_id'];
             if (array_key_exists($gameId, $gameTypes)) {
                 $returnDate[$gameId] = $gameTypes[$gameId];
             }
         }
         return $returnDate;
     }
     return $gameTypes;
 }
Beispiel #11
0
 /**
  * 建立缓存
  * @return void
  */
 public function createToCache()
 {
     $serverList = $this->select("select * from {$this->tName()} order by game_type_id");
     $operatorList = $this->_getGlobalData('operator_list');
     $operatorList = Model::getTtwoArrConvertOneArr($operatorList, 'Id', 'operator_name');
     $gameTypeList = $this->_getGlobalData('game_type');
     $gameTypeList = Model::getTtwoArrConvertOneArr($gameTypeList, 'Id', 'name');
     $tmpArr = array();
     $num = count($serverList);
     //建立缓存时,让条记录的ID,成为这个数组的key值,方便后期优化
     for ($i = 0; $i < $num; $i++) {
         $serverList[$i]['full_name'] = "{$serverList[$i]['server_name']}({$operatorList[$serverList[$i]['operator_id']]})[{$gameTypeList[$serverList[$i]['game_type_id']]}]";
         $tmpArr[$serverList[$i]['Id']] = $serverList[$i];
     }
     return $this->_addCache($tmpArr, $this->_cacheFile);
 }
Beispiel #12
0
 /**
  * 生成服务器列表
  * @param array $params
  */
 private function _createGameServerSelect($params)
 {
     $labelParams = '';
     $label = '<select name="game_server_id" >';
     $options = '';
     $operator = $this->_getGlobalData('operator_list');
     $serverList = $this->_getGlobalData('gameser_list');
     $operatorList = Model::getTtwoArrConvertOneArr($operator, 'Id', 'operator_name');
     foreach ($serverList as $value) {
         if ($value['game_type_id'] == $this->_selectedGameType) {
             $options .= "<option value=\"{$value['operator_id']},{$value['Id']}\">{$value['server_name']}({$operatorList[$value['operator_id']]})</option>";
         }
     }
     $label .= $options;
     $label .= '</select>';
     return array('title' => '请选择游戏服务器', 'description' => '选择服务器列表', 'label' => $label);
 }
 /**
  * 群发公告
  */
 public function actionAllAdd()
 {
     $this->_checkOperatorAct();
     $this->_createCenterServer();
     $servers = $this->_getAllServerIds();
     $serversInfo = $this->_getGlobalData('server/server_list_' . self::XUN_XIA_ID);
     $serversInfo = Model::getTtwoArrConvertOneArr($serversInfo, 'marking', 'server_name');
     $sendData = array();
     if ($this->_isPost()) {
         //die($_REQUEST['server_id']);
         if (empty($_POST['serverId'])) {
             $this->_utilMsg->showMsg('请选择发送的服务', -1);
         }
         $sendData = array();
         foreach ($_POST['serverId'] as $val) {
             if ($servers[$val]) {
                 $sendData['serverId'][$val] = $servers[$val];
                 $sendData['serversInfo'][$val] = isset($serversInfo[$servers[$val]]) ? $serversInfo[$servers[$val]] : $servers[$val];
             }
         }
         if (empty($sendData['serverId'])) {
             $this->_utilMsg->showMsg('服务器信息错误,请更新服务器', -1);
         }
         $sendData['serverId'] = implode(',', $sendData['serverId']);
         $this->getApi()->setUrl($_REQUEST['server_id'], 'oneNotice/notice');
         $data = $this->getApi()->saveNotice(strval($_POST['title']), strval($_POST['content']), strval($_POST['begin']), strval($_POST['end']), intval($_POST['interval']), $_POST['url'], $sendData['serverId']);
         if ($data === 0) {
             $this->_utilMsg->showMsg('添加公告成功', 1, Tools::url(CONTROL, 'AllAdd', array('zp' => 'XunXia', 'server_id' => $_REQUEST['server_id'])));
         } else {
             $this->_utilMsg->showMsg('添加公告失败', 1);
         }
     } else {
         //<input class="serverId" type="checkbox" value="S1" name="serverId[]">
         if ($servers) {
             $serverToSlt = array();
             foreach ($servers as $k => $v) {
                 $serverToSlt[$k] = "{$k}";
                 //$serverToSlt[$k] = isset($serversInfo[$v])?$serversInfo[$v]."($v)":$v;
             }
             $this->_view->assign('server', $serverToSlt);
         }
         //print_r($serverToSlt);
         $this->_utilMsg->createPackageNavBar();
         $this->_view->display();
     }
 }
 /**
  * 编辑项目
  */
 public function actionEdit()
 {
     $this->_modelProgramProject = $this->_getGlobalData('Model_ProgramProject', 'object');
     if ($this->_isPost()) {
         $this->_modelProgramProject = $this->_getGlobalData('Model_ProgramProject', 'object');
         $info = $this->_modelProgramProject->edit($_POST);
         $this->_utilMsg->showMsg($info['msg'], $info['status'], $info['href']);
     } else {
         $users = $this->_modelProgramProject->findProjectUser(self::DEPARTMENT_IT, $_GET['Id']);
         $users['full_user'] = Model::getTtwoArrConvertOneArr($users['full_user'], 'Id', 'nick_name');
         $users['all_user'] = Model::getTtwoArrConvertOneArr($users['all_user'], 'Id', 'nick_name');
         $dataList = $this->_modelProgramProject->findById($_GET['Id']);
         $this->_view->assign('dataList', $dataList);
         $this->_view->assign('users', $users);
         $this->_utilMsg->createPackageNavBar();
         $this->_view->display();
     }
 }
Beispiel #15
0
 public function getApplyType($ListType = 0, $gameId = 0)
 {
     switch ($ListType) {
         case 0:
             return false;
             break;
         case -1:
             //从缓存中拿到所有申请类型
             $ApplyType = $this->_getGlobalData($this->_cacheApplyTypeAll);
             break;
         default:
             //从缓存中拿到申请类型
             $ApplyType = $this->_getGlobalData($this->_cacheApplyType);
             $ApplyType = $ApplyType[$ListType];
             break;
     }
     if (empty($ApplyType)) {
         return false;
         //$this->_utilMsg->showMsg('List Type Error',-1);
     }
     if ($gameId) {
         $ApplyType = $ApplyType[$gameId];
     } else {
         $tmp = array();
         foreach ($ApplyType as $sub) {
             $tmp = array_merge($tmp, $sub);
         }
         $ApplyType = $tmp;
         unset($tmp);
     }
     if ($ApplyType) {
         return Model::getTtwoArrConvertOneArr($ApplyType, 'Id', 'name');
     } else {
         return array();
     }
 }
Beispiel #16
0
 public function getGameType()
 {
     $gameTypes = $this->_getGlobalData('game_type');
     $gameTypes = Model::getTtwoArrConvertOneArr($gameTypes, 'Id', 'name');
     return $gameTypes;
 }
Beispiel #17
0
 /**
  * 选择了游戏,提交了问题名称之后进入的页面
  */
 public function actionAsk()
 {
     if ($this->_isPost()) {
         $gameTypeList = Model::getTtwoArrConvertOneArr($this->_modelSysconfig->getValueToCache('game_type'), 'Id', 'name');
         $question = $this->_modelQuestionType->findById($_POST['question_type']);
         //查找ID对应的问题
         Tools::import('Util_QuickForm');
         $quickForm = new Util_QuickForm();
         $quickForm->set_selectedGameType($_POST['game_type']);
         //设置用户提交过来的游戏类型,方便调用服务器列表
         $quickForm->addManyElementArray($question['form_table']);
         $this->_view->assign('questionHtml', $quickForm->get_formHtml());
         $this->_view->assign('questionTitle', $question['title']);
         //获取问题标题
         $this->_view->assign('gameType', $_POST['game_type']);
         $this->_view->assign('questionType', $_POST['question_type']);
         $this->_view->assign('word_gameType', $gameTypeList[$_POST['game_type']]);
         $this->_view->assign('title', $_POST['title']);
         $this->_utilMsg->createNavBar();
         $this->_view->display();
     }
 }
 /**
  * 按小时统计 
  */
 public function actionHour()
 {
     $operatorList = $this->_getGlobalData('operator_list');
     $operatorList = Model::getTtwoArrConvertOneArr($operatorList, 'Id', 'operator_name');
     $gameTypeList = $this->_getGlobalData('game_type');
     $gameTypeList = Model::getTtwoArrConvertOneArr($gameTypeList, 'Id', 'name');
     $this->_modelGameOperator = $this->_getGlobalData('Model_GameOperator', 'object');
     $gameOperatorIndex = $this->_modelGameOperator->findAll();
     foreach ($gameOperatorIndex as &$value) {
         $value['word_operator_id'] = $operatorList[$value['operator_id']];
     }
     if ($this->_isPost()) {
         if (empty($_POST['start_date']) || empty($_POST['end_date'])) {
             $this->_utilMsg->showMsg('统计日期不能为空', -2);
         }
         if (empty($_POST['game_type_id']) || !count($_POST['operator_id'])) {
             $this->_utilMsg->showMsg('请选译游戏,和运营商', -2);
         }
         $curDate = $_POST['date'];
         $this->_view->assign('selectedGameTypeId', $_POST['game_type_id']);
         $selectedOperatorList = array();
         foreach ($_POST['operator_id'] as $operatorId) {
             if (array_key_exists($operatorId, $operatorList)) {
                 $selectedOperatorList[$operatorId] = $operatorList[$operatorId];
             }
         }
         $this->_view->assign('selectedOperatorIds', $_POST['operator_id']);
         $this->_view->assign('selectedOperatorList', $selectedOperatorList);
         $this->_view->assign('selectedTime', array('start_date' => $_POST['start_date'], 'end_date' => $_POST['end_date']));
         $date['start'] = strtotime($_POST['start_date']);
         $date['end'] = strtotime($_POST['end_date']);
         $this->_modelWorkOrder = $this->_getGlobalData('Model_WorkOrder', 'object');
         $this->_modelWorkOrderQa = $this->_getGlobalData('Model_WorkOrderQa', 'object');
         $this->_modelReplyQulity = $this->_getGlobalData('Model_ReplyQulity', 'object');
         $this->_modelVerify = $this->_getGlobalData('Model_Verify', 'object');
         $workOrderTotal = $this->_modelWorkOrder->getOperatorDayStatsNum($_POST['game_type_id'], $_POST['operator_id'], $date);
         $workOrderQaTotal = $this->_modelWorkOrderQa->getOperatorDayStatsNum($_POST['game_type_id'], $_POST['operator_id'], $date);
         $replyQulityTotal = $this->_modelReplyQulity->getOperatorDayStatsNum($_POST['game_type_id'], $_POST['operator_id'], $date);
         $bugListTotal = $this->_modelVerify->getOperatorDayStatsNum($_POST['game_type_id'], $_POST['operator_id'], $date);
         $total = array();
         for ($i = 0; $i <= 23; $i++) {
             if (!$workOrderQaTotal[$i]) {
                 $workOrderQaTotal[$i] = array();
             }
             if (!$replyQulityTotal[$i]) {
                 $replyQulityTotal[$i] = array();
             }
             if (!$workOrderTotal[$i]) {
                 $workOrderTotal[$i] = array();
             }
             if (!$bugListTotal[$i]) {
                 $bugListTotal[$i] = array();
             }
             $total[$i] = array_merge($workOrderQaTotal[$i], $replyQulityTotal[$i], $workOrderTotal[$i], $bugListTotal[$i]);
         }
         if (!$workOrderQaTotal['total']) {
             $workOrderQaTotal['total'] = array();
         }
         if (!$replyQulityTotal['total']) {
             $replyQulityTotal['total'] = array();
         }
         if (!$workOrderTotal['total']) {
             $workOrderTotal['total'] = array();
         }
         if (!$bugListTotal['total']) {
             $bugListTotal['total'] = array();
         }
         $total['total'] = array_merge($workOrderQaTotal['total'], $replyQulityTotal['total'], $workOrderTotal['total'], $bugListTotal['total']);
         ksort($total);
         $this->_view->assign('total', $total);
         $this->_view->assign('displayTrue', true);
     }
     $this->_view->assign('gameOperatorIndex', json_encode($gameOperatorIndex));
     $this->_view->assign('gameTypeList', $gameTypeList);
     $this->_utilMsg->createPackageNavBar();
     $this->_view->display();
 }
Beispiel #19
0
 private function _shareInfoEdit()
 {
     $_GET['Id'] = intval($_GET['Id']);
     $gameTypes = $this->_getGlobalData('game_type');
     $gameTypes = Model::getTtwoArrConvertOneArr($gameTypes, 'Id', 'name');
     $this->_modelLyShareInfo = $this->_getGlobalData('Model_LyShareInfo', 'object');
     if ($this->_isPost()) {
         if (!array_key_exists($_POST['game_type_id'], $gameTypes)) {
             $this->_utilMsg->showMsg('所选游戏不存在', -1);
         }
         if ('' == trim($_POST['title'])) {
             $this->_utilMsg->showMsg('标题不能为空', -1);
         }
         if ('' == trim($_POST['content'])) {
             $this->_utilMsg->showMsg('内容不能为空', -1);
         }
         $AddData = Tools::fieldFilter('game_type_id,title,content', $_POST);
         $userClass = $this->_utilRbac->getUserClass();
         $AddData['user_id'] = $userClass['_id'];
         $AddData['update_time'] = CURRENT_TIME;
         if ($this->_modelLyShareInfo->update($AddData, "Id = {$_GET['Id']}")) {
             $this->_utilMsg->showMsg('修改成功', 1, $this->_url['share_info'], 1);
         } else {
             $this->_utilMsg->showMsg('修改失败', -1);
         }
     }
     $data = $this->_modelLyShareInfo->findById($_GET['Id']);
     $this->_view->assign('data', $data);
     $this->_view->assign('game_type_id', $gameTypes);
     $this->_utilMsg->createPackageNavBar();
     $this->_view->display();
 }
Beispiel #20
0
 /**
  * 多运营商选择器
  */
 protected function _multiOperatorSelect($optGroupFunName = '')
 {
     $serverList = $this->_getGlobalData('server/server_list_' . self::GAME_ID);
     if ($optGroupFunName && is_callable(array(&$this, $optGroupFunName))) {
         $operatorGroup = call_user_func(array(&$this, $optGroupFunName));
     }
     if (!$operatorGroup) {
         $operatorList = $this->_getGlobalData('operator/operator_list_' . self::GAME_ID);
         $operatorList = Model::getTtwoArrConvertOneArr($operatorList, 'Id', 'operator_name');
         $operatorGroup = array(0 => $operatorList);
     }
     $optSer = array();
     foreach ($serverList as $serverId => $server) {
         $optSer[$server['operator_id']][$serverId] = $server['server_name'];
     }
     $this->_view->assign('optSer', json_encode($optSer));
     $this->_view->assign('operatorGroup', $operatorGroup);
     $this->_view->assign('tplServerSelect', 'OperationFRG/MultiServerSelect.html');
 }
 /**
  * 问题类型编辑
  */
 private function _qEdit()
 {
     if ($this->_isPost()) {
         $_POST['form_table'] = str_replace('\\', '', $_POST['form_table']);
         $_POST['form_table'] = 'return ' . $_POST['form_table'] . ';';
         $formTable = eval($_POST['form_table']);
         $formTable = serialize($formTable);
         $updateArr = array('game_type_id' => $_POST['game_type_id'], 'title' => $_POST['title'], 'form_table' => $formTable);
         if ($this->_modelQuestionType->update($updateArr, "Id={$_POST['Id']}")) {
             $this->_utilMsg->showMsg('编辑成功', 1);
         } else {
             $this->_utilMsg->showMsg('编辑失败', 1);
         }
     } else {
         $gameTypeList = Model::getTtwoArrConvertOneArr($this->_modelSysconfig->getValueToCache('game_type'), 'Id', 'name');
         $this->_view->assign('gameListSelect', $gameTypeList);
         $dataList = $this->_modelQuestionType->findById($_GET['Id'], false);
         $dataList['form_table'] = unserialize($dataList['form_table']);
         $dataList['form_table'] = var_export($dataList['form_table'], true);
         $this->_view->assign('list', $dataList);
         $this->_utilMsg->createNavBar();
         $this->_view->set_tpl(array('body' => 'SysManagement/QuestionEdit.html'));
         $this->_view->display();
     }
 }
Beispiel #22
0
 /**
  * 添加服务器
  */
 private function _add()
 {
     if ($this->_isPost()) {
         $addArr = array('game_type_id' => $_POST['game_type'], 'operator_id' => $_POST['operator_id'], 'server_name' => $_POST['server_name'], 'marking' => $_POST['marking'], 'server_url' => $_POST['server_url'], 'send_msg_url' => $_POST['send_msg_url']);
         if ($this->_modelGameSerList->add($addArr)) {
             $this->_utilMsg->showMsg('添加成功', 1, Tools::url(CONTROL, ACTION));
         } else {
             $this->_utilMsg->showMsg('添加失败', -2);
         }
     } else {
         $gameTypeList = Model::getTtwoArrConvertOneArr($this->_modelSysconfig->getValueToCache('game_type'), 'Id', 'name');
         $operatorList = $this->_modelOperatorList->findAll();
         $operatorList = Model::getTtwoArrConvertOneArr($operatorList, 'Id', 'operator_name');
         $this->_view->assign('operatorList', $operatorList);
         $this->_view->assign('gameTypeList', $gameTypeList);
         $this->_utilMsg->createNavBar();
         $this->_view->set_tpl(array('body' => 'GameSerList/Add.html'));
         $this->_view->display();
     }
 }
 private function _add()
 {
     $time = array();
     $time['start_time'] = date('Y-m-d 09:45:00', CURRENT_TIME);
     $startTimeCuo = strtotime($time['start_time']);
     $time['end_time'] = date('Y-m-d H:i:s', strtotime('+8 hour +15 minute', $startTimeCuo));
     if ($this->_isPost()) {
         $postArr = $time;
         $postArr['group_id'] = $_POST['group_id'];
         $postArr['content'] = $_POST['content'];
         $this->_modelProgramDatework = $this->_getGlobalData('Model_ProgramDatework', 'object');
         $info = $this->_modelProgramDatework->add($postArr);
         $this->_utilMsg->showMsg($info['msg'], $info['status'], $info['href']);
     } else {
         $programGroup = $this->_getGlobalData('program/project');
         $programGroup = Model::getTtwoArrConvertOneArr($programGroup, 'Id', 'name');
         $this->_view->assign('time', $time);
         $this->_view->assign('programGroup', $programGroup);
         $this->_utilMsg->createPackageNavBar();
         $this->_view->set_tpl(array('body' => 'ProgramDateWork/Add.html'));
         $this->_view->display();
     }
 }
Beispiel #24
0
 /**
  * 添加服务器
  */
 private function _serverlistadd()
 {
     if ($this->_isPost()) {
         if ($this->_modelGameSerList->addServerlist($_POST)) {
             $this->jump('添加成功', 1, Tools::url(CONTROL, ACTION, array('zp' => PACKAGE, '__game_id' => $this->_gameObject->_gameId)));
         } else {
             $this->jump('添加失败', -1);
         }
     } else {
         $gameTypeList = Model::getTtwoArrConvertOneArr($this->_modelSysconfig->getValueToCache('game_type'), 'Id', 'name');
         $operatorList = $this->_modelOperatorList->findAll();
         $operatorList = Model::getTtwoArrConvertOneArr($operatorList, 'Id', 'operator_name');
         $timer = array('0' => '关闭', '1' => '开启');
         $this->_assign['operatorList'] = $operatorList;
         $this->_assign['gameTypeList'] = $gameTypeList;
         $this->_assign['game_type'] = $_GET["__game_id"];
         $this->_assign['get'] = $_GET;
         $this->_assign['timer'] = $timer;
     }
     if (in_array($_REQUEST['__game_id'], $this->isCenterGame)) {
         $this->_assign['isCenter'] = array(0 => '不是', 1 => '是');
         $this->_assign['_body'] = "ActionGame_OperatorTools/ServerManagement/AddHaveCenter.html";
     } else {
         $this->_assign['_body'] = "ActionGame_OperatorTools/ServerManagement/Add.html";
     }
     return $this->_assign;
 }
Beispiel #25
0
 /**
  * 评价管理
  */
 private function _evManage()
 {
     $kind = $this->_modelPlayerKindFaq->findAll();
     $kind = Model::getTtwoArrConvertOneArr($kind, 'Id', 'name');
     $faqOpinion = $this->_getGlobalData('faq_opinion');
     $lang = $this->_getGlobalData('lang');
     $gameTypes = $this->_getGlobalData('game_type');
     $gameTypes = Model::getTtwoArrConvertOneArr($gameTypes, 'Id', 'name');
     $source = Tools::getLang('EVMANAGE_SOURCE', __CLASS__);
     $whether = Tools::getLang('EVMANAGE_WHETHER', __CLASS__);
     $this->_modelFaqLog = $this->_getGlobalData('Model_FaqLog', 'object');
     $selected = array();
     $selected['game_type_id'] = $_GET['game_type_id'];
     $selected['source'] = $_GET['source'];
     $selected['whether'] = $_GET['whether'];
     $selected['time'] = array('start' => $_GET['start_time'], 'end' => $_GET['end_time']);
     $selected['faq_id'] = $_GET['faq_id'];
     $selected['faq_opinion'] = $_GET['faq_opinion'];
     $selected['lang'] = $_GET['lang'];
     $data = $this->_modelFaqLog->findPage($selected, $_GET['page']);
     foreach ($data['dataList'] as &$list) {
         $list['word_game_type_id'] = $gameTypes[$list['game_type_id']];
         $list['word_lang_id'] = $lang[$list['lang_id']];
         $list['word_kind_id'] = $kind[$list['kind_id']];
         $list['date_create'] = date('Y-m-d H:i:s', $list['date_create']);
         $list['word_faq_whether'] = $whether[$list['faq_whether']];
         $list['url_detail'] = Tools::url(CONTROL, ACTION, array('doaction' => 'edit', 'Id' => $list['player_faq_id'], 'disabled' => 1));
         if (!$list['faq_whether']) {
             $list['opinion'] = $list['content'] ? $list['content'] : $faqOpinion[$list['faq_opinion']];
         }
     }
     $this->_loadCore('Help_Page');
     $faqOpinion[''] = Tools::getLang('ALL', 'Common');
     $helpPage = new Help_Page(array('total' => $data['total'], 'perpage' => PAGE_SIZE));
     $this->_view->assign('pageBox', $helpPage->show());
     $this->_view->assign('dataList', $data['dataList']);
     $this->_view->assign('selected', $selected);
     $this->_view->assign('gameTypes', $gameTypes);
     $this->_view->assign('source', $source);
     $this->_view->assign('whether', $whether);
     $this->_view->assign('faqOpinion', $faqOpinion);
     $this->_view->assign('lang', $lang);
     $this->_utilMsg->createNavBar();
     $this->_view->set_tpl(array('body' => 'Faq/PlayerEvManage.html'));
     $this->_view->display();
 }
 /**
  * 工单处理时长统计
  */
 public function actionTime()
 {
     $gameTypes = $this->_getGlobalData('game_type');
     $gameTypes = Model::getTtwoArrConvertOneArr($gameTypes, 'Id', 'name');
     $operatorIds = $this->_getGlobalData('operator_list');
     $operatorIds = Model::getTtwoArrConvertOneArr($operatorIds, 'Id', 'operator_name');
     $vipIndex = Tools::getLang('VIP_LEVEL', 'Common');
     $this->_modelRooms = $this->_getGlobalData('Model_Rooms', 'object');
     $roomList = $this->_modelRooms->findAll();
     $roomList = Model::getTtwoArrConvertOneArr($roomList, 'Id', 'name');
     //$roomList['']=Tools::getLang('All','Common');
     array_pop($vipIndex);
     //弹出最后一个
     if ($this->_isPost()) {
         $selected = array();
         if (!$_POST['game_type_id']) {
             $this->_utilMsg->showMsg('请至少选择一个游戏类型', -1);
         }
         if (!$_POST['operator_id']) {
             $this->_utilMsg->showMsg('请至少选择一个运营商', -1);
         }
         if (!$_POST['start_time'] || !$_POST['end_time']) {
             $this->_utilMsg->showMsg('请指定时间范围', -1);
         }
         $selected['roomList'] = $_POST['roomList'];
         $selected['game_type_id'] = $_POST['game_type_id'];
         $selected['operator_id'] = $_POST['operator_id'];
         $selected['start_time'] = $_POST['start_time'];
         $selected['end_time'] = $_POST['end_time'];
         $selected['vip_level'] = $_POST['vip_level'];
         $this->_view->assign('selected', $selected);
         $time = array('start_time' => strtotime($_POST['start_time']), 'end_time' => strtotime($_POST['end_time']));
         $this->_modelOrderLog = $this->_getGlobalData('Model_OrderLog', 'object');
         $dataList = $this->_modelOrderLog->statsTime($time, $_POST['game_type_id'], $_POST['operator_id'], $_POST['vip_level'], $_POST['roomList']);
         $this->_view->assign('dataList', $dataList);
         $this->_view->assign('display', true);
     }
     $this->_view->assign('roomList', $roomList);
     $this->_view->assign('vipIndex', $vipIndex);
     $this->_view->assign('gameTypes', $gameTypes);
     $this->_view->assign('operatorList', $operatorIds);
     $this->_utilMsg->createPackageNavBar();
     $this->_view->display();
 }
Beispiel #27
0
 private function _ref()
 {
     #------初始化------#
     if (!$this->_isAjax()) {
         return;
     }
     parse_str($_POST['url'], $_GET);
     $this->_modelWorkOrder = $this->_getGlobalData('Model_WorkOrder', 'object');
     $this->_modelSysconfig = $this->_getGlobalData('Model_Sysconfig', 'object');
     $this->_modelQuestionType = $this->_getGlobalData('Model_QuestionType', 'object');
     $this->_utilRbac = $this->_getGlobalData('Util_Rbac', 'object');
     $this->_utilRooms = $this->_getGlobalData('Util_Rooms', 'object');
     $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');
     $evArr = $this->_modelWorkOrder->getEvArr();
     //获取评价数组
     $badEvArr = $this->_getGlobalData('player_evaluation');
     $badEvArr = $badEvArr[3]['Description'];
     //差评数组
     #------初始化------#
     $userClass = $this->_utilRbac->getUserClass();
     $userGameTypes = $userClass->getUserGameTypeIds();
     //获取用户能控制的游戏ids
     $userOperatorIds = $userClass->getUserOperatorIds();
     //获取用户能控制的运营商ids
     $questionTypes = $this->_getGlobalData('question_types');
     $questionTypes = Model::getTtwoArrConvertOneArr($questionTypes, 'Id', 'title');
     $onlineUsers = $this->_utilOnline->getOnlineUser('user_id');
     //在线用户,一维数组,value值为user_id
     #------分页生成sql------#
     $this->_loadCore('Help_SqlSearch');
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->_modelWorkOrder->tName());
     if (!$_GET['view_type']) {
         $_GET['view_type'] = 1;
     }
     if ($_GET['view_type'] == 1) {
         $helpSqlSearch->set_conditions("owner_user_id={$userClass['_id']}");
     } else {
         if (count($userGameTypes) == 1) {
             $gameTypeId = reset($userGameTypes);
             $helpSqlSearch->set_conditions("game_type = {$gameTypeId}");
             //只能处理的所有工单
         } else {
             $helpSqlSearch->set_conditions("game_type in (" . implode(',', $userGameTypes) . ")");
             //只能处理的所有工单
         }
         if (count($userOperatorIds) == 1) {
             $operatorId = reset($userOperatorIds);
             $helpSqlSearch->set_conditions("operator_id = {$operatorId}");
         } else {
             $helpSqlSearch->set_conditions("operator_id in (" . implode(',', $userOperatorIds) . ")");
         }
     }
     if ($_GET['question_type']) {
         $helpSqlSearch->set_conditions("question_type={$_GET['question_type']}");
     }
     if ($_GET['vip_level'] != '') {
         $helpSqlSearch->set_conditions("vip_level={$_GET['vip_level']}");
     }
     if ($_GET['evaluation_status'] != '') {
         $helpSqlSearch->set_conditions("evaluation_status={$_GET['evaluation_status']}");
         if ($_GET['evaluation_status'] == 3) {
             //如果为差评
             $this->_view->assign('badev_display', true);
         }
     }
     if ($_GET['evaluation_desc'] != '') {
         $helpSqlSearch->set_conditions("evaluation_desc={$_GET['evaluation_desc']}");
     }
     if ($_GET['order_status']) {
         $helpSqlSearch->set_conditions("status={$_GET['order_status']}");
         $helpSqlSearch->set_orderBy('`create_time` desc');
     } else {
         $helpSqlSearch->set_orderBy('`status` asc,`create_time` desc');
     }
     if ($_GET['user_nickname']) {
         $helpSqlSearch->set_conditions("user_nickname='{$_GET['user_nickname']}'");
     }
     if ($_GET['user_account']) {
         $helpSqlSearch->set_conditions("user_account='{$_GET['user_account']}'");
     }
     if ($_GET['title']) {
         $helpSqlSearch->set_conditions("title like '%{$_GET['title']}%'");
     }
     $helpSqlSearch->setPageLimit($_GET['page'], PAGE_SIZE);
     $sql = $helpSqlSearch->createSql();
     $dataList = $this->_modelWorkOrder->select($sql);
     #------分页生成sql------#
     #------载入缓存------#
     $workOrderSourceArr = $this->_modelSysconfig->getValueToCache('workorder_source');
     $vipLevel = Tools::getLang('VIP_LEVEL', 'Common');
     $users = $this->_getGlobalData('user');
     $serverList = $this->_getGlobalData('gameser_list');
     #------载入缓存------#
     if ($dataList) {
         Tools::import('Util_FontColor');
         $timeInterval = array();
         //定时器计时
         foreach ($dataList as &$list) {
             $list['url_dialog'] = Tools::url(CONTROL, '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_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']] ? $questionTypes[$list['question_type']] : ' ';
             $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']]);
             //提问类型
             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 ($serverList[$list['game_server_id']]['time_zone'] != 0) {
                 $list['create_time'] = date('Y-m-d H:i:s', $list['create_time'] + $serverList[$list['game_server_id']]['time_zone'] * 3600);
             } 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);
             }
         }
     }
     $timeInterval = json_encode($timeInterval);
     $this->_view->assign('dataList', $dataList);
     $dataList = $this->_view->fetch('MyTask/Ref.html');
     $output = array('dataList' => $dataList, 'timer' => $timeInterval);
     $this->_returnAjaxJson(array('status' => 1, 'msg' => null, 'data' => $output));
 }
Beispiel #28
0
 public function getSqlSearch($sqldata)
 {
     $this->_loadCore('Help_SqlSearch');
     $_modelOperatorList = $this->_getGlobalData('Model_OperatorList', 'object');
     $modelOperatorList = $_modelOperatorList->findAll();
     $operatorList = $this->_getGlobalData('operator/operator_list_' . $sqldata['game_type']);
     $operatorList = $_modelOperatorList->getTtwoArrConvertOneArr($operatorList, 'Id', 'operator_name');
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->tName());
     //$helpSqlSearch->set_conditions ( 'Id !=100 and Id !=200' );
     $helpSqlSearch->set_conditions("game_type_id=" . $sqldata['game_type']);
     if ($sqldata['operator_id']) {
         $helpSqlSearch->set_conditions("operator_id={$sqldata['operator_id']}");
     }
     if ($sqldata['timer']) {
         $helpSqlSearch->set_conditions('timer = ' . $sqldata['timer']);
     }
     if ($sqldata['Id']) {
         $helpSqlSearch->set_conditions('Id=' . intval($sqldata['Id']));
     }
     if ($sqldata['marking']) {
         $helpSqlSearch->set_conditions("marking like '%{$sqldata['marking']}%'");
     }
     if ($sqldata['server_url']) {
         $helpSqlSearch->set_conditions("server_url like '%{$sqldata['server_url']}%'");
     }
     if ($sqldata['server_name']) {
         $helpSqlSearch->set_conditions("server_name like '%{$sqldata['server_name']}%'");
     }
     $helpSqlSearch->set_orderBy('operator_id,ordinal,Id');
     $helpSqlSearch->setPageLimit($sqldata['page']);
     $conditions = $helpSqlSearch->get_conditions();
     $sql = $helpSqlSearch->createSql();
     $serverList = $this->select($sql);
     $_modelSysconfig = $this->_getGlobalData('Model_Sysconfig', 'object');
     $gameTypeList = Model::getTtwoArrConvertOneArr($_modelSysconfig->getValueToCache('game_type'), 'Id', 'name');
     if ($serverList) {
         foreach ($serverList as &$value) {
             $value['word_game_type'] = $gameTypeList[$value['game_type_id']];
             $value['word_operator_name'] = $modelOperatorList[$value['operator_id']]['operator_name'];
             $value['url_edit'] = Tools::url(CONTROL, ACTION, array('Id' => $value['Id'], 'doaction' => 'edit', 'zp' => $sqldata['zp']));
             $value['url_del'] = Tools::url(CONTROL, ACTION, array('Id' => $value['Id'], 'doaction' => 'del', 'zp' => $sqldata['zp']));
         }
         $this->_loadCore('Help_Page');
         $helpPage = new Help_Page(array('total' => $this->findCount($conditions), 'perpage' => $this->_pagesize));
         $pageshow = $helpPage->show();
     }
     $operatorList[''] = Tools::getLang('ALL', 'Common');
     $data = array('serverList' => $serverList, 'pageBox' => $pageshow, 'operatorList' => $operatorList);
     return $data;
 }
 /**
  * 添加服务器
  */
 private function _serverlistadd()
 {
     if ($this->_isPost()) {
         if ($this->_modelGameSerList->addServerlist($_POST)) {
             $this->_utilMsg->showMsg(Tools::getLang('ADD_SUCCESS', 'Common'), 1, Tools::url(CONTROL, ACTION, array('zp' => "xianhun")));
         } else {
             $this->_utilMsg->showMsg(Tools::getLang('ADD_ERROR', 'Common'), -2);
         }
     } else {
         $gameTypeList = Model::getTtwoArrConvertOneArr($this->_modelSysconfig->getValueToCache('game_type'), 'Id', 'name');
         $operatorList = $this->_modelOperatorList->findAll();
         $operatorList = Model::getTtwoArrConvertOneArr($operatorList, 'Id', 'operator_name');
         $this->_view->assign('operatorList', $operatorList);
         $this->_view->assign('gameTypeList', $gameTypeList);
         $timer = array('0' => '关闭', '1' => '开启');
         $this->_view->assign('game_type', self::SFTX_ID);
         $this->_view->assign('timer', $timer);
         $this->_utilMsg->createPackageNavBar();
         $this->_view->set_tpl(array('body' => 'ServerList/Add.html'));
         $this->_view->display();
     }
 }
Beispiel #30
0
 /**
  * 后台右边主页面显示
  */
 public function actionRight()
 {
     $this->_utilMsg->createNavBar();
     $gameTypeList = $this->_getGlobalData('game_type');
     $gameTypeList = Model::getTtwoArrConvertOneArr($gameTypeList, 'Id', 'name');
     $operatorList = $this->_getGlobalData('operator_list');
     $operatorList = Model::getTtwoArrConvertOneArr($operatorList, 'Id', 'operator_name');
     $this->_utilRooms = $this->_getGlobalData('Util_Rooms', 'object');
     $userClass = $this->_utilRbac->getUserClass();
     $orgList = $this->_getGlobalData('org');
     $orgList = Model::getTtwoArrConvertOneArr($orgList, 'Id', 'name');
     $departmentList = $this->_getGlobalData('department');
     $departmentList = Model::getTtwoArrConvertOneArr($departmentList, 'Id', 'name');
     $userClass['word_department'] = $departmentList[$userClass['_departmentId']];
     $this->_modelRoles = $this->_getGlobalData('Model_Roles', 'object');
     if (count($userClass['_roles'])) {
         $rolesArr = array();
         foreach ($userClass['_roles'] as $roles) {
             $rolesArr[] = $this->_modelRoles->findByRoleToName($roles);
         }
         $userClass['word_roles'] = implode(',', $rolesArr);
     }
     $userClass['word_vip'] = implode(',', $userClass['_orderVipLevel']);
     $userClass['word_org'] = $orgList[$userClass['_orgId']];
     $userOeratorIds = array();
     $userClass['bulletin_list'] = $userClass->getMail(array(1, 15), array('type' => 1));
     //公告
     $userClass['bulletin_list'] = $userClass['bulletin_list']['data'];
     $userClass['work_list'] = $userClass->getMail(array(1, 15), array('type' => 2));
     //工作交接
     $userClass['work_list'] = $userClass['work_list']['data'];
     foreach ($userClass['_operatorIds'] as $list) {
         $str = "{$operatorList[$list['operator_id']]}[{$gameTypeList[$list['game_type_id']]}]";
         array_push($userOeratorIds, $str);
     }
     if ($userClass['_roomId']) {
         $roomClass = $this->_utilRooms->getRoom($userClass['_roomId']);
         $this->_view->assign('roomClass', $roomClass);
     }
     $this->_view->assign('userOeratorIds', $userOeratorIds);
     $this->_view->assign('userClass', $userClass);
     $this->_view->display();
 }