本文整理汇总了PHP中Tools::gameConfig方法的典型用法代码示例。如果您正苦于以下问题:PHP Tools::gameConfig方法的具体用法?PHP Tools::gameConfig怎么用?PHP Tools::gameConfig使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tools
的用法示例。
在下文中一共展示了Tools::gameConfig方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: main
public function main($UrlAppend = NULL, $get = NULL, $post = NULL)
{
if (!$_REQUEST['server_id']) {
return array();
}
$noticeType = Tools::gameConfig('noticeType', $this->_gameObject->_gameId);
$this->_assign['noticeType'] = $noticeType;
// $this->_assign['forbid'] = array('0'=>'不屏蔽','1'=>'屏蔽');
if ($this->_isPost() && !empty($_POST["subbutton"])) {
$postData = array('title' => trim($_POST['title']), 'delay' => intval($_POST['IntervalTime']), 'begin' => trim($_POST['begin']), 'end' => trim($_POST['end']));
if ($post) {
$postData = array_merge($post, $postData);
}
$getData = $getData = $this->_gameObject->getGetData($get);
$data = $this->getResult($UrlAppend, $getData, $postData);
// print_r($postData);
// print_r($data);
// exit;
if ($data['status'] == 1) {
$jumpUrl = $this->_urlNotice();
$this->jump('操作成功', 1, $jumpUrl);
} else {
$errorInfo = '操作失败:';
$this->jump($errorInfo . $data['info'], -1);
}
}
return $this->_assign;
}
示例2: _init
public function _init()
{
$this->_assign[self::ITEM_TYPE] = Tools::gameConfig(self::ITEM_TYPE, $this->_gameObject->_gameId);
//itemTypes
$this->_assign[self::BIND_TYPE] = Tools::gameConfig(self::BIND_TYPE, $this->_gameObject->_gameId);
//bindType
$this->_assign[self::GOLD_TYPE] = Tools::gameConfig(self::GOLD_TYPE, $this->_gameObject->_gameId);
//goldType
$this->_assign[self::KEY_TYPE] = Tools::gameConfig(self::KEY_TYPE, $this->_gameObject->_gameId);
//keyType
$this->_assign[self::ITEM_PACKAGE_TYPE] = Tools::gameConfig(self::ITEM_PACKAGE_TYPE, $this->_gameObject->_gameId);
//keyType
$this->_assign[self::EXCHANGE_TYPE] = Tools::gameConfig(self::EXCHANGE_TYPE, $this->_gameObject->_gameId);
//keyType
$this->_assign['itemReceiveConditions'] = $this->partner('ItemReceiveCondition');
//礼包领取的条件
$this->_assign['items'] = $this->partner('Item');
$this->_assign['selected'][self::BIND_TYPE] = 2;
//0:不绑定,1:绑定服,2:绑定玩家
$this->_assign['selected'][self::GOLD_TYPE] = 2;
//1:系统元宝,2:GM元宝
$this->_assign['selected'][self::KEY_TYPE] = 10;
//1:36位,2 10位
$this->_assign['selected'][self::ITEM_PACKAGE_TYPE] = 1;
//1:标准礼包,2: 共享礼包
$this->_assign['selected'][self::EXCHANGE_TYPE] = 2;
//1:补偿金币卡,2: 智能金币卡
$this->_assign['URL_itemReceiveConditions'] = Tools::url(CONTROL, 'ItemReceiveCondition', array('timeout' => '1', 'zp' => PACKAGE, '__game_id' => $this->_gameObject->_gameId, 'server_id' => $_REQUEST['server_id']));
$this->_assign['URL_itemUpdate'] = Tools::url(CONTROL, 'Item', array('timeout' => '1', 'zp' => PACKAGE, '__game_id' => $this->_gameObject->_gameId, 'server_id' => $_REQUEST['server_id']));
$this->_assign['URL_itemCard'] = Tools::url(CONTROL, 'ItemCard', array('submit' => 1, 'zp' => PACKAGE, '__game_id' => $this->_gameObject->_gameId, 'server_id' => $_REQUEST['server_id']));
$this->_assign['URL_playerLookup'] = Tools::url(CONTROL, 'PlayerLookup', array('sbm' => 1, 'zp' => PACKAGE, '__game_id' => $this->_gameObject->_gameId, 'server_id' => $_REQUEST['server_id']));
$this->_assign['URL_ItemPackageEdit'] = Tools::url(CONTROL, 'ItemPackageEdit', array('zp' => PACKAGE, '__game_id' => $this->_gameObject->_gameId, 'server_id' => $_REQUEST['server_id']));
}
示例3: _init
public function _init()
{
$this->_assign['URL_itemsDel'] = $this->_urlItemsDel();
$this->_backpackSearchType = Tools::gameConfig('backpackSearchType', $this->_gameObject->_gameId);
$this->_assign['backpackSearchType'] = $this->_backpackSearchType;
$this->_assign['userType'] = Tools::gameConfig('userType', $this->_gameObject->_gameId);
}
示例4: _init
public function _init()
{
$this->_lockUserTypes = Tools::gameConfig('lockUserType', $this->_gameObject->_gameId);
$this->_assign['userType'] = Tools::gameConfig('userType', $this->_gameObject->_gameId);
//$this->_assign['lockUserType'] = $this->_lockUserTypes;
$this->_assign['lockUserType'] = $this->_lockUserTypes;
}
示例5: _init
public function _init()
{
$this->_assign['exchangeTypes'] = Tools::gameConfig('exchangeTypes', $this->_gameObject->_gameId);
//itemTypes
$this->_userType = Tools::gameConfig('userType', $this->_gameObject->_gameId);
$this->_assign['userType'] = $this->_userType;
}
示例6: _init
public function _init()
{
$this->_assign['URL_TitleOrGagLocalLog'] = $this->_urlLocalLog();
$this->_assign['URL_TitleOrGagInGame'] = $this->_urlInGame();
$this->_assign['URL_AddTitleOrGag'] = $this->_urlLockAccountAdd();
$this->_lockUserType = Tools::gameConfig('lockUserType', $this->_gameObject->_gameId);
}
示例7: _career
private function _career()
{
static $career = false;
if ($career === false) {
$career = Tools::gameConfig('career', $this->_gameObject->_gameId);
}
return $career;
}
示例8: _vocationId
private function _vocationId($vocationId = 0)
{
static $vocation = false;
//首次执行,放进内存保存
if ($vocation === false) {
$vocation = Tools::gameConfig('vocationId', $this->_gameObject->_gameId);
//vocation 职业 :1武者 ,2气宗 ,3药师
}
return $vocation[$vocationId];
}
示例9: _init
public function _init()
{
$this->_assign[self::KEY_TYPE] = Tools::gameConfig(self::KEY_TYPE, $this->_gameObject->_gameId);
//keyType
$this->_assign[self::BIND_TYPE] = Tools::gameConfig(self::BIND_TYPE, $this->_gameObject->_gameId);
//bindType
$this->_assign[self::ITEM_PACKAGE_TYPE] = Tools::gameConfig(self::ITEM_PACKAGE_TYPE, $this->_gameObject->_gameId);
//keyType
$this->_assign['URL_itemUpdate'] = Tools::url(CONTROL, 'Item', array('timeout' => '1', 'zp' => PACKAGE, '__game_id' => $this->_gameObject->_gameId, 'server_id' => $_REQUEST['server_id']));
$this->_assign['URL_itemCard'] = Tools::url(CONTROL, 'ItemCard', array('zp' => PACKAGE, '__game_id' => $this->_gameObject->_gameId, 'server_id' => $_REQUEST['server_id']));
}
示例10: main
public function main($UrlAppend = NULL, $get = NULL, $post = NULL)
{
if (!$_REQUEST['server_id']) {
return array();
}
// print_r($_POST);
// $gameConf = $this->_gameObject->getIfConf();
// $getData = $this->_gameObject->getGetData($gameConf['NoticeEdit']['get']);
// $postData = $this->_gameObject->getPostData($_GET['id']);
// if($post){
// $postData = array_merge($post,$postData);
// }
// $postData = array_filter($postData);
// $data = $this->_gameObject->getNotice($postData);
// if($data['data']){
// foreach($data['data'] as &$item){
// if($item['id']==$_GET['id']){
// $this->_assign['selected'] = $item;
// }
// }
// }
$noticeType = Tools::gameConfig('noticeType', $this->_gameObject->_gameId);
$this->_assign['noticeType'] = $noticeType;
$this->_assign['forbid'] = array('0' => '不屏蔽', '1' => '屏蔽');
if (isset($_GET['id'])) {
$getData = $this->_gameObject->getGetData(array('type' => 'placardlist'));
$data = $this->getResult($UrlAppend, $getData, array('id' => $_GET['id']));
if ($data['status'] == 1) {
$this->_assign['info'] = $data['data']['list'][0];
}
}
if ($this->_isPost() && !empty($_POST["subbutton"])) {
$postData = array('id' => trim($_GET["id"]), 'title' => trim($_POST['title']), 'delay' => intval($_POST['IntervalTime']), 'forbid' => intval($_POST['forbid']), 'type' => intval($_POST['type']), 'begin' => strtotime(trim($_POST['begin'])), 'end' => strtotime(trim($_POST['end'])));
if ($post) {
$postData = array_merge($post, $postData);
}
$getData = $getData = $this->_gameObject->getGetData($get);
$data = $this->getResult($UrlAppend, $getData, $postData);
// print_r($postData);
// print_r($data);exit;
if ($data['status'] == 1) {
$jumpUrl = $this->_urlNotice();
$this->jump('操作成功', 1, $jumpUrl);
} else {
$errorInfo = '操作失败:';
$this->jump($errorInfo . $data['info'], -1);
}
}
return $this->_assign;
}
示例11: main
public function main($UrlAppend = NULL, $get = NULL, $post = NULL)
{
if (!$_REQUEST['server_id']) {
return array();
}
$noticeType = Tools::gameConfig('noticeType', $this->_gameObject->_gameId);
$this->_assign['noticeType'] = $noticeType;
$this->_assign['forbid'] = array('0' => '不屏蔽', '1' => '屏蔽');
if (isset($_GET['id']) && !$this->_isPost()) {
$noticeType = array(0 => '跑马灯', 1 => '游戏信息公告', 2 => '喇叭', 3 => '跑马灯+聊天(紧急公告)', 4 => ' 聊天公告');
$this->_assign['noticeType'] = $noticeType;
$getData = $this->_gameObject->getGetData($get);
$data = $this->getResult('listNotice', $getData, array('id' => $_GET['id']));
// print_r(array('id'=>$_GET['id']));
// print_r($data);
// exit;
if ($data['status'] == 0) {
$this->_assign['dataList'] = $data['data'];
}
}
if ($this->_isPost() && !empty($_POST["subbutton"])) {
$postData = array('id' => trim($_GET["id"]), 'title' => trim($_POST['title']), 'contents' => trim($_POST['contents']), 'intervals' => intval($_POST['intervals']), 'noticeType' => intval($_POST['noticeType']), 'startTime' => trim($_POST['startTime']), 'endTime' => trim($_POST['endTime']), 'op' => 0, 'playMode' => 1, 'status' => 1);
if ($post) {
$postData = array_merge($post, $postData);
}
$getData = $getData = $this->_gameObject->getGetData($get);
$data = $this->getResult($UrlAppend, $getData, $postData);
if ($data['status'] == 0) {
$jumpUrl = $this->_urlNotice();
$this->jump('操作成功', 1, $jumpUrl);
} else {
$errorInfo = '操作失败:';
$this->jump($errorInfo . $data['info'], -1);
}
}
return $this->_assign;
}
示例12: main
public function main($UrlAppend = null, $get = null, $post = null)
{
if (!$this->_isPost()) {
return $this->_assign;
}
$postData = $this->getPostData($post);
$getData = $this->_gameObject->getGetData($get);
$data = $this->getResult($UrlAppend, $getData, $postData);
if ($data['status'] != 1) {
$this->_assign['connectError'] = 'Error Info:' . $data['info'];
return $this->_assign;
}
$cardInfo = $data['data'];
$cardInfo['goods'] = json_decode($cardInfo['goods'], true);
$itemsCon = array();
if (is_array($cardInfo['goods'])) {
foreach ($cardInfo['goods'] as $item) {
$itemsCon[$item['goodsId']] = '';
}
$itemsCon = $this->_getItemsName($itemsCon);
$cardInfo['itemInfo'] = '';
foreach ($cardInfo['goods'] as $item) {
$cardInfo['itemInfo'] .= $itemsCon[$item['goodsId']] . "(<font color='#FF0000'>{$item['num']}</font>),";
}
$bindTypes = Tools::gameConfig(self::BIND_TYPE, $this->_gameObject->_gameId);
//bindType
$goldTypes = Tools::gameConfig(self::GOLD_TYPE, $this->_gameObject->_gameId);
//goldType
$cardInfo['bindType'] = $bindTypes[$cardInfo['bindType']];
$cardInfo['goldType'] = $goldTypes[$cardInfo['goldType']];
$cardInfo['addTime'] = date('Y-m-d H:i:s', $cardInfo['addTime']);
$cardInfo['exchangeTime'] = ($tmp = intval($cardInfo['exchangeTime'])) ? date('Y-m-d H:i:s', $tmp) : '--';
}
$this->_assign['cardInfo'] = $cardInfo;
return $this->_assign;
}
示例13: _getLogDetail
private function _getLogDetail()
{
return Tools::gameConfig('LogDetail', $this->game_id);
}
示例14: _init
public function _init()
{
$this->_assign['URL_itemsDel'] = $this->_urlItemsDel();
$this->_assign['itemTypes'] = Tools::gameConfig('itemTypes', $this->_gameObject->_gameId);
}