Commit f01f4d15 authored by Nemo Ma's avatar Nemo Ma Committed by GitHub

Merge pull request #132 from luluxia/nachster

feat: 增加适配新前端的接口
parents 7e763606 7a9c3356
This diff is collapsed.
......@@ -706,7 +706,11 @@ ob_clean();
$jgamedata = compatible_json_encode($gamedata);
//$json = new Services_JSON();
//$jgamedata = $json->encode($gamedata);
echo $jgamedata;
if (!strstr($_SERVER['HTTP_REFERER'], 'php')) {
include './api.php';
} else {
echo $jgamedata;
}
ob_end_flush();
//$t_e=getmicrotime();
......
......@@ -162,6 +162,10 @@ if(isset($clbpara['dialogue']))
$dialogue_id = $clbpara['dialogue'];
}
include template('game');
if (!strstr($_SERVER['HTTP_REFERER'], 'php')) {
include './api.php';
} else {
include template('game');
}
?>
......@@ -194,6 +194,7 @@ namespace revbattle
{
global $db,$tablepre,$log,$mode,$main,$cmd,$battle_title,$attinfo,$skillinfo,$nosta,$cskills;
global $fog,$pdata;
global $battle_skills;
//格式化双方clbpara
$edata['clbpara'] = get_clbpara($edata['clbpara']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment