当前位置: 首页>>代码示例>>PHP>>正文


PHP Tools::getLang方法代码示例

本文整理汇总了PHP中Tools::getLang方法的典型用法代码示例。如果您正苦于以下问题:PHP Tools::getLang方法的具体用法?PHP Tools::getLang怎么用?PHP Tools::getLang使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Tools的用法示例。


在下文中一共展示了Tools::getLang方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: sendOrderReplay

 public function sendOrderReplay($data = NULL)
 {
     if (!$data || empty($data['content'])) {
         return 'Can not send empty data';
     }
     $data['send_url'] .= 'php/interface.php?m=clerk&c=UserQuiz&a=GetClientReply';
     $_utilFRGInterface = $this->_getGlobalData('Util_FRGInterface', 'object');
     $_utilFRGInterface->set_sendUrl($data['send_url']);
     $fileData = $data['file_img'];
     $isFile = is_file($fileData);
     if ($isFile) {
         $webPath = pathinfo($fileData);
         $data['ReplyFile'] = 'http://' . $_SERVER['HTTP_HOST'] . '/Upload/Service/' . date('Ymd', CURRENT_TIME) . '/' . $webPath["basename"];
     }
     unset($data['send_url'], $data['file_img']);
     $data['_sign'] = md5(TAKE_KEY . CURRENT_TIME);
     $data['_verifycode'] = CURRENT_TIME;
     $_utilFRGInterface->setPost($data);
     $data = $_utilFRGInterface->callInterface();
     $errorInfo = Tools::getLang('SEND_MSG', 'Control_WorkOrder');
     if ($data) {
         if ($data['msgno'] == 1) {
             return true;
         }
         $errorInfo = Tools::getLang('FRG_SEND_ERROR', 'Control_WorkOrder', array('data[message]' => $data['message']));
     }
     if ($isFile) {
         unlink($fileData);
     }
     return $errorInfo;
 }
开发者ID:huangwei2wei,项目名称:kfxt,代码行数:31,代码来源:2.class.php

示例2: main

 public function main($UrlAppend = NULL, $get = NULL, $post = NULL)
 {
     if (!$_REQUEST['server_id']) {
         return array();
     }
     if ($this->_isPost()) {
         $postData = array('cardType' => intval($_POST['cardType']));
         if ($post) {
             $postData = array_merge($post, $postData);
         }
         $getData = $this->_gameObject->getGetData($get);
         $data = $this->getResult($UrlAppend, $getData, $postData);
         if ($data["Result"] === 0) {
             $jumpUrl = $this->_urlNotice();
             $this->jump('操作成功', 1, $jumpUrl);
         } else {
             $errorInfo = '操作失败:';
             $this->jump($errorInfo . $data['info'], -1);
         }
     } else {
         $getData = $this->_gameObject->getGetData(array('m' => 'Admin', 'c' => 'CardType', 'a' => 'CardTypeList'));
         $data = $this->getResult('php/interface.php', $getData, null);
         if ($data && is_array($data)) {
             $cardTypeList = array();
             foreach ($data['data']['cardTypes'] as $v) {
                 $cardTypeList[$v['id']] = $v['typeName'];
             }
             $this->_assign["cardTypeList"] = $cardTypeList;
         } else {
             $this->_assign['errorConn'] = Tools::getLang('CONNECT_SERVER_ERROR', 'Common');
         }
     }
     $this->_assign["Item_url"] = $this->_urlitems();
     return $this->_assign;
 }
开发者ID:huangwei2wei,项目名称:kfxt,代码行数:35,代码来源:LuanShi.class.php

示例3: actionIndex

 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();
 }
开发者ID:huangwei2wei,项目名称:kfxt,代码行数:33,代码来源:LostPassword.class.php

示例4: sendOrderReplay

 public function sendOrderReplay($data = NULL)
 {
     if (!$data || empty($data['content'])) {
         return 'Can not send empty data';
     }
     $_utilApiBto = $this->_getGlobalData('Util_ApiBto', 'object');
     $sendUrl = $data['send_url'];
     $sendUrl .= 'api_interface.php?action=Faq&doaction=GetClientReply';
     $sendUrl = trim($sendUrl);
     $fileData = $data['file_img'];
     $isFile = is_file($fileData);
     if ($isFile) {
         $webPath = pathinfo($fileData);
         $data['ReplyFile'] = 'http://' . $_SERVER['HTTP_HOST'] . '/Upload/Service/' . date('Ymd', CURRENT_TIME) . '/' . $webPath["basename"];
     }
     unset($data['send_url']);
     $_utilApiBto->addHttp($sendUrl, null, $data);
     $_utilApiBto->send();
     $dataResult = $_utilApiBto->getResult();
     if ($dataResult['status'] == 1) {
         return true;
     } else {
         if ($isFile) {
             unlink($fileData);
         }
         return Tools::getLang('SEND_MSG', 'Control_WorkOrder');
     }
 }
开发者ID:huangwei2wei,项目名称:kfxt,代码行数:28,代码来源:1.class.php

示例5: _checkOperatorsAct

 /**
  * 多服务器检测权限
  */
 protected function _checkOperatorsAct()
 {
     $this->_utilMsg = $this->_getGlobalData('Util_Msg', 'object');
     $this->_utilRbac = $this->_getGlobalData('Util_Rbac', 'object');
     $this->_view->assign('operatorList', $this->_utilRbac->getOperatorActList(self::GAME_ID));
     if (count($_REQUEST['server_ids'])) {
         foreach ($_REQUEST['server_ids'] as $value) {
             if (!$this->_utilRbac->checkOperatorAct($value)) {
                 $this->_utilMsg->showMsg(Tools::getLang('NOT_ACTSERVER', 'Common'), -2);
             }
         }
     }
 }
开发者ID:huangwei2wei,项目名称:kfxt,代码行数:16,代码来源:BTO2.class.php

示例6: smarty_modifier_lang

/**
 * 语言包函数
 * @param string $key
 * @param string $fileName
 */
function smarty_modifier_lang($key, $fileName = NULL)
{
    if ($fileName === null) {
        $fileName = 'Control_' . CONTROL;
    }
    $key = 'TPL_' . $key;
    if (CONTROL == "MasterTools" || CONTROL == "OperatorTools") {
        $fileName = "GameAction_" . $_GET["__game_id"];
    }
    $re = Tools::getLang(strtoupper($key), $fileName);
    if (empty($re)) {
        $re = Tools::getLang(strtoupper($key), "GameAction");
    }
    return $re;
}
开发者ID:huangwei2wei,项目名称:kfxt,代码行数:20,代码来源:modifier.lang.php

示例7: main

 public function main($UrlAppend = NULL, $get = NULL, $post = NULL)
 {
     if ($_REQUEST['server_id']) {
         $utilFRGInterface = $this->_getGlobalData('Util_FRGInterface', 'object');
         $utilFRGInterface->setServerUrl($_REQUEST['server_id']);
         $sendParams = Tools::getFilterRequestParam(array('page'));
         $utilFRGInterface->setGet(array('c' => 'UserData', 'a' => 'UserQuery', 'Page' => $_GET['page']));
         $utilFRGInterface->setPost($sendParams);
         $data = $utilFRGInterface->callInterface();
         $returnData = array();
         if ($data) {
             if ($data['data']['list']) {
                 foreach ($data['data']['list'] as &$value) {
                     $value['url_ask'] = Tools::url('Verify', 'OrderVerify', array('game_type_id' => 2, 'operator_id' => $this->_operatorId, 'game_server_id' => $_REQUEST['server_id'], 'game_user_id' => $value['UserId'], 'user_account' => $value['UserName'], 'user_nickname' => $value['VUserName']));
                     $value['url_emp'] = Tools::url(CONTROL, 'EmpShopList', array('server_id' => $_REQUEST['server_id'], 'Query[Items]' => 3, 'Query[start]' => $value['Id'], 'Query[TypeItems]' => 1, 'PageSize' => 10));
                     $value['url_shop'] = Tools::url(CONTROL, 'EmpShopList', array('server_id' => $_REQUEST['server_id'], 'Query[Items]' => 3, 'Query[start]' => $value['Id'], 'Query[TypeItems]' => 2, 'PageSize' => 10));
                     $value['url_tools'] = Tools::url(CONTROL, 'EmpShopList', array('server_id' => $_REQUEST['server_id'], 'Query[Items]' => 3, 'Query[start]' => $value['Id'], 'Query[TypeItems]' => 3, 'PageSize' => 10));
                     $value['url_msg'] = Tools::url(CONTROL, ACTION, array('server_id' => $_REQUEST['server_id'], 'Query[Items]' => 3, 'Query[start]' => $value['Id'], 'PageSize' => 10, 'doaction' => 'message'));
                     $value['url_send_msg'] = Tools::url(CONTROL, 'SendMail', array('server_id' => $_REQUEST['server_id'], 'UserId[]' => $value['Id'], 'lock' => true, 'user_name' => $value['UserName'], 'nick_name' => $value['VUserName']));
                     $value['url_event_list'] = Tools::url(CONTROL, 'EventList', array('server_id' => $_REQUEST['server_id'], 'UserId' => $value['Id']));
                 }
             }
             $this->_loadCore('Help_Page');
             if ($data['data']['TotalNum'] == '') {
                 $data['data']['TotalNum'] = 0;
             }
             if ($data['data']['PageSize']) {
                 $helpPage = new Help_Page(array('total' => $data['data']['TotalNum'], 'perpage' => $data['data']['PageSize']));
                 $returnData['pageBox'] = $helpPage->show();
             }
             $data['data']['query']['Items'] = $data['data']['query']['Items'] ? $data['data']['query']['Items'] : '9';
             //默认角色名称
             $selectPage = Tools::getLang('PAGE_OPTION', 'Control_MasterFRG');
             $returnData['selectPage'] = $selectPage;
             $returnData['select'] = $data['data']['Items'];
             $returnData['dataList'] = $data['data']['list'];
             $returnData['selectedQuery'] = $data['data']['query'];
             $returnData['selectedPageSize'] = $data['data']['PageSize'];
             $returnData['companyNum'] = $data['data']['CompanyNum'];
         }
         return $returnData;
     }
     return array();
 }
开发者ID:huangwei2wei,项目名称:kfxt,代码行数:44,代码来源:PlayerLookup2.class.php

示例8: sendOrderReplay

 public function sendOrderReplay($data = NULL)
 {
     if (!$data || empty($data['content'])) {
         return 'Can not send empty data';
     }
     //warren 图片上传
     $_utilHttpDown = $this->_getGlobalData('Util_Httpdown', 'object');
     $sendUrl = $data['send_url'];
     $sendUrl .= 'question/answerQuestion';
     $random = CURRENT_TIME . rand(100000, 900000);
     $verifyCode = md5($this->_key . $random);
     $sendUrl .= "?_sign={$verifyCode}&_verifycode={$random}&operator=kefu";
     //		$data['content'] = $data['content'];//解决三分%号发不出去
     unset($data['send_url']);
     $file_data = $data['file_img'];
     unset($data['file_img']);
     if ($file_data && is_file($file_data)) {
         $webPath = pathinfo($file_data);
         $data['image'] = 'http://' . $_SERVER['HTTP_HOST'] . '/Upload/Service/' . date('Ymd', CURRENT_TIME) . '/' . $webPath["basename"];
         //$_utilHttpDown->AddFileContent('picture',basename($file_data),file_get_contents($file_data));
     }
     foreach ($data as $k => $v) {
         $_utilHttpDown->AddForm($k, $v);
     }
     //echo $sendUrl;
     //$sendUrl	=	"http://127.0.0.1/333.php";
     $_utilHttpDown->OpenUrl($sendUrl);
     if ($_utilHttpDown->IsGetOK()) {
         $dataResult = $_utilHttpDown->GetRaw();
         $dataResult = json_decode($dataResult, ture);
         if ($dataResult['status'] != 1) {
             if ($file_data) {
                 //如果存在文件,就删除
                 unlink($file_data);
             }
             return Tools::getLang('SEND_MSG', 'Control_WorkOrder') . '<br>' . serialize($dataResult);
         } else {
             return true;
         }
     } else {
         return Tools::getLang('SEND_MSG', 'Control_WorkOrder') . '<br>' . serialize($dataResult);
     }
 }
开发者ID:huangwei2wei,项目名称:kfxt,代码行数:43,代码来源:3.class.php

示例9: sendOrderReplay

 public function sendOrderReplay($data = NULL)
 {
     if (!$data || empty($data['content'])) {
         return 'Can not send empty data';
     }
     if ($data['file_img'] && is_file($data['file_img'])) {
         $webPath = pathinfo($data['file_img']);
         $webPath = 'http://' . $_SERVER['HTTP_HOST'] . '/Upload/Service/' . date('Ymd', CURRENT_TIME) . '/' . $webPath["basename"];
         $data['content'] .= "<br/><img src=\"{$webPath}\"/>";
     }
     $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']);
     return true;
     // 直接返回 true
     if ($dataResult === 0) {
         return true;
     }
     return Tools::getLang('SEND_MSG', 'Control_WorkOrder') . '<br>' . serialize($dataResult);
 }
开发者ID:huangwei2wei,项目名称:kfxt,代码行数:20,代码来源:5.class.php

示例10: sendOrderReplay

 public function sendOrderReplay($data = NULL)
 {
     if (!$data || empty($data['content'])) {
         return 'Can not send empty data';
     }
     $_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'];
     $post['image'] = $data['file_img'];
     $_utilHttpMInterface->addHttp($data['send_url'], 'game/answer', array(), $post);
     $_utilHttpMInterface->send();
     $dataResult = $_utilHttpMInterface->getResults();
     $dataResult = json_decode(array_shift($dataResult), true);
     if ($dataResult['status'] == 1) {
         return true;
     } else {
         return Tools::getLang('SEND_MSG', 'Control_WorkOrder') . ':' . $dataResult['info'];
     }
 }
开发者ID:huangwei2wei,项目名称:kfxt,代码行数:23,代码来源:7.class.php

示例11: actionIndex

 /**
  * 公告显示列表
  */
 public function actionIndex()
 {
     $this->_checkOperatorAct();
     $this->_createServerList();
     if ($_REQUEST['server_id']) {
         //如果设置了服务器id
         $this->getApi()->setUrl($_REQUEST['server_id'], self::API_HREF);
         $page = $_GET['page'] ? $_GET['page'] : 0;
         $dataList = $this->getApi()->selectNotices('', $page, PAGE_SIZE);
         if (!$dataList instanceof PHPRPC_Error) {
             $dataList = json_decode($dataList, true);
             $this->_view->assign('dataList', $dataList['data']['result']);
         } else {
             $this->_view->assign('errorConn', Tools::getLang('CONNECT_SERVER_ERROR', 'Common'));
         }
     }
     $total = $data['data']['totalCount'];
     $this->_loadCore('Help_Page');
     //载入分页工具
     $helpPage = new Help_Page(array('total' => $total, 'perpage' => PAGE_SIZE));
     $this->_view->assign('pageBox', $helpPage->show());
     $this->_utilMsg->createPackageNavBar();
     $this->_view->display();
 }
开发者ID:huangwei2wei,项目名称:kfxt,代码行数:27,代码来源:SftxNotice.class.php

示例12: _multiNoticeAdd

 private function _multiNoticeAdd()
 {
     if ($this->_isPost()) {
         if (!count($_REQUEST['server_ids'])) {
             $this->_utilMsg->showMsg(Tools::getLang('PLEASE_SELECTSERVER', 'Common'), -1);
         }
         $this->_utilApiSftx = $this->_getGlobalData('Util_ApiSftx', 'object');
         $getArr = array('ctl' => 'oneNotice', 'act' => 'save');
         foreach ($_REQUEST['server_ids'] as $serverId) {
             $this->_utilApiSftx->addHttp($serverId, $getArr, $_POST);
         }
         $this->_utilApiSftx->send();
         $datas = $this->_utilApiSftx->getResults();
         $message = array();
         $serverList = $this->_getGlobalData('gameser_list');
         foreach ($datas as $key => $value) {
             if ($value['status'] == 1) {
                 array_push($message, "{$serverList[$key]['server_name']} <font color='#00cc00'>发送成功</font>");
             } else {
                 array_push($message, "{$serverList[$key]['server_name']} <font color='#FF0000'>发送失败</font>");
             }
         }
         $message = Tools::formatLog($message);
         $this->_utilMsg->showMsg($message, 1, 1, null);
     } else {
         $this->_createMultiServerList();
         $this->_view->set_tpl(array('body' => 'GmSftx/MultiPublicNoticeAdd.html'));
         $this->_utilMsg->createNavBar();
         $this->_view->display();
     }
 }
开发者ID:huangwei2wei,项目名称:kfxt,代码行数:31,代码来源:GmSftx.class.php

示例13: _updaterewardindex

 private function _updaterewardindex()
 {
     $this->_checkOperatorAct();
     $this->_createServerList();
     if ($_REQUEST['server_id'] && $this->_isPost()) {
         $serverList = $this->_getGlobalData('server/server_list_3');
         $server = $serverList[$_REQUEST['server_id']];
         if ($server) {
             if ($_POST['usertype'] == 1) {
                 $_POST['uid'] = $_POST['user'];
             } else {
                 $_POST['username'] = $_POST['user'];
             }
             unset($_POST['user'], $_POST['usertype']);
             foreach ($_POST as $key => $value) {
                 if (empty($value)) {
                     unset($_POST[$key]);
                 }
             }
             $_POST['sid'] = $server['marking'];
             //'192.168.12.127:8080';//
             $_POST['time'] = CURRENT_TIME . '000';
             //时间(毫秒)
             $_POST['sign'] = md5($_POST['sid'] . $this->_key . $_POST['time']);
             $this->_utilHttpMInterface = $this->_getGlobalData('Util_HttpMInterface', 'object');
             $this->_utilHttpMInterface->addHttp($server['server_url'], 'playerReward/reward', array(), $_POST);
             $this->_utilHttpMInterface->send();
             $dataResult = $this->_utilHttpMInterface->getResults();
             $dataResult = json_decode(array_shift($dataResult), true);
             //				print_r($dataResult);
             //				die();
             if (is_array($dataResult) && 'success' == strval($dataResult['m']['message'])) {
                 //				if('success' == $dataResult){
                 $sendtype = array('1' => Tools::getLang('SYS_GOLE', __CLASS__), '2' => Tools::getLang('USER_GOLD', __CLASS__));
                 $log = "资源修改用户:" . $_POST['uid'] . $_POST['username'] . ";<br>";
                 $log .= "发送类型为:" . $sendtype[$_POST['goldtype']] . ";<br>";
                 $log .= $this->_updaterewardConfLog($_POST);
                 $log .= "<br/>道具ID:{$_POST['goodsId']}";
                 $this->_modelGameOperateLog = $this->_getGlobalData('Model_GameOperateLog', 'object');
                 $AddLog = array(array('操作', '<font style="color:#F00">玩家资源修改</font>'), array('操作时间', date('Y-m-d H:i:s', CURRENT_TIME)), array('操作人', '<b>{UserName}</b>'), array('操作原因', $_POST['cause']), array('修改内容', "<div style='margin-left:10px;'>{$log}</div>"));
                 $AddLog = $this->_modelGameOperateLog->addInfoMake($AddLog);
                 $GameOperateLog = $this->_modelGameOperateLog->MakeDataForStore(array('UserId' => '0'), 6, $_REQUEST['server_id'], $AddLog);
                 if (false !== $GameOperateLog) {
                     $this->_modelGameOperateLog->add($GameOperateLog);
                 }
                 $this->_utilMsg->showMsg($dataResult['m']['message'] . ";" . $dataResult['m']['STARSOUL'], 1);
             } else {
                 $this->_utilMsg->showMsg(Tools::getLang('OPERATION_FAILURE', 'Common') . ' ' . $dataResult, -1);
             }
         }
     }
     $this->_view->assign('dataConfig', $this->_updateRewardConfig(true));
     $this->_view->assign('URL_updateRewardConfig', Tools::url(CONTROL, ACTION, array('doaction' => 'config', 'server_id' => $_REQUEST["server_id"])));
     $this->_view->assign('checkurl', Tools::url(CONTROL, 'UpdateReward', array('doaction' => 'check', 'server_id' => $_REQUEST["server_id"])));
     $this->_view->assign('searchType', $this->_searchType);
     $this->_utilMsg->createNavBar();
     $this->_view->display();
 }
开发者ID:huangwei2wei,项目名称:kfxt,代码行数:58,代码来源:GmSftx.class.php

示例14: _getMultiMsg

 /**
  * 并发时生成的消息
  * @param array $data back_result
  * @return string
  */
 private function _getMultiMsg($data)
 {
     $serverList = $this->_getGlobalData('gameser_list');
     $sendStatusMsgs = '';
     foreach ($data as $key => $value) {
         if ($value['Result'] === 0) {
             $value['message'] = $value['message'] ? $value['message'] : Tools::getLang('SEND_SUCCESS', 'Common');
             $sendStatusMsgs .= "<b>{$serverList[$key]['full_name']}</b>:<font color='#00CC00'>{$value['message']}</font><br>";
         } else {
             $value['message'] = $value['message'] ? $value['message'] : Tools::getLang('SEND_FAILURE', 'Common');
             $sendStatusMsgs .= "<b>{$serverList[$key]['full_name']}</b>:<font color='#FF0000'>{$value['message']}</font><br>";
         }
     }
     return $sendStatusMsgs;
 }
开发者ID:huangwei2wei,项目名称:kfxt,代码行数:20,代码来源:zhanlong.class.php

示例15: SendItemsToAllBack

 public function SendItemsToAllBack($sendOk = false)
 {
     if ($sendOk) {
         return '<font style="font-weight:bold; color:#360">' . Tools::getLang('SEND_SUCCESS', 'Common') . '</font>';
     }
     return '<font color="#FF0000">' . Tools::getLang('SEND_FAILURE', 'Common') . '</font>';
 }
开发者ID:huangwei2wei,项目名称:kfxt,代码行数:7,代码来源:6.class.php


注:本文中的Tools::getLang方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。