📄 ru_query.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="include/const.asp"-->
<!--#include file="include/char.asp"-->
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script><LINK href="include/STYLE.CSS" rel=stylesheet><style type="text/css">
<!--
.bor {
border: 1px solid #009900;
}
-->
</style>
<style type="text/css">
<!--
.14 {
font-family: "宋体";
font-size: 14px;
line-height: 25px;
}
-->
</style><style type="text/css">
<!--
.lb {
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: solid;
border-top-color: #009900;
border-right-color: #009900;
border-bottom-color: #009900;
border-left-color: #009900;
}
-->
</style><body bgcolor="#d9d9ff">
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000" class="bor">
<tr>
<td width="25">
<div align="center"><img src="images/computer.gif" width="20" height="20"></div></td>
<td width="141" class="lb"><div align="center" class="14">设备编号</div></td>
<td width="128" class="lb"><div align="center" class="14"><font style=line-height:150%>设备名称</font></div></td>
<td width="128" class="lb"><div align="center" class="14">设备型号</div></td>
<td width="249" class="lb"><div align="center" class="14">设备信息</div></td>
<td width="87" height="30" class="lb"><font color=green> </font></td>
</tr>
</table>
<%
dim keyword,action,rs,sql,i,totalPut,currentpage,Nclassname
keyword=trim(request("keyword"))
action=trim(request("action"))
if action="" then
response.Write "请输入查询条件!"
end if
set rs=server.createobject("adodb.recordset")
sql="select * from product where "&action&" like '%"&keyword&"%' "
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'>没有您查找的信息</p>"
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showContent
showpage totalput,MaxPerPage,"ru_query.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,"ru_query.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"ru_query.asp"
end if
end if
rs.close
end if
response.write "查询条件:<font color=red>"&keyword&"</font> "
sub showContent
dim i ,content
i=0
do while not rs.eof
%>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000" class="bor">
<tr>
<td width="25">
<div align="center"><img src="images/computer.gif" width="20" height="20"></div></td>
<td width="141" class="lb"><div align="center"><font style=line-height:150%><font style=line-height:150%><%=rs("sbbh")%></font></font></div></td>
<td width="128" class="lb"><div align="center"><font style=line-height:150%><font style=line-height:150%><%=rs("sbmc")%> </font> </font></div></td>
<td width="128" class="lb"><div align="center"><font style=line-height:150%><font style=line-height:150%><%=rs("xh")%></font></font></div></td>
<td width="249" class="lb"><div align="center"><font style=line-height:150%><font style=line-height:150%><%=rs("bz")%></font></font></div></td>
<td width="87" height="30" class="lb"><font color=green><a href=# onclick="MM_openBrWindow('productview.asp?id=<%=rs("productid")%>','','width=600,height=400')"><img src="images/1.gif" width="78" height="18" border="0"></a> </font></td>
</tr>
</table>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
end sub
function showpage(totalnumber,maxperpage,filename)
dim n, i
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write "<form method=Post action="&filename&"?classid="&request("classid")&"&Nclassid="&request("Nclassid")&">"
response.write "<font color='red'>"&Nclassname&"</font>"
if CurrentPage<2 then
response.write "共"&totalnumber&"篇 首页 上一页 "
else
response.write "共"&totalnumber&"篇 <a href="&filename&"?page=1&classid="&request("classid")&"&Nclassid="&request("Nclassid")&">首页</a> "
response.write "<a href="&filename&"?page="&CurrentPage-1&"&classid="&request("classid")&"&Nclassid="&request("Nclassid")&">上一页</a> "
end if
if n-currentpage<1 then
response.write "下一页 尾页"
else
response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&action="&request("action")&"&keyword="&request("keyword")&" >"
response.write "下一页</a> <a href="&filename&"?page="&n&"&classid="&request("classid")&"&Nclassid="&request("Nclassid")&">尾页</a>"
end if
response.write " 页次:<strong><font color=red>"&CurrentPage&"</font>/"&n&"</strong>页 "
response.write " <b>"&maxperpage&"</b>篇设备/页 "
%>
转到:
<select name='page' size='1' class="smallinput" onchange='javascript:submit()'>
<%for i = 1 to n%>
<option value='<%=i%>' <%if cint(CurrentPage)=cint(i) then%> selected <%end if%>>第<%=i%>页</option>
<%next%>
</select> <p></p>
<%
end function
%>
<%
'xh 型号
'flbh分类编号
'bz实验室
'sbmc设备名称
%>
<%
%></body >
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -