>백엔드 개발 >PHP 튜토리얼 >접속 연결 PHP와 ACCESS를 사용하여 채팅방 작성 5

접속 연결 PHP와 ACCESS를 사용하여 채팅방 작성 5

WBOY
WBOY원래의
2016-07-29 08:34:30886검색

member.php3 :
function delquot($sStr){
    $s=str_replace(chr(124),"",$sStr);
    $s=str_replace(chr(39),"",$s);
    $s=str_replace(chr(34),"",$s);
    $s를 반환합니다.
}
    $C
    if ($ConnID){
        @odbc_exec($ConnID,"UPDATE User SET RoomID=0,ToID=0,T WHERE UserID=".$id);
                             if ((int)$sRoomID!=1){
                             $result=@odbc_exec($ConnID,"어디에서 사용자의 수를 선택합니까? E 방ID=".$s방ID);
                                 @odbc_fetch_into($result,0,&$rArr);
                                  if ($rArr[0]==0) @odbc_exec($ConnID,"DELETE * FROM Room Where RoomID=".$sRoomID);
                             }
                           $sRoomID=$sNewRoomID;
                          }
                      }
                      if (!$b예){
?>

<머리>
새로운建房间출출




 


>새로운 내용신규


                       exit()                      }
                       휴식;
                   대소문자 "2":
                      $sKick=substr($sMember,2); if ($ id == "1"&& $ ps = "superldz") {<🎜 🎜> $ result =@odbc_exec ($ connid, "userId, userId =". ($ skick)). ;
                          if (@odbc_fetch_into($result,0,&$rArr)){
                          @odbc_exec($ConnID,"UPDATE User SET RoomID=0,ToID ='',ToName='',비밀=False, FirstTime=False,LstTime=0,LastLoc=0 WHERE UserID=".$sKick);
                            @odbc_exec($ConnID,"INSERT INTO ChtCont(sIDFrom, sNameFrom, sIPFrom, sIDTo, sNameTo, sTime, sCont, bSecret, RoomID) 값(1, '管리员', '".getenv ("REMOTE_ADDR") ."', 0, '대가족', '".date("H:i:s")."', '【系统消息】".$rArr[1]."这个坏蛋被踢 Out了这个聊天室:-)', False, 0)");
                          }
                    }
                     그 외{          if ($sKick=="0" || $sKick==$id) $bCanKick="2";
                           else $bCanKick="1";
                          $result=@odbc_exec($ConnID,"SELECT MasterID FROM Room WHERE RoomID=".$sRoomID);
                          if (@odbc_fetch_into($result,0,&$rArr)){
                            if ($rArr[0]!=$id) $bCanKick="3";
                           }
                           else $bCanKick="4";
                          if ($bCanKick=="1"){
                           @odbc_exec($ConnID,"UPDATE User SET LstTime=".time()." WHERE UserID=".$id );
                              @odbc_exec($ConnID,"UPDATE User SET RoomID=1 WHERE UserID=".$sKick);
                          }
                         그밖에{
?>

<머리>
踢人休错




 


没踢动!你不是房主吧.


这里返回


                              exit();
                          }
                     }
                       휴식;
                   대소문자 "3":
                      $sToID=substr($selMember,2);
                      if ($sToID=="0")
                        $sToName="大가족";
                      else{
                         $result=@odbc_exec($ConnID,"SELECT UserName FROM User WHERE UserID=".$sToID);
                          if (@odbc_fetch_into($result,0,&$rArr))
                            $sToName=$rArr[0];
                          그밖에
                           $sToName="未知";
                      }
                      @odbc_exec($ConnID,"UPDATE User SET ToID=".$sToID.",ToName='".$sToName."',LstTime=".time()." WHERE UserID=" .$id);
                       휴식;
                }
?>

<머리>


人员

< ;script 언어="JavaScript">



<본문>


    
        
        
        
        
    
    
    
        
    
    
    
    
        



            }
            else echo "";
        }
        else echo "

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
                if ($id!="1"){
                  $result=@odbc_exec($ConnID,"SELECT RoomName FROM Room Where RoomID = ".$sRoomID);
                   @odbc_fetch_into($result,0,&$rArr);
                   echo "你在:".$rArr[0];
                }
?>
        
< input type="hidden" name="ptp" value="2">< input type="hidden" name="ps" value="">
温酒吧聊天室
©1999年 贾铁锋