Commit 72f2017d authored by hisuinohoshi's avatar hisuinohoshi

fix

parent c2f7ec23
This diff is collapsed.
...@@ -129,7 +129,16 @@ if(!$db->num_rows($result)) { ...@@ -129,7 +129,16 @@ if(!$db->num_rows($result)) {
gexit($_ERROR['wrong_pw'],__file__,__line__); gexit($_ERROR['wrong_pw'],__file__,__line__);
} }
} }
# 重新登录后将房间号设为0 # 重新登录后退出当前房间
if(!empty($userdata['roomid']))
{
$result = $db->query("SELECT groomnums FROM {$gtablepre}game WHERE groomid = {$userdata['roomid']}");
if($db->num_rows($result))
{
$join_nums = $db->fetch_array($result)[0] - 1;
$db->query("UPDATE {$gtablepre}game SET groomnums = {$join_nums} WHERE groomid = {$userdata['roomid']}");
}
}
$db->query("UPDATE {$gtablepre}users SET ip='$onlineip',roomid=0 WHERE username = '$username'"); $db->query("UPDATE {$gtablepre}users SET ip='$onlineip',roomid=0 WHERE username = '$username'");
gsetcookie('user',$username); gsetcookie('user',$username);
gsetcookie('pass',$password); gsetcookie('pass',$password);
......
<span class="evergreen">当前房间列表:</span><br> <span class="evergreen">当前房间列表:<br>(房间状态更新可能存在延迟,如果发现房间状态不对请刷新几次)</span><br>
<div style="height:5px;">&nbsp;</div> <div style="height:5px;">&nbsp;</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="">
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<!--<td class="b1" width="120px">运行时间</td>--> <!--<td class="b1" width="120px">运行时间</td>-->
<td class="b1" width="80px">操作</td> <td class="b1" width="80px">操作</td>
</tr> </tr>
<!--{loop range(1,3) $rkey}--> <!--{loop range(1,$max_rooms) $rkey}-->
<tr> <tr>
<td class="b3" width="60px" height="30px"> <td class="b3" width="60px" height="30px">
$rkey $rkey
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment