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

📄 querytelephone.asp

📁 一个适用于企业的客户电话咨询系统,可以与其它的相关企业管理系统进行整合!
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#INCLUDE FILE=conn.asp -->
<!--#INCLUDE FILE=const.asp -->
<!--#INCLUDE FILE=theme.asp -->
<%dim Class1,Class2,Class3,Class4
	Class1=request("Class1")
	Class2=request("Class2")
	Class3=request("Class3")
	Class4=request("Class4")
dim rs,rs1
dim sql,sql1
dim count
set rs=server.createobject("adodb.recordset")
set rs1=server.createobject("adodb.recordset")
sql = "select * from Bigclass where Isfatherclass=false order by id desc "
sql1 = "select BigClassCN1,Name from Telephone where BigClassCN='' and SmallClassCN='' and SmallClassCN1='' order by tel_ID desc "
rs.open sql,conn,1,1
rs1.open sql1,conn,1,1
'count是用来记录下拉菜单数量的。
%>
<script language = "JavaScript">
var onecount;
subcat = new Array();
        <%
        count = 0
        do while not rs.eof 
        %>
subcat[<%=count%>] = new Array("<%= trim(rs("BigClassCN"))%>","<%= trim(rs("FatherClass"))%>","<%= trim(rs("BigClassCN"))%>");
        <%
        count = count + 1
        rs.movenext
        loop
        rs.close
		do while not rs1.eof
		if rs1("Name")<>"" then
        %>
subcat[<%=count%>] = new Array("<%= trim(rs1("Name"))%>","<%= trim(rs1("BigClassCN1"))%>","<%= trim(rs1("Name"))%>");
        <%
        count = count + 1
		end if
        rs1.movenext
        loop
        rs1.close
        %>
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.myform.Class2.length = 1; 
    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.myform.Class2.options[document.myform.Class2.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
    }    
function loadForm()
{
  editor.HtmlEdit.document.body.innerHTML=document.myform.Content.value;
  return true
}
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=version%>--电话咨询</title>
<LINK href="include/site.css" rel=stylesheet type=text/css>
</head>
<body>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
  <tr bgcolor="#f6f6f6"> 
    <td colspan="2" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';> 
      <div align="center">
	  <br>:::::::<%=username%>:::::::<br><br>
      <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#FFFFFF">
       <tr align="center" valign="middle" bgcolor="#FFFFFF"> 
        <td height="34"><a href="javascript:history.go(-1)"><img src="images/back.gif" width="25" height="24" border="0"></a><a href="javascript:location.reload()"><img src="images/refurbish.gif" width="25" height="24" border="0"></a><a href="querytelephone.asp"><img src="images/homepage.gif" width="25" height="24" border="0"></a><a href="javascript:history.go(1)"><img src="images/forward.gif" width="25" height="24" border="0"></a></td>
       </tr>
      </table>
      </div></td>
  </tr>
  <form action="querytelephone.asp?action=highSearch" name="myform" method=post>
    <tr bgcolor="#f6f6f6">
      <td colspan="2" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';>&nbsp; 
        <div align="center"><font color="#0000FF">高级查询</font></div>
        <br></td>
    </tr>
    <tr bgcolor="#f6f6f6"> 
      <td colspan="2" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';>        <p>  一级&nbsp;:
        <select name="Class1" onChange="changelocation(document.myform.Class1.options[document.myform.Class1.selectedIndex].value)">
          <option value="">请选择查询条件</option>
          <%
    set rs = server.createobject("adodb.recordset")
    rs.source = "select BigClassCN,ID from bigclass  where Isfatherclass=true order by id desc "
    rs.open rs.source,conn,1,1
    while not rs.eof
	if rs("BigClassCN")=Class1 then
%>
          <option value="<%=rs("BigClassCN")%>" selected><%=rs("BigClassCN")%></option>
          <%else%>
          <option value="<%=rs("BigClassCN")%>"><%=rs("BigClassCN")%></option>
          <%
	 end if
    rs.movenext
    wend
    rs.close
	set rs=nothing
%>
        </select>          
        &nbsp;二级:&nbsp;
          <select size=1 name="Class2" onchange="javascript:submit()">
            <option value="">请选择查询条件</option>
            <%
    set rs = server.createobject("adodb.recordset")
    rs.source = "select BigClassCN from Bigclass where FatherClass='"&Class1&"' and BigClassCN='"&Class2&"' and Isfatherclass=false order by id desc "
    rs.open rs.source,conn,1,1
    while not rs.eof
	   if rs("BigClassCN")=Class2 then
	      response.Write "<option value="&rs("BigClassCN")&" selected>"&rs("BigClassCN")&"</option>"
       else
	      response.Write "<option value="&rs("BigClassCN")&">"&rs("BigClassCN")&"</option>"
	   end if
    rs.movenext
    wend
    rs.close
	'显示姓名
    rs.source = "select Name from telephone where BigClassCN1='"&Class1&"' and BigClassCN=''"
    rs.open rs.source,conn,1,1
    while not rs.eof
	   if rs("Name")=Class2 and rs("Name")<>"" then
	      response.Write "<option value="&rs("Name")&" selected>"&rs("Name")&"</option>"
       elseif rs("Name")<>"" then
	      response.Write "<option value="&rs("Name")&">"&rs("Name")&"</option>"
	   end if
    rs.movenext
    wend
    rs.close
%>
          </select>          
          &nbsp;&nbsp;</p>
        <p> 三级&nbsp;:
          <select name="Class3" onchange="javascript:submit()">
            <option value="">请选择查询条件</option>
            <%
if Class2<>"" then
 response.Write "<option value='' style=background-color:#a4cee4 >╋"&Class2&"</option>"
        set rsSmallClass = server.createobject("adodb.recordset")
        rsSmallClass.source = "select * from SmallClass where BigClassCN='"&Class2&"' and isFatherClass=true"
        rsSmallClass.open rsSmallClass.source,conn,1,1
        while not rsSmallClass.eof
		    if rsSmallClass("SmallClassCN")=Class3 then
			  FatherclassID=rsSmallClass("Fatherclass")
              response.Write "<option value="&rsSmallClass("SmallClassCN")&" selected>&nbsp;&nbsp;├"&rsSmallClass("SmallClassCN")&"</option>"
            else
              response.Write "<option value="&rsSmallClass("SmallClassCN")&">&nbsp;&nbsp;├"&rsSmallClass("SmallClassCN")&"</option>"
            end if
            rsSmallClass.movenext
        wend
        rsSmallClass.Close
		
		'显示姓名
        set rsSmallClass1 = server.createobject("adodb.recordset")
        rsSmallClass1.source = "select Name,SmallClassCN from telephone where BigClassCN='"&Class2&"'"
        rsSmallClass1.open rsSmallClass1.source,conn,1,1
        while not rsSmallClass1.eof
		  if rsSmallClass1("Name")<>"" and rsSmallClass1("SmallClassCN")="" then
		    if rsSmallClass1("Name")=Class3 then
			  FatherclassID=rsSmallClass("Fatherclass")
              response.Write "<option value="&rsSmallClass1("Name")&" selected>&nbsp;&nbsp;├"&rsSmallClass1("Name")&"</option>"
            else
              response.Write "<option value="&rsSmallClass1("Name")&">&nbsp;&nbsp;├"&rsSmallClass1("Name")&"</option>"
            end if
            rsSmallClass1.movenext
		  else
            rsSmallClass1.movenext
		  end if
        wend
		rsSmallClass1.Close
		
end if
%>
          </select>          

⌨️ 快捷键说明

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