<%@ Language=VBScript %>
<%Option Explicit%>
<!-- #INCLUDE FILE = "../inc.asp" -->
<%
CheckAdminLogin()

Dim iRoomID, iPriority, sRoomName, sDescription, sWelcome, iState, bEmote, sStyle, iCapacity
iRoomID = Request.Form("RoomID")
iPriority = Request.Form("Priority")
sRoomName = Trim(Request.Form("RoomName"))
sDescription = Request.Form("Description")
sWelcome = Request.Form("Welcome")
iState = Request.Form("State")
bEmote = Request.Form("Emote")
sStyle = Request.Form("Style")
iCapacity = Request.Form("Capacity")

Dim oChat
Set oChat = Server.CreateObject("LSChat.ChatRooms")
oChat.Configure g_SiteName, g_SiteDomain, g_DBString, g_ErrFile, g_ScriptName
Dim rst
Set rst = oChat.GetChatRoom(iRoomID)

If Not rst.EOF Then
	rst("Priority") = iPriority
	rst("RoomName") = sRoomName
	rst("Description") = sDescription
	rst("Welcome") = sWelcome
	rst("State") = iState
	rst("Emote") = bEmote
	rst("Style") = sStyle
	rst("Capacity") = iCapacity
	rst.Update
End If

rst.Close
Set rst = Nothing
Set oChat = Nothing

Dim sURL
sURL = "m_vroom.asp?RoomID=" & iRoomID
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javascript">
<!--
var dtTime = 3000;
function Redirect(){
	RedirectDIV.innerHTML = "您已经执行了修改房间的命令！<font color=\"red\"><b>" + dtTime/1000 + "</b></font> 秒钟之后，系统将自动为您转到“查看房间信息”页面。";
	dtTime -= 1000;
	if(dtTime>=0)
		setTimeout("Redirect()", 1000, "javascript");
	else
		self.location = "<%=sURL%>";
}
//-->
</script>
<link rel="stylesheet" href="manager.css" type="text/css">
</head>
<body <%=g_BodyTag%>>
<div name="RedirectDIV" id="RedirectDIV" align="center"></div>
<script language="javascript">
<!--
Redirect();
//-->
</script>
</body>
</html>