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
4fab0d51
Commit
4fab0d51
authored
May 12, 2023
by
Nemo Ma
Committed by
GitHub
May 12, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #136 from hikawiier/waaagh
Update clubslct & roommng
parents
4d45df30
a34d0e9d
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
241 additions
and
55 deletions
+241
-55
command.php
command.php
+2
-1
include/admin/roommng.php
include/admin/roommng.php
+24
-4
include/common.inc.php
include/common.inc.php
+23
-14
include/game.func.php
include/game.func.php
+2
-1
include/game/clubslct.func.php
include/game/clubslct.func.php
+73
-3
include/news.func.php
include/news.func.php
+4
-0
include/roommng.func.php
include/roommng.func.php
+16
-2
include/system.func.php
include/system.func.php
+9
-1
templates/default/index.htm
templates/default/index.htm
+2
-2
templates/default/profile.htm
templates/default/profile.htm
+12
-3
templates/default/roomlist.htm
templates/default/roomlist.htm
+2
-2
templates/default/usergdicon.htm
templates/default/usergdicon.htm
+16
-18
templates/default/userwords.htm
templates/default/userwords.htm
+32
-0
templates/default/valid.htm
templates/default/valid.htm
+12
-3
valid.php
valid.php
+12
-1
No files found.
command.php
View file @
4fab0d51
...
...
@@ -445,7 +445,8 @@ if($hp > 0){
$shop
=
substr
(
$command
,
4
,
2
);
shoplist
(
$shop
);
}
elseif
(
strpos
(
$command
,
'clubsel'
)
===
0
)
{
$clubchosen
=
substr
(
$command
,
7
,
1
);
# 后续更新中,将停用在游戏内直接选择称号的方式
$clubchosen
=
(
int
)
str_replace
(
'clubsel'
,
''
,
$command
);
include_once
GAME_ROOT
.
'./include/game/clubslct.func.php'
;
$retval
=
selectclub
(
$clubchosen
);
if
(
$retval
==
0
)
...
...
include/admin/roommng.php
View file @
4fab0d51
...
...
@@ -8,12 +8,20 @@ if($command == 'killroom')
roommng_close_room
(
$roomkey
,
1
);
$command
=
''
;
}
elseif
(
$command
==
'killallroom'
)
{
for
(
$r
=
1
;
$r
<=
$max_rooms
;
$r
++
)
{
roommng_close_room
(
$r
,
1
,
1
);
}
$command
=
''
;
}
echo
<<<EOT
<form method="post" name="roommng" onsubmit="admin.php">
<input type="hidden" name="mode" value="roommng">
<input type="hidden" name="command" value="killroom">
强制关闭
<input type="hidden"
id="command"
name="command" value="killroom">
强制关闭
指定房间:
<select name="roomkey">
EOT;
...
...
@@ -25,8 +33,20 @@ EOT;
}
echo
<<<EOT
</select><br>
<input type="submit" value="关闭"><br>
</select>
<input type="submit" value="强制关闭">
<br>
<span class='red'>(警告:正处于游戏状态中的房间也会被关闭!)</span>
<br><br>
EOT;
echo
<<<EOT
<span tooltip="只会关闭尚未开始、或已无幸存玩家的房间">
<input type="submit" value="关闭所有闲置房间" onclick="$('command').value='killallroom';"><br>
</span>
EOT;
echo
<<<EOT
</form>
EOT;
...
...
include/common.inc.php
View file @
4fab0d51
...
...
@@ -76,24 +76,24 @@ while($roominfo = $db->fetch_array($result))
if
(
$cuser
)
{
$tr
=
$db
->
query
(
"SELECT * FROM
{
$gtablepre
}
users WHERE username='
$cuser
'"
);
$
tp
=
$db
->
fetch_array
(
$tr
);
$
udata
=
$db
->
fetch_array
(
$tr
);
}
$rid
=
isset
(
$tp
[
'roomid'
])
?
$tp
[
'roomid'
]
:
0
;
$groomid
=
$rid
;
$groomid
=
isset
(
$udata
[
'roomid'
])
?
$udata
[
'roomid'
]
:
0
;
if
(
!
empty
(
$
r
id
))
if
(
!
empty
(
$
groom
id
))
{
$result
=
$db
->
query
(
"SELECT * FROM
{
$gtablepre
}
game WHERE groomid='
$
r
id
'"
);
$result
=
$db
->
query
(
"SELECT * FROM
{
$gtablepre
}
game WHERE groomid='
$
groom
id
'"
);
if
(
!
$db
->
num_rows
(
$result
))
{
$gr
=
$db
->
query
(
"SELECT gamenum FROM
{
$gtablepre
}
game WHERE groomid=0"
);
$gnums
=
$db
->
result
(
$result
,
0
)
+
$rid
;
roommng_create_new_room
(
$udata
);
/*$gr = $db->query("SELECT gamenum FROM {$gtablepre}game WHERE groomid=0");
$gnums = $db->result($result, 0) + $groomid;
$starttime = $now + $startmin*5;
$db
->
query
(
"INSERT INTO
{
$gtablepre
}
game (gamenum,groomid,groomnums,gamestate,starttime) VALUES ('
$gnums
','
$
rid
','1','0','
$starttime
')"
);
$db->query("INSERT INTO {$gtablepre}game (gamenum,groomid,groomnums,gamestate,starttime) VALUES ('$gnums','$
groomid','1','0','$starttime')");*/
}
}
$tablepre
=
!
empty
(
$
rid
)
?
$tablepre
.
's'
.
$r
id
.
'_'
:
$tablepre
;
$tablepre
=
!
empty
(
$
groomid
)
?
$tablepre
.
's'
.
$groom
id
.
'_'
:
$tablepre
;
if
(
CURSCRIPT
!==
'chat'
)
{
...
...
@@ -123,12 +123,21 @@ if(CURSCRIPT !== 'chat')
{
if
(
$now
>=
$starttime
)
{
$gamestate
=
20
;
//save_gameinfo();
//addnews($starttime,'newgame',$gamenum);
addnews
(
$starttime
,
'newgame'
,
$gamenum
);
# 小房间开始游戏
if
(
!
empty
(
$groomid
))
{
addnews
(
$starttime
,
'newroomgame'
,
$gamenum
,
$groomid
);
}
# 大房间开始游戏
else
{
addnews
(
$starttime
,
'newgame'
,
$gamenum
);
# 是否部署BOT -> 数量; 只有大房间会部署bot
$gamevars
[
'botplayer'
]
=
$rsgame_bots
;
}
systemputchat
(
$starttime
,
'newgame'
);
//是否部署BOT -> 数量;
$gamevars
[
'botplayer'
]
=
$rsgame_bots
;
$ginfochange
=
true
;
}
}
...
...
include/game.func.php
View file @
4fab0d51
...
...
@@ -7,6 +7,7 @@ if(!defined('IN_GAME')) {
function
init_playerdata
(){
global
$lvl
,
$baseexp
,
$exp
,
$gd
,
$icon
,
$arbe
,
$arhe
,
$arae
,
$arfe
,
$weather
,
$fog
,
$weps
,
$arbs
,
$log
,
$upexp
,
$lvlupexp
,
$iconImg
,
$iconImgB
,
$ardef
;
global
$pls
,
$weather
,
$pose
,
$tactic
,
$clbpara
;
global
$udata
;
$upexp
=
round
((
$lvl
*
$baseexp
)
+
((
$lvl
+
1
)
*
$baseexp
));
$lvlupexp
=
$upexp
-
$exp
;
...
...
@@ -38,7 +39,7 @@ function init_profile(){
global
$nospk
,
$wepsk_words
,
$arbsk_words
,
$arhsk_words
,
$arask_words
,
$arfsk_words
,
$artsk_words
,
$itmsk0_words
,
$itmsk1_words
,
$itmsk2_words
,
$itmsk3_words
,
$itmsk4_words
,
$itmsk5_words
,
$itmsk6_words
;
global
$wepk_words
,
$arbk_words
,
$arhk_words
,
$arak_words
,
$arfk_words
,
$artk_words
,
$itmk0_words
,
$itmk1_words
,
$itmk2_words
,
$itmk3_words
,
$itmk4_words
,
$itmk5_words
,
$itmk6_words
;
global
$wep
,
$arb
,
$arh
,
$ara
,
$arf
,
$art
,
$itm0
,
$itm1
,
$itm2
,
$itm3
,
$itm4
,
$itm5
,
$itm6
;
global
$clbpara
,
$weather
,
$definfo
,
$atkinfo
,
$pdata
;
global
$clbpara
,
$weather
,
$definfo
,
$atkinfo
,
$pdata
,
$udata
;
foreach
(
Array
(
'wep'
,
'arb'
,
'arh'
,
'ara'
,
'arf'
,
'art'
,
'itm0'
,
'itm1'
,
'itm2'
,
'itm3'
,
'itm4'
,
'itm5'
,
'itm6'
)
as
$value
)
{
...
...
include/game/clubslct.func.php
View file @
4fab0d51
...
...
@@ -19,6 +19,66 @@ function swap(&$a,&$b)
$t
=
$a
;
$a
=
$b
;
$b
=
$t
;
}
function
getrandclbKeys
(
$randclblist
,
$mkey1
,
$mkey2
,
$uid
,
$gid
,
$gamenum
)
{
$keys
=
array
();
// 确定第一个键名
$key1
=
(
$mkey1
+
$uid
+
$gid
)
%
count
(
$randclblist
);
$keys
[]
=
$randclblist
[
$key1
];
// 确定第二个键名
$key2
=
(
$mkey2
+
$uid
+
$gamenum
)
%
count
(
$randclblist
);
while
(
$key2
==
$key1
)
{
$key2
++
;
if
(
$key2
>=
count
(
$randclblist
))
$key2
=
0
;
}
$keys
[]
=
$randclblist
[
$key2
];
// 确定第三个键名
$key3
=
(
$mkey1
+
$mkey2
+
$gid
+
$gamenum
)
%
count
(
$randclblist
);
while
(
$key3
==
$key1
||
$key3
==
$key2
)
{
$key3
++
;
if
(
$key3
>=
count
(
$randclblist
))
$key3
=
0
;
}
$keys
[]
=
$randclblist
[
$key3
];
return
$keys
;
}
# 在入场界面确定可选社团列表
# 普通社团列表
function
valid_getclublist_t2
(
$udata
)
{
# 固定可选:0 1-殴 2-斩 3-投 4-射 5-爆 9-灵 7-锡安 8-黑衣
$t2_list
=
Array
(
0
,
1
,
2
,
3
,
4
,
5
,
9
,
7
,
8
);
return
$t2_list
;
}
# 特殊社团列表
function
valid_getclublist_t1
(
$udata
)
{
# 随机可选范围(选3):6-疾风 10-天赋 11-富家 12-全能 19-晶莹
$temp_t1_list
=
Array
(
6
,
10
,
11
,
12
,
19
);
global
$db
,
$gtablepre
;
# 种子生成器看不懂……让gpt帮我整一个……
$mkey1
=
11131
;
$mkey2
=
6397
;
$uid
=
$udata
[
'uid'
]
+
1
;
$result
=
$db
->
query
(
"SELECT gid FROM
{
$gtablepre
}
winners ORDER BY gid desc LIMIT 1"
);
$gid
=
$db
->
fetch_array
(
$result
)[
'gid'
]
+
2
;
$result
=
$db
->
query
(
"SELECT gamenum FROM
{
$gtablepre
}
game WHERE groomid='
{
$udata
[
'roomid'
]
}
'"
);
$gamenum
=
$db
->
fetch_array
(
$result
)[
'gamenum'
]
+
3
;
$t1_list
=
getrandclbKeys
(
$temp_t1_list
,
$mkey1
,
$mkey2
,
$uid
,
$gid
,
$gamenum
);
return
$t1_list
;
}
function
getclub
(
$who
,
&
$c1
,
&
$c2
,
&
$c3
)
{
global
$db
,
$gtablepre
,
$tablepre
,
$starttime
,
$validtime
;
...
...
@@ -125,11 +185,21 @@ function selectclub($id)
{
global
$name
,
$club
;
if
(
$club
!=
0
)
return
1
;
if
(
$id
==
0
)
return
2
;
getclub
(
$name
,
$c1
,
$c2
,
$c3
);
if
(
!
$id
)
return
2
;
$t1_list
=
valid_getclublist_t1
(
$udata
);
$t2_list
=
valid_getclublist_t2
(
$udata
);
if
(
in_array
(
$id
,
$t1_list
)
||
in_array
(
$id
,
$t2_list
))
{
$club
=
$id
;
updateskill
();
return
0
;
}
/*getclub($name,$c1,$c2,$c3);
if ($id==1) { $club=$c1; updateskill(); return 0; }
if ($id==2) { $club=$c2; updateskill(); return 0; }
if
(
$id
==
3
)
{
$club
=
$c3
;
updateskill
();
return
0
;
}
if ($id==3) { $club=$c3; updateskill(); return 0; }
*/
return
3
;
}
...
...
include/news.func.php
View file @
4fab0d51
...
...
@@ -47,8 +47,12 @@ function nparse_news($start = 0, $range = 0 ){//$type = '') {
//$sec='??';
if
(
$news
==
'newgame'
)
{
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
red
\"
>第
{
$a
}
回ACFUN大逃杀开始了</span><br>
\n
"
;
}
elseif
(
$news
==
'newroomgame'
)
{
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
red
\"
>
{
$b
}
号房间内,第
{
$a
}
回ACFUN大逃杀开始了</span><br>
\n
"
;
}
elseif
(
$news
==
'gameover'
)
{
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
red
\"
>第
{
$a
}
回ACFUN大逃杀结束了</span><br>
\n
"
;
}
elseif
(
$news
==
'roomgameover'
)
{
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
red
\"
>
{
$b
}
号房间内,第
{
$a
}
回ACFUN大逃杀结束了</span><br>
\n
"
;
}
elseif
(
$news
==
'newpc'
)
{
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
yellow
\"
>
{
$a
}
(
{
$b
}
)进入了大逃杀战场</span><br>
\n
"
;
}
elseif
(
$news
==
'newgm'
)
{
...
...
include/roommng.func.php
View file @
4fab0d51
...
...
@@ -89,9 +89,13 @@ function roommng_create_new_room(&$udata)
$new_room_id
=
1
;
}
# 获取当前游戏回数
$result
=
$db
->
query
(
"SELECT max(gamenum) AS max_value FROM
{
$gtablepre
}
game WHERE groomid>=0 "
);
$new_gamenum
=
$db
->
fetch_array
(
$result
)[
'max_value'
];
# 新建并初始化房间状态
$starttime
=
$now
+
$startmin
*
5
;
$db
->
query
(
"INSERT INTO
{
$gtablepre
}
game (gamenum,groomid,groomownid,gamestate,starttime) VALUES ('
1
','
$new_room_id
','
{
$udata
[
'username'
]
}
','0','
$starttime
')"
);
$db
->
query
(
"INSERT INTO
{
$gtablepre
}
game (gamenum,groomid,groomownid,gamestate,starttime) VALUES ('
$new_gamenum
','
$new_room_id
','
{
$udata
[
'username'
]
}
','0','
$starttime
')"
);
# 加入房间
roommng_join_room
(
$new_room_id
,
$udata
);
...
...
@@ -216,7 +220,7 @@ function roommng_close_own_room(&$udata)
}
# 强制解散指定房间
function
roommng_close_room
(
$rkey
,
$adminlog
=
0
)
function
roommng_close_room
(
$rkey
,
$adminlog
=
0
,
$check_in_game
=
0
)
{
global
$db
,
$gtablepre
,
$rerror
,
$cmd_info
;
...
...
@@ -230,6 +234,16 @@ function roommng_close_room($rkey,$adminlog = 0)
if
(
$db
->
num_rows
(
$result
))
{
$gdata
=
$db
->
fetch_array
(
$result
);
# 检查是否为闲置房间
if
(
$check_in_game
)
{
# 不能解散正在游戏中的房间
if
(
$gdata
[
'gamestate'
]
>
10
&&
$gdata
[
'alivenum'
])
{
$cmd_info
.=
"房间
{
$rkey
}
内仍有存活玩家,无法关闭。<br>"
;
return
;
}
}
# 清空房间内玩家
if
(
$gdata
[
'groomnums'
])
$db
->
query
(
"UPDATE
{
$gtablepre
}
users SET roomid=0 WHERE roomid=
{
$rkey
}
"
);
# 关闭房间
...
...
include/system.func.php
View file @
4fab0d51
...
...
@@ -459,6 +459,7 @@ function duel($time = 0,$keyitm = ''){
//模式:0保留:程序故障;1:全部死亡;2:最后幸存;3:禁区解除;4:无人参加;5:核爆全灭;6:GM中止
function
gameover
(
$time
=
0
,
$mode
=
''
,
$winname
=
''
)
{
global
$gamestate
,
$winmode
,
$alivenum
,
$winner
,
$now
,
$gamenum
,
$db
,
$gtablepre
,
$tablepre
,
$gamenum
,
$starttime
,
$validnum
,
$hdamage
,
$hplayer
;
global
$groomid
;
if
(
$gamestate
<
10
){
return
;}
if
((
!
$mode
)
||
((
$mode
==
2
)
&&
(
!
$winname
)))
{
//在没提供游戏结束模式的情况下,自行判断模式
if
(
$validnum
<=
0
)
{
//无激活者情况下,全部死亡
...
...
@@ -559,7 +560,14 @@ function gameover($time = 0, $mode = '', $winname = '') {
//addnews($time, "end$winmode" , $winner);
addnews
(
$time
,
"end
$winmode
"
,
$winner
);
//addnews($time, 'gameover',$gamenum);
addnews
(
$time
,
'gameover'
,
$gamenum
);
if
(
$groomid
)
{
addnews
(
$time
,
'roomgameover'
,
$gamenum
,
$groomid
);
}
else
{
addnews
(
$time
,
'gameover'
,
$gamenum
);
}
systemputchat
(
$time
,
'gameover'
);
include_once
'./include/news.func.php'
;
$newsinfo
=
nparse_news
(
0
,
65535
);
...
...
templates/default/index.htm
View file @
4fab0d51
...
...
@@ -51,8 +51,8 @@
<!--{/if}-->
</div>
<div>
<!--{if $
r
id}-->
<span
class=
"yellow"
>
当前房间:{$
r
id} 号
</span>
<!--{if $
groom
id}-->
<span
class=
"yellow"
>
当前房间:{$
groom
id} 号
</span>
<!--{else}-->
上局结果:
<span
id=
"lastwin"
>
$gwin[$winmode]
</span>
<!--{if $winner}-->
...
...
templates/default/profile.htm
View file @
4fab0d51
...
...
@@ -83,10 +83,19 @@
<!--{if $club!=0}-->
$clubinfo[$club]
<!--{else}-->
<!-- 后续更新中,将停用在游戏内直接选择称号的方式。 -->
<!--{eval $t1_list = valid_getclublist_t1($udata); $t2_list = valid_getclublist_t2($udata);}-->
<select
id=
"clubsel"
name=
"clubsel"
onchange=
"$('mode').value='special';$('command').value=$('clubsel').value;postCmd('gamecmd','command.php');return false;"
<!
--
{
if
CURSCRIPT
!=
'
game
'
||
$
mode
!=
'
command
'}
--
>
disabled
<!--{/if}-->
>
<!--{loop $clubavl $key $value}-->
<option
value=
"clubsel$key"
<!
--
{
if
$
club =
=
$
key
}
--
>
selected
<!--{/if}-->
>$clubinfo[$value]
<!--{/loop}-->
<optgroup
label=
"普通称号"
>
<!--{loop $t2_list $key}-->
<option
value=
"clubsel$key"
>
$clubinfo[$key]
</option>
<!--{/loop}-->
</optgroup>
<optgroup
label=
"特殊称号"
>
<!--{loop $t1_list $key}-->
<option
value=
"clubsel$key"
>
$clubinfo[$key]
</option>
<!--{/loop}-->
</optgroup>
</select>
<!--{/if}-->
</span></td>
...
...
templates/default/roomlist.htm
View file @
4fab0d51
...
...
@@ -39,8 +39,8 @@
<!--<td class="b3" width="120px">运行时间</td>-->
<td
class=
"b3"
width=
"80px"
>
<!--{if !empty($cuser) && !empty($cpass)}-->
<!--{if !empty($
r
id)}-->
<!--{if $
r
id == $rkey}-->
<!--{if !empty($
groom
id)}-->
<!--{if $
groom
id == $rkey}-->
<span
tooltip2=
"退出房间后,如房间内没有其他玩家,则房间会解散;房主退出房间会将房主权限转移给房间内其他玩家;"
>
<input
type=
"button"
value=
"退出"
onclick=
"$('roomact').value='exit';postCmd('roomact','index.php');"
>
</span>
...
...
templates/default/usergdicon.htm
View file @
4fab0d51
<table
align=
"center"
>
<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>
<td>
{lang gender}
</td>
<td>
{lang gender}
</td>
<td>
<input
type=
"radio"
id=
"male"
name=
"gender"
onclick=
"userIconMover()"
value=
"m"
<!
--
{
if
$
gender
!=
"
f
"}
--
>
checked
<!--{/if}-->
>$sexinfo['m']
<br
/>
<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>
<td>
</td>
</tr>
<tr>
<td>
{lang icon}
</td>
<td>
<select
id=
"icon"
name=
"icon"
onchange=
"userIconMover()"
>
<!--{loop $iconarray $icon}-->
$icon
<!--{/loop}-->
</select>
(0为随机)
</td>
<td>
<div
id=
"userIconImg"
class=
"iconImg"
>
<img
src=
"img/<!--{if $gender != 'f'}-->m<!--{else}-->f<!--{/if}-->_{$select_icon}.gif"
alt=
"$select_icon"
>
<div>
<div
style=
"display:inline-block; vertical-align:top"
>
<br><br>
<select
id=
"icon"
name=
"icon"
style=
"width:80px"
onchange=
"userIconMover()"
>
<!--{loop $iconarray $icon}-->
$icon
<!--{/loop}-->
</select>
<br>
(0为随机)
</div>
<div
id=
"userIconImg"
class=
"iconImg"
style=
"display:inline-block;"
>
<img
src=
"img/<!--{if $gender != 'f'}-->m<!--{else}-->f<!--{/if}-->_{$select_icon}.gif"
alt=
"$select_icon"
>
</div>
</div>
</td>
</tr>
...
...
templates/default/userwords.htm
View file @
4fab0d51
<table
align=
"center"
>
<!--{if !empty($udata)}-->
<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>
内定称号
</td>
<td>
<select
name=
"club"
>
<optgroup
label=
"普通称号"
>
<!--{loop $t2_list $key}-->
<option
value=
"{$key}"
>
$clubinfo[$key]
</option>
<!--{/loop}-->
</optgroup>
<optgroup
label=
"特殊称号"
>
<!--{loop $t1_list $key}-->
<option
value=
"{$key}"
>
$clubinfo[$key]
</option>
<!--{/loop}-->
</optgroup>
</select>
选择“无”时,可在游戏内使用
<span
class=
"lime"
>
称号卡
</span>
变更称号。
</td>
</tr>
<!--{/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 @
4fab0d51
...
...
@@ -11,9 +11,18 @@
<form
method=
"post"
action=
"valid.php"
name=
"valid"
>
<input
type=
"hidden"
name=
"mode"
value=
"enter"
>
{lang name} : $username
<br
/>
{template usergdicon}
<br
/>
{template userwords}
<br
/>
<center>
<table>
<tr>
<td
align=
"center"
>
<table>
<tr><td>
{template usergdicon}
<br
/></td><td>
</td>
<td>
{template userwords}
<br
/></td></tr>
</table>
</td>
</tr>
</table>
</center>
<input
type=
"submit"
name=
"enter"
value=
"{lang submit}"
>
<input
type=
"reset"
name=
"reset"
value=
"{lang reset}"
>
</form>
...
...
valid.php
View file @
4fab0d51
...
...
@@ -21,6 +21,11 @@ if($gamestate >= 30 && $udata['groupid'] < 6 && $cuser != $gamefounder) {
gexit
(
$_ERROR
[
'valid_stop'
],
__file__
,
__line__
);
}
# 入场时可选内定称号表 t1-随机选3 t2-固定出现
include_once
GAME_ROOT
.
'./include/game/clubslct.func.php'
;
$t1_list
=
valid_getclublist_t1
(
$udata
);
$t2_list
=
valid_getclublist_t2
(
$udata
);
if
(
$mode
==
'enter'
)
{
if
(
$iplimit
)
{
$result
=
$db
->
query
(
"SELECT * FROM
{
$gtablepre
}
users AS u,
{
$tablepre
}
players AS p WHERE u.ip='
{
$udata
[
'ip'
]
}
' AND ( u.username=p.name AND p.type=0)"
);
...
...
@@ -100,7 +105,10 @@ if($mode == 'enter') {
$pose
=
3
;
$tactic
=
2
;
$icon
=
$icon
?
$icon
:
rand
(
1
,
$iconlimit
);
$club
=
0
;
//$club = 0;
# 入场内定称号合法性检查
if
(
$club
&&
!
in_array
(
$club
,
$t1_list
)
&&
!
in_array
(
$club
,
$t2_list
))
$club
=
17
;
$wep2
=
'拳头'
;
$wep2k
=
'WN'
;
$wep2e
=
0
;
$wep2s
=
$nosta
;
$wep2sk
=
''
;
$arb
=
$gd
==
'm'
?
'男生校服'
:
'女生校服'
;
...
...
@@ -302,6 +310,9 @@ if($mode == 'enter') {
include_once
GAME_ROOT
.
'./include/game/itemmain.func.php'
;
reload_set_items
(
$ndata
);
# 初始化称号技能
if
(
$ndata
[
'club'
])
updateskill
(
$ndata
);
$ndata
=
player_format_with_db_structure
(
$ndata
);
if
(
!
empty
(
$ndata
))
$db
->
array_insert
(
"
{
$tablepre
}
players"
,
$ndata
);
...
...
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