?? checkkcindex.asp
字號(hào):
<%
path=request.ServerVariables("path_info")
set conn=server.CreateObject("adodb.connection")
set rs=server.CreateObject("adodb.recordset")
conn.open application("dsn")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<link href="../style.css" rel="stylesheet" type="text/css">
</head>
<body>
<%if request("hsub")="查詢" then
session("sel")=request("hsel")
session("tj")=request("htj")
session("qname")=request("hqname")
end if
%>
<%'查詢條件判斷'
if session("tj")="=" then
sql="select * from tab_kucun where "&session("sel")&" = '"&session("qname")&"'"
end if
if session("tj")="like" then
sql="select * from tab_kucun where "&session("sel")&" like '%"&session("qname")&"%'"
end if
if session("tj")="all" then
sql="select * from tab_kucun"
end if
if (session("tj")=">"and session("sel")="kcsl") then
sql="select * from tab_kucun where "&session("sel")&" > "&session("qname")&""
else if (session("tj")=">") then
sql="select * from tab_kucun where "&session("sel")&" > '"&session("qname")&"'"
end if
end if
if (session("tj")="<" and session("sel")="kcsl") then
sql="select * from tab_kucun where "&session("sel")&" < "&session("qname")&""
else if (session("tj")="<") then
sql="select * from tab_kucun where "&session("sel")&" < '"&session("qname")&"'"
end if
end if
rs.open sql,conn,1,3
%>
<%if rs.eof then
response.write "<div align=center><font color=red>對(duì)不起!暫時(shí)沒有您要找的數(shù)據(jù)!</font></div>"
response.end
end if%>
<%
'設(shè)置分頁(yè)'
rs.pagesize=3
page=clng(request("page"))
if page<1 then page=1
if page>rs.pagecount then page=rs.pagecount
show rs,page
%>
<%sub show(rs,page)%>
<%rs.absolutepage=page
for i=1 to rs.pagesize
total=total+rs("dj")*rs("kcsl")
%>
<table width="590" height="82" border=1 align="center" cellpadding=-1 cellspacing=0 bordercolor="#ffffff"
bordercolorlight="#9CA6C6" bordercolordark="#ffffff">
<tr bgcolor="#dddddd">
<td height="16" bgcolor="#D9ECFF"><font color="#336699">商品名稱:<%=rs("spname")%></font></td>
<td bgcolor="#D9ECFF"><font color="#336699">簡(jiǎn)稱:
<%=rs("jc")%>
</font></td>
<td bgcolor="#D9ECFF" width="185"><font color="#336699">產(chǎn)地:
<%=rs("cd")%>
</font></td>
</tr>
<tr bgcolor="#dddddd">
<td width="208" bgcolor="#D9ECFF" height="17"><font color="#336699">規(guī)格:
<%=rs("gg")%>
</font></td>
<td width="189" bgcolor="#D9ECFF" height="17"><font color="#336699">包裝:
<%=rs("bz")%>
</font></td>
<td bgcolor="#D9ECFF" width="185" height="17"><font color="#336699">單位:
<%=rs("dw")%>
</font></td>
</tr>
<tr bgcolor="#dddddd">
<td width="208" bgcolor="#D9ECFF"><font color="#336699">單價(jià):
<%=rs("dj")%>
</font></td>
<td width="189" bgcolor="#D9ECFF"><font color="#336699">庫(kù)存數(shù)量:
<%=rs("kcsl") %>
</font></td>
<td bgcolor="#D9ECFF" width="185"><font color="#336699">庫(kù)存金額:
<%=rs("dj")*rs("kcsl")%>
</font></td>
</tr>
</table>
<br>
<%rs.movenext
if rs.eof then exit for
next%>
<%end sub%>
</p>
<p align="center">
<form action="checkkcindex.asp" method="get">
<div align="center">
<% if page<>1 then%>
<font size="2"> <a href=<%=path%>?page=1>第一頁(yè)</a>
</font><a href=<%=path%>?page=<%=(page-1)%> >上一頁(yè)</a>
<%end if
if page<>rs.pagecount then%>
<a href=<%=path%>?page=<%=(page+1)%>>下一頁(yè)</a>
<a href=<%=path%>?page=<%=rs.pagecount%>>最后一頁(yè)</a>
<%end if%>
<font color="#336699">輸入頁(yè)次
<input type="text" name="page" size="3">
頁(yè)次 </font><font color=red><%=page%>/<%=rs.pagecount%></font> [ <a href="kcindex.asp">返回</a> ]</div>
</form>
<p></p>
</body>
</html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -