1
This commit is contained in:
parent
736b92aa35
commit
b952f49092
@ -5,11 +5,13 @@ require 'classes/AddReward.php';
|
||||
|
||||
class BagController extends BaseAuthedController {
|
||||
|
||||
|
||||
private $bagTableCache = null;
|
||||
protected function getBag($bag_id)
|
||||
{
|
||||
$g_conf_bag_cluster = require('../res/bag@bag.php');
|
||||
$bag_conf = getBagConfig($g_conf_bag_cluster, $bag_id);
|
||||
if ($this->bagTableCache == null) {
|
||||
$this->bagTableCache = require('../res/bag@bag.php');
|
||||
}
|
||||
$bag_conf = getBagConfig($this->bagTableCache, $bag_id);
|
||||
$b = array(
|
||||
'id' => $bag_conf['id'],
|
||||
'name' => $bag_conf['name'],
|
||||
|
@ -5,11 +5,14 @@ require 'classes/AddReward.php';
|
||||
|
||||
class PayController extends BaseAuthedController {
|
||||
|
||||
|
||||
private $vipTableCache = null;
|
||||
private $itemTableCache = null;
|
||||
protected function getItem($item_id)
|
||||
{
|
||||
$item_meta_table = require('../res/item@item.php');
|
||||
$item_meta = getItemConfig($item_meta_table, $item_id);
|
||||
if ($this->itemTableCache == null) {
|
||||
$this->itemTableCache = require('../res/item@item.php');
|
||||
}
|
||||
$item_meta = getItemConfig($this->itemTableCache, $item_id);
|
||||
$item = array(
|
||||
'id' => $item_meta['id'],
|
||||
'name' => $item_meta['name'],
|
||||
@ -24,8 +27,10 @@ class PayController extends BaseAuthedController {
|
||||
|
||||
protected function getVip($vip_id)
|
||||
{
|
||||
$vip_meta_table = require('../res/vip@vip.php');
|
||||
$vip_meta = getVipConfig($vip_meta_table, $vip_id);
|
||||
if ($this->vipTableCache == null) {
|
||||
$this->vipTableCache = require('../res/vip@vip.php');
|
||||
}
|
||||
$vip_meta = getVipConfig($this->vipTableCache, $vip_id);
|
||||
$vip = array(
|
||||
'level' => $vip_meta['level'],
|
||||
'require' => $vip_meta['require'],
|
||||
|
@ -27,7 +27,9 @@ try{
|
||||
$c = $_REQUEST['c'];
|
||||
$a = $_REQUEST['a'];
|
||||
$classname = $c .'Controller';
|
||||
$beginTick = phpcommon\getTickCount();
|
||||
$obj = eval('$obj = new $classname(); $obj->handlePre(); $obj->$a(); $obj->handlePost();');
|
||||
//error_log('c=' . $_REQUEST['c'] . ' a=' . $_REQUEST['a'] . ' costtime:' . (phpcommon\getTickCount() - $beginTick));
|
||||
} catch (Exception $e){
|
||||
echo($e);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user