当前位置:首页 > 操作系统 > MacOs

randomaccessmemories用PHP和ACCESS写聊天室九

enterrm.php3
代码如下:
<br /><?php <br>        $C <br>        if ($ConnID){ <br>                $result=@odbc_exec($ConnID,"SELECT PassWord,LstTime,RoomID,RefRate FROM User WHERE UserID=".$id); <br>                if (@odbc_fetch_into($result,0,&$rArr)){ <br>                        $sRoomID=$rArr[2]; <br>                        $sRefRate=(int)$rArr[3]; <br>                        if ($sRefRate<2) $sRefRate=2; <br>                        if (($rArr[0]==$ps) && ($rArr[1]>=(time()-1800))){ <br>                                $sNewRoomID=substr($selRoom,2); <br>                                if ($sNewRoomID!=$sRoomID){ <br>                                        $result=@odbc_exec($ConnID,"SELECT Password FROM Room WHERE RoomID=".$sNewRoomID); <br>                                        if (@odbc_fetch_into($result,0,&$rArr)){ <br>                                                if ((strlen(trim($rArr[0]))==0) || ($rArr[0]==$sPass)){ <br>                                                        @odbc_exec($ConnID,"UPDATE User SET RoomID=".$sNewRoomID.",ToID=0,T WHERE UserID=".$id); <br>                                                        if ((int)$sRoomID!=1){ <br>                                                                $result=@odbc_exec($ConnID,"SELECT COUNT(UserID) FROM User WHERE RoomID=".$sRoomID); <br>                                                                @odbc_fetch_into($result,0,&$rArr); <br>                                                                if ($rArr[0]==0) @odbc_exec($ConnID,"DELETE * FROM Room Where RoomID=".$sRoomID); <br>                                                        } <br>                                                } <br>                                                else{ <br>?> <br /><html> <br /><head> <br /><title>输入房间口令</title> <br /><meta http-equiv="Content-Type" c/html; charset=gb2312"> <br /> <br /> <br /> <br /></head> <br /><body  <br /><p> </p> <br /><p align="center"><font color="#996666">输入房间口令</font></p> <br /> <br /><p align="center">按&ps=<?php echo $ps; ?>&at=<?php echo time(); ?>">这里放弃</p> <br /></html>

【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐