您现在的位置: 军旅同心 >> 读书赏析 >> 学习园地 >> 电脑网络 >> 技术文章 >> 文章正文
用PHP和ACCESS写聊天室(三)
作者:采集员 文章来源:来源于网络 点击数: 更新时间:2005-9-10 14:36:22
p;                  $sChtCont="<font color=red>%m".substr($sSend,3)."</font>";
                            $sSecret="False";
                            $bCht="False";
                        }
                        elseif (strtolower(substr($sSend,0,3))=="/w "){
                            $result=@odbc_exec($ConnID,"SELECT RoomID FROM User WHERE UserName='".trim(substr($sSend,3))."'");
                            if (@odbc_fetch_into($result,0,&$rArr)){
                                if ($rArr[0]>0){
                                    $result=@odbc_exec($ConnID,"SELECT RoomName FROM Room WHERE RoomID=".$rArr[0]);
                                    if (@odbc_fetch_into($result,0,&$rArr))
                                        $sChtCont="<font color=gray>【系统消息】".trim(substr($sSend,3))."目前在房间".$rArr[0]."。</font>";
                                    else
                                        $sChtCont="<font color=gray>【系统消息】系统混乱了,".trim(substr($sSend,3))."目前在的房间不可识别!</font>";
                                }
                                else
                                    $sChtCont="<font color=gray>【系统消息】".trim(substr($sSend,3))."目前没有上线。</font>";
                                $sSecret="True";
                                $bCht="False";
                            }
                            else{
                                $sChtCont="<font color=gray>【系统消息】没有".trim(substr($sSend,3))."这个人。</font>";
                                $sSecret="True";
                                $bCht="False";
                            }
                            $bToMe="True";
                        }
                        elseif (substr($sSend,0,3)=="// "){
                            $result=@odbc_exec($ConnID,"SELECT ActCont FROM Action WHERE ActID='".trim(substr($sSend,3))."'");
                            if (@odbc_fetch_into($result,0,&$rArr)){
                                $sChtCont="<font color=red>".trim($rArr[0])."</font>";
                                $sSecret="False";
                                $bCht="False";
                            }
                            else $bCht="True";
                        }
                        if ($bCht=="True"){
                            $result=@odbc_exec($ConnID,"SELECT COUNT(EmotionTp) AS CNT_TP FROM Emotion WHERE EmotionTp=".$sEmotion);
                            @odbc_fetch_into($result,0,&$rArr);
                            if ($rArr[0]>0){
                                $iEmCnt=suiji($rArr[0]);
                                $result=@odbc_exec($ConnID,"SELECT EmotionCont FROM Emotion WHERE EmotionTp=".$sEmotion." AND EmotionID=".$iEmCnt);
                                if (@odbc_fetch_into($result,0,&$rArr))
                                    $sChtCont="%m".trim($rArr[0])."对%g".$sTalk.$sSend;
             &nb

上一页  [1] [2] [3] [4] 下一页


 
免责声明:作品版权归所属媒体与作者所有!!本站刊载此文不代表同意其说法或描述,仅为提供更多信息。如果您认为我们侵犯了您的版权,请告知!本站立即删除。有异议请联系我们。
文章录入:烟灰缸    责任编辑:烟灰缸 
网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
| 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 版权申明 | 网站公告 | 管理登录 |