<!--#include file="../inc/DAL.asp"-->
<!--#include file="../inc/md5.asp"-->
<!--#include file="../inc/page.asp"-->
<!--#include file="Check.asp"-->
<%
Dim ConfigRS
Set ConfigRS=Server.CreateObject( "ADODB.Recordset" )
if request.form("Method")="AddRoom" then
    ConfigRS.OPEN "select * from [i_Sys_Room] where [i_Sys_Room_ID]="&request.form("Room_ID") , DB_CONN , 1 , 3
    'ConfigRS("i_Sys_Room_Name")=request.form("i_Sys_Room_Name")
    'ConfigRS("i_Sys_Room_AdminUserID")=request.form("i_Sys_Room_AdminUserID")
    ConfigRS("i_Sys_Room_MaxNum")=request.form("i_Sys_Room_MaxNum")
    ConfigRS("i_Sys_Room_PubNotice")=request.form("i_Sys_Room_PubNotice")
    ConfigRS("i_Sys_Room_PubNoticeHref")=request.form("i_Sys_Room_PubNoticeHref")
    ConfigRS("i_Sys_Room_PriNotice")=request.form("i_Sys_Room_PriNotice")
    ConfigRS("i_Sys_Room_PriNoticeHref")=request.form("i_Sys_Room_PriNoticeHref")
    ConfigRS("i_Sys_Room_ClassID")=request.form("i_Sys_Room_ClassID")
    ConfigRS.update()
    RW "<script>alert('修改成功!');location.href='EditRoom.asp?Room_ID="&request("Room_ID")&"';</script>":response.end()
end if
Set ConfigRS=DB_CONN.EXECUTE("select * from [i_Sys_Room] where [i_Sys_Room_ID]="&request("Room_ID"))

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ImChat v1.5 Manage System</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="styles/layoutContent.css" rel="stylesheet" type="text/css" />
<link href="themes/blue/styles.css" rel="stylesheet" type="text/css" />
<style>
.JSTB{border:#ccc solid 1px;border-right:none;border-bottom:none;margin-top:20px;}
.JSTB th,.JSTB td{border-bottom:#ccc solid 1px; border-right:#ccc solid 1px;}
</style>
</head>
<body>
<div class="contentcontainer">
    <div class="headings alt">
        <h2>房间编辑&nbsp;&nbsp;&nbsp;<a href="javascript:history.back();" style="text-decoration:none;">返回</a>&nbsp;&nbsp;&nbsp;<a href="javascript:\\;" onclick="location.reload();" style="text-decoration:none;">刷新</a></h2>
    </div>
    <div class="contentbox">
        
        <form action="#" method="post" >
            <table class="CB" width="100%" cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td width="350">
                        <label for="i_Sys_Room_ID"><strong>房间ID:</strong></label>
                        <input type="text" id="i_Sys_Room_ID" name="i_Sys_Room_ID" readonly="" class="inputbox" value="<%=ConfigRS("i_Sys_Room_ID")%>"/>
                    </td>
                    <td>
                        <label for="i_Sys_Room_AdminUserID"><strong>房间创建人ID:</strong></label>
                        <input type="text" id="i_Sys_Room_AdminUserID" name="i_Sys_Room_AdminUserID" readonly="" class="inputbox" value="<%=ConfigRS("i_Sys_Room_AdminUserID")%>" readonly/>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="i_Sys_Room_MaxNum"><strong>最大额定人数:(0为无限)</strong></label>
                        <input type="text" id="i_Sys_Room_MaxNum" name="i_Sys_Room_MaxNum" class="inputbox" value="<%=ConfigRS("i_Sys_Room_MaxNum")%>"/>
                    </td>
                    <td>
                        <label for="i_Sys_Room_ClassID"><strong>房间类别:</strong></label>
						<select id="i_Sys_Room_ClassID" name="i_Sys_Room_ClassID" >
							<%
							dim tRS,iselect
							Set tRS=DB_CONN.EXECUTE( "select * from [i_Sys_Room_Class] order by [i_Sys_Room_Class_Sort] desc" )
							while not tRS.eof
								if ConfigRS("i_Sys_Room_ClassID")=tRS("i_Sys_Room_Class_ID") then 
									iselect="selected"
								else
									iselect=""
								end if
								RW "<option value='"&tRS("i_Sys_Room_Class_ID")&"' "&iselect&">"&tRS("i_Sys_Room_Class_Name")&"</option>"
								tRS.movenext()
							 wend
							%>
						</select>
                    </td>
                </tr>
                <tr>
                    <td width="350">
                        <label for="i_Sys_Room_PubNotice"><strong>公聊公告内容:</strong></label>
                        <input type="text" id="i_Sys_Room_PubNotice" name="i_Sys_Room_PubNotice" class="inputbox" value="<%=ConfigRS("i_Sys_Room_PubNotice")%>"/>
                    </td>
                    <td>
                        <label for="i_Sys_Room_PubNoticeHref"><strong>公聊公告链接:</strong></label>
						<input type="text" id="i_Sys_Room_PubNoticeHref" name="i_Sys_Room_PubNoticeHref" class="inputbox" value="<%=ConfigRS("i_Sys_Room_PubNoticeHref")%>"/>
                    </td>
                </tr>
                <tr>
                    <td width="350">
                        <label for="i_Sys_Room_PriNotice"><strong>私聊公告内容:</strong></label>
                        <input type="text" id="i_Sys_Room_PriNotice" name="i_Sys_Room_PriNotice" class="inputbox" value="<%=ConfigRS("i_Sys_Room_PriNotice")%>"/>
                    </td>
                    <td>
                        <label for="i_Sys_Room_PriNoticeHref"><strong>私聊公告链接:</strong></label>
						<input type="text" id="i_Sys_Room_PriNoticeHref" name="i_Sys_Room_PriNoticeHref" class="inputbox" value="<%=ConfigRS("i_Sys_Room_PriNoticeHref")%>"/>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <input type="hidden" value="<%=request("Room_ID")%>" name="Room_ID"/>
                        <input type="hidden" value="AddRoom" name="Method"/>
                        <input type="submit" value="修改" class="btn" />
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>
</body>
</html>
