Пример #1
0
 /**
  * 物品日志
  */
 public function actionGoodsLog()
 {
     $this->_createServerList();
     if ($_REQUEST['server_id']) {
         $_GET['detailId'] = trim($_GET['detailId']);
         $_GET['playerId'] = trim($_GET['playerId']);
         $_GET['goodsId'] = trim($_GET['goodsId']);
         $_GET['page'] = max(1, intval($_GET['page']));
         $_POST['toPage'] = $_GET['page'];
         $this->_utilApiSftx = $this->_getGlobalData('Util_ApiSftx', 'object');
         $sendParams = Tools::getFilterRequestParam();
         $getArr = array('ctl' => 'goodsLog', 'act' => 'findGoodsLg');
         $this->_utilApiSftx->addHttp($_REQUEST['server_id'], $getArr, $sendParams);
         $this->_utilApiSftx->send();
         $dataList = $this->_utilApiSftx->getResult();
         if (is_array($dataList['data'])) {
             $this->_view->assign('dataList', $dataList['data']);
             $total = $dataList['totalCount'];
             $this->_loadCore('Help_Page');
             //载入分页工具
             $helpPage = new Help_Page(array('total' => $total, 'perpage' => PAGE_SIZE));
             $this->_view->assign('pageBox', $helpPage->show());
         } elseif (is_string($dataList)) {
             $this->_view->assign('error', $dataList);
         }
         $this->_view->assign('selected', $_GET);
     }
     $this->_utilMsg->createNavBar();
     $this->_view->display();
 }
Пример #2
0
 /**
  * 通过webservice发送消息
  */
 private function _sendMsg($data)
 {
     $this->_utilApiSftx = $this->_getGlobalData('Util_ApiSftx', 'object');
     $this->_utilApiSftx->addHttp($data['server_url'], null, $data);
     $this->_utilApiSftx->send();
     $dataResult = $this->_utilApiSftx->getResult();
     if ($dataResult['status'] == 1) {
         return true;
     } else {
         return '向游戏发送消息失败';
     }
     /*
     		$this->_utilFRGInterface=$this->_getGlobalData('Util_FRGInterface','object');
     		$this->_utilFRGInterface->set_sendUrl($data['send_url']);
     		unset($data['send_url']);
     		$data ['_sign'] = md5 ( TAKE_KEY . CURRENT_TIME );
     		$data ['_verifycode'] = CURRENT_TIME;
     		$this->_utilFRGInterface->setPost($data);
     		$data=$this->_utilFRGInterface->callInterface();
     		if ($data){
     			if ($data['msgno']==1){
     				return true;
     			}else {
     				return '游戏内部错误 :'.$data['message'];
     			}
     		}else {
     			return '向游戏发送消息失败';
     		}*/
 }
Пример #3
0
 /**
  * 强制下线
  */
 private function _downline()
 {
     $this->_utilApiSftx = $this->_getGlobalData('Util_ApiSftx', 'object');
     $getArr = array('ctl' => 'external', 'act' => 'startServerForSepecialIPNotice');
     $this->_utilApiSftx->addHttp($_REQUEST['server_id'], $getArr);
     $this->_utilApiSftx->send();
     $data = $this->_utilApiSftx->getResult();
     $this->_returnAjaxJson(array('status' => $data['status'], 'msg' => '强制下线成功', 'data' => null));
 }
Пример #4
0
 /**
  * 通过webservice发送消息
  */
 private function _sendMsg($data)
 {
     switch ($data['game_type_id']) {
         case '1':
             // 商业大亨
             $this->_utilApiBto = $this->_getGlobalData('Util_ApiBto', 'object');
             $sendUrl = $data['send_url'];
             $sendUrl .= 'api_interface.php?action=Faq&doaction=GetClientReply';
             unset($data['send_url']);
             $this->_utilApiBto->addHttp($sendUrl, null, $data);
             $this->_utilApiBto->send();
             $dataResult = $this->_utilApiBto->getResult();
             if ($dataResult['status'] == 1) {
                 return true;
             } else {
                 return Tools::getLang('SEND_MSG', __CLASS__);
             }
             break;
         case '2':
             //富人国
             $data['send_url'] .= 'php/interface.php?m=clerk&c=UserQuiz&a=GetClientReply';
             $this->_utilFRGInterface = $this->_getGlobalData('Util_FRGInterface', 'object');
             $this->_utilFRGInterface->set_sendUrl($data['send_url']);
             unset($data['send_url']);
             $data['_sign'] = md5(TAKE_KEY . CURRENT_TIME);
             $data['_verifycode'] = CURRENT_TIME;
             $this->_utilFRGInterface->setPost($data);
             $data = $this->_utilFRGInterface->callInterface();
             if ($data) {
                 if ($data['msgno'] == 1) {
                     return true;
                 } else {
                     return Tools::getLang('FRG_SEND_ERROR', __CLASS__, array('data[message]' => $data['message']));
                 }
             } else {
                 return Tools::getLang('SEND_MSG', __CLASS__);
             }
             break;
         case '3':
             //三分天下
             $this->_utilApiSftx = $this->_getGlobalData('Util_ApiSftx', 'object');
             $sendUrl = $data['send_url'];
             $sendUrl .= 'question/answerQuestion';
             unset($data['send_url']);
             $data['content'] = urlencode($data['content']);
             //解决三分%号发不出去
             $this->_utilApiSftx->addHttp($sendUrl, null, $data);
             $this->_utilApiSftx->send();
             $dataResult = $this->_utilApiSftx->getResult();
             if ($dataResult['status'] == 1) {
                 return true;
             } else {
                 return Tools::getLang('SEND_MSG', __CLASS__) . '<br>' . serialize($dataResult);
             }
             break;
         case '5':
             //寻侠
             $utilRpc = $this->_getGlobalData('Util_Rpc', 'object');
             $utilRpc->setUrl($data['send_url'] . 'question/answerQuestion');
             $dataResult = $utilRpc->answerQuestion($data['work_order_id'], $data['service_id'], $data['status'], $data['content']);
             if ($dataResult === 0) {
                 return true;
             }
             return Tools::getLang('SEND_MSG', __CLASS__) . '<br>' . serialize($dataResult);
             break;
         case '6':
             return true;
         case '7':
             //大唐 双龙诀
             $this->_utilHttpMInterface = $this->_getGlobalData('Util_HttpMInterface', 'object');
             $post['_verifycode'] = CURRENT_TIME;
             $post['_sign'] = md5('e23&^$)(&HJjkdwi^&%$' . CURRENT_TIME);
             $post['work_order_id'] = $data['work_order_id'];
             $post['service_id'] = $data['service_id'];
             $post['content'] = $data['content'];
             $post['status'] = $data['status'];
             $this->_utilHttpMInterface->addHttp($data['send_url'], 'game/answer', array(), $post);
             $this->_utilHttpMInterface->send();
             $dataResult = $this->_utilHttpMInterface->getResults();
             $dataResult = json_decode(array_shift($dataResult), true);
             if ($dataResult['status'] == 1) {
                 return true;
             } else {
                 return Tools::getLang('SEND_MSG', __CLASS__) . ':' . $dataResult['info'];
             }
             break;
     }
 }