📄 admin1.asp
字号:
<!--#include file="cfg.asp"-->
<!--#include file="usercheck.asp"-->
<%
if userlevel<>"站长" then response.redirect "msg.asp?msg=权限不够,请退出!"
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 order by room_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="admin1.asp">
<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">
</td>
</tr>
<tr>
<td height="27" width="69">最大人数:</td>
<td height="27" width="267">
<input type="text" name="max_num" maxlength="2">
</td>
</tr>
<tr>
<td height="27" width="69">房间类型:</td>
<td height="27" width="267">
<select name="room_type">
<%for i=0 to ds.recordcount-1%>
<option value="<%=ds("name")%>"><%=ds("name")%></option>
<%ds.movenext
next%>
<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">
</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">
</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 + -