コード例 #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();
     }
 }
コード例 #2
0
ファイル: MasterFRG.class.php プロジェクト: huangwei2wei/kfxt
 /**
  * 增加封号用户
  */
 private function _lockUsersAdd()
 {
     $this->_createServerList();
     if ($_REQUEST['server_id']) {
         //如果选择了服务器将显示
         if ($this->_isPost() && $_POST['submit']) {
             //提交表单
             $this->_utilFRGInterface = $this->_getGlobalData('Util_FRGInterface', 'object');
             $this->_utilFRGInterface->setServerUrl($_REQUEST['server_id']);
             //初始化连接url地址
             $sendParams = Tools::getFilterRequestParam();
             $this->_utilFRGInterface->setGet(array('c' => 'LockUser', 'a' => 'Add', 'doaction' => 'saveadd'));
             $this->_utilFRGInterface->setPost($sendParams);
             $data = $this->_utilFRGInterface->callInterface();
             if ($data) {
                 if ($data['msgno'] == 1) {
                     //记录富人国操作日志
                     $this->_modelFrgLog = $this->_getGlobalData('Model_FrgLog', 'object');
                     $this->_modelFrgLog->add($_POST, 3);
                     //记录游戏后台新操作日志
                     $AddLog = '操作:<font style="color:#F00">封号</font>';
                     $AddLog .= '<br>操作人:<b>{UserName}</b>';
                     $AddLog .= '<br>封号结束时间:' . $_POST['Data']['EndTime'];
                     $AddLog .= '<br>原因:' . $_POST['cause'];
                     $this->_modelGameOperateLog = $this->_getGlobalData('Model_GameOperateLog', 'object');
                     $GameOperateLog = $this->_modelGameOperateLog->GameOperateLogMake($data['backparams']['Exist'], 1, $_REQUEST['server_id'], $AddLog);
                     if (false != $GameOperateLog && is_array($GameOperateLog) && count($GameOperateLog) > 0) {
                         foreach ($GameOperateLog as $sub) {
                             $this->_modelGameOperateLog->add($sub);
                         }
                     }
                     if (is_array($data['backparams']['NoExist']) && count($data['backparams']['NoExist']) > 0) {
                         $data['message'] .= Tools::getLang('SEND_ERRORMSG', __CLASS__) . implode(',', $data['backparams']['NoExist']) . '</b>';
                     }
                     $this->_utilMsg->showMsg($data['message'], 1, Tools::url(CONTROL, 'LockUsers', array('server_id' => $_REQUEST['server_id'])));
                 } else {
                     $this->_utilMsg->showMsg($data['message'], -2, Tools::url(CONTROL, ACTION, array('server_id' => $_REQUEST['server_id'])));
                 }
             } else {
                 $this->_utilMsg->showMsg(Tools::getLang('CONNECT_SERVER_ERROR', 'Common'), -1);
             }
         } else {
             //显示表单
             if ($_POST['UserId']) {
                 $this->_view->assign('users', implode(',', $_POST['UserId']));
             }
         }
     }
     $this->_view->set_tpl(array('body' => 'MasterFRG/AddLockUsers.html'));
     $this->_utilMsg->createNavBar();
     $this->_view->display();
 }
コード例 #3
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();
 }
コード例 #4
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();
 }