wy_trip_findasp.asp
上传用户:hnxqingdao
上传日期:2013-05-22
资源大小:1283k
文件大小:10k
源码类别:

其他行业

开发平台:

ASP/ASPX

  1. <!--#include file="../wy_trip_inc/wy_trip_cnn.inc"-->
  2. <html>
  3. <head>
  4. <title>PTrip Server 2005 For 数据库课程设计
  5. </title>
  6. <META http-equiv=Content-Type content="text/html; charset=gb2312">
  7. <link rel="stylesheet" type="text/css" href="../wy_trip_css/wy_trip.css">
  8. </head>
  9. <%
  10.       country=request.Form("classid")
  11.   city=request.Form("Nclassid")
  12.   money=request.Form("Mclassid")
  13.   keyword=request.Form("keyword")
  14.   
  15.   qcountry=request.QueryString("country")
  16.   qcity=request.QueryString("city")
  17.   qmoney=request.QueryString("money")
  18.   
  19.   if(country="" and city="" and money="")then
  20.      country=qcountry
  21.  city=qcity
  22.  money=qmoney
  23.   end if  
  24.   country=trim(country)
  25.   city=trim(city)
  26.   money=trim(money)
  27.  ' response.Write(country)
  28.   'response.Write(city)
  29.      '"500~2000" d>500元~2000元</option>
  30. '<option value="2000~5000">2000元~5000元</option>
  31. '<option value="5000~8000">5000元~8000元</option>
  32. '<option value="8000~10000">
  33.  sqlstr1="nothing"
  34.  sqlstr2="nothing"
  35.      select case money
  36.         case "500~2000"
  37.       m1=500
  38.   m2=2000
  39.     case  "2000~5000"
  40.       m1=2000
  41.   m2=5000
  42. case  "5000~8000"
  43.       m1=5000
  44.   m2=8000
  45. case  "8000~10000"
  46.       m1=8000
  47.   m2=10000   
  48.  end select 
  49.  
  50.  
  51.  
  52.  if(city="")then
  53.      ' country="" city="" money=""
  54.      if(keyword="关键字")then
  55.   sqlstr1="select * from trip_solhomelandinfor"
  56.   sqlstr2="select * from trip_soloverseasinfor"
  57.  else
  58.   sqlstr1="select * from trip_solhomelandinfor where solname like '%"&keyword&"%'"
  59.   sqlstr2="select * from trip_soloverseasinfor where solname like '%"&keyword&"%'"     
  60.  end if
  61.  ' country="" city="" money<>""
  62.  if(money<>"")then
  63.    if(keyword="关键字")then
  64.     sqlstr1="select * from trip_solhomelandinfor where solmoney>="&m1&" and solmoney<="&m2
  65.     sqlstr2="select * from trip_soloverseasinfor where solmoney>="&m1&" and solmoney<="&m2
  66.    else
  67.     sqlstr1="select * from trip_solhomelandinfor where solmoney>="&m1&" and solmoney<="&m2&" and solname like '%"&keyword&"%'"
  68.     sqlstr2="select * from trip_soloverseasinfor where solmoney>="&m1&" and solmoney<="&m2&" and solname like '&"&keyword&"%'"    
  69.    end if
  70.  end if
  71.  else
  72.      ' country="" city<>""
  73.  if(keyword="关键字")then
  74.   sqlstr1="select * from trip_solhomelandinfor where soladdress='"&city&"'"
  75.   sqlstr2="select * from trip_soloverseasinfor where soladdress='"&city&"'"
  76.  else
  77.   sqlstr1="select * from trip_solhomelandinfor where soladdress='"&city&"' and solname like '%"&keyword&"%'"
  78.   sqlstr2="select * from trip_soloverseasinfor where soladdress='"&city&"' and solname like '%"&keyword&"%'"  
  79.  end if
  80.  ' country="" city="" money<>""
  81.  if(money<>"")then
  82.      if(keyword="关键字")then
  83.       sqlstr1="select * from trip_solhomelandinfor where soladdress='"&city&"' and solmoney>="&m1&" and solmoney<="&m2
  84.     sqlstr2="select * from trip_soloverseasinfor where soladdress='"&city&"' and solmoney>="&m1&" and solmoney<="&m2
  85.  else
  86.       sqlstr1="select * from trip_solhomelandinfor where soladdress='"&city&"' and solmoney>="&m1&" and solmoney<="&m2&"' and solname like '%"&keyword&"%'"
  87.     sqlstr2="select * from trip_soloverseasinfor where soladdress='"&city&"' and solmoney>="&m1&" and solmoney<="&m2&"' and solname like '%"&keyword&"%'"  
  88.  end if
  89.  end if 
  90.  end if
  91.  
  92.  select case country
  93.         case ""
  94.      showl=0
  95.     case "1"
  96.      showl=1
  97. case "2"
  98.      show=2  
  99.  end select
  100.  'if( country=1) then
  101.       ' tablename="trip_solhomelandinfor"
  102.    'solad=0
  103. ' else
  104.        'tablename="trip_soloverseasinfor"
  105.    'solad=1
  106. ' end if
  107. %>
  108. <body leftmargin="0" topmargin="0"  bottommargin="0" rightmargin="0" link="#3357B3" vlink="#3357B3" alink="#3357B3" bgcolor="#e8eefc">
  109. <table width="750" height="716" cellpadding="0" cellspacing="0">
  110. <tr>
  111.   <td valign="top" class="Main">
  112. <p class="NoBreakBeforeAfter"><img src="../wy_trip_images/TopCol3.gif" WIDTH="247" HEIGHT="23"></p>
  113. <p class="NoBreakBeforeAfter"><img src="../wy_trip_images/HeaderOtherDestination.gif" width="229" height="28"></p>
  114. <p class="Indented1" align="center"><font size="6" color="#3357b3"><b> 旅游解决方案查询</b></font></p>
  115. <p class="Indented1" align="center">&nbsp;</p>
  116. <table width="95%"  border="0" align="center" cellpadding="0" cellspacing="0">
  117.               <tr>
  118.                 <th colspan="2" scope="col">名称</th>
  119.                 <th width="14%" scope="col">类型</th>
  120.                 <th width="10%" scope="col">地点</th>
  121.                 <th width="10%" scope="col">费用</th>
  122.                 <th width="19%" scope="col">说明</th>
  123.                 <th width="21%" scope="col">更新时间</th>
  124.               </tr>
  125.               <tr>
  126.                 <td colspan="7"><hr color="#999999" width="100%"></td>
  127.               </tr>
  128.   <%
  129.       if(showl=0 or showl=1)then
  130.      sqlstr=sqlstr1
  131.                      solad1=0
  132.   set rst=server.createobject("adodb.recordset")
  133.   rst.open sqlstr,conn,1,1
  134.  
  135.  
  136.   if not (rst.eof or rst.bof) then
  137.                       do while(not rst.eof)
  138.     solid1=rst("id")
  139.     solname1=rst("solname")
  140. soladdress1=rst("soladdress")
  141. soltype1=rst("soltype")
  142. solabode1=rst("solabode")
  143. solmoney1=rst("solmoney")
  144. solnote1=rst("solnote")
  145. soltime1=rst("soltime")
  146.   %>
  147.               <tr onmouseover=this.style.backgroundColor="#cccccc";return  onmouseout=this.style.backgroundColor=''; true;>
  148.                 <td width="5%" ><div align="left">&nbsp;</div></td>
  149.                 <td width="21%" ><div align="left">&nbsp;国内:&nbsp;&nbsp;&nbsp;&nbsp;<%=solname1%></div></td>
  150.                 <td><div align="center"><%=soltype1%></div></td>
  151.                 <td><div align="center"><%=soladdress1%></div></td>
  152.                 <td><div align="center"><%=solmoney1%></div></td>
  153.                 <td><div align="center"><a href="wy_trip_findshow.asp?inforid=<%=solid1%>&inforkind=<%=solad1%>&solname=<%=solname1%>"><font color="#0000FF">详细内容</font></a></div></td>
  154.                 <td><div align="center"><%=soltime1%></div></td>
  155.               </tr>
  156.   <tr>
  157.                 <th colspan="2" scope="col">&nbsp;</th>
  158.                 <th scope="col">&nbsp;</th>
  159.                 <th scope="col">&nbsp;</th>
  160.                 <th scope="col">&nbsp;</th>
  161.                 <th scope="col">&nbsp;</th>
  162.                 <th scope="col">&nbsp;</th>
  163.               </tr> 
  164.   <%
  165.                rst.movenext
  166.  loop
  167.     end if
  168. rst.close
  169. set rst=nothing
  170. end if    
  171.    %>
  172.    <tr>
  173.                 <th colspan="2" scope="col">&nbsp;</th>
  174.                 <th scope="col">&nbsp;</th>
  175.                 <th scope="col">&nbsp;</th>
  176.                 <th scope="col">&nbsp;</th>
  177.                 <th scope="col">&nbsp;</th>
  178.                 <th scope="col">&nbsp;</th>
  179.               </tr> 
  180.    <%
  181.        if(showl=0 or show=2)then
  182.         sqlstr=sqlstr2
  183. solad2=1
  184.   set rst=server.createobject("adodb.recordset")
  185.   rst.open sqlstr,conn,1,1
  186.  
  187.   if not (rst.eof or rst.bof) then
  188.                       do while(not rst.eof)
  189.     solid2=rst("id")
  190.     solname2=rst("solname")
  191. soladdress2=rst("soladdress")
  192. soltype2=rst("soltype")
  193. solabode2=rst("solabode")
  194. solmoney2=rst("solmoney")
  195. solnote2=rst("solnote")
  196. soltime2=rst("soltime")
  197.   %>
  198.               <tr onmouseover=this.style.backgroundColor="#cccccc";return  onmouseout=this.style.backgroundColor=''; true;>
  199.                 <td><div align="left"></div></td>
  200.                 <td>&nbsp;国外:&nbsp;&nbsp;&nbsp;&nbsp;<%=solname2%></td>
  201.                 <td><div align="center"><%=soltype2%></div></td>
  202.                 <td><div align="center"><%=soladdress2%></div></td>
  203.                 <td><div align="center"><%=solmoney2%></div></td>
  204.                 <td><div align="center"><a href="wy_trip_findshow.asp?inforid=<%=solid2%>&inforkind=<%=solad2%>&solname=<%=solname2%>"><font color="#0000FF">详细内容</font></a></div></td>
  205.                 <td><div align="center"><%=soltime2%></div></td>
  206.               </tr>
  207.   <tr>
  208.                 <th colspan="2" scope="col">&nbsp;</th>
  209.                 <th scope="col">&nbsp;</th>
  210.                 <th scope="col">&nbsp;</th>
  211.                 <th scope="col">&nbsp;</th>
  212.                 <th scope="col">&nbsp;</th>
  213.                 <th scope="col">&nbsp;</th>
  214.               </tr> 
  215.   <%
  216.                rst.movenext
  217.  loop
  218.     end if
  219. rst.close
  220. set rst=nothing
  221. end if
  222.   %>
  223.   <tr>
  224.                 <th colspan="2" scope="col">&nbsp;</th>
  225.                 <th scope="col">&nbsp;</th>
  226.                 <th scope="col">&nbsp;</th>
  227.                 <th scope="col">&nbsp;</th>
  228.                 <th scope="col">&nbsp;</th>
  229.                 <th scope="col">&nbsp;</th>
  230.               </tr>
  231.   
  232.   <tr>
  233.                 <th colspan="2" scope="col">&nbsp;</th>
  234.                 <th scope="col">&nbsp;</th>
  235.                 <th scope="col">&nbsp;</th>
  236.                 <th scope="col">&nbsp;</th>
  237.                 <th scope="col">&nbsp;</th>
  238.                 <th scope="col"><a href="wy_trip_find.asp">返回</a></th>
  239.               </tr>
  240.             </table>
  241. <p>&nbsp;</p></td>
  242. </tr>
  243. <tr>
  244.   <td bgcolor="#e8eefc">&nbsp;</td>
  245.   </tr>
  246. <tr>
  247.    <td bgcolor="#e8eefc">&nbsp;</td>
  248. </tr>
  249. </table>
  250. </body>
  251. </html>