?? editroom.asp
字號:
<!--#include file="cfg.asp"-->
<!--#include file="usercheck.asp"-->
<%if userlevel<>"站長" then response.redirect "msg.asp?msg=權限不夠,請退出!"
id=request.querystring("id")
set ds=server.createobject("adodb.recordset")
ds.open "select * from area_info order by id",conn,1,1
set rs=server.createobject("adodb.recordset")
rs.open "select * from room where room_id="&id&"",conn,1,3
if request.totalbytes>0 then
room_name=request.form("room_name")
max_num=request.form("max_num")
room_type=request.form("room_type")
room_master=request.form("room_master")
room_info=request.form("room_info")
if room_name="" or max_num="" then
response.redirect "msg.asp?msg=請填寫完整資料!"
else
if not isnumeric(max_num) then
response.redirect "msg.asp?msg=最大人數為整型變量!"
else
rs.addnew
rs("room_name")=room_name
rs("max_num")=max_num
rs("room_type")=room_type
rs("room_master")=room_master
rs("room_info")=room_info
rs.update
response.redirect "admin.asp"
end if
end if
end if
%>
<html>
<head>
<title><%=application("ChatInfo")%>-管理中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="style.css" rel=stylesheet>
</head>
<body bgcolor="#8EB4D9" text="#000000">
<table width="400" border="1" cellpadding="10" cellspacing="13" background="../images/b2.gif" height="275">
<tr bgcolor="#FFFFFF">
<td bgcolor="#8EB4D9" valign="top" height="284">
<form name="form1" method="post" action="editroom.asp?id=<%=id%>">
<table width="350" cellpadding="2" bordercolor="#333333" align="center" cellspacing="0" border="1" bordercolordark="#FFFFFF" height="81">
<tr>
<td height="25" colspan="2">
<div align="center"><a href="admin.asp">房間列表</a> <a href="admin1.asp">增加房間</a></div>
</td>
</tr>
<tr>
<td height="27" width="69">房間名:</td>
<td height="27" width="267">
<input type="text" name="room_name" maxlength="10" value="<%=trim(rs("room_name"))%>">
</td>
</tr>
<tr>
<td height="27" width="69">最大人數:</td>
<td height="27" width="267">
<input type="text" name="max_num" maxlength="2" value="<%=trim(rs("max_num"))%>">
</td>
</tr>
<tr>
<td height="27" width="69">房間類型:</td>
<td height="27" width="267">
<select name="room_type">
<%do while not ds.eof%>
<option value="<%=ds("name")%>"><%=ds("name")%></option>
<%ds.movenext
loop%>
<option value="自定義">自定義</option>
</select>
</td>
</tr>
<tr>
<td height="27" width="69">屋主:</td>
<td height="27" width="267">
<input type="text" name="room_master" maxlength="10" value="<%=trim(rs("room_master"))%>">
</td>
</tr>
<tr>
<td height="27" width="69">
<div align="left">備注:</div>
</td>
<td height="27" width="267">
<div align="left">
<input type="text" name="room_info" maxlength="50" value="<%=trim(rs("room_info"))%>">
</div>
</td>
</tr>
<tr>
<td height="27" colspan="2">
<input type="submit" name="Submit" value=" 確 定 ">
<input type="reset" name="Submit2" value=" 取 消 ">
</td>
</tr>
</table>
</form>
<p align=center> </p>
</td>
</tr>
</table>
</body>
</html>
<%rs.close
set rs=nothing
ds.close
set ds=nothing
call db_close()%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -