<!-- #include file="VT_Page/VT_F_S.asp" -->


<%
if int(request.Form("MaxMemberNum")) > 100 then
	response.write "房间太大了！"
elseif int(request.Form("MaxMemberNum")) <= 0 then
	response.write "房间大小不能为0或负数！"
else
%>

<%
RoomName = request.Form("RoomName")
RoomPWD = request.Form("RoomPWD")
MaxMemberNum = int(request.Form("MaxMemberNum"))
if request.Form("Mode")="3" then
	Mode = 3
else
	Mode = 1
end if

i = NameCheck(RoomName,"房间名")

if i="1" then
	i = PWDCheck(RoomPWD,"密码")
end if

if i<>"1" then
	response.write i
else

%>


<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>建立房间</title>
</head>

<body  background="img/bg.jpg">
<br>
<%if session(VT_SysNum & "_" & "WebVT_IsNameOK")=1 then%>

<table border="0" width="100%" height="183">
  <tr>
    <td width="20%" height="18">　</td>
    <td width="20%" height="18">　</td>
    <td width="20%" height="18">　</td>
    <td width="20%" height="18">　</td>
    <td width="20%" height="18">　</td>
  </tr>
  <tr>
    <td width="20%" height="91">　</td>
    <td width="20%" height="91">　</td>
    <td width="20%" height="91">　</td>
    <td width="20%" height="91">　</td>
    <td width="20%" height="91">　</td>
  </tr>
  <tr>
    <td width="20%" height="18">　</td>
    <td width="20%" height="18">　</td>
    <td width="20%" height="18">
<%
i = User_CreateRoom(RoomName,RoomPWD,MaxMemberNum,Mode,0)
if i="1" then
	response.write "房间已建立！<br>房间ID:" & Glb_RoomID & "<br>房间名称:" & RoomName
%>
	<br><a href="ListRoom.asp">查看房间列表</a>
	<br>
	<form method="POST" action="talk.asp">
		<input type="hidden" name="RoomPWD" value="<%=RoomPWD%>">
		<input type="hidden" name="RoomID" value="<%=Glb_RoomID%>">
		<input type="hidden" name="RoomName" value="<%=RoomName%>">
		<input type="submit" value="进入房间" name="B1">
	</form>
<%
else
	response.write i
end if
%>

	</td>
    <td width="20%" height="18">　</td>
    <td width="20%" height="18">　</td>
  </tr>
  <tr>
    <td width="20%" height="18">　</td>
    <td width="20%" height="18">　</td>
    <td width="20%" height="18">　</td>
    <td width="20%" height="18">　</td>
    <td width="20%" height="18">　</td>
  </tr>
  <tr>
    <td width="20%" height="18">　</td>
    <td width="20%" height="18">　</td>
    <td width="20%" height="18">　</td>
    <td width="20%" height="18">　</td>
    <td width="20%" height="18">　</td>
  </tr>
</table>

<%else%>
您还没有登录，不能建立房间，请先到论坛上登录。
<%end if%>

</body>

</html>

<%end if%>

<%end if%>
