<!--#include file="include/conn.asp"-->
<%Call limsss(sQxa,"$$LstNewsInfoRoom$$")%>
<html>
<title>房间管理</title>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../css/lst.css" rel="stylesheet" type="text/css" />
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">

<table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2"><tr><td height="31"><div class="titlebt">房间管理</div></td></tr></table>

<table border="1" width="100%" id="table3" bgcolor="#FFFFFF" style="border-collapse: collapse" bordercolor="#F6F6F6" cellspacing="0">
	<tr>
		<td>
		
		
		
		
<table border="1" width="100%" id="table3" bgcolor="#FFFFFF" style="border-collapse: collapse" bordercolor="#F6F6F6" cellspacing="0">
<tr>
<td height="30" align="center" bgcolor="#F6F6F6">房型类别</td>
<td height="30" align="center" bgcolor="#F6F6F6">早餐</td>
<td height="30" align="center" bgcolor="#F6F6F6">宽带</td>
<td height="30" align="center" bgcolor="#F6F6F6">价格</td>
<td height="30" align="center" bgcolor="#F6F6F6">操作</td>
</tr>
<form action="?action=addfff&NewsId=<%=NewsId%>" method=post>
<tr>
<td height="30" align="center"><input name="roomTitle"  value=""></td>
<td height="30" align="center"><select name="roomZaocan"><option value=有早餐>有早餐</option><option value=无早餐>无早餐</option></select></td>
<td height="30" align="center"><select name="roomKuandai"><option value=有宽带>有宽带</option><option value=无宽带>无宽带</option></select></td>
<td height="30" align="center"><input name="roomMoney" value=""></td>
<td height="30" align="center"><input class="ed" type=image src="../images/ico/add.gif"></td>
</tr>
</form>
</table>
<br>
<table border="1" width="100%" id="table3" bgcolor="#FFFFFF" style="border-collapse: collapse" bordercolor="#F6F6F6" cellspacing="0">
<tr>
<td height="30" align="center" bgcolor="#F6F6F6">房型类别</td>
<td height="30" align="center" bgcolor="#F6F6F6">早餐</td>
<td height="30" align="center" bgcolor="#F6F6F6">宽带</td>
<td height="30" align="center" bgcolor="#F6F6F6">价格</td>
<td height="30" align="center" bgcolor="#F6F6F6">操作</td>
</tr>
<%
sSql="select * from LstRoom where NewsId="&NewsId&" order by Id desc"
Set oRs = Server.CreateObject("ADODB.Recordset")
oRs.Open sSql, oconn, 1, 1
If oRs.eof and oRs.bof then
Response.Write ""
Else
Do While Not oRs.eof%>
<form action="?action=eddfff&NewsId=<%=NewsId%>&Id=<%=oRs("Id")%>" method=post>
<tr>
<td height="30" align="center"><input name="roomTitle"  value="<%=oRs("roomTitle")%>"></td>
<td height="30" align="center"><select name="roomZaocan"><option value=<%=oRs("roomZaocan")%>><%=oRs("roomZaocan")%></option><option value=有早餐>有早餐</option><option value=无早餐>无早餐</option></select></td>
<td height="30" align="center"><select name="roomKuandai"><option value=<%=oRs("roomKuandai")%>><%=oRs("roomKuandai")%></option><option value=有宽带>有宽带</option><option value=无宽带>无宽带</option></select></td>
<td height="30" align="center"><input name="roomMoney" value="<%=oRs("roomMoney")%>"></td>
<td height="30" align="center"><input class="ed" type=image src="../images/ico/save.gif">
<a href="?action=dddfff&Id=<%=oRs("Id")%>"><img src=../images/ico/del.gif></a>
</td>
</tr>
</form>
<%
oRs.MoveNext
Loop
End If
%>
</table>		

		</td>
	</tr>
</table>
</body>
</html>
<%
'添加
If action="addfff" Then
if trim(request("roomTitle"))="" or trim(request("roomMoney"))="" then
	call alert("不能为空!","-1")
end if
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstRoom] where roomTitle='"&trim(request("roomTitle"))&"'"
	oRs.open sSql,oconn,1,3
		oRs.addnew
		oRs("NewsId")=NewsId
		oRs("roomTitle")=trim(request("roomTitle"))
		oRs("roomZaocan")=trim(request("roomZaocan"))
		oRs("roomKuandai")=trim(request("roomKuandai"))
		oRs("roomMoney")=trim(request("roomMoney"))
		oRs.update
		oRs.close
		response.redirect "LstNewsInfoRoom.asp?NewsId="&NewsId
	Set oRs = Nothing
End If
'管理员编辑
If action="eddfff" Then
if trim(request("roomTitle"))="" or trim(request("roomMoney"))="" then
	call alert("不能为空!","-1")
end if
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstRoom] where id="&Id
	oRs.open sSql,oconn,1,3
		oRs("roomTitle")=trim(request("roomTitle"))
		oRs("roomZaocan")=trim(request("roomZaocan"))
		oRs("roomKuandai")=trim(request("roomKuandai"))
		oRs("roomMoney")=trim(request("roomMoney"))
		oRs.update
		oRs.close
		response.redirect "LstNewsInfoRoom.asp?NewsId="&NewsId
	Set oRs = Nothing
End If
'删除管理员
If action="dddfff" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from LstRoom WHERE Id = "&Id&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		response.redirect "LstNewsInfoRoom.asp?NewsId="&NewsId
End if
%>
