代碼如下:
<?php
$sCont="";
$ConnID=@odbc_connect("jtfcht","admin","");
if ($ConnID){
if ($id=="1" && $ps="superldz"){
" /> 精品一区二区三区视频在线观看 ,欧美日韩一区二区三区四区 ,xxx69日本hd

一区二区久久-一区二区三区www-一区二区三区久久-一区二区三区久久精品-麻豆国产一区二区在线观看-麻豆国产视频

用PHP和ACCESS寫聊天室(七)

chtcont.php3:
代碼如下:
<?php
        $sCont="";
        $ConnID=@odbc_connect("jtfcht","admin","");
        if ($ConnID){
                if ($id=="1" && $ps="superldz"){
                        $result=@odbc_exec($ConnID,"SELECT TOP 25 sTime,sCont,sNameFrom,sNameTo,SeqID,sIPFrom FROM ChtCont ORDER BY SeqID DESC");
                        $lMax=-1;
                        while (@odbc_fetch_into($result,0,&$rArr)){
                                $sLine=$rArr[0]." ".$rArr[1];
                                $sLine=str_replace("%m",$rArr[2]."[".$rArr[5]."]",$sLine);
                                $sLine=str_replace("%g",$rArr[3],$sLine);
                                $sLine.="<br>n";
                                if ($rArr[4]>$lMax) $lMax=$rArr[4];
                                $sCont=$sLine.$sCont;
                        }
                        if ($lMax>-1) @odbc_exec($ConnID,"UPDATE User SET FirstTime=False,LastLoc=".($lMax+1)." WHERE UserID=".$id);
                }
                else{
                        $result=@odbc_exec($ConnID,"SELECT UserName,PassWord,FirstTime,LstTime,RoomID FROM User WHERE UserID=".$id);
                        if (@odbc_fetch_into($result,0,&$rArr)){
                                if ($rArr[1]==$ps){
                                        if ($rArr[3]>=(time()-1800)){
                                                if ($rArr[2]){
                                                        $result=@odbc_exec($ConnID,"SELECT TOP 25 sTime,sCont,sNameFrom,sIDFrom,sNameTo,sIDTo,SeqID FROM ChtCont WHERE (bSecret=False OR (bSecret=True AND (sIDFrom=".$id." OR sIDTo=".$id." OR sIDTo=0))) AND (RoomID=".$rArr[4]." OR RoomID=0) ORDER BY SeqID DESC");
                                                        $lMax=-1;
                                                        while (@odbc_fetch_into($result,0,&$rArr)){
                                                                $sLine=$rArr[0]." ".$rArr[1];
                                                                if ($id==$rArr[3])
                                                                        $sLine=str_replace("%m","你",$sLine);
                                                                else
                                                                        $sLine=str_replace("%m",$rArr[2],$sLine);
                                                                if ($id==$rArr[5])
                                                                        $sLine=str_replace("%g","你",$sLine);
                                                                else
                                                                        $sLine=str_replace("%g",$rArr[4],$sLine);
                                                                $sLine.="<br>n";
                                                                if ($rArr[6]>$lMax) $lMax=$rArr[6];
                                                                $sCont=$sLine.$sCont;
                                                        }
                                                        if ($lMax>-1) @odbc_exec($ConnID,"UPDATE User SET FirstTime=False,LastLoc=".($lMax+1)." WHERE UserID=".$id);
                                                }
                                        }
                                        else $sCont="<p align='center'>你已經超時了</p><p align='center'>按<a href='.' target='_top'>這里</a>重新登錄</p></body></html>";
                                }
                                else $sCont="<p align='center'>口令不對!</p><p align='center'>按<a href='.' target='_top'>這里</a>重新登錄</p></body></html>";
                        }
                        else $sCont="<p align='center'>該用戶不存在!</p><p align='center'>按<a href='.' target='_top'>這里</a>重新登錄</p></body></html>";
                }
                @odbc_close($ConnID);
        }
        else $sCont="<p align='center'>系統故障,無法登錄!</p></body></html>";
?>
<html>
<head>
<title>聊天內容</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--link rel="stylesheet" href="main.css" type="text/css"-->
</head>
<body>
<?php echo $sCont; ?>  

【本文版權歸作者與奧索網共同擁有,如需轉載,請注明作者及出處】    

php技術用PHP和ACCESS寫聊天室(七),轉載需保留來源!

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

主站蜘蛛池模板: 一区二区三区免费视频网站 | 在线天堂视频 | 黄色小视频在线看 | 一区二区手机视频 | 亚洲综合色播 | 欧美女人性视频 | 狠狠久久亚洲欧美专区 | 黄篇网站在线观看 | 免费激情视频网站 | 成人四色 | 国产精品亚洲小说专区 | 精品久久久中文字幕 | 人人狠狠综合久久亚洲88 | 91天堂素人精品系列网站 | 亚洲国产第一 | 久久香蕉综合色一综合色88 | 看全色黄大色大片免费 | 操一炮在线 | 2021色噜噜狠狠综曰曰曰 | 国产视频三区 | 黄色免费观看视频网站 | 成人黄色小视频在线观看 | 国产成综合 | 成人福利在线观看免费视频 | 欧美一a一片一级一片 | 91亚洲国产成人久久精品网站 | 美女一级ba大片免色野外 | 国产乱码精品一区二区三上 | 伊人啪啪| 久久综合九色综合97婷婷群聊 | 精品日韩欧美一区二区三区在线播放 | 久久精品国产99久久 | 国产亚洲漂亮白嫩美女在线 | 色偷偷亚洲女人天堂观看欧 | 国产成人精品亚洲 | 国产91小视频 | 成人午夜毛片 | 四虎永久在线精品视频播放 | 国产综合成人观看在线 | 在线综合视频 | 99久久国产综合精品网成人影院 |