gysquest.asp

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

ASP
146
字号
<%@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 rsgysinfo = Server.CreateObject("ADODB.Recordset")
'设置查询字符串
if session("varccif") = "LIKE" then 
sql ="SELECT gysname, jc, address, postcode, tel, fax, lxr, lxrtel, khyh, Email FROM"&_
" dbo.tab_supplier WHERE "& Replace(session("varcif"), "'", "''") & " " &_
Replace(session("varccif"), "'", "''")& "'%" & Replace(session("MMColParam"),"'", "''") & "%'"
else 
if session("varccif") = "ALL" then 
sql = "SELECT gysname, jc, address, postcode, tel, fax, lxr, lxrtel, khyh, Email  FROM"&_
" dbo.tab_supplier"
else
sql ="SELECT gysname, jc, address, postcode, tel, fax, lxr, lxrtel, khyh, Email  FROM"&_
" dbo.tab_supplier"&" WHERE "& Replace(session("varcif"), "'", "''") & " " &_
Replace(session("varccif"), "'", "''") &"'" & Replace(session("MMColParam"), "'", "''") & " '"
	end if
end if
rsgysinfo.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="gysname" selected>供应商全称</option>
                  <option value="jc">简称</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 rsgysinfo.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 colspan="2" bgcolor="#D9ECFF"><font color="#336699">供应商全称
				:<%=(rsgysinfo.Fields.Item("gysname").Value)%></font></td>
                <td bgcolor="#D9ECFF" width="185"><font color="#336699">简称:
				<%=(rsgysinfo.Fields.Item("jc").Value)%></font></td>
              </tr>
              <tr bgcolor="#dddddd"> 
                <td width="208" bgcolor="#D9ECFF" height="17"><font color="#336699">地址:
				<%=(rsgysinfo.Fields.Item("address").Value)%></font></td>
                <td width="189" bgcolor="#D9ECFF" height="17"><font color="#336699">邮政编码:
				<%=(rsgysinfo.Fields.Item("postcode").Value)%></font></td>
                <td bgcolor="#D9ECFF" width="185" height="17"><font color="#336699">电话:
				<%=(rsgysinfo.Fields.Item("tel").Value)%></font></td>
              </tr>
              <tr bgcolor="#dddddd"> 
                <td width="208" bgcolor="#D9ECFF"><font color="#336699">传真:
				<%=(rsgysinfo.Fields.Item("fax").Value)%></font></td>
                <td width="189" bgcolor="#D9ECFF"><font color="#336699">联系人:
				<%=(rsgysinfo.Fields.Item("lxr").Value)%></font></td>
                <td bgcolor="#D9ECFF" width="185"><font color="#336699">联系人电话:
				<%=(rsgysinfo.Fields.Item("lxrtel").Value)%></font></td>
              </tr>
              <tr bgcolor="#dddddd"> 
                <td bgcolor="#D9ECFF" colspan="2"><font color="#336699">E-Mail:
				<%=(rsgysinfo.Fields.Item("Email").Value)%></font></td>
                <td bgcolor="#D9ECFF" width="185"><font color="#336699">开户银行:
				<%=(rsgysinfo.Fields.Item("khyh").Value)%></font></td>
              </tr>
            </table>
              <% rsgysinfo.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 rsgysinfo.EOF Or Not rsgysinfo.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 + =
减小字号Ctrl + -
显示快捷键?