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
f9b8e0d4
Commit
f9b8e0d4
authored
Apr 02, 2023
by
Nemo Ma
Committed by
GitHub
Apr 02, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #107 from hikawiier/waaagh
update roommng2
parents
1715fd24
214f51b8
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
243 additions
and
91 deletions
+243
-91
gamedata/cache/gamecfg_1.php
gamedata/cache/gamecfg_1.php
+4
-1
gamedata/sql/all.sql
gamedata/sql/all.sql
+1
-0
include/admin/pcmng.php
include/admin/pcmng.php
+1
-1
include/roommng.func.php
include/roommng.func.php
+169
-5
index.php
index.php
+12
-36
install/bra.sql
install/bra.sql
+1
-0
templates/default/roomlist.htm
templates/default/roomlist.htm
+55
-48
No files found.
gamedata/cache/gamecfg_1.php
View file @
f9b8e0d4
...
@@ -164,7 +164,10 @@ $no_self_sponsored = 0;
...
@@ -164,7 +164,10 @@ $no_self_sponsored = 0;
$rsgame_bots
=
4
;
$rsgame_bots
=
4
;
//房间数量上限
//房间数量上限
$max_rooms
=
3
;
$max_rooms
=
15
;
//相同ip最多可创建房间数量:
$ip_max_rooms
=
2
;
//重登陆时是否自动退出房间(1:自动退出 0:不自动退出)
//重登陆时是否自动退出房间(1:自动退出 0:不自动退出)
$login_exit_room
=
0
;
$login_exit_room
=
0
;
...
...
gamedata/sql/all.sql
View file @
f9b8e0d4
...
@@ -64,6 +64,7 @@ CREATE TABLE `acbra2_game` (
...
@@ -64,6 +64,7 @@ CREATE TABLE `acbra2_game` (
`gamestate`
tinyint
(
3
)
unsigned
NOT
NULL
DEFAULT
'0'
,
`gamestate`
tinyint
(
3
)
unsigned
NOT
NULL
DEFAULT
'0'
,
`groomid`
tinyint
(
3
)
unsigned
NOT
NULL
DEFAULT
'0'
,
`groomid`
tinyint
(
3
)
unsigned
NOT
NULL
DEFAULT
'0'
,
`groomnums`
tinyint
(
3
)
unsigned
NOT
NULL
DEFAULT
'0'
,
`groomnums`
tinyint
(
3
)
unsigned
NOT
NULL
DEFAULT
'0'
,
`groomownid`
char
(
15
)
NOT
NULL
default
''
,
`starttime`
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
`starttime`
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
`winmode`
tinyint
(
3
)
unsigned
NOT
NULL
DEFAULT
'0'
,
`winmode`
tinyint
(
3
)
unsigned
NOT
NULL
DEFAULT
'0'
,
`winner`
char
(
15
)
NOT
NULL
DEFAULT
''
,
`winner`
char
(
15
)
NOT
NULL
DEFAULT
''
,
...
...
include/admin/pcmng.php
View file @
f9b8e0d4
...
@@ -74,7 +74,7 @@ if($command == 'kill' || $command == 'live' || $command == 'del') {
...
@@ -74,7 +74,7 @@ if($command == 'kill' || $command == 'live' || $command == 'del') {
if
(
$operlist
||
$operlist2
||
$dfaillist
||
$gfaillist
){
if
(
$operlist
||
$operlist2
||
$dfaillist
||
$gfaillist
){
if
(
$command
==
'kill'
){
if
(
$command
==
'kill'
){
$operword
=
'被杀死'
;
$operword
=
'被杀死'
;
$qryword
=
"UPDATE
{
$tablepre
}
players SET hp='0',state='15',bid='0'
,
"
;
$qryword
=
"UPDATE
{
$tablepre
}
players SET hp='0',state='15',bid='0' "
;
}
elseif
(
$command
==
'live'
){
}
elseif
(
$command
==
'live'
){
$operword
=
'被复活'
;
$operword
=
'被复活'
;
$qryword
=
"UPDATE
{
$tablepre
}
players SET hp=mhp,state='0' "
;
$qryword
=
"UPDATE
{
$tablepre
}
players SET hp=mhp,state='0' "
;
...
...
include/roommng.func.php
View file @
f9b8e0d4
...
@@ -27,6 +27,12 @@ function roommng_verify_db_game_structure()
...
@@ -27,6 +27,12 @@ function roommng_verify_db_game_structure()
$db
->
query
(
"ALTER TABLE
{
$gtablepre
}
game ADD groomnums tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER groomid"
);
$db
->
query
(
"ALTER TABLE
{
$gtablepre
}
game ADD groomnums tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER groomid"
);
echo
"向game表中添加了字段groomnums<br>"
;
echo
"向game表中添加了字段groomnums<br>"
;
}
}
$result
=
$db
->
query
(
"DESCRIBE
{
$gtablepre
}
game groomownid"
);
if
(
!
$db
->
num_rows
(
$result
))
{
$db
->
query
(
"ALTER TABLE
{
$gtablepre
}
game ADD groomownid char(15) NOT NULL default '' AFTER groomnums"
);
echo
"向game表中添加了字段groomownid<br>"
;
}
$result
=
$db
->
query
(
"SHOW INDEX FROM
{
$gtablepre
}
game"
);
$result
=
$db
->
query
(
"SHOW INDEX FROM
{
$gtablepre
}
game"
);
$gr
=
$db
->
fetch_array
(
$result
);
$gr
=
$db
->
fetch_array
(
$result
);
...
@@ -39,7 +45,164 @@ function roommng_verify_db_game_structure()
...
@@ -39,7 +45,164 @@ function roommng_verify_db_game_structure()
return
;
return
;
}
}
function
roommng_close_room
(
$rkey
,
$log_print
=
0
)
# 创建一个新房间
function
roommng_create_new_room
(
&
$udata
)
{
global
$db
,
$gtablepre
,
$now
;
global
$startmin
,
$max_rooms
,
$ip_max_rooms
;
if
(
!
empty
(
$udata
[
'roomid'
]))
{
echo
"你已经在房间里了。要创建新房间必须退出当前房间。<br>"
;
return
;
}
# 根据IP判断是否可新建房间
$ipresult
=
$db
->
query
(
"SELECT roomid FROM
{
$gtablepre
}
users WHERE roomid>0 AND ip='
{
$udata
[
'ip'
]
}
'"
);
if
(
$db
->
num_rows
(
$ipresult
)
>=
$ip_max_rooms
)
{
echo
"相同IP最多只能创建
{
$ip_max_rooms
}
个房间。请先解散其他房间。<br>"
;
return
;
}
# 统计当前已新建房间数量
$result
=
$db
->
query
(
"SELECT * FROM
{
$gtablepre
}
game WHERE groomid>0 "
);
$now_room_nums
=
$db
->
num_rows
(
$result
);
if
(
$now_room_nums
>=
$max_rooms
)
{
echo
"房间数量已达上限,无法新建房间。<br>"
;
return
;
}
# 新建并初始化房间状态
$now_room_nums
++
;
$starttime
=
$now
+
$startmin
*
5
;
$db
->
query
(
"INSERT INTO
{
$gtablepre
}
game (gamenum,groomid,groomownid,gamestate,starttime) VALUES ('1','
$now_room_nums
','
{
$udata
[
'username'
]
}
','0','
$starttime
')"
);
# 加入房间
roommng_join_room
(
$now_room_nums
,
$udata
);
return
;
}
# 加入一个房间
function
roommng_join_room
(
$rkey
,
&
$udata
)
{
global
$db
,
$gtablepre
;
if
(
!
empty
(
$udata
[
'roomid'
]))
{
echo
"你已经在房间里了。要加入房间必须退出当前房间。<br>"
;
return
;
}
$result
=
$db
->
query
(
"SELECT * FROM
{
$gtablepre
}
game WHERE groomid='
$rkey
'"
);
if
(
$db
->
num_rows
(
$result
))
{
$gdata
=
$db
->
fetch_array
(
$result
);
$gdata
[
'groomnums'
]
++
;
# 更新房间内玩家数量
$db
->
query
(
"UPDATE
{
$gtablepre
}
game SET groomnums=
{
$gdata
[
'groomnums'
]
}
WHERE groomid=
{
$rkey
}
"
);
# 加入房间
$db
->
query
(
"UPDATE
{
$gtablepre
}
users SET roomid=
{
$rkey
}
WHERE username='
{
$udata
[
'username'
]
}
'"
);
}
else
{
# 要加入的房间号不存在时,尝试新建一个
roommng_create_new_room
(
$udata
);
}
return
;
}
# 离开当前房间
function
roommng_exit_room
(
&
$udata
)
{
global
$db
,
$gtablepre
;
if
(
empty
(
$udata
[
'roomid'
]))
{
echo
"你不在任何房间里。<br>"
;
return
;
}
echo
"已退出房间
{
$udata
[
'roomid'
]
}
<br>"
;
# 退出房间时更新房间状态
$result
=
$db
->
query
(
"SELECT * FROM
{
$gtablepre
}
game WHERE groomid=
{
$udata
[
'roomid'
]
}
"
);
if
(
$db
->
num_rows
(
$result
))
{
$gdata
=
$db
->
fetch_array
(
$result
);
$gdata
[
'groomnums'
]
--
;
# 检查解散房间还是更新房间状态
if
(
$gdata
[
'groomnums'
]
>
0
)
{
# 房主退出房间时,将房主权限移交给房间内其他人
if
(
!
empty
(
$gdata
[
'groomownid'
])
&&
$gdata
[
'groomownid'
]
==
$udata
[
'username'
])
{
$result2
=
$db
->
query
(
"SELECT * FROM
{
$gtablepre
}
users WHERE roomid=
{
$udata
[
'roomid'
]
}
AND username!='
{
$udata
[
'username'
]
}
'"
);
if
(
$db
->
num_rows
(
$result2
))
{
$udata2
=
$db
->
fetch_array
(
$result2
);
$new_ownid
=
$udata2
[
'uid'
];
echo
"将房主权限移交给了
{
$udata2
[
'username'
]
}
<br>"
;
}
}
if
(
isset
(
$new_ownid
))
{
$db
->
query
(
"UPDATE
{
$gtablepre
}
game SET groomnums=
{
$gdata
[
'groomnums'
]
}
,groomownid=
{
$new_ownid
}
WHERE groomid=
{
$udata
[
'roomid'
]
}
"
);
}
else
{
$db
->
query
(
"UPDATE
{
$gtablepre
}
game SET groomnums=
{
$gdata
[
'groomnums'
]
}
WHERE groomid=
{
$udata
[
'roomid'
]
}
"
);
}
}
else
{
roommng_close_room
(
$udata
[
'roomid'
]);
}
}
# 更新用户状态
$db
->
query
(
"UPDATE
{
$gtablepre
}
users SET roomid = 0 WHERE username='
{
$udata
[
'username'
]
}
'"
);
return
;
}
# 房主解散自己所在的房间
function
roommng_close_own_room
(
&
$udata
)
{
global
$db
,
$gtablepre
;
if
(
empty
(
$udata
[
'roomid'
]))
{
echo
"你不在任何房间里。<br>"
;
return
;
}
$result
=
$db
->
query
(
"SELECT * FROM
{
$gtablepre
}
game WHERE groomid=
{
$udata
[
'roomid'
]
}
"
);
if
(
$db
->
num_rows
(
$result
))
{
$gdata
=
$db
->
fetch_array
(
$result
);
# 不能解散没有房主的房间
if
(
empty
(
$gdata
[
'groomownid'
])
||
(
!
empty
(
$gdata
[
'groomownid'
])
&&
$gdata
[
'groomownid'
]
!=
$udata
[
'username'
]))
{
echo
"你没有权限解散房间
{
$udata
[
'roomid'
]
}
<br>"
;
return
;
}
# 不能解散正在游戏中的房间
if
(
$gdata
[
'gamestate'
]
>
10
&&
$gdata
[
'alivenum'
])
{
echo
"不能解散游戏正在进行且尚有幸存者的房间!<br>"
;
return
;
}
# 解散房间
roommng_close_room
(
$udata
[
'roomid'
]);
}
# 更新用户状态
$db
->
query
(
"UPDATE
{
$gtablepre
}
users SET roomid = 0 WHERE username='
{
$udata
[
'username'
]
}
'"
);
return
;
}
# 强制解散指定房间
function
roommng_close_room
(
$rkey
)
{
{
global
$db
,
$gtablepre
;
global
$db
,
$gtablepre
;
...
@@ -54,15 +217,16 @@ function roommng_close_room($rkey,$log_print=0)
...
@@ -54,15 +217,16 @@ function roommng_close_room($rkey,$log_print=0)
{
{
$gdata
=
$db
->
fetch_array
(
$result
);
$gdata
=
$db
->
fetch_array
(
$result
);
# 清空房间内玩家
# 清空房间内玩家
if
(
$gdata
[
'groomnums'
])
$db
->
query
(
"UPDATE
{
$gtablepre
}
users SET roomid
= 0 WHERE roomid=
{
$rkey
}
"
);
if
(
$gdata
[
'groomnums'
])
$db
->
query
(
"UPDATE
{
$gtablepre
}
users SET roomid
=0 WHERE roomid=
{
$rkey
}
"
);
# 关闭房间
# 关闭房间
$db
->
query
(
"DELETE FROM
{
$gtablepre
}
game WHERE groomid
=
{
$rkey
}
"
);
$db
->
query
(
"DELETE FROM
{
$gtablepre
}
game WHERE groomid
=
{
$rkey
}
"
);
if
(
$log_print
)
echo
"已关闭房间
{
$rkey
}
号<br>"
;
echo
"已关闭房间
{
$rkey
}
号<br>"
;
}
}
else
else
{
{
if
(
$log_print
)
echo
"房间
{
$rkey
}
未开启,或房间不存在!<br>"
;
echo
"房间
{
$rkey
}
未开启,或房间不存在!<br>"
;
}
}
return
;
}
}
...
...
index.php
View file @
f9b8e0d4
...
@@ -29,48 +29,24 @@ if(!empty($roomact))
...
@@ -29,48 +29,24 @@ if(!empty($roomact))
if
(
$udata
[
'password'
]
!=
$cpass
)
{
gexit
(
$_ERROR
[
'wrong_pw'
],
__file__
,
__line__
);
}
if
(
$udata
[
'password'
]
!=
$cpass
)
{
gexit
(
$_ERROR
[
'wrong_pw'
],
__file__
,
__line__
);
}
if
(
$udata
[
'groupid'
]
<=
0
)
{
gexit
(
$_ERROR
[
'user_ban'
],
__file__
,
__line__
);
}
if
(
$udata
[
'groupid'
]
<=
0
)
{
gexit
(
$_ERROR
[
'user_ban'
],
__file__
,
__line__
);
}
if
(
strpos
(
$roomact
,
'join'
)
!==
false
)
if
(
$roomact
==
'create'
)
{
roommng_create_new_room
(
$udata
);
}
elseif
(
strpos
(
$roomact
,
'join'
)
!==
false
)
{
{
if
(
!
empty
(
$udata
[
'roomid'
]))
gexit
(
'你已经在房间里了,想加入其它房间要先从当前房间退出。'
,
__file__
,
__line__
);
$join_id
=
(
int
)
str_replace
(
"join"
,
""
,
$roomact
);
$join_id
=
(
int
)
str_replace
(
"join"
,
""
,
$roomact
);
if
(
in_array
(
$join_id
,
range
(
1
,
$max_rooms
)))
roommng_join_room
(
$join_id
,
$udata
);
{
$db
->
query
(
"UPDATE
{
$gtablepre
}
users SET roomid =
{
$join_id
}
WHERE username='
$cuser
'"
);
$result
=
$db
->
query
(
"SELECT groomnums FROM
{
$gtablepre
}
game WHERE groomid =
{
$join_id
}
"
);
if
(
$db
->
num_rows
(
$result
))
{
$join_nums
=
$db
->
result
(
$result
,
0
);
$join_nums
++
;
$db
->
query
(
"UPDATE
{
$gtablepre
}
game SET groomnums =
{
$join_nums
}
WHERE groomid =
{
$join_id
}
"
);
}
}
else
{
gexit
(
'要加入的房间不存在!'
,
__file__
,
__line__
);
}
unset
(
$roomact
);
}
}
elseif
(
$roomact
==
'exit'
)
elseif
(
$roomact
==
'exit'
)
{
{
if
(
empty
(
$udata
[
'roomid'
]))
gexit
(
'你没有在任何房间里!'
,
__file__
,
__line__
);
roommng_exit_room
(
$udata
);
$result
=
$db
->
query
(
"SELECT groomnums FROM
{
$gtablepre
}
game WHERE groomid =
{
$udata
[
'roomid'
]
}
"
);
}
if
(
$db
->
num_rows
(
$result
))
elseif
(
$roomact
==
'close'
)
{
{
$join_nums
=
$db
->
result
(
$result
,
0
);
roommng_close_own_room
(
$udata
);
$join_nums
--
;
# 退出房间时,检查是关闭房间还是减少房间内人数
if
(
$join_nums
>
0
)
{
$db
->
query
(
"UPDATE
{
$gtablepre
}
game SET groomnums =
{
$join_nums
}
WHERE groomid =
{
$udata
[
'roomid'
]
}
"
);
}
else
{
roommng_close_room
(
$udata
[
'roomid'
]);
}
}
$db
->
query
(
"UPDATE
{
$gtablepre
}
users SET roomid = 0 WHERE username='
$cuser
'"
);
unset
(
$roomact
);
}
}
unset
(
$roomact
);
}
}
else
else
{
{
...
...
install/bra.sql
View file @
f9b8e0d4
...
@@ -9,6 +9,7 @@ CREATE TABLE bra_game (
...
@@ -9,6 +9,7 @@ CREATE TABLE bra_game (
`gamestate`
tinyint
(
3
)
unsigned
NOT
NULL
DEFAULT
'0'
,
`gamestate`
tinyint
(
3
)
unsigned
NOT
NULL
DEFAULT
'0'
,
`groomid`
tinyint
(
3
)
unsigned
NOT
NULL
DEFAULT
'0'
,
`groomid`
tinyint
(
3
)
unsigned
NOT
NULL
DEFAULT
'0'
,
`groomnums`
tinyint
(
3
)
unsigned
NOT
NULL
DEFAULT
'0'
,
`groomnums`
tinyint
(
3
)
unsigned
NOT
NULL
DEFAULT
'0'
,
`groomownid`
char
(
15
)
NOT
NULL
default
''
,
`starttime`
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
`starttime`
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
`winmode`
tinyint
(
3
)
unsigned
NOT
NULL
DEFAULT
'0'
,
`winmode`
tinyint
(
3
)
unsigned
NOT
NULL
DEFAULT
'0'
,
`winner`
char
(
15
)
NOT
NULL
DEFAULT
''
,
`winner`
char
(
15
)
NOT
NULL
DEFAULT
''
,
...
...
templates/default/roomlist.htm
View file @
f9b8e0d4
<dialog
id=
"roomlist"
style=
"max-width: 90%;max-height: 80%; text-align: left;"
>
<dialog
id=
"roomlist"
style=
"max-width: 90%;max-height: 80%; text-align: left;"
>
<span
class=
"evergreen"
>
当前房间列表:
<br><span
class=
"grey"
>
房间状态更新可能存在延迟
<br>
如果发现房间状态不对请刷新几次
</span></span><br>
<div
style=
"height:5px;"
>
</div>
<form
method=
"post"
name=
"roomact"
onsubmit=
"return false;"
>
<form
method=
"post"
name=
"roomact"
onsubmit=
"return false;"
>
<input
type=
"hidden"
name=
"roomact"
id=
"roomact"
value=
""
>
<input
type=
"hidden"
name=
"roomact"
id=
"roomact"
value=
""
>
<table
CellSpacing=
0
CellPadding=
0
class=
"infotable"
>
<tr>
<!--{eval $now_rooms = !empty($roomlist) ? count($roomlist) : 0;}-->
<td
class=
"b1"
width=
"60px"
>
编号
</td>
<span
class=
"evergreen"
>
当前房间列表({$now_rooms}/{$max_rooms})
<!--<td class="b1" width="80px">游戏模式</td>-->
<!--{if $now_rooms < $max_rooms && !$groomid}-->
<td
class=
"b1"
width=
"60px"
>
状态
</td>
<input
type=
"button"
value=
"点击创建一个新的房间"
onclick=
"$('roomact').value='create';postCmd('roomact','index.php');setTimeout(function(){window.location.href='index.php';},300);disabled=true;"
>
<!--<td class="b1" width="120px">创建者/房主</td>-->
<!--{/if}-->
<td
class=
"b1"
width=
"60px"
>
人数
</td>
<br>
<!--<td class="b1" width="120px">运行时间</td>-->
<div
style=
"height:5px;"
>
</div>
<td
class=
"b1"
width=
"80px"
>
操作
</td>
<table
CellSpacing=
0
CellPadding=
0
class=
"infotable"
>
</tr>
<tr>
<!--{loop range(1,$max_rooms) $rkey}-->
<td
class=
"b1"
width=
"60px"
>
编号
</td>
<tr>
<!--<td class="b1" width="80px">游戏模式</td>-->
<td
class=
"b3"
width=
"60px"
height=
"30px"
>
<td
class=
"b1"
width=
"60px"
>
状态
</td>
$rkey
<td
class=
"b1"
width=
"120px"
>
创建者/房主
</td>
</td>
<td
class=
"b1"
width=
"60px"
>
人数
</td>
<!--<td class="b3" width="80px">游戏模式</td>-->
<!--<td class="b1" width="120px">运行时间</td>-->
<td
class=
"b3"
width=
"60px"
>
<td
class=
"b1"
width=
"80px"
>
操作
</td>
<!--{if !empty($roomlist[$rkey]['gamestate'])}-->
</tr>
$gstate[$roomlist[$rkey]['gamestate']]
<!--{if !empty($now_rooms)}-->
<!--{else}-->
<!--{loop $roomlist $rkey $rinfo}-->
<span
class=
"grey"
>
未开启
</span>
<tr>
<!--{/if}-->
<td
class=
"b3"
width=
"60px"
height=
"30px"
>
</td>
$rkey
<!--<td class="b3" width="120px">
</td>
房主
<!--<td class="b3" width="80px">游戏模式</td>-->
</td>-->
<td
class=
"b3"
width=
"60px"
>
<td
class=
"b3"
width=
"60px"
>
$gstate[$rinfo['gamestate']]
<!--{if !empty($roomlist[$rkey]['groomnums'])}-->
</td>
<span
class=
"yellow"
>
$roomlist[$rkey]['groomnums']
</span>
<td
class=
"b3"
width=
"120px"
>
<!--{else}-->
$rinfo['groomownid']
<span
class=
"grey"
>
-
</span>
</td>
<!--{/if}-->
<td
class=
"b3"
width=
"60px"
>
</td>
$rinfo['groomnums']
<!--<td class="b3" width="120px">运行时间</td>-->
</td>
<td
class=
"b3"
width=
"80px"
>
<!--<td class="b3" width="120px">运行时间</td>-->
<!--{if !empty($rid)}-->
<td
class=
"b3"
width=
"80px"
>
<!--{if $rid == $rkey}-->
<!--{if !empty($rid)}-->
<input
type=
"button"
value=
"退出房间"
onclick=
"$('roomact').value='exit';postCmd('roomact','index.php');setTimeout(function(){window.location.href='index.php';},300);disabled=true;"
>
<!--{if $rid == $rkey}-->
<span
tooltip2=
"退出房间后,如房间内没有其他玩家,则房间会解散;房主退出房间会将房主权限转移给房间内其他玩家;"
>
<input
type=
"button"
value=
"退出"
onclick=
"$('roomact').value='exit';postCmd('roomact','index.php');setTimeout(function(){window.location.href='index.php';},300);disabled=true;"
>
</span>
<!--{if !empty($rinfo['groomownid']) && $rinfo['groomownid'] == $cuser}-->
<span
tooltip2=
"不能解散正在进行游戏且尚有其他玩家存活的房间"
>
<input
type=
"button"
value=
"解散"
onclick=
"$('roomact').value='close';postCmd('roomact','index.php');setTimeout(function(){window.location.href='index.php';},300);disabled=true;"
>
</span>
<!--{/if}-->
<!--{else}-->
<span
class=
"grey"
>
-
</span>
<!--{/if}-->
<!--{else}-->
<!--{else}-->
<
span
class=
"grey"
>
-
</span
>
<
input
type=
"button"
value=
"加入"
onclick=
"$('roomact').value='join{$rkey}';postCmd('roomact','index.php');setTimeout(function(){window.location.href='index.php';},300);disabled=true;"
>
<!--{/if}-->
<!--{/if}-->
<!--{else}-->
</td>
<input
type=
"button"
value=
"加入房间"
onclick=
"$('roomact').value='join{$rkey}';postCmd('roomact','index.php');setTimeout(function(){window.location.href='index.php';},300);disabled=true;"
>
</tr>
<!--{/if}-->
<!--{/loop}-->
</td>
<!--{/if}-->
</tr>
</table>
<!--{/loop}-->
</table>
</form>
</form>
<img
class=
"dialog-background"
src=
"img/profile.gif"
onclick=
"closeDialog($('roomlist'))"
>
<img
class=
"dialog-background"
src=
"img/profile.gif"
onclick=
"closeDialog($('roomlist'))"
>
</dialog>
</dialog>
\ No newline at end of file
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