xsbrowse.asp

来自「《网上商品交易系统》 开发及测试环境 操作系统:Windows 2000 」· ASP 代码 · 共 144 行

ASP
144
字号
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/sell.asp" -->
<%
if request.Form("ccif")<>"" then
session("MMColParam") = ""
if (Request("qvalue") <> "") then session("MMColParam") = Request("qvalue")   
if (Request("cif") <> "") then  session("varcif") = Request("cif")  
session("varccif") = "ALL"
if (Request("ccif") <> "") then  session("varccif") = Request("ccif")  
if (Request("andor") <> "") then  session("varandor") = Request("andor") 
if (Request("sdate") <> "") then  session("varsdate") = Request("sdate") 
if (Request("edate") <> "") then  session("varedate") = Request("edate")
else
	if session("varccif")="" then
	session("varccif")="ALL"
	end if
end if
set rsxsinfo = Server.CreateObject("ADODB.Recordset")
if  session("varccif") = "LIKE" then
	sql = "SELECT *  FROM dbo.tab_sell  WHERE " + Replace(session("varcif"), "'", "''") +_
	 " " + Replace(session("varccif"), "'", "''") + "  '%" + Replace(session("MMColParam"), "'", "''") +_
	  "%' " + Replace(session("varandor"), "'", "''") + " xsdate BETWEEN '" +_
	   Replace(session("varsdate"), "'", "''") + "' AND '" + Replace(session("varedate"), "'", "''") + "'"
else
	if  session("varccif") = "ALL" then
		sql = "SELECT *  FROM dbo.tab_sell"
	else
		sql = "SELECT *  FROM dbo.tab_sell  WHERE " + Replace(session("varcif"), "'", "''") +_
		 " " + Replace(session("varccif"), "'", "''") + "  '" + Replace(session("MMColParam"), "'", "''") +_
		  "' " + Replace(session("varandor"), "'", "''") + " xsdate BETWEEN '" +_
		   Replace(session("varsdate"), "'", "''") + "' AND '" + Replace(session("varedate"), "'", "''") + "'"
	end if
end if
rsxsinfo.open sql,conn,1,3
%>
<%
if (Request("hbz")="1") then message
sub message()
if rsxsinfo.eof then  Response.Write "<script language=""" & "javascript""" &_
"> alert(""" & "无符合条件的记录!""" & ");history.back(); </script>"
end sub%>
<html>
<head>
<title>网上商品交易系统--商品销售查询!</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style.css" rel="stylesheet">
</head>
<body bgcolor="#FFFFFF" text="#000000" background="../../images/bg.gif">
<table width="590" border="0" cellspacing="-2" cellpadding="-2" height="134">
  <tr> 
    <td valign="top"> 
      <table width="590" border="0" cellspacing="-2" cellpadding="-2" height="124">
	<%'分页'
	total=0
	rsxsinfo.pagesize=3
	page=CLng(Request("page"))
	if page<1 then page=1
		rsxsinfo.absolutepage=page
		for i=1 to rsxsinfo.pagesize %>
        <tr> 
          <td height="10" colspan="2" valign="top"> 
          </td>
        </tr>
        <tr> 
          <td width="590"> 
            <table width="590" border=1 bordercolor=#ffffff bordercolordark=#ffffff 
                  bordercolorlight=#0099ff cellpadding=-1 cellspacing=0 height="54" align="center">
              <tr bgcolor="#dddddd"> 
                <td width="165" bgcolor="#D9ECFF"><font color="#336699">销售票号:
				<%=rsxsinfo("ID")%></font></td>
                <td width="186" bgcolor="#D9ECFF"><font color="#336699">商品编号:
				<%=rsxsinfo("spid")%></font></td>
                <td bgcolor="#D9ECFF" width="231"><font color="#336699">商品名称:
				<%=rsxsinfo("spname")%></font></td>
              </tr>
              <tr bgcolor="#dddddd"> 
                <td width="165" bgcolor="#D9ECFF" height="19"><font color="#336699">简称:
				<%=rsxsinfo("jc")%></font></td>
                <td width="186" bgcolor="#D9ECFF" height="19"><font color="#336699">产地:
				<%=rsxsinfo("cd")%></font></td>
                <td bgcolor="#D9ECFF" width="231" height="19"><font color="#336699">规格:
				<%=rsxsinfo("gg")%></font></td>
              </tr>
              <tr bgcolor="#dddddd"> 
                <td width="165" bgcolor="#D9ECFF"><font color="#336699">包装:
				<%=rsxsinfo("bz")%></font></td>
                <td width="186" bgcolor="#D9ECFF"><font color="#336699">单价:
				<%=rsxsinfo("dj")%></font></td>
                <td bgcolor="#D9ECFF" width="231"><font color="#336699">数量
				<%=rsxsinfo("sl")%></font></td>
              </tr>
              <tr bgcolor="#dddddd"> 
                <td width="165" bgcolor="#D9ECFF"><font color="#336699">金额:
				<%=rsxsinfo("je")%></font></td>
                <td width="186" bgcolor="#D9ECFF"><font color="#336699">客户全称
				:<%=rsxsinfo("khname")%></font></td>
                <td bgcolor="#D9ECFF" width="231"><font color="#336699">销售日期:
				<%=rsxsinfo("xsdate")%></font></td>
              </tr>
              <tr bgcolor="#dddddd"> 
                <td width="165" bgcolor="#D9ECFF"><font color="#336699">操作员:
				<%=rsxsinfo("czy")%></font></td>
                <td bgcolor="#D9ECFF"><font color="#336699">经手人:
				<%=rsxsinfo("jsr")%></font></td>
                <td bgcolor="#D9ECFF"><font color="#336699">结算方式:
				<%=rsxsinfo("jsfs")%></font></td>
              </tr>
            </table>
          </td>
        </tr>
        <%rsxsinfo.movenext
		total=total+1
		if rsxsinfo.eof then exit for 
		next %>
        <tr> 
          <td> 
            <table width="590" border="0" cellspacing="-2" cellpadding="-2">
              <tr> 
                <td width="197"> 
        <% if page<>1 then %><a href=<%=path%>?page=1 class="l">第一页</a>
			<a href=<%=path%>?page=<%=(page-1)%> class="l">上一页</a> 
		<%end if 
		if page<>rsxsinfo.pagecount then %>
   			<a href=<%=path%>?page=<%=(page+1)%> class="l">下一页</a> 
			<a href=<%=path%>?page=<%=rsxsinfo.pagecount%> class="l">最后一页</a> 
		<%end if %>
                </td>
                <td width="393">&nbsp;<div align="right"> 
                    <% If Not rsxsinfo.EOF Or Not rsxsinfo.BOF Then '显记录导航信息%>
                    <font color="#00CCFF">从 <%=(page-1)*3+1%> 到 <%=(page-1)*3+total%> 共
					 <%=rsxsinfo.recordcount%></font> <font color="#00CCFF">条记录</font> 
                    <% End If %>
                  </div>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?