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
5dc5bd38
Commit
5dc5bd38
authored
May 20, 2023
by
Nemo Ma
Committed by
GitHub
May 20, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #146 from hikawiier/waaagh
update useradvdata
parents
839ee813
73cde7cc
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
85 additions
and
77 deletions
+85
-77
command.php
command.php
+2
-1
game.php
game.php
+2
-1
gamedata/cache/gamecfg_1.php
gamedata/cache/gamecfg_1.php
+7
-1
gamedata/cache/style_20190718.css
gamedata/cache/style_20190718.css
+0
-1
gamedata/sql/all.sql
gamedata/sql/all.sql
+1
-0
include/roommng.func.php
include/roommng.func.php
+7
-0
install/bra.sql
install/bra.sql
+1
-0
templates/default/dialogue.htm
templates/default/dialogue.htm
+1
-1
templates/default/templates.lang.php
templates/default/templates.lang.php
+1
-1
templates/default/user.htm
templates/default/user.htm
+19
-17
templates/default/useradvdata.htm
templates/default/useradvdata.htm
+7
-48
templates/default/userbasicdata.htm
templates/default/userbasicdata.htm
+6
-0
templates/default/usergdicon.htm
templates/default/usergdicon.htm
+7
-0
templates/default/userwords.htm
templates/default/userwords.htm
+3
-1
templates/default/valid.htm
templates/default/valid.htm
+5
-2
user.php
user.php
+16
-3
No files found.
command.php
View file @
5dc5bd38
...
...
@@ -714,7 +714,8 @@ ob_clean();
$jgamedata
=
compatible_json_encode
(
$gamedata
);
//$json = new Services_JSON();
//$jgamedata = $json->encode($gamedata);
if
(
!
strstr
(
$_SERVER
[
'HTTP_REFERER'
],
'php'
))
{
//if(!strstr($_SERVER['HTTP_REFERER'], 'php')) {
if
(
$udata
[
'u_templateid'
]
==
1
&&
!
strstr
(
$_SERVER
[
'HTTP_REFERER'
],
'php'
)
&&
$_SERVER
[
'HTTP_REFERER'
]
!=
''
){
include
'./api.php'
;
}
else
{
echo
$jgamedata
;
...
...
game.php
View file @
5dc5bd38
...
...
@@ -169,7 +169,8 @@ if(isset($opendialog))
</script>"
;
}
if
(
!
strstr
(
$_SERVER
[
'HTTP_REFERER'
],
'php'
)
&&
$_SERVER
[
'HTTP_REFERER'
]
!=
''
)
{
//if (!strstr($_SERVER['HTTP_REFERER'], 'php') && $_SERVER['HTTP_REFERER'] != '') {
if
(
$udata
[
'u_templateid'
]
==
1
&&
!
strstr
(
$_SERVER
[
'HTTP_REFERER'
],
'php'
)
&&
$_SERVER
[
'HTTP_REFERER'
]
!=
''
){
include
'./api.php'
;
}
else
{
include
template
(
'game'
);
...
...
gamedata/cache/gamecfg_1.php
View file @
5dc5bd38
...
...
@@ -173,6 +173,12 @@ $ip_max_rooms = 2;
$login_exit_room
=
0
;
//版本更新时是否需要检查增补数据库字段
$need_update_db_structrue
=
0
;
$need_update_db_structrue
=
1
;
//使用新版UI时,访问旧页面时重定向至新版UI界面的完整路径
$u_templateid_url
=
Array
(
1
=>
''
,
);
?>
gamedata/cache/style_20190718.css
View file @
5dc5bd38
...
...
@@ -681,7 +681,6 @@ div.ach_box
{
background-color
:
rgba
(
20
,
22
,
24
,
0.5
);
*
BACKGROUND
:
rgb
(
20
,
22
,
24
);
*
filter
:
alpha
(
opacity
=
50
);
display
:
Inline-block
;
overflow-y
:
auto
;
width
:
320px
;
min-height
:
106px
;
text-align
:
left
;
vertical-align
:
middle
;
margin
:
5px
;
border
:
1px
solid
rgba
(
225
,
124
,
226
,
0.4
);
border-radius
:
7px
;
}
...
...
gamedata/sql/all.sql
View file @
5dc5bd38
...
...
@@ -384,6 +384,7 @@ CREATE TABLE `acbra2_users` (
`motto`
char
(
30
)
NOT
NULL
DEFAULT
''
,
`killmsg`
char
(
30
)
NOT
NULL
DEFAULT
''
,
`lastword`
char
(
30
)
NOT
NULL
DEFAULT
''
,
`u_templateid`
tinyint
(
3
)
unsigned
NOT
NULL
DEFAULT
'0'
,
PRIMARY
KEY
(
`uid`
),
UNIQUE
KEY
`username`
(
`username`
)
)
ENGINE
=
MyISAM
AUTO_INCREMENT
=
17725
DEFAULT
CHARSET
=
utf8
;
...
...
include/roommng.func.php
View file @
5dc5bd38
...
...
@@ -34,6 +34,13 @@ function roommng_verify_db_game_structure()
echo
"向game表中添加了字段groomownid<br>"
;
}
$result
=
$db
->
query
(
"DESCRIBE
{
$gtablepre
}
users u_templateid"
);
if
(
!
$db
->
num_rows
(
$result
))
{
$db
->
query
(
"ALTER TABLE
{
$gtablepre
}
users ADD u_templateid tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER lastword"
);
echo
"向users表中添加了字段u_templateid<br>"
;
}
$result
=
$db
->
query
(
"SHOW INDEX FROM
{
$gtablepre
}
game"
);
$gr
=
$db
->
fetch_array
(
$result
);
if
(
$gr
[
'Column_name'
]
!=
'groomid'
)
...
...
install/bra.sql
View file @
5dc5bd38
...
...
@@ -73,6 +73,7 @@ CREATE TABLE bra_users (
`motto`
char
(
30
)
NOT
NULL
DEFAULT
''
,
`killmsg`
char
(
30
)
NOT
NULL
DEFAULT
''
,
`lastword`
char
(
30
)
NOT
NULL
DEFAULT
''
,
`u_templateid`
tinyint
(
3
)
unsigned
NOT
NULL
DEFAULT
'0'
,
PRIMARY
KEY
(
uid
),
UNIQUE
KEY
username
(
username
)
...
...
templates/default/dialogue.htm
View file @
5dc5bd38
...
...
@@ -9,7 +9,7 @@
<!-- 对白分段显示 -->
<!--{loop $dialogues[$dialogue_id] $dkey $dinfo}-->
<div
id=
"d{$dkey}"
<!
--
{
if
$
dkey =
=
0
}
--
>
class="ach_box" style="border:0; text-align: center; min-height: min-content; width: max-content; max-width: 560px;"
<!--{else}-->
style="display: none;"
<!--{/if}-->
>
<div
id=
"d{$dkey}"
<!
--
{
if
$
dkey =
=
0
}
--
>
class="ach_box" style="
overflow-y: auto;
border:0; text-align: center; min-height: min-content; width: max-content; max-width: 560px;"
<!--{else}-->
style="display: none;"
<!--{/if}-->
>
<table>
<tr>
<!-- 带头像对白 -->
...
...
templates/default/templates.lang.php
View file @
5dc5bd38
...
...
@@ -57,7 +57,7 @@ $language = array
'motto_comment'
=>
'写下彰显个性的台词,30个字以内。'
,
'killmsg_comment'
=>
'写下你杀死对手的留言,30个字以内'
,
'lastword_comment'
=>
'写下你不幸被害时的台词,30个字以内'
,
'bgmvolume_comment'
=>
'设置游戏内背景音乐的默认音量
,刷新页面后生效
'
,
'bgmvolume_comment'
=>
'设置游戏内背景音乐的默认音量'
,
'credits'
=>
'战斗力'
,
'credits2'
=>
'切糕'
,
'lastgame'
=>
'最后游戏'
,
...
...
templates/default/user.htm
View file @
5dc5bd38
...
...
@@ -8,24 +8,26 @@
<span
id=
"info"
class=
"yellow"
></span>
</p>
<center>
<form
method=
"post"
action=
"user.php"
name=
"userdata"
>
<input
type=
"hidden"
name=
"mode"
value=
"edit"
>
<table
style=
"text-align: center"
>
<tr>
<td
style=
"vertical-align:top"
><span
class =
"yellow"
>
{lang basicdata}
</span>
{template userbasicdata}
</td>
<td
rowspan=
"2"
style=
"vertical-align:top"
><span
class =
"yellow"
>
{lang advanceddata}
</span>
{template useradvdata}
</td>
</tr>
<tr>
<td><span
class =
"yellow"
>
{lang creditsdata}
</span>
{template usercrdtsdata}
</td>
</tr>
</table>
<div
id=
"postdata"
>
<input
type=
"submit"
id=
"post"
onClick=
"postCmd('userdata','user.php');return false;"
value=
"{lang submit}"
>
<input
type=
"reset"
id=
"reset"
name=
"reset"
value=
"{lang reset}"
>
<form
method=
"post"
action=
"user.php"
name=
"userdata"
>
<input
type=
"hidden"
name=
"mode"
value=
"edit"
>
<div>
<div
style=
"display:inline-block;"
>
<span
class =
"yellow b"
>
{lang basicdata}
</span>
{template userbasicdata}
</div>
</form>
<div
style=
"display:inline-block;"
>
<span
class =
"yellow b"
>
{lang advanceddata}
</span>
{template useradvdata}
</div>
</div>
<div
id=
"postdata"
>
<input
type=
"submit"
id=
"post"
onClick=
"postCmd('userdata','user.php');return false;"
value=
"{lang submit}"
>
<input
type=
"reset"
id=
"reset"
name=
"reset"
value=
"{lang reset}"
>
</div>
</form>
</center>
<br
/>
{template footer}
\ No newline at end of file
templates/default/useradvdata.htm
View file @
5dc5bd38
<table
align=
"center"
>
<table>
<tr>
<td>
{lang gender}
</td>
<td>
<input
type=
"radio"
id=
"male"
name=
"gender"
onclick=
"userIconMover()"
value=
"m"
<!
--
{
if
$
gender
!=
"
f
"}
--
>
checked
<!--{/if}-->
>$sexinfo['m']
<input
type=
"radio"
name=
"gender"
onclick=
"userIconMover()"
value=
"f"
<!
--
{
if
$
gender =
=
"
f
"}
--
>
checked
<!--{/if}-->
>$sexinfo['f']
<td
align=
"center"
>
<table>
<tr><td>
{template usergdicon}
<br
/></td><td>
</td>
<td>
{template userwords}
<br
/></td></tr>
</table>
</td>
</tr>
<tr>
<td>
{lang icon}
</td>
<td>
<select
id=
"icon"
name=
"icon"
onchange=
"userIconMover()"
>
<!--{loop $iconarray $icon}-->
{$icon}
<!--{/loop}-->
</select>
(0为随机)
<div
id=
"userIconImg"
class=
"iconImg"
>
<img
src=
"img/<!--{if $gender != 'f'}-->m<!--{else}-->f<!--{/if}-->_{$select_icon}.gif"
alt=
"$select_icon"
>
</div>
</td>
</tr>
<tr>
<td>
{lang motto}
</td>
<td><input
size=
"30"
type=
"text"
name=
"motto"
maxlength=
"30"
value=
"{$motto}"
>
{lang motto_comment}
</td>
</tr>
<tr>
<tr>
<td>
{lang killmsg}
</td>
<td><input
size=
"30"
type=
"text"
name=
"killmsg"
maxlength=
"30"
value=
"{$killmsg}"
>
{lang killmsg_comment}
</td>
</tr>
<tr>
<td>
{lang lastword}
</td>
<td><input
size=
"30"
type=
"text"
name=
"lastword"
maxlength=
"30"
value=
"{$lastword}"
>
{lang lastword_comment}
</td>
</tr>
<tr>
<td>
{lang usertitle}
</td>
<td>
<!--{eval $utlist = !empty($utlist) ? $utlist : Array(0 => '参展者');}-->
<select
name=
"nick"
>
<!--{loop $utlist $key $val}-->
<option
value=
"{$val}"
<!
--
{
if
$
udata
['
nick
'
] =
=
$
val
}
--
>
selected
<!--{/if}-->
>$val
</option>
<!--{/loop}-->
</select>
</td>
</tr>
<tr>
<td>
{lang bgmvolume}
</td>
<!--{eval $volume = isset($_COOKIE["volume"]) ? filter_var($_COOKIE["volume"],FILTER_VALIDATE_FLOAT)*100 : 20; $v = isset($volume) ? $volume : 20;}-->
<td><input
style=
"width: 45px;"
size=
"2"
type=
"number"
name=
"volume"
min=
"0"
max=
"100"
value=
"{$v}"
>
% {lang bgmvolume_comment}
</td>
</tr>
</table>
\ No newline at end of file
</table>
\ No newline at end of file
templates/default/userbasicdata.htm
View file @
5dc5bd38
...
...
@@ -36,6 +36,12 @@
<td><input
type=
"password"
id=
"rnpass"
name=
"rnpass"
size=
"15"
maxlength=
"24"
value=
""
></td>
<td>
{lang password_comment}
</td>
</tr>
<tr>
<td>
{lang bgmvolume}
</td>
<!--{eval $volume = isset($_COOKIE["volume"]) ? filter_var($_COOKIE["volume"],FILTER_VALIDATE_FLOAT)*100 : 20; $v = isset($volume) ? $volume : 20;}-->
<td><input
type=
"number"
name=
"volume"
min=
"0"
max=
"100"
value=
"{$v}"
>
%
</td>
<td>
{lang bgmvolume_comment}
</td>
</tr>
<!--{else}-->
<tr>
<td>
{lang username}
</td>
...
...
templates/default/usergdicon.htm
View file @
5dc5bd38
...
...
@@ -26,4 +26,11 @@
</div>
</td>
</tr>
<tr>
<td>
当前界面
</td>
<td>
<input
type=
"radio"
id=
"template_1"
name=
"templateid"
value=
"0"
<!
--
{
if
!$
u_templateid
}
--
>
checked
<!--{/if}-->
>
<a
onclick=
"sl('template_1')"
>
经典界面
</a>
<input
type=
"radio"
id=
"template_2"
name=
"templateid"
value=
"1"
<!
--
{
if
$
u_templateid =
=
1
}
--
>
checked
<!--{/if}-->
>
<a
onclick=
"sl('template_2')"
>
LULUXIA(未开放)
</span>
</td>
</tr>
</table>
\ No newline at end of file
templates/default/userwords.htm
View file @
5dc5bd38
<table
align=
"center"
>
<!--{if !empty($udata)}-->
<!--{if !empty($udata)}-->
<tr>
<td>
{lang usertitle}
</td>
<td>
...
...
@@ -12,6 +12,7 @@
选择一个有趣的头衔,部分头衔存在特殊的入场效果。
</td>
</tr>
<!--{if !empty($t1_list) && !empty($t2_list)}-->
<tr>
<td>
内定称号
</td>
<td>
...
...
@@ -31,6 +32,7 @@
</td>
</tr>
<!--{/if}-->
<!--{/if}-->
<tr>
<td>
{lang motto}
</td>
<td><input
size=
"30"
type=
"text"
name=
"motto"
maxlength=
"30"
value=
"{$motto}"
>
{lang motto_comment}
</td>
...
...
templates/default/valid.htm
View file @
5dc5bd38
...
...
@@ -16,8 +16,11 @@
<tr>
<td
align=
"center"
>
<table>
<tr><td>
{template usergdicon}
<br
/></td><td>
</td>
<td>
{template userwords}
<br
/></td></tr>
<tr>
<td>
{template usergdicon}
<br
/></td>
<td>
</td>
<td>
{template userwords}
<br
/></td>
</tr>
</table>
</td>
</tr>
...
...
user.php
View file @
5dc5bd38
...
...
@@ -46,7 +46,7 @@ if($mode == 'edit') {
$gamedata
[
'innerHTML'
][
'info'
]
.=
$_INFO
[
'pass_failure'
]
.
'<br />'
;
}
$credits
=
$udata
[
'credits'
];
$credits2
=
$udata
[
'credits2'
];
if
(
$exchg12
||
$exchg21
){
/*
if($exchg12||$exchg21){
//if(!is_numeric($exchg12)||$exchg12<0){$gamedata['innerHTML']['info'] .= $_INFO['credits_failure'];}
if(!is_numeric($exchg12)||!is_numeric($exchg21)||$exchg12<0||$exchg21<0){$gamedata['innerHTML']['info'] .= $_INFO['credits_failure'];}
elseif($exchg12 && $exchg21){$gamedata['innerHTML']['info'] .= $_INFO['credits_conflicts'];}
...
...
@@ -71,11 +71,24 @@ if($mode == 'edit') {
}
}
}
}
}*/
# 头像编辑
if
(
$icon
>
$iconlimit
)
$icon
=
0
;
# 入场音量编辑
$volume
=
round
(
$volume
/
100
,
2
);
$volume
=
round
(
min
(
1
,
max
(
0
,
$volume
)),
2
);
gsetcookie
(
'volume'
,
$volume
,
86400
*
30
,
0
);
$db
->
query
(
"UPDATE
{
$gtablepre
}
users SET gender='
$gender
', icon='
$icon
',
{
$passqry
}
motto='
$motto
', killmsg='
$killmsg
', lastword='
$lastword
', credits='
$credits
', credits2='
$credits2
' ,nick='
$nick
' WHERE username='
$cuser
'"
);
# 切换用户界面
if
(
!
empty
(
$templateid
))
{
if
(
$templateid
!=
1
)
$templateid
=
1
;
# 暂时只允许管理员账户切换至新界面
if
(
$udata
[
'groupid'
]
<
9
)
{
$templateid
=
0
;
$gamedata
[
'innerHTML'
][
'info'
]
.=
'界面切换失败,新版界面暂未实装。<br>'
;
}
}
$db
->
query
(
"UPDATE
{
$gtablepre
}
users SET gender='
$gender
', icon='
$icon
',
{
$passqry
}
motto='
$motto
', killmsg='
$killmsg
', lastword='
$lastword
', credits='
$credits
', credits2='
$credits2
' ,nick='
$nick
', u_templateid='
$templateid
' WHERE username='
$cuser
'"
);
if
(
$db
->
affected_rows
()){
$gamedata
[
'innerHTML'
][
'info'
]
.=
$_INFO
[
'data_success'
];
}
else
{
...
...
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