1. 云栖社区>
  2. PHP教程>
  3. 正文

用PHP和ACCESS写聊天室(九)

作者:用户 来源:互联网 时间:2017-12-01 16:10:23

聊天室

用PHP和ACCESS写聊天室(九) - 摘要: 本文讲的是用PHP和ACCESS写聊天室(九),  enterrm.php3 代码如下: <?php         [email protected]_connect("jtfcht","admin","");         if ($ConnID){             

  enterrm.php3
代码如下:
<?php
        [email protected]_connect("jtfcht","admin","");
        if ($ConnID){
                [email protected]_exec($ConnID,"SELECT PassWord,LstTime,RoomID,RefRate FROM User WHERE UserID=".$id);
                if (@odbc_fetch_into($result,0,&$rArr)){
                        $sRoomID=$rArr[2];
                        $sRefRate=(int)$rArr[3];
                        if ($sRefRate<2) $sRefRate=2;
                        if (($rArr[0]==$ps) && ($rArr[1]>=(time()-1800))){
                                $sNewRoomID=substr($selRoom,2);
                                if ($sNewRoomID!=$sRoomID){
                                        [email protected]_exec($ConnID,"SELECT Password FROM Room WHERE RoomID=".$sNewRoomID);
                                        if (@odbc_fetch_into($result,0,&$rArr)){
                                                if ((strlen(trim($rArr[0]))==0) || ($rArr[0]==$sPass)){
                                                        @odbc_exec($ConnID,"UPDATE User SET RoomID=".$sNewRoomID.",ToID=0,ToName='大家' WHERE UserID=".$id);
                                                        if ((int)$sRoomID!=1){
                                                                [email protected]_exec($ConnID,"SELECT COUNT(UserID) FROM User WHERE RoomID=".$sRoomID);
      

以上是云栖社区小编为您精心准备的的内容,在云栖社区的博客、问答、公众号、人物、课程等栏目也有的相关内容,欢迎继续使用右上角搜索按钮进行搜索聊天室 ,以便于您获取更多的相关知识。