示例#1
0
 /**
  * 获取运营商key
  */
 public function getKey($gameId = 0)
 {
     exit('Model_GoldCard::getKey已停止使用');
     if ($this->_payKey !== null) {
         return $this->_payKey;
     }
     if ($gameId) {
         //兼容其他游戏配置
         $gameClass = $this->_getGlobalData($gameId, 'game');
         if ($gameClass) {
             $tmp = $gameClass->getOptConf();
             if ($tmp) {
                 $this->_payKey = $tmp;
                 return $this->_payKey;
             }
         }
     }
     Tools::import('Cache_OperatorSetup');
     $this->_payKey = Cache_OperatorSetup::getFrgConf();
     return $this->_payKey;
 }
示例#2
0
 public function _getOperatorIdByMark($gameTypeId, $marking)
 {
     if (strpos($marking, '|') === false) {
         return false;
     }
     list($mark, $server) = explode('|', $marking);
     Tools::import('Cache_OperatorSetup');
     switch ($gameTypeId) {
         case 1:
             $operatorList = Cache_OperatorSetup::getBtoConf();
             break;
         case 2:
             $operatorList = Cache_OperatorSetup::getFrgConf();
             break;
     }
     if (!isset($operatorList)) {
         return false;
     }
     foreach ($operatorList as $key => $list) {
         if ($list['mark'] == $mark) {
             return array('operator_id' => $key, 'url' => str_replace('{$var}', Tools::getNum($server), $list['url']), 'server' => $server);
         }
     }
     return false;
 }
 /**
  * 获取运营商mark
  */
 private function _getOperatorMark()
 {
     static $operatorIds = null;
     if (is_null($operatorIds)) {
         Tools::import('Cache_OperatorSetup');
         $operatorList = Cache_OperatorSetup::getFrgConf();
         $operatorIds = array();
         foreach ($operatorList as $key => $list) {
             $operatorIds[$key] = $list['mark'];
         }
     }
     return $operatorIds;
 }