用PHP和ACCESS寫聊天室(七)_PHP教學

WBOY
發布: 2016-07-21 16:02:47
原創
885 人瀏覽過

chtcont.php3:
代碼如下:
        $sCont="";
        $ConnID=@odbc_connect("jtfcht","admin","");
> if($ connid){
> if($ id ==“ 1” && $ ps =“ superldz”){
$ result =@odbc_exec($ connid,$ connid,'選擇25 Stime,Scont,Scont,Scont, sNameFrom,sNameTo,SeqID,sIPFrom FROM ChtCont ORDER BY SeqID DESC");
                              while (@odbc_fetch _into($結果,0,&$rArr ) ){
                            地 ".$rArr[1]; );
                              =str_replace("%g",$rArr[3],$sLine);
                                         if ($rArr[4]>$ l 最大) $l 最大=$ rArr[4] ;
                                      }
                       )。
                else{為
             stTime、LstTime、RoomID WHERE UserID=".$id);
                                                                              if ($rArr[3]>=(時間()-1800)){
if ($rArr[2]){
                               $result=@odbc_exec($ConnID,"從ChtCont 選取前25 個sTime,sCont,sNameFrom,sIDFrom,sNameTo,sIDTo,SeqID WHERE (bSecret=False OR (bSecret =True AND (sIDFrom=".$id." OR sIDTo=".$id." OR sIDTo=0))) AND (RoomID=".$rArr[4]." OR RoomID=0) 依SeqID DESC 排序");
                                 $lMax=-1; (@odbc_fetch_into($result,0,&$rArr)){
                                         $sLine=$rArr[0]." ".$rArr[1 ];
                                      if ($id==$rArr[3])
                                               $sLine=str_replace("%m","你",$ );                                                                        ( "%m",$rArr[2],$sLine);
                                                                if ($id==$rArr[5])
                                            $sLine=str_replace("%g","你",$sLine);
                                  其他
                                                          $sLine=str_replace("%g",$rArr[4],$sLine);
                                     $sLine.="
n";
                                   if ($rArr[6]>$lMax) $lMax=$rArr[6];
                                      $sCont=$sLine.$sCont;
                                                                      exec($ConnID,"更新使用者設定 FirstTime=False,LastLoc=".($lMax 1)." WHERE UserID=".$id);
                                                                    }
                                href='.' target='_top'>這裡重新登入

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
最新問題
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板