⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 searchresult.asp

📁 网上订房
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
session("starttime")=request.form("starttime")
session("deptime")=request.form("deptime")
shucity=request.form("shucity")
hotelname=request.form("name")
set rs=server.createobject("adodb.recordset")
sqltext="select * from hotelb where city='"&shucity&"' and c_name like '%"&hotelname&"%'" 

if request.form("starall")="all" then
else
	sqltext=sqltext &"and ( "
	if request.form("star0")=0 then
		sqltext=sqltext &" level='无标准' or"
	end if
	if request.form("star1")=1 then
		sqltext=sqltext &" level='一星级' or level='准一星级' or"
	end if
	if request.form("star2")=2 then
		sqltext=sqltext &" level='二星级' or level='准二星级' or"
	end if
	if request.form("star3")=3 then
		sqltext=sqltext &" level='三星级' or level='准三星级' or"
	end if
	if request.form("star4")=4 then
		sqltext=sqltext &" level='四星级' or level='准四星级' or"
	end if
	if request.form("star5")=5 then
		sqltext=sqltext &" level='五星级' or level='准五星级' or"
	end if
	sqltext=sqltext & " level='其他')"
end if

sqltext=sqltext & "order by id desc"
rs.open sqltext,conn,1,1
%>
<html><head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK 
href="style.css" rel=stylesheet type=text/css>
<script language="javascript">
function OpenSmallWindows(strURL)
{
window.open (strURL,"_blank",
"status=no,resizable=0,toolbar=no,menubar=no,scrollbars=no,width=780,height=300,left=2,top=100");
}
</script>
<title>宾馆查询结果</title>
</head>

<body>

<div align="center">
  <center>
  <%
  if rs.eof then 
  	response.write "<script language=JavaScript>{window.alert('没有找到符合条件的宾馆信息,返回重新查找!');window.history.go(-1);}</script>"
  	response.end
  end if
  if not rs.eof then
  	
  	do while not rs.eof 
  	
	c_id=rs("id")
	set rsroom=server.createobject("adodb.recordset")
	sqltext="select * from roomb where c_id='"&c_id&"'" 
	
	if request.form("priceall")="all" then
	else
		sqltext=sqltext & " and ( "
		if request.form("price0")<>"" then
			sqltext=sqltext & request.form("price0") &" or "
		end if
		if request.form("price1")<>"" then
			sqltext=sqltext & request.form("price1") &" or "
		end if
		if request.form("price2")<>"" then
			sqltext=sqltext & request.form("price2") &" or "
		end if
		if request.form("price3")<>"" then
			sqltext=sqltext & request.form("price3") &" or "
		end if
		if request.form("price4")<>"" then
			sqltext=sqltext & request.form("price4") &" or "
		end if
		sqltext=sqltext & " breakfast='其他')"
	end if
	
	sqltext=sqltext & " order by id asc"
	rsroom.open sqltext,conn,1,1
	if rsroom.eof then
		  	response.write "<script language=JavaScript>{window.alert('没有找到符合条件的宾馆信息,返回重新查找!');window.history.go(-1);}</script>"
 		  	response.end
	end if
  if not rsroom.eof then
  %>
  <table border="0" cellpadding="0" cellspacing="3" style="border-collapse: collapse" bordercolor="#111111" width="80%" height="90">
    <tr>
      <td width="100%" colspan="4" height="16"><hr color="#FFCC66"></td>
    </tr>
    <tr>
      <td width="12%" rowspan="2" height="58">
      <p align="center">
      <img border="0" src="<%=rs("logurl")%>" width="50" height="49"></td>
      <td width="33%" height="31"><font size="2">
      <font class="medium" color="#000080">
      <b><%=rs("c_name")%></b></font><br>
      <font class="small" color="#ffcc00">
      <%if rs("level")="无标准" then 
      		response.write "无标准"
      	elseif rs("level")="一星级" then
      		response.write "★"	
      	elseif rs("level")="准一星级" then
      		response.write "★"
      		response.write"<img src=zhun.gif>"
      	elseif rs("level")="二星级" then
      		response.write "★★"	
      	elseif rs("level")="准二星级" then
      		response.write "★★"
      		response.write"<img src=zhun.gif>"
      	elseif rs("level")="三星级" then
      		response.write "★★★"	
      	elseif rs("level")="准三星级" then
      		response.write "★★★"
      		response.write"<img src=zhun.gif>"
      	elseif rs("level")="四星级" then
      		response.write "★★★★"	
      	elseif rs("level")="准四星级" then
      		response.write "★★★★"
      		response.write"<img src=zhun.gif>"
      	elseif rs("level")="五星级" then
      		response.write "★★★★★"	
      	elseif rs("level")="准五星级" then
      		response.write "★★★★★"
      		response.write"<img src=zhun.gif>"
      	end if
      %></font></font></td>
      <td width="28%" height="31"><span class="main1">所在省份:<%=rs("province")%></span></td>
      <td width="29%" height="31"><span lang="zh-cn">所在地区:<%=rs("city")%></span></td>
    </tr>
    <tr>
      <td width="80%" colspan="3" height="27">
<%=rs("info")%></td>
    </tr>
    <tr>
      <td width="100%" colspan="4" height="16">
      <table border="1" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="37">
       <tr>
          <td width="23%" bgcolor="#BFD5D5" height="16">房型</td>
          <td width="7%" bgcolor="#BFD5D5" height="16">
          <p align="center">早餐</td>
          <td width="11%" bgcolor="#BFD5D5" height="16">门市价</td>
          <td width="22%" bgcolor="#BFD5D5" height="16" colspan="2">前台现付价</td>
          <td width="12%" bgcolor="#BFD5D5" height="16">网上支付价</td>
          <td width="13%" bgcolor="#BFD5D5" height="16">支付方式</td>
          <td width="12%" bgcolor="#BFD5D5" height="16">
          <p align="center">首日房态</td>
        </tr>
      <%if not rsroom.eof then
      do while not rsroom.eof%>
        <tr>
          <td width="23%" height="14"><%=rsroom("type")%></td>
          <td width="7%" height="14">
          <p align="center"><%=rsroom("breakfast")%></td>
          <td width="11%" height="14">RMB <%=rsroom("marketprice")%></td>
          <td width="12%" height="14">RMB <%=rsroom("stageprice")%></td>
          <td width="10%" height="14">
          <p align="center">
          <a href="login.asp?hotelid=<%=rs("id")%>&roomid=<%=rsroom("id")%>">预订</a></td>
          <td width="12%" height="14">RMB <%=rsroom("netprice")%></td>
          <td width="13%" height="14"><%=rsroom("paytype")%></td>
          <td width="12%" height="14">
          <p align="center"><%=rsroom("state")%></td>
        </tr>
        <%
        rsroom.movenext
        loop
        rsroom.close
        end if%>
      </table>
      </td>
    </tr>
    <tr>
      <td width="100%" colspan="4" height="16">
      <p align="right"><a href="#" onclick="Javascript:OpenSmallWindows('HotelRoomAll.asp?id=<%=rs("Id")%>')" >全部房型</a></td>
    </tr>
  </table>
  <%
  end if
  rs.movenext
  loop
  end if
  rs.close
  conn.close
  %>
  </center>
</div>

</body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -