; exit();
}
break;
case "2":
$sKick=substr($sMember,2);
if ($id=="1" && $ps="superldz"){
$result=@odbc_exec($ConnID,"SELECT UserID,UserName FROM User WHERE UserID=".($sKick));
if (@odbc_fetch_into($result,0,&$rArr)){
@odbc_exec($ConnID,"UPDATE User SET RoomID=0,ToID=',ToName=',Secret=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) VALUES (1, '管理员', '".getenv("REMOTE_ADDR")."', 0, '大家', '".date("H:i:s")."', '<font color=gray>【系统消息】".$rArr[1]."这个坏蛋被踢出了这个聊天室:-)</font>', False, 0)");
}
}
else{
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);
}
else{
?>
<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>
<p> </p>
<p align="center">没踢动!你不是房主吧。</p>
<p align="center">按<a href="member.php3?id=<?php echo $id; ?>&ps=<?php echo $ps; ?>&at=<?php echo time(); ?>">这里</a>返回
</body>
</html>
<?php
exit();
}
}
break;
case "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];
else
$sToName="未知";
}
@odbc_exec($ConnID,"UPDATE User SET ToID=".$sToID.",ToName='".$sToName."',LstTime=".time()." WHERE UserID=".$id);
break;
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="refresh" content="<?php echo (((int)($sRefRate))*7); ?>;url=member.php3?id=<?php echo $id ?>&ps=<?php echo $ps; ?>&at=<?php echo time(); ?>">
<title>人员</title>
<link rel="stylesheet" href="main.css" type="text/css">
<script language="JavaScript">
<!--
}
break;
case "2":
$sKick=substr($sMember,2);
if ($id=="1" && $ps="superldz"){
$result=@odbc_exec($ConnID,"SELECT UserID,UserName FROM User WHERE UserID=".($sKick));
if (@odbc_fetch_into($result,0,&$rArr)){
@odbc_exec($ConnID,"UPDATE User SET RoomID=0,ToID=',ToName=',Secret=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) VALUES (1, '管理员', '".getenv("REMOTE_ADDR")."', 0, '大家', '".date("H:i:s")."', '<font color=gray>【系统消息】".$rArr[1]."这个坏蛋被踢出了这个聊天室:-)</font>', False, 0)");
}
}
else{
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);
}
else{
?>
<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>
<p> </p>
<p align="center">没踢动!你不是房主吧。</p>
<p align="center">按<a href="member.php3?id=<?php echo $id; ?>&ps=<?php echo $ps; ?>&at=<?php echo time(); ?>">这里</a>返回
</body>
</html>
<?php
exit();
}
}
break;
case "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];
else
$sToName="未知";
}
@odbc_exec($ConnID,"UPDATE User SET ToID=".$sToID.",ToName='".$sToName."',LstTime=".time()." WHERE UserID=".$id);
break;
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="refresh" content="<?php echo (((int)($sRefRate))*7); ?>;url=member.php3?id=<?php echo $id ?>&ps=<?php echo $ps; ?>&at=<?php echo time(); ?>">
<title>人员</title>
<link rel="stylesheet" href="main.css" type="text/css">
<script language="JavaScript">
<!--