📄 searchzhcount.asp
字号:
<!--#include file="conn.asp"-->
<%
dim action,lx_hao_name,se_hao_name,rs_sx,i_x
action = request("action")
i_x =0
%>
<html>
<head>
<title>综合统计</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../images/css2.css" rel="stylesheet" type="text/css">
<SCRIPT LANGUAGE="JavaScript">
<!--
function checksearch()
{
if(checkspace(document.searchzhcount.se_hao_name.value)==1) {
document.searchzhcount.se_hao_name.focus();
alert("查询的关键字不能为空!");
return false;
}
}
function checkspace(checkstr)
{
var str = '';
for(i = 0; i < checkstr.length; i++) {
str = str + ' ';
}
return (str == checkstr);
}
//-->
</script>
</head>
<table width="90%" height="450" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#ece9d8"><br><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td>
<table width=77 border="0" cellpadding="0" cellspacing="0">
<tr valign=bottom>
<td background=images/get_img.gif width=77 height=26><P style='PADDING-LEFT: 7px'><div align="center"><font color=#ffffff>综合查询</font></div></td>
</tr>
</table>
<table width="98%" border="1" cellspacing="0" cellpadding="0" bordercolordark="#ffffff" bordercolorlight="#666666">
<tr><td><table width="100%" border="1" cellspacing="0" cellpadding="0"><tr><td>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<form name="searchzhcount" method="post" action="searchzhcount.asp?action=list_search" >
<tr height=25>
<td width="15%" align="right">查询类型 <td width="10%" align="right">
<select name="lx_hao_name" id="lx_hao_name">
<option value="1" selected>按书名</option>
<option value="2" >按书号</option>
</select> </td>
<td width="25%" align="center"><input type="text" name="se_hao_name" id="se_hao_name" size=25>
<td align="center"><input type="submit" name="Submit" class="bt3" value="查 询" onClick="return checksearch();">
<td align="center"><input type="button" name="Submit4" class="bt3" value="打 印" onclick="javascript:window.print()">
</tr>
</form>
</table>
<%select case action
case ""%>
<tr><td height=300 valign="top">
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#666666">
<tr>
<td width="6%" bgcolor="#ece9d8"><div align="center">序号</div></td>
<td bgcolor="#ece9d8"> 商品名称</td>
<td bgcolor="#ece9d8"><div align="center">采购数</div></td>
<td bgcolor="#ece9d8"><div align="center">销售数</div></td>
<td bgcolor="#ece9d8"><div align="center">退书数</div></td>
<td bgcolor="#ece9d8"><div align="center">库存数</div></td>
<td bgcolor="#ece9d8"><div align="center">采购日期</div></td>
<td bgcolor="#ece9d8"><div align="center">供货商</div></td>
</tr>
<tr>
<td width="6%" bgcolor="#ffffff" height=22></tr>
<td bgcolor="#ffffff"></td>
<td bgcolor="#ffffff"></td>
<td bgcolor="#ffffff"></td>
<td bgcolor="#ffffff"></td>
<td bgcolor="#ffffff"></td>
<td bgcolor="#ffffff"></td>
<td bgcolor="#ffffff"></td>
</tr>
</table>
<%
case "list_search"
lx_hao_name = trim(request("lx_hao_name"))
se_hao_name = trim(request("se_hao_name"))
set rs_sx=server.CreateObject("adodb.recordset")
if lx_hao_name="1" then
rs_sx.open "select shop_books.bookname,shop_books.isbn, shop_cgaction.cgcount, shop_cgaction.cgsy, shop_cgaction.cgdate, shop_cgaction.xscount, shop_cgaction.tscount, shop_cgaction.kccount, shop_gongyi.gyname FROM (shop_cgaction INNER JOIN shop_books ON shop_cgaction.bookid = shop_books.bookid) INNER JOIN shop_gongyi ON shop_cgaction.gyid = shop_gongyi.gyid WHERE shop_books.bookname like '%"&se_hao_name&"%' ",conn,1,1
else
rs_sx.open "select shop_books.bookname,shop_books.isbn, shop_cgaction.cgcount, shop_cgaction.cgsy, shop_cgaction.cgdate, shop_cgaction.xscount, shop_cgaction.tscount, shop_cgaction.kccount, shop_gongyi.gyname FROM (shop_cgaction INNER JOIN shop_books ON shop_cgaction.bookid = shop_books.bookid) INNER JOIN shop_gongyi ON shop_cgaction.gyid = shop_gongyi.gyid WHERE shop_books.isbn='"&se_hao_name&"' ",conn,1,1
end if
%>
<tr><td height=300 valign="top">
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#666666">
<tr>
<td width="6%" bgcolor="#ece9d8"><div align="center">序号</div></td>
<td bgcolor="#ece9d8"> 商品名称</td>
<td bgcolor="#ece9d8"><div align="center">采购数</div></td>
<td bgcolor="#ece9d8"><div align="center">销售数</div></td>
<td bgcolor="#ece9d8"><div align="center">退书数</div></td>
<td bgcolor="#ece9d8"><div align="center">库存数</div></td>
<td bgcolor="#ece9d8"><div align="center">采购日期</div></td>
<td bgcolor="#ece9d8"><div align="center">供货商</div></td>
</tr>
<% if rs_sx.bof and rs_sx.eof then
response.write "<tr><td colspan=8 align=center bgcolor=#ffffff><div align=center><font color=blue>没有你要查询的记录!</font></td></tr>"
else
'//初值
Page = rs_sx.AbsolutePage
rs_sx.PageSize=15
'//变化值
if Not IsEmpty(Request("Page")) then
Page = CInt(Request("Page"))
'//变化值情况分析
if Page > rs_sx.PageCount then
rs_sx.AbsolutePage = rs_sx.PageCount
elseif Page <= 0 then
Page = 1
else
rs_sx.AbsolutePage = Page
end if
else
Page = 1
end if
do while not rs_sx.eof
if i_x>= rs_sx.PageSize then Exit do
%>
<tr>
<td bgcolor="#ffffff"><div align="center"><%=rs_sx.bookmark%></div></td>
<td bgcolor="#ffffff" STYLE='PADDING-LEFT: 5px'><%=rs_sx("bookname")%></td>
<td bgcolor="#ffffff"><div align="center"><font color=dodgerblue><%=rs_sx("cgcount")%></font></div></td>
<td bgcolor="#ffffff"><div align="center"><font color=green><%=rs_sx("xscount")%></font></div></td>
<td bgcolor="#ffffff"><div align="center"><font color=red> <%=rs_sx("tscount")%></font></div></td>
<td bgcolor="#ffffff"><div align="center"><font color=brown><%=rs_sx("kccount")%></font></div></td>
<td bgcolor="#ffffff"><div align="center"><font color=#003366><%=rs_sx("cgdate")%></font></div></td>
<td bgcolor="#ffffff"><div align="center"><font color=blue><%=rs_sx("gyname")%></font></div></td>
<%
rs_sx.MoveNext
i_x = i_x+1
loop
end if
%>
<tr>
<td colspan=8 bgcolor="#ece9d8" height=40><div align="center">共<font color=blue><%=rs_sx.recordcount%></font>条<font color=blue><%=rs_sx.pagecount%></font>页
<%if request("page")>1 then%>
<a Href="searchzhcount.asp?action=list_search&lx_hao_name=<%=lx_hao_name%>&se_hao_name=<%=se_hao_name%>&Page=<%=1%>">首页</a> <a Href="searchzhcount.asp?action=list_search&lx_hao_name=<%=lx_hao_name%>&se_hao_name=<%=se_hao_name%>&Page=<%=page-1%>">上一页</a>
<%end if %>
<%if request("page")<>rs_sx.pagecount and page<rs_sx.pagecount then %>
<a Href="searchzhcount.asp?action=list_search&lx_hao_name=<%=lx_hao_name%>&se_hao_name=<%=se_hao_name%>&Page=<% =page + 1%>">下一页</a> <a Href="searchzhcount.asp?action=list_search&lx_hao_name=<%=lx_hao_name%>&se_hao_name=<%=se_hao_name%>&Page=<%=rs_sx.PageCount%>">尾页</a>
<%end if
if rs_sx.pagecount>0 then %>
第<font color="#FF3300"><%=page%></font>页
<%end if%></font></div></td>
</tr>
</table>
<br>
<%end select%>
</tr>
</table>
</tr>
</table>
</tr>
</table>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -