⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 khquest.asp

📁 《网上商品交易系统》 开发及测试环境 操作系统:Windows 2000 Server 后台数据库:SQL Server 2000 Web服务器:IIS 5.0  《网上商品交易系统》
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/sell.asp" -->
<%
'设置查询条件
if Request("cif")<>"" and Request("ccif")<>"" and Request("qvalue")<>"" then
session("MMColParam") = ""
if (Request("qvalue")   <> "") then session("MMColParam") = Request("qvalue")  
session("varcif")= ""
if (Request("cif") <> "") then session("varcif") = Request("cif")  
session("varccif") = "ALL"
if (Request("ccif") <> "") then session("varccif") = Request("ccif") 
else
session("varccif") = "ALL"
end if
%>
<%
'创建Recordset对象实例
set rskhinfo = Server.CreateObject("ADODB.Recordset")
'设置查询字符串
if session("varccif") = "LIKE" then 
sql ="SELECT khname, khjc, address, postcode, tel, fax, lxr, lxrtel, Email, khyh, yhzh"&_
" FROM dbo.tab_customer WHERE "& Replace(session("varcif"), "'", "''") & " " &_
Replace(session("varccif"), "'", "''") & "'%" & Replace(session("MMColParam"), "'", "''") & "%'"
else 
if session("varccif") = "ALL" then 
sql = "SELECT khname, khjc, address, postcode, tel, fax, lxr, lxrtel, Email, khyh, yhzh"&_
" FROM dbo.tab_customer"
else
sql ="SELECT khname, khjc, address, postcode, tel, fax, lxr, lxrtel, Email, khyh, yhzh"&_
" FROM dbo.tab_customer  WHERE "& Replace(session("varcif"), "'", "''") & " " &_
 Replace(session("varccif"), "'", "''") &"'" & Replace(session("MMColParam"), "'", "''") & " '"
	end if
end if
rskhinfo.open sql,conn,3,3
%>

<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">
<script language="JavaScript">
function listall()
{form1.ccif.value = "ALL";
form1.submit();
}
</script>
<table width="590" border="0" cellspacing="-2" cellpadding="-2" height="311">
  <tr> 
    <td height="40"> 
      <h2 style="filter:glow(color=#ccccff,strength=5);height:1pt"align="center">
	  <font size="2" color=#000099> 
        客户信息查询</font></h2>
    </td>
  </tr>
  <tr> 
    <td valign="top"> 
      <table width="590" border="0" cellspacing="-2" cellpadding="-2" height="247">
        <tr> 
          <td width="590" height="28"> 
            <form name="form1" method="post" action="">
              <div align="center">请选择查询条件: 
                <select name="cif">
                  <option value="khname" selected>客户名称</option>
                  <option value="khjc">简称</option>
                </select>
                <select name="ccif">
                  <option value="=" selected>等于</option>
                  <option value="LIKE">LIKE</option>
                  <option value="ALL">ALL</option>
                </select>
                <input type="text" name="qvalue">
                <input type="submit" name="Submit" value="查询">
                <input type="button" name="Submit2" value="显示全部数据" onclick="listall()">
              </div>
            </form>
          </td>
        </tr>
        <tr> 
          <td height="78"> 
            <% total=0
			While NOT rskhinfo.EOF
			%>
            <table width="590" border="0" cellspacing="-2" cellpadding="-2">
              <tr> 
                <td>&nbsp;</td>
              </tr>
            </table>
            <table width="590" border=1 bordercolor=#ffffff bordercolordark=#ffffff 
                  bordercolorlight=#0099ff cellpadding=-1 cellspacing=0 height="54" align="center">
              <tr bgcolor="#dddddd"> 
                <td width="202" bgcolor="#D9ECFF"><font color="#336699">客户全称
				</font><font color="#336699">:<%=rskhinfo("khname")%></font></td>
                <td width="135" bgcolor="#D9ECFF"><font color="#336699">简称:
				<%=rskhinfo("khjc")%></font></td>
                <td bgcolor="#D9ECFF" width="245"><font color="#336699">地址:
				<%=rskhinfo("address")%></font></td>
              </tr>
              <tr bgcolor="#dddddd"> 
                <td width="202" bgcolor="#D9ECFF" height="17"><font color="#336699">邮政编码:
				<%=rskhinfo("postcode")%></font></td>
                <td width="135" bgcolor="#D9ECFF" height="17"><font color="#336699">电话:
				<%=rskhinfo("tel")%></font></td>
                <td bgcolor="#D9ECFF" width="245" height="17"><font color="#336699">传真:
				<%=rskhinfo("fax")%></font></td>
              </tr>
              <tr bgcolor="#dddddd"> 
                <td width="202" bgcolor="#D9ECFF"><font color="#336699">联系人电话:
				<%=rskhinfo("lxrtel")%></font></td>
                <td width="135" bgcolor="#D9ECFF"><font color="#336699">联系人:
				<%=rskhinfo("lxr")%></font></td>
                <td bgcolor="#D9ECFF" width="245"><font color="#336699">开户银行:
				<%=rskhinfo("khyh")%></font></td>
              </tr>
              <tr bgcolor="#dddddd"> 
                <td width="202" bgcolor="#D9ECFF"><font color="#336699">银行帐号:
				<%=rskhinfo("yhzh")%></font></td>
                <td colspan="2" bgcolor="#D9ECFF"><font color="#336699">E-Mail:
				<%=rskhinfo("Email")%></font></td>
              </tr>
            </table>
			<% rskhinfo.MoveNext()
			total=total+1
			Wend %>
            <table width="590" border="0" cellspacing="-2" cellpadding="-2">
              <tr> 
                <td width="197">&nbsp; </td>
                <td width="393">&nbsp; 
                  <div align="right"> 
                    <% If Not rskhinfo.EOF Or Not rskhinfo.BOF Then %>
                    <font color="#00CCFF">共 <%=(total)%> 条客户信息</font> 
                    <% End If %>
                  </div>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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