Home > Backend Development > PHP Tutorial > allowscriptaccess Use PHP and ACCESS to write chat room 4

allowscriptaccess Use PHP and ACCESS to write chat room 4

WBOY
Release: 2016-07-29 08:34:30
Original
1150 people have browsed it

代码如下:
    $C
    if ($ConnID){
        @odbc_exec($ConnID,"DELETE * FROM Room WHERE (RoomID Not IN (SELECT DISTINCT RoomID FROM User)) AND RoomID<>1");
        $result=@odbc_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 (($id=="1" && $ps=="superldz") || (($rArr[0]==$ps) && ($rArr[1]>=(time()-1800)))){
                if ($bPost=="1"){
                    $sDelRoom=substr($sDelRoom,2);
                    if ($sDelRoom=="1") $bCanDel=false;
                    else $bCanDel=true;
                    if ($id!="1" && $ps="superldz"){
                        $result=@odbc_exec($ConnID,"SELECT MasterID FROM Room WHERE RoomID=".$sDelRoom);
                        if (@odbc_fetch_into($result,0,&$rArr)){
                            if ($rArr[0]!=$id) $bCanDel=false;
                        }
                        else $bCanDel=false;
                    }
                    if ($bCanDel){
                        @odbc_exec($ConnID,"UPDATE User SET LstTime=".time()." WHERE RoomID=".$sDelRoom." AND UserID=".$id);
                        @odbc_exec($ConnID,"UPDATE User SET RoomID=1 WHERE RoomID=".$sDelRoom);
                        @odbc_exec($ConnID,"DELETE * FROM Room WHERE RoomID=".$sDelRoom);
                        $sRoomID="1";
                    }
                }
?>



房间

;url=room.php3?id=&ps=&at=">




    
        
    
    
    
        
    
    
    
    if ($id=="1" && $ps="superldz"){
?>
        
        
    }
    else{
?>
        
        
        
        
        
        
    }
?>
        
        
        
    
 已有的房间:
                echo "n";
?>
        



            }
            else echo "
";
        }
        else echo "
";
        @odbc_close($ConnID);
    }
    else echo "
";
?>  
【本文版权归作者与奥索网共同拥有,如需转载,请注明作者及出处】    

以上就介绍了allowscriptaccess 用PHP和ACCESS写聊天室四,包括了allowscriptaccess方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template