📄 search.asp
字号:
<!--#include file="conn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
sqltext="select * from hetongb where hetongid='"&request("keyword1")&"' and searchid='"&request("keyword2")&"' "
rs.open sqltext,conn,1,1
%>
<HTML><HEAD><TITLE>欢迎您光临房产信息网!</TITLE>
<script language=Javascript>
<!--
function checkForm(){
if ( document.formSignUp.keyword1.value == '' ) {
window.alert('请输入合同号!!');
document.formSignUp.keyword1.focus();
}
else if ( document.formSignUp.keyword2.value == '' ) {
window.alert('请输入查询码!!');
document.formSignUp.keyword2.focus();
}
else {
return true;
}
return false;
}
//-->
</script>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK
href="images/style.css" type=text/css rel=stylesheet>
<META content="Microsoft FrontPage 5.0" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#666666 leftMargin=0 topMargin=0 marginwidth="0"
marginheight="0">
<TABLE cellSpacing=0 cellPadding=0 width=778 align=center border=0>
<TBODY>
<TR>
<TD bgColor=#666666 height=5></TD></TR>
<TR>
<TD bgColor=#333333 height=1></TD></TR>
<TR>
<TD bgColor=#727272 height=1></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=778 align=center border=0 height="556">
<TBODY>
<TR>
<TD bgColor=#e4e4e4 colSpan=2 height="32">
<TABLE class=black cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<FORM action=search.asp method=post name="formSignUp" onSubmit="return checkForm()">
<TD vAlign=top align=middle width="95%">
<TABLE height=1 width="100%">
<TBODY>
<TR>
<TD></TD></TR></TBODY></TABLE><FONT class=p14> 查询备用表信息:</FONT> <FONT
class=p14>合同号:</FONT> <INPUT size=15 name=keyword1> <FONT
class=p14>查询码:</FONT> <INPUT size=9 name=keyword2> <INPUT style="FONT-SIZE: 9pt" type=submit value=查询 name=查询>
<TABLE height=1 width="100%">
<TBODY>
<TR>
<TD></TD></TR></TBODY></TABLE></TD></FORM></TR></TBODY></TABLE></TD></TR>
<TR>
<TD style="BORDER-RIGHT: #333333 1px solid" vAlign=top align=middle
width=168 background=images/leftbg.gif height="368">
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
<TBODY>
<TR>
<TD vAlign=top align=middle>
<TABLE cellSpacing=0 cellPadding=0 width=168 border=0>
<TBODY>
<TR>
<TD vAlign=top>
<IMG height=48 src="images/fzbt1.gif"
width=113></TD></TR>
<TR>
<TD vAlign=bottom align=middle bgColor=#d7d7d7 colSpan=3
height=1></TD></TR>
<TR>
<TD class=p14 align=middle height=10> </TD></TR>
<TR>
<TD class=p14>
<TABLE cellSpacing=0 cellPadding=0 width="80%" align=center
border=0>
<TBODY>
<TR><FORM language=javascript name=FORM1 action=logincheck.asp method=post>
<TD style="font-size:9pt" align=center >
<%if session("userlogin")="ok" then%>
欢迎您:<%=session("comname")%><br><br>
<a href=addinfo.asp>填写合同表单</a><br><a href=modifyinfo.asp>维护合同表单</a><br><br>
<a href=quit.asp>退出</a>
<%else%>
<p align="center">用户: <input name=userid type=text size=11 class=finput> <br>
密码:
<input name=userpwd type=password size=11 class=finput> <br>
<br>
<input name=Submit type=submit style="font-size:9pt" class=foxinput value=登录><input name=reset type=reset style="font-size:9pt" class=foxinput value=重置>
</p>
<p>
<%end if%>
</TD></form></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD align=middle>
<TABLE cellSpacing=0 cellPadding=0 width=168 border=0>
<TBODY>
<TR>
<TD class=p14 height=20></TD></TR>
</TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=168 border=0>
<TBODY>
<TR>
<TD class=p14 align=middle
height=10></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD>
<TD align=middle width=610 bgColor=#ffffff rowSpan=2 valign="top" height="523">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="98%" id="AutoNumber1">
<tr>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center
border=0>
<TBODY>
<TR>
<TD>
</TD></TR></TBODY></TABLE>
<br>
<%
dim MaxPerPage
MaxPerPage=8
'假如没有数据时
If rs.eof and rs.bof then
'call showpages
response.write "<p align='center'><font color='#ff0000'>还没有检索到具体信息</font></p>"
response.end
End if
if session("userid")<>rs("userid") then
Response.Write "<script language=JavaScript>{window.alert('您不能察看其他客户的资料!');window.history.go(-1);}</script>"
end if
'取得页数,并判断用户输入的是否数字类型的数据,如不是将以第一页显示
dim text,checkpage
text="0123456789"
Rs.PageSize=MaxPerPage
for i=1 to len(request("page"))
checkpage=instr(1,text,mid(request("page"),i,1))
if checkpage=0 then
exit for
end if
next
If checkpage<>0 then
If NOT IsEmpty(request("page")) Then
CurrentPage=Cint(request("page"))
If CurrentPage < 1 Then CurrentPage = 1
If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount
Else
CurrentPage= 1
End If
If not Rs.eof Then Rs.AbsolutePage = CurrentPage end if
Else
CurrentPage=1
End if
call list
'call showpages
If Rs.recordcount > MaxPerPage then
'call showpages
end if
%>
<%
'显示帖子的子程序
Sub list()
%>
<TABLE class=p14 borderColor=#333333 cellSpacing=0
borderColorDark=#ffffff cellPadding=0 width="100%" align=center
borderColorLight=#666666 border=1 height="46">
<TBODY>
<TR>
<TD class=p14 width="21%" bgColor=#f3f3f3 height=22>
<DIV align=center>项目名称</DIV></TD>
<TD class=p14 width="18%" bgColor=#f3f3f3 height=22>
<DIV align=center>合同编号</DIV></TD>
<TD class=p14 width="23%" bgColor=#f3f3f3 height=22>
<p align="center">提交日期</TD>
<TD class=p14 width="13%" bgColor=#f3f3f3 height=22>
<p align="center"><span lang="zh-cn">受买人</span></TD>
<TD class=p14 width="8%" bgColor=#f3f3f3 height=22>
<DIV align=center>修改</DIV></TD>
<TD class=p14 width="9%" bgColor=#f3f3f3 height=22>
<DIV align=center>删除</DIV></TD></TR>
<%
if not rs.eof then
i=0
do while not rs.eof
%> <TR>
<TD class=p14 align=middle width="21%" height="20"><A class=blue
href="infodetail.asp?id=<%=rs("id")%>"><%=rs("name")%></A> </TD>
<TD class=p14 align=middle width="18%" height="20"><%=rs("hetongid")%> </TD>
<TD class=p14 align=middle width="23%" height="20"><%=rs("dateandtime")%> </TD>
<TD class=p14 align=middle width="13%" height="20"><%=rs("shoumairen")%></TD>
<TD class=p14 align=middle width="8%" height="20"><%if datediff("h",rs("dateandtime"),now())<=1 then%><a href="modify.asp?id=<%=rs("id")%>"><%end if%>
<font color="#000080">修改</font></a></TD>
<TD class=p14 align=middle width="9%" height="20"><%if datediff("h",rs("dateandtime"),now())<=1 then%><a href="#" onclick="if (confirm('确实要将此条信息删除?')) window.location='del.asp?id=<%=rs("id")%>'"><%end if%>
<font color="#000080">删除</font></a></TD></TR>
<%
i=i+1
if i >= MaxPerpage then exit do
rs.movenext
loop
end if
%></TBODY></TABLE>
<%end sub%>
</TD>
</tr>
<tr>
<td width="100%"> </td>
</tr>
</table>
</TD></TR>
<TR>
<TD style="BORDER-RIGHT: #333333 1px solid" vAlign=bottom width=168
background=images/leftbg.gif height="155">
<IMG height=124
src="images/leftbk.gif" width=168></TD></TR>
<TR>
<TD vAlign=bottom align=middle bgColor=#333333 colSpan=3
height=1></TD></TR></TBODY></TABLE>
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -