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
6d5d0a17
Commit
6d5d0a17
authored
Mar 11, 2023
by
hisuinohoshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rev achievement phase 0.81
- 新增一个管理后台的临时功能:批量将玩家的旧成就数据转移至新成就结构内;
parent
a5c689d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
3 deletions
+38
-3
include/admin/urlist.php
include/admin/urlist.php
+33
-2
templates/default/admin_urlist.htm
templates/default/admin_urlist.htm
+5
-1
No files found.
include/admin/urlist.php
View file @
6d5d0a17
...
@@ -34,7 +34,7 @@ if($urcmd){
...
@@ -34,7 +34,7 @@ if($urcmd){
$resultinfo
=
'第'
.
$startno
.
'条-第'
.
$endno
.
'条记录'
;
$resultinfo
=
'第'
.
$startno
.
'条-第'
.
$endno
.
'条记录'
;
}
}
}
}
if
(
$urcmd
==
'ban'
||
$urcmd
==
'unban'
||
$urcmd
==
'del'
)
{
if
(
$urcmd
==
'ban'
||
$urcmd
==
'unban'
||
$urcmd
==
'del'
||
$urcmd
==
'checkach'
)
{
$operlist
=
$gfaillist
=
$ffaillist
=
array
();
$operlist
=
$gfaillist
=
$ffaillist
=
array
();
for
(
$i
=
0
;
$i
<
$showlimit
;
$i
++
){
for
(
$i
=
0
;
$i
<
$showlimit
;
$i
++
){
if
(
isset
(
$
{
'user_'
.
$i
}))
{
if
(
isset
(
$
{
'user_'
.
$i
}))
{
...
@@ -46,6 +46,35 @@ if($urcmd == 'ban' || $urcmd == 'unban' || $urcmd == 'del') {
...
@@ -46,6 +46,35 @@ if($urcmd == 'ban' || $urcmd == 'unban' || $urcmd == 'del') {
$urdata
[
$i
][
'groupid'
]
=
1
;
$urdata
[
$i
][
'groupid'
]
=
1
;
}
elseif
(
$urcmd
==
'del'
){
}
elseif
(
$urcmd
==
'del'
){
unset
(
$urdata
[
$i
]);
unset
(
$urdata
[
$i
]);
}
elseif
(
$urcmd
==
'checkach'
){
$adata
=
$urdata
[
$i
];
$n
=
$urdata
[
$i
][
'username'
];
$adata
[
'achrev'
]
=
json_decode
(
$adata
[
'achrev'
],
true
);
$new_ach
=
Array
();
$cpl
=
Array
();
$prc
=
Array
();
//手动变化成就储存结构
if
(
!
empty
(
$adata
[
'achievement'
])
&&
empty
(
$adata
[
'achrev'
]))
{
include_once
GAME_ROOT
.
'./include/game/achievement.func.php'
;
$alist
=
get_achlist
();
foreach
(
$alist
as
$a
=>
$aarr
)
{
if
(
$a
<=
57
)
{
$cpl
[
$a
]
=
check_achievement
(
$a
,
$n
);
$prc
[
$a
]
=
fetch_achievement
(
$a
,
$n
);
//新成就储存结构内,只会保存有进度的成就
if
(
!
empty
(
$cpl
[
$a
])
||
!
empty
(
$prc
[
$a
]))
{
// 到达999阶段的成就 替换为配置中预设的达成等级
if
(
$cpl
[
$a
]
==
999
)
$cpl
[
$a
]
=
$aarr
[
'lvl'
]
?:
count
(
$aarr
[
'name'
]);
$new_ach
[
$a
][
'l'
]
=
$cpl
[
$a
]
?:
0
;
$new_ach
[
$a
][
'v'
]
=
$prc
[
$a
]
?:
0
;
}
}
}
$new_ach
=
json_encode
(
$new_ach
);
$db
->
query
(
"UPDATE
{
$tablepre
}
users SET achrev='
$new_ach
' WHERE username='"
.
$n
.
"'"
);
}
//$new_ach = '';
}
}
// adminlog('banur',$urdata[$i]['username']);
// adminlog('banur',$urdata[$i]['username']);
}
elseif
(
isset
(
$urdata
[
$i
])
&&
$urdata
[
$i
][
'uid'
]
==
$
{
'user_'
.
$i
}){
}
elseif
(
isset
(
$urdata
[
$i
])
&&
$urdata
[
$i
][
'uid'
]
==
$
{
'user_'
.
$i
}){
...
@@ -66,8 +95,10 @@ if($urcmd == 'ban' || $urcmd == 'unban' || $urcmd == 'del') {
...
@@ -66,8 +95,10 @@ if($urcmd == 'ban' || $urcmd == 'unban' || $urcmd == 'del') {
}
elseif
(
$urcmd
==
'del'
){
}
elseif
(
$urcmd
==
'del'
){
$operword
=
'删除'
;
$operword
=
'删除'
;
$qryword
=
"DELETE FROM
{
$tablepre
}
users "
;
$qryword
=
"DELETE FROM
{
$tablepre
}
users "
;
}
elseif
(
$urcmd
==
'checkach'
){
$cmd_info
.=
" 帐户
$opernames
调整了成就储存结构"
;
}
}
if
(
$operlist
){
if
(
$operlist
&&
$urcmd
!=
'checkach'
){
$qrywhere
=
'('
.
implode
(
','
,
array_keys
(
$operlist
))
.
')'
;
$qrywhere
=
'('
.
implode
(
','
,
array_keys
(
$operlist
))
.
')'
;
$opernames
=
implode
(
','
,(
$operlist
));
$opernames
=
implode
(
','
,(
$operlist
));
$db
->
query
(
"
$qryword
WHERE uid IN
$qrywhere
"
);
$db
->
query
(
"
$qryword
WHERE uid IN
$qrywhere
"
);
...
...
templates/default/admin_urlist.htm
View file @
6d5d0a17
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
<th>
头像
</th>
<th>
头像
</th>
<th>
社团
</th>
<th>
社团
</th>
<th>
成就
</th>
<th>
成就
</th>
<th>
成就(新)
</th>
<th>
称号表
</th>
<th>
称号表
</th>
<th>
口头禅
</th>
<th>
口头禅
</th>
<th>
杀人留言
</th>
<th>
杀人留言
</th>
...
@@ -59,6 +60,7 @@
...
@@ -59,6 +60,7 @@
<td><input
type=
"text"
name=
"icon_$n"
size=
"2"
maxlength=
"2"
value=
"$ur['icon']"
disabled=
"true"
></td>
<td><input
type=
"text"
name=
"icon_$n"
size=
"2"
maxlength=
"2"
value=
"$ur['icon']"
disabled=
"true"
></td>
<td>
{$clubinfo[$ur['club']]}
</td>
<td>
{$clubinfo[$ur['club']]}
</td>
<td><input
type=
"text"
name=
"achievement_$n"
size=
"20"
maxlength=
"400"
value=
"$ur['achievement']"
disabled=
"true"
></td>
<td><input
type=
"text"
name=
"achievement_$n"
size=
"20"
maxlength=
"400"
value=
"$ur['achievement']"
disabled=
"true"
></td>
<td><input
type=
"text"
name=
"achrev_$n"
size=
"20"
maxlength=
"400"
value=
"$ur['achrev']"
disabled=
"true"
></td>
<td><input
type=
"text"
name=
"nicks_$n"
size=
"20"
maxlength=
"300"
value=
"$ur['nicks']"
disabled=
"true"
></td>
<td><input
type=
"text"
name=
"nicks_$n"
size=
"20"
maxlength=
"300"
value=
"$ur['nicks']"
disabled=
"true"
></td>
<td><input
type=
"text"
name=
"motto_$n"
size=
"20"
maxlength=
"60"
value=
"$ur['motto']"
disabled=
"true"
></td>
<td><input
type=
"text"
name=
"motto_$n"
size=
"20"
maxlength=
"60"
value=
"$ur['motto']"
disabled=
"true"
></td>
<td><input
type=
"text"
name=
"killmsg_$n"
size=
"20"
maxlength=
"20"
value=
"$ur['killmsg']"
disabled=
"true"
></td>
<td><input
type=
"text"
name=
"killmsg_$n"
size=
"20"
maxlength=
"20"
value=
"$ur['killmsg']"
disabled=
"true"
></td>
...
@@ -85,6 +87,7 @@
...
@@ -85,6 +87,7 @@
<td><input
type=
"text"
name=
"icon_$n"
size=
"2"
maxlength=
"2"
value=
"$ur['icon']"
></td>
<td><input
type=
"text"
name=
"icon_$n"
size=
"2"
maxlength=
"2"
value=
"$ur['icon']"
></td>
<td>
{$clubinfo[$ur['club']]}
</td>
<td>
{$clubinfo[$ur['club']]}
</td>
<td><input
type=
"text"
name=
"achievement_$n"
size=
"20"
maxlength=
"400"
value=
"$ur['achievement']"
></td>
<td><input
type=
"text"
name=
"achievement_$n"
size=
"20"
maxlength=
"400"
value=
"$ur['achievement']"
></td>
<td><textarea
name=
"achrev_$n"
style=
"overflow:auto"
>
$ur['achrev']
</textarea></td>
<td><input
type=
"text"
name=
"nicks_$n"
size=
"20"
maxlength=
"300"
value=
"$ur['nicks']"
></td>
<td><input
type=
"text"
name=
"nicks_$n"
size=
"20"
maxlength=
"300"
value=
"$ur['nicks']"
></td>
<td><input
type=
"text"
name=
"motto_$n"
size=
"20"
maxlength=
"60"
value=
"$ur['motto']"
></td>
<td><input
type=
"text"
name=
"motto_$n"
size=
"20"
maxlength=
"60"
value=
"$ur['motto']"
></td>
<td><input
type=
"text"
name=
"killmsg_$n"
size=
"20"
maxlength=
"60"
value=
"$ur['killmsg']"
></td>
<td><input
type=
"text"
name=
"killmsg_$n"
size=
"20"
maxlength=
"60"
value=
"$ur['killmsg']"
></td>
...
@@ -97,10 +100,11 @@
...
@@ -97,10 +100,11 @@
<!--{/loop}-->
<!--{/loop}-->
<tr>
<tr>
<td
colspan=
2
><input
type=
"checkbox"
name=
"user_all"
onchange=
"for(i=0; i<=$n;i++){if(! $('user_'+i).disabled){if(this.checked==true){$('user_'+i).checked=true}else{$('user_'+i).checked=false}}}"
>
全选
</td>
<td
colspan=
2
><input
type=
"checkbox"
name=
"user_all"
onchange=
"for(i=0; i<=$n;i++){if(! $('user_'+i).disabled){if(this.checked==true){$('user_'+i).checked=true}else{$('user_'+i).checked=false}}}"
>
全选
</td>
<td
colspan=
1
2
style=
"text-align:center;"
>
<td
colspan=
1
6
style=
"text-align:center;"
>
<input
type=
"submit"
name=
"submit"
value=
"封停选中玩家"
onclick=
"$('urcmd').value='ban'"
>
<input
type=
"submit"
name=
"submit"
value=
"封停选中玩家"
onclick=
"$('urcmd').value='ban'"
>
<input
type=
"submit"
name=
"submit"
value=
"解封选中玩家"
onclick=
"$('urcmd').value='unban'"
>
<input
type=
"submit"
name=
"submit"
value=
"解封选中玩家"
onclick=
"$('urcmd').value='unban'"
>
<input
type=
"submit"
name=
"submit"
value=
"删除选中玩家"
onclick=
"$('urcmd').value='del'"
>
<input
type=
"submit"
name=
"submit"
value=
"删除选中玩家"
onclick=
"$('urcmd').value='del'"
>
<input
type=
"submit"
name=
"submit"
value=
"更新选中玩家的成就结构"
onclick=
"$('urcmd').value='checkach'"
>
</td>
</td>
</tr>
</tr>
<!--{/if}-->
<!--{/if}-->
...
...
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