六月婷婷综合激情-六月婷婷综合-六月婷婷在线观看-六月婷婷在线-亚洲黄色在线网站-亚洲黄色在线观看网站

明輝手游網中心:是一個免費提供流行視頻軟件教程、在線學習分享的學習平臺!

用PHP與ACCESS寫聊天室(7)

[摘要]chtcont.php3: 代碼如下: <?php sCont=""; ConnID=@odbc_connect("jtfcht","admin",""); if ...
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]."&nbsp;".$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]."&nbsp;".$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; ?>  

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



主站蜘蛛池模板: 天堂综合网 | 天天黄视频 | 亚洲精品福利你懂 | 中文亚洲| 伊人网在线视频 | 青草视频app| 欧美一级做性受 | 亚洲精品自拍视频 | 在线观看国产久青草 | 日本三级带日本三级带黄国产 | 亚洲成人自拍 | 在线视频a | 怡春院日本一区二区久久 | 日本七大伦理经典在线观看 | 亚洲成av人片在线观看 | 日本xxxx在线观看 | 欧美特黄一级高清免费的香蕉 | 欧美一区二区三区不卡免费 | 中文字幕日韩专区精品系列 | 人人狠狠综合久久亚洲88 | 全黄a一级毛片 | 天天看有黄有色大片 | 四虎影视免费在线观看 | 青草园网站在线观看 | 天天插天天射天天干 | 手机在线播放av | 特一级黄色大片 | 亚洲视频一区二区在线观看 | 色噜噜色噜噜天天拍一拍 | 青青草原成人 | 亚洲天堂在线观看完整版 | 日韩va亚洲va欧美va浪潮 | 午夜在线精品不卡国产 | 伊人久久婷婷丁香六月综合基地 | 午夜夜伦鲁鲁片 | 日韩手机在线视频 | 日韩福利视频一区 | 亚洲伊人久久大香线蕉综合图片 | 中文字幕在线不卡视频 | 日日噜噜夜夜狠狠久久丁香 | 最近韩国中文字幕更新 |