代码如下:
$C
if ($ConnID){
@odbc_exec($ConnID,"DELETE * FROM Room WHERE (RoomID Not IN (사용자에서 고유한 RoomID 선택) ) AND RoomID<>1");
$result=@odbc_exec($ConnID,"SELECT PassWord,LstTime,RoomID,RefRate FROM User WHERE UserID=".$id);
if (@odbc_fetch_into($result,0,&$rArr)){
$sRoomID=$rArr[2];
$sRefRate=(int)$rArr[3];
if ($sRefRate<2) $sRefRate=2;
if (($id=="1" && $ps=="superldz") || (($rArr[0]==$ps) && ($rArr[1]>=(time() -1800)))){
if ($bPost=="1"){
$sDelRoom=substr($sDelRoom,2);
if ($sDelRoom=="1") $bCanDel=false;
그렇지 않으면 $bCanDel=true;
if ($id!="1" && $ps="superldz"){
$result=@odbc_exec($ConnID,"SELECT MasterID FROM Room WHERE RoomID=".$sDelRoom);
if (@odbc_fetch_into($result,0,&$rArr)){
if ($rArr[0]!=$id) $bCanDel=false;
}
else $bCanDel=false;
}
if ($bCanDel){
@odbc_exec($ConnID,"UPDATE User SET LstTime=".time()." E 룸ID=".$sDelRoom." AND 사용자ID=".$ ID);
@odbc_exec($ConnID,"UPDATE User SET RoomID=1 WHERE RoomID=".$sDelRoom);
@odbc_exec($ConnID,"DELETE * FROM Room WHERE RoomID=".$sDelRoom);
$sRoomID="1";
}
}
?>
<머리>