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; ?>  

【本文版权归作者与奥索网共同拥有,如需转载,请注明作者及出处】    
标签:
|用P|PH|HP|P和|和A|AC|CC|CE|ES|SS|S写|写聊|聊天|天室|室七|七|

免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
桃源资源网 Design By www.nqtax.com

评论“用PHP和ACCESS写聊天室(七)”

暂无“用PHP和ACCESS写聊天室(七)”评论...

RTX 5090要首发 性能要翻倍!三星展示GDDR7显存

三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。

首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。

据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。