/** * 拒绝 */ private function _reject($options) { $this->_modelApplyDataFrg = $this->_getGlobalData('Model_ApplyDataFrg', 'object'); $this->_modelApplyDataFrg->set_options($options); $this->_modelApplyDataFrg->set_postArr($_POST); $data = $this->_modelApplyDataFrg->reject(); $this->_utilMsg->showMsg($data['msg'], $data['status'], $data['href']); }
/** * 生成卡号 */ public function actionCardAdd() { $this->_checkOperatorAct(true); //null : 检测$_SERVER['id'],true : 检测$_REQUEST['operator_id'] if ($this->_isPost()) { //检查所在游戏是否有相同批号 $this->_modelGoldCard = $this->_getGlobalData('Model_GoldCard', 'object'); $batchNum = md5($_POST['batch_num']); if ($this->_modelGoldCard->select("select Id from {$this->_modelGoldCard->tName()} where game_type={$this->game_id} and batch_num='{$batchNum}'", 1)) { $this->_utilMsg->showMsg(Tools::getLang('CARD_BATCHCLASH', __CLASS__), -1, 2); } $this->_modelApplyDataFrg = $this->_getGlobalData('Model_ApplyDataFrg', 'object'); $postArr = array(); $this->_utilRbac = $this->_getGlobalData('Util_Rbac', 'object'); $userClass = $this->_utilRbac->getUserClass(); $_POST['apply_user_id'] = $userClass['_id']; $postArr['type'] = 12; //金币卡号生成 $postArr['cause'] = $_POST['cause']; unset($_POST['cause']); $postArr['send_action'] = '0'; $_POST['game_type'] = $this->game_id; //在表中增加游戏ID,富人国game_id是2 $postArr['post_data'] = $_POST; $this->_modelApplyDataFrg->set_postArr($postArr); $data = $this->_modelApplyDataFrg->add(); $this->_utilMsg->showMsg($data['msg'], $data['status'], $data['href']); } else { if ($_GET['card_type']) { $this->_view->set_tpl(array('body' => "FrgGold/CardAdd{$_GET['card_type']}.html")); } else { $this->_view->set_tpl(array('body' => 'FrgGold/CardAdd.html')); } $this->_utilMsg->createNavBar(); $this->_view->display(); } }
/** * 生成礼包卡号 */ public function actionAddCard() { if ($_REQUEST['server_id'] && $this->_isPost()) { $sendParams = Tools::getFilterRequestParam(); $this->_modelApplyDataFrg = $this->_getGlobalData('Model_ApplyDataFrg', 'object'); $postArr = array(); $postArr['server_id'] = $_POST['server_id']; $postArr['type'] = 7; //礼包生成卡号 $postArr['cause'] = $_POST['cause']; unset($_POST['cause']); $postArr['send_action'] = array('c' => 'Card', 'a' => 'Create', 'doaction' => 'save'); $postArr['post_data'] = $_POST; $this->_modelApplyDataFrg->set_postArr($postArr); $data = $this->_modelApplyDataFrg->add(); $this->_utilMsg->showMsg($data['msg'], $data['status'], $data['href'], false); } else { $this->_createServerList(); $this->_utilFRGInterface = $this->_getGlobalData('Util_FRGInterface', 'object'); $this->_utilFRGInterface->setServerUrl($_REQUEST['server_id']); $sendParams = Tools::getFilterRequestParam(); $this->_utilFRGInterface->setGet(array('c' => 'Card', 'a' => 'Create')); $this->_utilFRGInterface->setPost($sendParams); $data = $this->_utilFRGInterface->callInterface(); if ($data['data']['TypeData']) { $this->_view->assign('cardList', json_encode($data['data']['TypeData'])); } //卡类型 $this->_view->assign('systemTime', $data['data']['SYSTEM_TIME']); if ($_GET['Id'] && $_GET['card_name']) { $this->_view->assign('selectedLibao', array('Id' => $_GET['Id'], 'card_name' => $_GET['card_name'])); } $this->_utilMsg->createNavBar(); $this->_view->display(); } }
/** * 多服务器玩家即时发放道具 */ public function actionRewardBefore() { if ($this->_isPost() && $_POST['submit']) { unset($_POST['submit']); $_POST['ToolId'] = $_POST['Tool']; $_POST['ToolIdName'] = $_POST['ToolName']; $_POST['ToolIdImg'] = $_POST['ToolImg']; unset($_POST['Tool'], $_POST['ToolName'], $_POST['ToolImg']); $this->_modelApplyDataFrg = $this->_getGlobalData('Model_ApplyDataBTO2', 'object'); $postArr = array(); $postArr['server_id'] = $_POST['server_id']; unset($_POST['server_id']); $postArr['type'] = 10; //'批量多玩家奖励发放' $postArr['cause'] = $_POST['cause']; unset($_POST['cause']); $postArr['send_action'] = array('c' => 'Reward', 'a' => 'SendAward', 'Action' => 'Save'); $postArr['post_data'] = $_POST; $this->_modelApplyDataFrg->set_postArr($postArr); $data = $this->_modelApplyDataFrg->add(); $this->_utilMsg->showMsg($data['msg'], $data['status'], $data['href'], false); } else { if (!count($_POST['ids'])) { $this->_utilMsg->showMsg(Tools::getLang('PLZ_SLT_USER', 'Common'), 1, -1); } if ($_POST['player_type'] == '') { $this->_utilMsg->showMsg(Tools::getLang('PARAMETER_ERROT', 'Common'), 1, -1); } $this->_utilFRGInterface = $this->_getGlobalData('Util_FRGInterface', 'object'); $this->_utilFRGInterface->setServerUrl($this->_defaultServerId); //初始化连接url地址 $this->_utilFRGInterface->setGet(array('c' => 'Reward', 'a' => 'SendAward')); $data = $this->_utilFRGInterface->callInterface(); if ($data) { $this->_view->assign('toolData', json_encode($data['data']['ToolData'])); $effData = $data['data']['ObjProp']; $newEffData = array(); foreach ($effData as $key => $value) { $newEffData[$key] = array(); foreach ($value as $childValue) { $newEffData[$key][$childValue]['Key'] = "{$key}.{$childValue}"; $newEffData[$key][$childValue]['Name'] = $data['data']['ObjData'][$key][$childValue]['Name']; } } $this->_view->assign('effData', json_encode($newEffData)); } else { $this->_utilMsg->showMsg(Tools::getLang('CONNECT_SERVER_ERROR', 'Common'), -1); } $serverList = $this->_getGlobalData('gameser_list'); $playerIds = array(); foreach ($_POST['ids'] as $id) { $playerIds[$_POST['server_id'][$id]][] = $_POST['player_id'][$id]; } foreach ($playerIds as &$serverPlayers) { $serverPlayers = array_unique($serverPlayers); } $this->_view->assign('playerIds', $playerIds); $this->_view->assign('serverList', $serverList); $this->_view->assign('serializePlayerIds', serialize($playerIds)); $this->_utilMsg->createNavBar(); $this->_view->display(); } }
/** * 架座数值修改 */ public function actionUserCarTune() { $this->_createServerList(); if ($_REQUEST['server_id']) { if ($_POST['user_edit']) { //改变玩家信息 $this->_modelApplyDataFrg = $this->_getGlobalData('Model_ApplyDataFrg', 'object'); $postArr = array(); $postArr['server_id'] = $_POST['server_id']; unset($_POST['server_id']); $postArr['type'] = 5; //员工数值修改 $postArr['cause'] = $_POST['cause']; unset($_POST['cause']); $postArr['send_action'] = array('c' => 'UserData', 'a' => 'CarTune', 'doaction' => 'save'); $postArr['post_data'] = $_POST; $this->_modelApplyDataFrg->set_postArr($postArr); $data = $this->_modelApplyDataFrg->add(); $this->_utilMsg->showMsg($data['msg'], $data['status'], $data['href'], false); } elseif ($_POST['addtool']) { //增加座驾道具 $sendParams = Tools::getFilterRequestParam(); $this->_utilFRGInterface = $this->_getGlobalData('Util_FRGInterface', 'object'); $this->_utilFRGInterface->setServerUrl($_REQUEST['server_id']); $sendParams = Tools::getFilterRequestParam(); $this->_utilFRGInterface->setGet(array('c' => 'UserData', 'a' => 'CarTune', 'doaction' => 'addtool')); $this->_utilFRGInterface->setPost($sendParams); $data = $this->_utilFRGInterface->callInterface(); if ($data) { if ($data['msgno'] == 1) { $this->_utilMsg->showMsg($data['message'], 1, 2); } else { $this->_utilMsg->showMsg($data['message'], -2, 2); } } else { $this->_utilMsg->showMsg(Tools::getLang('CONNECT_SERVER_ERROR', 'Common'), -1); } } elseif ($_POST['search_user'] || $_GET['request'] == 'read') { //搜索玩家信息 if ($_GET['request'] == 'read') { //如果为只读消息的话,表示察 看 $this->_modelApplyDataFrg = $this->_getGlobalData('Model_ApplyDataFrg', 'object'); $auditData = $this->_modelApplyDataFrg->findById($_GET['audit_id']); $auditData['post_data'] = unserialize($auditData['post_data']); $_POST['userflag'] = 'txtids'; $_POST['txtids'] = $auditData['post_data']['userid']; $this->_view->assign('auditData', $auditData); $this->_view->assign('postData', $auditData['post_data']); $this->_view->assign('read', true); } $sendParams = Tools::getFilterRequestParam(); $this->_utilFRGInterface = $this->_getGlobalData('Util_FRGInterface', 'object'); $this->_utilFRGInterface->setServerUrl($_REQUEST['server_id']); $this->_utilFRGInterface->setGet(array('c' => 'UserData', 'a' => 'CarTune', 'doaction' => 'query')); $this->_utilFRGInterface->setPost($sendParams); $data = $this->_utilFRGInterface->callInterface(); if ($data) { if ($data['data']['ErrMsg'][0]) { //如果没有记录 $this->_view->assign('errMsg', $data['data']['ErrMsg'][0]); } else { //如果有 $this->_view->assign('detailTrue', true); //显示详细 $this->_view->assign('uo', $data['data']['uo']); $this->_view->assign('car', $data['data']['Car']); $selectTools = $data['data']['Tools']; $selectTools = Model::getTtwoArrConvertOneArr($selectTools, 'Id', 'toolsname'); $this->_view->assign('selectTools', $selectTools); } } else { $this->_utilMsg->showMsg(Tools::getLang('CONNECT_SERVER_ERROR', 'Common'), -1); } } } $this->_utilMsg->createPackageNavBar(); $this->_view->display(); }