Ejemplo n.º 1
0
 /**
  * 员工恢复
  */
 public function actionEmployeeResume()
 {
     $this->_createServerList();
     $this->_utilFRGInterface = $this->_getGlobalData('Util_FRGInterface', 'object');
     $this->_utilFRGInterface->setServerUrl($_REQUEST['server_id']);
     if ($this->_isPost()) {
         if ('' == trim($_POST['cause'])) {
             $this->_utilMsg->showMsg(Tools::getLang('TPL_REASON_CAN_NOT_BE_EMPTY', __CLASS__), -1, 2);
             //'原因不能为空'
         }
         //记录游戏后台新操作日志
         $AddLog = '操作:<font style="color:#F00">员工恢复</font>';
         $AddLog .= '<br>操作人:<b>{UserName}</b>';
         $ENames = '';
         foreach ($_POST['EIds'] as $eid) {
             $ENames .= $_POST['ENames_' . $eid] . ',';
         }
         $AddLog .= '<br>恢复的员工:' . $ENames;
         $AddLog .= '<br>原因:' . $_POST['cause'];
         $this->_modelGameOperateLog = $this->_getGlobalData('Model_GameOperateLog', 'object');
         $GameOperateLog = $this->_modelGameOperateLog->GameOperateLogMake(array(0 => array('UserId' => $_GET['UserId'])), 3, $_REQUEST['server_id'], $AddLog);
         if (false != $GameOperateLog && is_array($GameOperateLog) && count($GameOperateLog) > 0) {
             foreach ($GameOperateLog as $sub) {
                 $this->_modelGameOperateLog->add($sub);
             }
         }
         $this->_utilFRGInterface->setGet(array('c' => 'UserData', 'a' => 'EmployeeResume', 'doaction' => $_POST['doaction'], 'UserId' => $_GET['UserId']));
         $PostData['EIds'] = $_POST['EIds'];
         $this->_utilFRGInterface->setPost($PostData);
         $data = $this->_utilFRGInterface->callInterface();
         $this->_utilMsg->showMsg($data['message'], -1);
     } else {
         $_GET['DigStatus'] = intval($_GET['DigStatus']);
         $DigStatusMap = array('0' => '2', '1' => '0', '2' => '1');
         $DigStatus = array('0' => Tools::getLang('ALL', 'Common'), '1' => Tools::getLang('NOT_POACHER', __CLASS__), '2' => Tools::getLang('POACHER', __CLASS__));
         $this->_utilFRGInterface->setGet(array('c' => 'UserData', 'a' => 'EmployeeResume', 'UserId' => $_GET['UserId'], 'DelDay' => $_GET['DelDay'], 'DigStatus' => $DigStatusMap[$_GET['DigStatus']]));
         $data = $this->_utilFRGInterface->callInterface();
         if ($data) {
             if ($data['data']['ResumeDays']) {
                 foreach ($data['data']['ResumeDays'] as $val) {
                     $ResumeDays[$val] = $val . Tools::getLang('DAY', 'Common');
                 }
                 $ResumeDays[0] = Tools::getLang('ALL', 'Common');
             }
             $this->_view->assign('DataTable', $data['data']['DataTable']);
             $this->_view->assign('DelDay', $ResumeDays);
             $this->_view->assign('DigStatus', $DigStatus);
             $this->_view->assign('dataList', $data['data']['Employees']);
         }
         $selected = array('UserId' => $_GET['UserId'], 'DelDay' => $_GET['DelDay'], 'DigStatus' => $_GET['DigStatus']);
         $this->_view->assign('selected', $selected);
         $this->_utilMsg->createPackageNavBar();
         $this->_view->display();
     }
 }
Ejemplo n.º 2
0
 /**
  * 封锁IP管理
  */
 public function actionLockIP()
 {
     $this->_createServerList();
     if ($_REQUEST['server_id']) {
         //如果选择了服务器将显示
         $this->_utilFRGInterface = $this->_getGlobalData('Util_FRGInterface', 'object');
         $this->_utilFRGInterface->setServerUrl($_REQUEST['server_id']);
         //初始化连接url地址
         if ($this->_isPost()) {
             //提交表单
             $sendParams = Tools::getFilterRequestParam();
             $this->_utilFRGInterface->setGet(array('c' => 'Conf', 'a' => 'CommonVartype', 'doaction' => 'saveedit'));
             $this->_utilFRGInterface->setPost($sendParams);
             $data = $this->_utilFRGInterface->callInterface();
             if ($data) {
                 //warren 封Ip日志
                 $this->_modelGameOperateLog = $this->_getGlobalData('Model_GameOperateLog', 'object');
                 $AddLog = array(array('操作', '<font style="color:#F00">封IP</font>'), array('操作时间', date('Y-m-d H:i:s', CURRENT_TIME)), array('操作人', '<b>{UserName}</b>'), array('原因', $_POST['cause']));
                 $AddLog = $this->_modelGameOperateLog->addInfoMake($AddLog);
                 $GameOperateLog = $this->_modelGameOperateLog->MakeDataForStore(array("UserId" => "-1"), 5, $_REQUEST['server_id'], $AddLog);
                 if (false !== $GameOperateLog) {
                     $this->_modelGameOperateLog->add($GameOperateLog);
                 }
                 //================================
                 if ($data['msgno'] == 1) {
                     //						$this->_modelFrgLog=$this->_getGlobalData('Model_FrgLog','object');
                     //						$this->_modelFrgLog->add($_POST,2);
                     $this->_utilMsg->showMsg($data['message'], 1, Tools::url(CONTROL, ACTION, array('zp' => self::PACKAGE, 'server_id' => $_REQUEST['server_id'])));
                 } else {
                     $this->_utilMsg->showMsg($data['message'], -2, Tools::url(CONTROL, ACTION, array('zp' => self::PACKAGE, 'server_id' => $_REQUEST['server_id'])));
                 }
             } else {
                 $this->_utilMsg->showMsg(Tools::getLang('CONNECT_SERVER_ERROR', 'Common'), -1);
             }
         } else {
             //显示表单
             $this->_utilFRGInterface->setGet(array('c' => 'Conf', 'a' => 'CommonVartype'));
             $data = $this->_utilFRGInterface->callInterface();
             //print_r($data['data']['VarCat']['ForbiddenIPList']);
             if ($data) {
                 $this->_view->assign('data', $data['data']['VarCat']['ForbiddenIPList']);
             } else {
                 $this->_view->assign('errorConn', Tools::getLang('CONNECT_SERVER_ERROR', 'Common'));
             }
         }
     }
     $this->_utilMsg->createPackageNavBar();
     $this->_view->display();
 }
Ejemplo n.º 3
0
 public function actionLockUserAdd()
 {
     $this->_createMultiServerList();
     $serverList = $this->_getGlobalData('gameser_list');
     if ($this->_isPost()) {
         $this->_utilApiFrg = $this->_getGlobalData('Util_ApiFrg', 'object');
         $this->_modelFrgSpecialActivity = $this->_getGlobalData('Model_FrgSpecialActivity', 'object');
         $getArr = array('c' => 'LockUser', 'a' => 'Add', 'doaction' => 'saveadd', 'ReceiveType' => '1');
         $postArr = $_POST;
         unset($postArr['cause'], $postArr['server_ids']);
         if (!count($_POST['server_ids'])) {
             $this->_utilMsg->showMsg(Tools::getLang('PLEASE_SELECTSERVER', 'Common'), -1, 2);
         }
         if (!is_array($_POST['server_ids'])) {
             $this->_utilMsg->showMsg('error post data', -1, 2);
         }
         foreach ($_POST['server_ids'] as $serverId) {
             $this->_utilApiFrg->addHttp($serverId, $getArr, $postArr);
         }
         $this->_utilApiFrg->send();
         $data = $this->_utilApiFrg->getResults();
         if ($data) {
             //记录操作日志
             $this->_modelGameOperateLog = $this->_getGlobalData('Model_GameOperateLog', 'object');
             foreach ($data as $key => $SubData) {
                 if ($SubData['msgno'] == 1) {
                     //记录游戏后台新操作日志
                     $AddLog = '操作:<font style="color:#F00">封号</font>';
                     $AddLog .= '<br>操作人:<b>{UserName}</b>';
                     $AddLog .= '<br>封号结束时间:' . $_POST['Data']['EndTime'];
                     $AddLog .= '<br>原因:' . $_POST['cause'];
                     $GameOperateLog = $this->_modelGameOperateLog->GameOperateLogMake($SubData['backparams']['Exist'], 1, $key, $AddLog);
                     if (false != $GameOperateLog && is_array($GameOperateLog) && count($GameOperateLog) > 0) {
                         foreach ($GameOperateLog as $sub) {
                             $this->_modelGameOperateLog->add($sub);
                         }
                     }
                 }
             }
             $this->_utilMsg->showMsg(Tools::getLang('OPERATION_SUCCESS', 'Common'));
         }
         $this->_utilMsg->showMsg(Tools::getLang('OPERATION_FAILURE', 'Common'), -1, 2);
     }
     $this->_utilMsg->createNavBar();
     $this->_view->display();
 }
Ejemplo n.º 4
0
 /**
  * 查看封号原因
  */
 private function _lockUserDetail()
 {
     //print_r($_GET);
     $_GET['game_server_id'] = intval($_GET['game_server_id']);
     $_GET['game_user_id'] = intval($_GET['game_user_id']);
     $gameSerList = $this->_getGlobalData('gameser_list');
     if (!array_key_exists($_GET['game_server_id'], $gameSerList)) {
         exit(Tools::getLang('NO_SERVER', 'Common'));
     }
     //游戏后台新操作日志
     $this->_modelGameOperateLog = $this->_getGlobalData('Model_GameOperateLog', 'object');
     $dataList = $this->_modelGameOperateLog->findGameUserLog($_GET['game_server_id'], $_GET['game_user_id'], 1);
     foreach ($dataList as &$sub) {
         $sub['info'] = unserialize($sub['info']);
         $sub['info'] = $sub['info']['AddString'];
         $sub['create_time'] = date('Y-m-d H:i:s', $sub['create_time']);
     }
     $this->_view->assign('dataList', $dataList);
     //		$this->_view->assign('tplServerSelect','MasterFRG/GameOperateLogDetail.html');
     $this->_view->set_tpl(array('body' => 'MasterFRG/GameOperateLogDetail.html'));
     //设置使用自定义模板
     $this->_view->display();
 }
Ejemplo n.º 5
0
 public function actionGetInfo()
 {
     $_GET['game_server_id'] = intval($_GET['game_server_id']);
     $_GET['game_user_id'] = intval($_GET['game_user_id']);
     $_GET['operate_type'] = intval($_GET['operate_type']);
     $_GET['page'] = max(1, intval($_GET['page']));
     $_GET['page_size'] = intval($_GET['page_size']);
     if (!$_GET['page_size']) {
         $_GET['page_size'] = 50;
     }
     $this->_modelGameOperateLog = $this->_getGlobalData('Model_GameOperateLog', 'object');
     $this->_loadCore('Help_SqlSearch');
     //载入sql工具
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_field('Id,info,create_time');
     $helpSqlSearch->set_tableName($this->_modelGameOperateLog->tName());
     if ($_GET['game_server_id']) {
         $helpSqlSearch->set_conditions("game_server_id={$_GET['game_server_id']}");
     }
     if ($_GET['game_user_id']) {
         $helpSqlSearch->set_conditions("game_user_id={$_GET['game_user_id']}");
     }
     if ($_GET['operate_type']) {
         $helpSqlSearch->set_conditions("operate_type={$_GET['operate_type']}");
     }
     $helpSqlSearch->set_orderBy('Id desc');
     $helpSqlSearch->setPageLimit($_GET['page'], $_GET['page_size']);
     $sql = $helpSqlSearch->createSql();
     $dataList = $this->_modelGameOperateLog->select($sql);
     foreach ($dataList as &$sub) {
         $sub['info'] = unserialize($sub['info']);
         $sub['info'] = $sub['info']['AddString'];
         $sub['create_time'] = date('Y-m-d H:i:s', $sub['create_time']);
     }
     $this->_returnAjaxJson($dataList);
 }