|
member.php3 :
=(time()-1800)))){
switch ($ptp){
case "1":
$bYes=true;
$sErr="";
$sRoom=htmlspecialchars(trim(delquot($sRoom)));
if ($sPass1!=$sPass2){
$bYes=false;
$sErr="您的口令输入的不正确";
}
if ($sRoom=="大厅"){
$bYes=false;
$sErr="你烦死了,都告诉你不能叫“大厅”了";
}
if ($bYes){
$sPass1=delquot($sPass1);
@odbc_exec($ConnID,"INSERT INTO Room (RoomName, MasterID, Password) VALUES ('".$sRoom."', ".$id.", '".$sPass1."')");
if ($php_errormsg=="SQL error: [Microsoft][ODBC Microsoft Access 97 Driver] The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate, SQL state 23000 in SQLExecDirect"){
$bYes=false;
$sErr="这个房间已经有了";
}
else{
$result=@odbc_exec($ConnID,"SELECT RoomID FROM Room WHERE RoomName = '".$sRoom."'");
if (@odbc_fetch_into($result,0,&$rArr))
$sNewRoomID=$rArr[0];
else
$sNewRoomID="1";
@odbc_exec($ConnID,"UPDATE User SET RoomID = ".$sNewRoomID.",ToID=0,ToName='大家' WHERE UserID=".$id);
if ((int)$sRoomID!=1){
$result=@odbc_exec($ConnID,"SELECT COUNT(UserID) FROM User WHERE RoomID=".$sRoomID);
@odbc_fetch_into($result,0,&$rArr);
if ($rArr[0]==0) @odbc_exec($ConnID,"DELETE * FROM Room Where RoomID=".$sRoomID);
}
$sRoomID=$sNewRoomID;
}
}
if (!$bYes){
?>
新建房间出错
请重新[url=]&ps=&at=">新建[/url]
踢人出错
没踢动!你不是房主吧。
按[url=]&ps=&at=">这里[/url]返回
;url=member.php3?id=&ps=&at=">
人员
| ">"> |
1 AND User.RoomID0");
while (@odbc_fetch_into($result,0,&$rArr)){
if ($sToID==$rArr[0])
echo "tt".$rArr[1]." - ".$rArr[2]."n";
else
echo "tt".$rArr[1]. " - ".$rArr[2]."n";
}
}
else{
echo "tt此房间所有人n";
$result=@odbc_exec($ConnID,"SELECT UserID,UserName,Sex FROM User Where UserID1 AND RoomID=".$sRoomID." ORDER BY UserName");
while (@odbc_fetch_into($result,0,&$rArr)){
if ($rArr[2])
echo "tt".$rArr[1]."n";
else
echo "'>".$rArr[1]."n";
}
}
?>
| ">">
温酒吧聊天室
©1999年 [url=]贾铁锋[/url] |
人员";
}
else echo "人员";
@odbc_close($ConnID);
}
else echo "人员";
?>
您可能感兴趣的文章:聊天室php&mysql(四)聊天室php&mysql(五)PHP聊天室技术用PHP和ACCESS写聊天室(十)用PHP和ACCESS写聊天室(七)用PHP和ACCESS写聊天室(八)用PHP和ACCESS写聊天室(九)用PHP+MySql编写聊天室用PHP和ACCESS写聊天室(一)用PHP和ACCESS写聊天室(二)用PHP和ACCESS写聊天室(三)用PHP和ACCESS写聊天室(四)用PHP和ACCESS写聊天室(六)发布一个迷你php+AJAX聊天程序[聊天室]提供下载php写的简易聊天室代码用PHP+MySQL搭建聊天室功能实例代码PHP实现简单聊天室(附源码)
|
|