Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
phpdts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nemo Ma
phpdts
Commits
7a9c3356
Commit
7a9c3356
authored
May 10, 2023
by
luluxia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 增加适配新前端的接口
parent
7e763606
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
602 additions
and
2 deletions
+602
-2
api.php
api.php
+591
-0
command.php
command.php
+5
-1
game.php
game.php
+5
-1
include/game/revbattle.func.php
include/game/revbattle.func.php
+1
-0
No files found.
api.php
0 → 100644
View file @
7a9c3356
This diff is collapsed.
Click to expand it.
command.php
View file @
7a9c3356
...
@@ -706,7 +706,11 @@ ob_clean();
...
@@ -706,7 +706,11 @@ ob_clean();
$jgamedata
=
compatible_json_encode
(
$gamedata
);
$jgamedata
=
compatible_json_encode
(
$gamedata
);
//$json = new Services_JSON();
//$json = new Services_JSON();
//$jgamedata = $json->encode($gamedata);
//$jgamedata = $json->encode($gamedata);
echo
$jgamedata
;
if
(
!
strstr
(
$_SERVER
[
'HTTP_REFERER'
],
'php'
))
{
include
'./api.php'
;
}
else
{
echo
$jgamedata
;
}
ob_end_flush
();
ob_end_flush
();
//$t_e=getmicrotime();
//$t_e=getmicrotime();
...
...
game.php
View file @
7a9c3356
...
@@ -162,6 +162,10 @@ if(isset($clbpara['dialogue']))
...
@@ -162,6 +162,10 @@ if(isset($clbpara['dialogue']))
$dialogue_id
=
$clbpara
[
'dialogue'
];
$dialogue_id
=
$clbpara
[
'dialogue'
];
}
}
include
template
(
'game'
);
if
(
!
strstr
(
$_SERVER
[
'HTTP_REFERER'
],
'php'
))
{
include
'./api.php'
;
}
else
{
include
template
(
'game'
);
}
?>
?>
include/game/revbattle.func.php
View file @
7a9c3356
...
@@ -194,6 +194,7 @@ namespace revbattle
...
@@ -194,6 +194,7 @@ namespace revbattle
{
{
global
$db
,
$tablepre
,
$log
,
$mode
,
$main
,
$cmd
,
$battle_title
,
$attinfo
,
$skillinfo
,
$nosta
,
$cskills
;
global
$db
,
$tablepre
,
$log
,
$mode
,
$main
,
$cmd
,
$battle_title
,
$attinfo
,
$skillinfo
,
$nosta
,
$cskills
;
global
$fog
,
$pdata
;
global
$fog
,
$pdata
;
global
$battle_skills
;
//格式化双方clbpara
//格式化双方clbpara
$edata
[
'clbpara'
]
=
get_clbpara
(
$edata
[
'clbpara'
]);
$edata
[
'clbpara'
]
=
get_clbpara
(
$edata
[
'clbpara'
]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment