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
46187c17
Commit
46187c17
authored
Mar 20, 2023
by
Nemo Ma
Committed by
GitHub
Mar 20, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #74 from hikawiier/waaagh
update clean-master
parents
651a5455
ffef2ffd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
0 deletions
+48
-0
admin.php
admin.php
+1
-0
include/admin/admin.lang.php
include/admin/admin.lang.php
+2
-0
include/admin/templates_clean.php
include/admin/templates_clean.php
+40
-0
templates/default/admin_menu.htm
templates/default/admin_menu.htm
+5
-0
No files found.
admin.php
View file @
46187c17
...
@@ -20,6 +20,7 @@ $admin_cmd_list = Array(
...
@@ -20,6 +20,7 @@ $admin_cmd_list = Array(
'npcmng'
=>
5
,
'npcmng'
=>
5
,
'gameinfomng'
=>
5
,
'gameinfomng'
=>
5
,
'antiAFKmng'
=>
4
,
'antiAFKmng'
=>
4
,
'templates_clean'
=>
4
,
);
);
if
(
!
$cuser
||!
$cpass
)
{
gexit
(
$_ERROR
[
'no_login'
],
__file__
,
__line__
);
}
if
(
!
$cuser
||!
$cpass
)
{
gexit
(
$_ERROR
[
'no_login'
],
__file__
,
__line__
);
}
...
...
include/admin/admin.lang.php
View file @
46187c17
...
@@ -251,6 +251,8 @@ $lang = array
...
@@ -251,6 +251,8 @@ $lang = array
'vnmixlist_comment'
=>
'检查或退回已被采纳的合成'
,
'vnmixlist_comment'
=>
'检查或退回已被采纳的合成'
,
'gamecheck'
=>
'当前游戏自检'
,
'gamecheck'
=>
'当前游戏自检'
,
'gamecheck_comment'
=>
'修正游戏人数异常和移动下拉框消失的功能'
,
'gamecheck_comment'
=>
'修正游戏人数异常和移动下拉框消失的功能'
,
'templates_clean'
=>
'清空模板缓存'
,
'templates_clean_comment'
=>
'清空已生成的模板缓存文件'
,
'pcmng'
=>
'玩家数据管理'
,
'pcmng'
=>
'玩家数据管理'
,
'pcmng_comment'
=>
'修改当前局玩家的各数值,不影响帐号'
,
'pcmng_comment'
=>
'修改当前局玩家的各数值,不影响帐号'
,
...
...
include/admin/templates_clean.php
0 → 100644
View file @
46187c17
<?php
if
(
!
defined
(
'IN_ADMIN'
))
{
exit
(
'Access Denied'
);
}
$dir
=
GAME_ROOT
.
'./gamedata/templates/'
;
if
(
!
isset
(
$sub_cmd
))
{
$cmd_info
=
"即将清空路径
{
$dir
}
下的.tpl后缀文件,"
;
$cmd_info
.=
"确认清理吗?<br>"
;
$cmd_info
.=
"
<form method=
\"
post
\"
name=
\"
admin
\"
onsubmit=
\"
admin.php
\"
>
<input type=
\"
hidden
\"
name=
\"
mode
\"
id=
\"
mode
\"
value=
\"
templates_clean
\"
>
<input type=
\"
hidden
\"
name=
\"
sub_cmd
\"
id=
\"
sub_cmd
\"
value=
\"
confirm
\"
>
<input type=
\"
submit
\"
style=
\"
width:100;height:40;
\"
value=
\"
清空
\"
onclick=
\"
$('command').value='templates_clean';
\"
>
</form>
"
;
}
else
{
$tpl_file
=
scandir
(
$dir
);
if
(
!
empty
(
$tpl_file
))
{
$cmd_info
=
"开始清理缓存文件……<br>"
;
foreach
(
$tpl_file
as
$key
=>
$file_name
)
{
if
(
strpos
(
$file_name
,
'.tpl'
)
!==
false
)
{
$cmd_info
.=
"已删除文件
{
$file_name
}
<br>"
;
unlink
(
$dir
.
$file_name
);
}
}
$cmd_info
.=
"清理完成!<br>"
;
}
}
include
template
(
'admin_menu'
);
?>
\ No newline at end of file
templates/default/admin_menu.htm
View file @
46187c17
...
@@ -86,6 +86,11 @@
...
@@ -86,6 +86,11 @@
<td>
$lang['gamecheck_comment']
</td>
<td>
$lang['gamecheck_comment']
</td>
<td>
$admin_cmd_list['gamecheck']
</td>
<td>
$admin_cmd_list['gamecheck']
</td>
</tr>
</tr>
<tr
height=
"45px"
>
<td><input
type=
"submit"
style=
"width:100;height:40;"
value=
"$lang['templates_clean']"
onclick=
"$('command').value='templates_clean'"
<!
--
{
if
$
mygroup
<
$
admin_cmd_list
['
templates_clean
']}
--
>
disabled="true"
<!--{/if}-->
>
</td>
<td>
$lang['templates_clean_comment']
</td>
<td>
$admin_cmd_list['templates_clean']
</td>
</tr>
</table>
</table>
</td>
</td>
</tr>
</tr>
...
...
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