Home > Backend Development > PHP Tutorial > Using PHP and ACCESS to write a chat room 8

Using PHP and ACCESS to write a chat room 8

WBOY
Release: 2016-07-29 08:34:31
Original
842 people have browsed it

emotion.php3:
代码如下:


表情动作




        $sEmotion="0";
        $sColorID="000000";
        $C
        if ($ConnID){
                if (!($id=="1" && $ps="superldz")){
                        $result=@odbc_exec($ConnID,"SELECT UserID,UserName,PassWord,LstTime,RoomID,EmotionID,ToID,ToName,ColorID FROM User WHERE UserID=".$id);
                        if (@odbc_fetch_into($result,0,&$rArr)){
                                $sUserName=$rArr[1];
                                $sRoomID=$rArr[4];
                                $sEmotion=$rArr[5];
                                $sToID=$rArr[6];
                                $sT
                                $sColorID=$rArr[8];
                                if (($rArr[2]==$ps) && ($rArr[3]>=(time()-1800)) && ($bPost=="1") && (substr($selAction,1)!="None")){
                                        odbc_exec($ConnID,"UPDATE User SET Emoti WHERE UserID=".$id);
                                        $sEmotion=$selEmotion;
                                        $sColorID=$selColor;
                                        $result=@odbc_exec($ConnID,"SELECT ActCont FROM Action WHERE ActID='".substr($selAction,1)."'");
                                        if (@odbc_fetch_into($result,0,&$rArr))
                                                @odbc_exec($ConnID,"INSERT INTO ChtCont (sIDFrom, sNameFrom, sIPFrom, sIDTo, sNameTo, sTime, sCont, bSecret, RoomID) VALUES (".$id.", '".$sUserName."', '".getenv("REMOTE_ADDR")."', ".$sToID.", '".$sToName."', '".date("H:i:s")."', '".trim($rArr[0])."', False, ".$sRoomID.")");
                                }
                        }
                }
?>


        if ($id=="1" && $ps="superldz"){
                echo "t管理员模式n";
                echo "表情:";
                $result=@odbc_exec($ConnID,"SELECT EmotionID,EmotionCont FROM Emotion WHERE Emoti ORDER BY EmotionID");
                while (@odbc_fetch_into($result,0,&$rArr)){
                        if ($sEmotion==$rArr[0])
                                echo "tn";
                        else
                                echo "tn";
                }
        }
?>

 颜色:
 动作:

                        @odbc_close($ConnID);                                                                                                                                                                              ; Indicate the author and source]

The above has introduced the use of PHP and ACCESS to write a chat room 8, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.


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