header('X-DS-KEY'); if ($key) { $mbchaintoken_model = model('mbchaintoken'); $chain_token = $mbchaintoken_model->getMbchaintokenInfo(array('chain_token' => $key)); if (!$chain_token) { ds_json_encode(40001, lang('chain_token_expire')); } $chain_model = model('chain'); $chain_info = $chain_model->getChainInfo(array('chain_id' => $chain_token['chain_id'])); if(!$chain_info){ ds_json_encode(40001, lang('chain_not_exist')); } if(request()->action()!='apply_again' && request()->action()!='information'){ if($chain_info['chain_state']!=1){ ds_json_encode(40001, lang('chain_not_open')); } } $this->chain_info= $chain_info; } else { ds_json_encode(10001, 'Hacking Attempt'); } } } ?>