search_newhouse.asp
来自「<1> 优化了部分代码及一些BUG.提高了浏览速度 <2&」· ASP 代码 · 共 285 行
ASP
285 行
<!--#include file=system/include/config.asp-->
<!--#include file=conn_newhouse.asp-->
<!--#include file=system/include/function.asp-->
<%
dim search,search_qy,search_house_name,search_kfs,search_jg_min,search_jg_max
search_qy=request("search_qy")
search_house_name=request("house_name")
search_kfs=request("kfs")
search_jg_min=trim(request("search_jg_min"))
search_jg_max=trim(request("search_jg_max"))
search=""
if request("search_qy")<>"" then
search=search & "and qy='" & request("search_qy") & "'"
end if
if request("house_name")<>"" then
search=search & " and house_name='" & request("search_lx") & "'"
end if
if request("kfs")<>"" then
search=search & " and kfs='" & request("search_hx") & "'"
end if
if search_jg_min<>"" then
search=search & " and int(jun_pay)>=int('" & search_jg_min & "')"
end if
if search_jg_max<>"" then
search=search & " and int(jun_pay)<=int('" & search_jg_max & "')"
end if
%>
<html>
<head>
<title><%=title%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<script language="JavaScript" src="share/nei_fc.js"></script>
<script language="JavaScript">
<!--
function checklogin()
{
if (document.form1.username.value=="")
{
alert("请输入用户名!");
form1.username.focus();
return false;
}
if (document.form1.password.value=="")
{
alert("请输入密码!");
form1.password.focus();
return false;
}
return true;
}
//-->
</script>
<style> body{ scrollbar-face-color:fd9035; scrollbar-shadow-color:ffffff; scrollbar-highlight-color:ffffff; scrollbar-3dlight-color:ffffff; scrollbar-darkshadow-color:ffffff; scrollbar-track-color:ffefd7; scrollbar-arrow-color:ffffff;}
.topkuan { border-color: #000000 black black; border-style: solid; border-top-width: 3px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px}
</style>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
<!--#include file="share/top.htm"-->
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top" background="images/index_r2_c1.jpg"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="778" height="89">
<param name="movie" value="images/top.swf">
<param name=WMODE value=Transparent>
<param name="quality" value="high">
<embed src="images/top.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="778" height="89"></embed></object></td>
</tr>
</table>
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center" class="topkuan">
<tr>
<td background="images/newhouse_r2_c1.gif" width="2" height="151" align="left" valign="top"><img src="images/newhouse_r2_c1.gif" width="2" height="3"></td>
<td height="151" align="left" valign="top" width="603">
<table width="603" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#fffbec" width="613" class="font" height="26"> 当前位置:
<a href="index.asp" class="ffbyfont">首页</a> >> 楼盘展示</td>
</tr>
<tr>
<td background="images/newhouse_r5_c2.gif" align="left" valign="top" height="2" width="613"><img src="images/newhouse_r5_c2.gif" width="3" height="3"></td>
</tr>
<tr>
<td height="29" align="center" valign="middle" bgcolor="#ffefad" width="613" class="font">您
好 , 以 下 是 您 所 查 询 的 记 录</td>
</tr>
<tr>
<td height="2" align="left" valign="top" background="images/newhouse_r5_c2.gif" width="613"><img src="images/newhouse_r5_c2.gif" width="3" height="3"></td>
</tr>
</table>
<table width="603" border="0" cellpadding="0" cellspacing="0">
<form name="form4" method="post">
<%
dim strSql,rs,i,PageNo
if request("search_qy")="" and request("house_name")="" and request("kfs")="" and trim(request("search_jg_min"))="" and trim(request("search_jg_max"))="" then
strSql="select * from [house_new] where house_name<>'' order by id desc"
else
strSql="select * from [house_new] where house_name<>'' " & search & "order by id desc"
end if
set rs=Server.CreateObject("ADODB.RecordSet")
rs.open strSql,conn,3,3
rs.PageSize=25
PageNo=request("PageNo")
if PageNo<1 or not isnumeric(PageNo) then
PageNo=1
end if
if cint(PageNo)>rs.PageCount then
PageNo=rs.PageCount
end if
%>
<tr align="center" valign="middle" bgcolor="#F0F0F0">
<td width="159" height="21" class="font">[楼盘名称]</td>
<td width="124" height="25" class="font" bgcolor="#F0F0F0">均价(元/㎡)</td>
<td width="75" height="21" class="font">[区域]</td>
<td width="240" height="21" class="font">[售楼热线]</td>
</tr>
<%
dim yy
if rs.recordcount>0 then
rs.AbsolutePage =PageNo
for i=1 to rs.pageSize
if i/2=int(i/2) then
yy="#ffffff"
else
yy="#fff9e1"
end if
%>
<tr align="center" valign="middle" bgcolor="<%=yy%>" onMouseOver="mOvr(this,'#FFECD9');" onMouseOut="mOut(this,'<%=yy%>');">
<%if rs.eof then
response.write ("<td height=21></td>")
response.write ("<td height=21></td>")
response.write ("<td height=21></td>")
response.write ("<td></td>")
else%>
<td height="21" class="font" width="159" ><a href="sub_newhouse.asp?id=<%=rs("id")%>" target="_blank" class="linkfont"><font color="#FF6600"><%=rs("house_name")%></font></a></td>
<td height="21" width="124" class="font"><%=rs("jun_pay")%></td>
<td height="21" class="font" width="75" ><%=rs("qy")%></td>
<td height="21" class="font" width="240" ><%=rs("sell_tel")%></td>
<%end if%>
</tr>
<%
if not rs.eof then
rs.movenext
end if
next
%>
<tr align="right" valign="middle" bgcolor="#FFE7CE">
<td height="28" class="font" colspan="6" >
<%
out("<font color=#929292>当前页次:</font><font color=red>" & PageNo & "/" & rs.pagecount & "</font> ")
out("<font color=#929292>共</font><font color=red>" & rs.pagecount & "</font><font color=#929292>页</font> ")
out("<font color=#929292>共</font><font color=red>" & rs.recordcount & "</font><font color=#929292>条记录</font> ")
out("<font color=#929292>每页显示</font><font color=red>" & rs.pagesize & "</font><font color=#929292>条</font> ")
out("<a href=""newhouse.asp?PageNo=1"" class=""menu1"">[首页]</a> ")
out("<a href=""newhouse.asp?PageNo=" & (PageNo-1) & """ class=""menu1"">[上一页]</a> ")
out("<a href=""newhouse.asp?PageNo=" & (PageNo+1) & """ class=""menu1"">[下一页]</a> ")
out("<a href=""newhouse.asp?PageNo=" & rs.pagecount & """ class=""menu1"">[尾页]</a> ")
dim pag
%>
<select name="jump" class="textinput" onChange="javascript:window.open('newhouse.asp?pageno='+this.options[this.selectedIndex].value,'_self')">
<% for pag=1 to rs.pagecount
if int(pageno)=pag then %>
<option value=<%=pageno%> selected><%=pageno%></option>
<%else%>
<option value="<%=pag%>"><%=pag%></option>
<%
end if
next %>
</select>
</td>
</tr>
<% else %>
<tr>
<td colspan="6">
<div align="center" class="font">没有数据!</div>
</td>
</tr>
<%
end if
rs.close
set rs=nothing
%>
</form>
</table>
</td>
<td height="151" align="center" valign="top" background="images/newhouse_r2_c4.gif">
<table width="173" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="bottom" height="29" width="173"><img src="images/newhouse_r10_c5.gif" width="160" height="19"></td>
</tr>
</table>
<% if session("adminlogin") <> "ok" then %>
<br>
<table width="154" border="0" cellspacing="0" cellpadding="0">
<form action="checklogin.asp" method=post name="form1" onSubmit="return checklogin()">
<tr valign="middle">
<td width="58" height="32" align="right" class="font"><font color="#FF6600">用户名:</font></td>
<td width="96">
<input type="text" name="username" size="10" class="textinput">
</td>
</tr>
<tr valign="middle">
<td width="58" align="right" class="font"><font color="#FF6600">密 码:</font></td>
<td width="96">
<input type="password" name="password" size="10" class="textinput">
</td>
</tr>
<tr align="center" valign="middle">
<td height="46" colspan="2">
<input name="imageField" type="image" src="images/login.gif" width="35" height="18" border="0">
<a href="reg1.asp"><img src="images/reg.gif" width="62" height="18" border="0"></a>
</td>
</tr>
</form>
</table>
<% else %>
<br>
<table width="154" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="14" height="92"> </td>
<td width="124" bgcolor="#FFFFFF" class="xu_kuan" align="left" valign="middle"><span class="font"> 您好!<font color=red><%=session("user_name")%></font><br>
欢迎来到本站...</span><br>
<a href="member.asp" class="ffbyfont">[进入控制面板]</a><br>
<a href="logout.asp" target="_parent"><img src="images/logout.gif" width="62" height="18" border="0"></a>
</td>
<td width="16" class="font"> </td>
</tr>
</table>
<br>
<% end if %>
<br>
<img src="images/newhouse_r4_c5.gif" width="160" height="20"><br>
<table width="159" border="0" cellspacing="0" cellpadding="0" align="center">
<form name="form2" method="post" action="search_newhouse.asp">
<tr>
<td align="left" valign="middle" width="159" height="30"><font color="#FF6600" class="font">区 域:</font>
<select name="search_qy" style="FONT-SIZE: 9pt; WIDTH: 90px; FONT-FAMILY: 宋体; HEIGHT: 22px" >
<option value="" selected>-内容不限-</option>
<option value="鼓楼区">鼓楼区</option>
<option value="台江区">台江区</option>
<option value="晋安区">晋安区</option>
<option value="马尾区">马尾区</option>
<option value="仓山区">仓山区</option>
<option value="八县">八县</option>
</select>
<font color="#0066CC"> </font></td>
</tr>
<tr>
<td align="left" valign="middle" width="159" height="30"> <font color="#FF6600" class="font">价 格:</font>
<input name="search_jg_min" type="text" style="FONT-SIZE: 9pt; WIDTH: 25px; FONT-FAMILY: 宋体; HEIGHT: 22px" size="1">
<span class="font">~</span>
<input name="search_jg_max" type="text" style="FONT-SIZE: 9pt; WIDTH: 25px; FONT-FAMILY: 宋体; HEIGHT: 22px" size="1">
<span class="font">元</span><font color="#0066CC"> </font></td>
</tr>
<tr>
<td align="left" valign="middle" width="159" height="30"><font color="#FF6600" class="font">楼 盘:</font>
<input name="house_name" type="text" style="FONT-SIZE: 9pt; WIDTH: 80px; FONT-FAMILY: 宋体; HEIGHT: 22px" size="20">
</td>
</tr>
<tr>
<td align="left" valign="middle" width="159" height="30"><font color="#FF6600" class="font">开发商:</font>
<input name="kfs" type="text" style="FONT-SIZE: 9pt; WIDTH: 80px; FONT-FAMILY: 宋体; HEIGHT: 22px" size="20">
</td>
</tr>
<tr>
<td align="center" valign="middle" width="159" height="32">
<input name="imageField32" type="image" src="images/search.gif" width="60" height="23" border="0">
</td>
</tr>
</form>
</table>
<br>
<img src="images/newhouse_r8_c5.gif" width="160" height="19"><br>
<br>
</td>
</tr>
</table>
<!--#include file="share/foot.htm"-->
</body>
</html>
<!--#include file=system/include/foot.asp-->
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?