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

📄 default.asp

📁 一个适用于企业的客户电话咨询系统,可以与其它的相关企业管理系统进行整合!
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#INCLUDE FILE=conn.asp -->
<!--#INCLUDE FILE=const.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>
<TITLE><%=version%>--电话咨询</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<LINK href="include/site.css" rel=stylesheet type=text/css>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<TABLE WIDTH=739 BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0>
  <TR> 
    <TD COLSPAN=4> <IMG SRC="images/default_1.jpg" WIDTH=738 HEIGHT=57 ALT=""></TD>
    <TD width="1"> <IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=57 ALT=""></TD>
  </TR>
  <TR> 
    <TD width="28" height="226"> <IMG SRC="images/default_2.jpg" WIDTH=28 HEIGHT=226 ALT=""></TD>
    <TD COLSPAN=2 rowspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <!--DWLayoutTable-->
        <tr> 
          <td width="681" height="538" valign="top" bgcolor="F2F8FF">
		  <table width="100%" height="344" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
              <tr valign="middle" bgcolor="#f6f6f6"> 
                <td height="16" colspan="4" bgcolor="#f6f6f6"> <div align="center">
                    <!--#include file = topMenu.htm-->
                  </div></td>
              </tr>
              <tr bgcolor="#f6f6f6"> 
                <td height="60" colspan="4" bgcolor="F2F8FF" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';> 
                  <div align="center">::::::: <%=username%> ::::::: </div></td>
              </tr>
              <form action="default.asp" method=post name="myform">
                <tr bgcolor="#f6f6f6"> 
                  <td colspan="4" bgcolor="F2F8FF" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';> 
                    <div align="center"><strong>高级查询</strong> :                   </div></td>
                </tr>
                <tr bgcolor="#f6f6f6"> 
                  <td bgcolor="F2F8FF" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';> 
                    <p align="center">&nbsp;一级:<br>
                      <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>
                  </td>
                  <td bgcolor="F2F8FF" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';> 
                    <div align="center">二级:<br>
                      <select size=1 name="Class2" onchange="javascript:submit()">
                        <option value="">请选择查询条件</option>
                        <%
    set rs = server.createobject("adodb.recordset")
    rs.source = "select BigClassEN,BigClassCN from Bigclass where 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 then
	      response.Write "<option value="&rs("Name")&" selected>"&rs("Name")&"</option>"
       else
	      response.Write "<option value="&rs("Name")&">"&rs("Name")&"</option>"
	   end if
    rs.movenext
    wend
    rs.close
%>
                      </select>
                    </div></td>
                  <td bgcolor="F2F8FF" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';> 
                    <div align="center">三级:<br>
					
                      <select name="Class3" onchange="javascript:submit()">
                        <option value="">请选择查询条件</option>
                        <%
if request("Class2")="" or request("Class2")="0" then
'显示所有选现
    set rs = server.createobject("adodb.recordset")
    rs.source = "select BigClassCN from bigclass where Isfatherclass=false order by id desc "
    rs.open rs.source,conn,1,1
    if rs.recordcount=0 then
      response.write("你没有添加分类")
    end if
    while not rs.eof
        BigClassCN=rs("BigClassCN")
                response.write"<option value='' style=background-color:#a4cee4 >╋"&rs("BigClassCN")&"</option>"
        set rsSmallClass = server.createobject("adodb.recordset")
        rsSmallClass.source = "select * from SmallClass where BigClassCN='"&BigClassCN&"' and IsFatherClass=true"
        rsSmallClass.open rsSmallClass.source,conn,1,1
        while not rsSmallClass.eof
                response.write"<option value="&rsSmallClass("SmallClassCN")&">&nbsp;&nbsp;├"&rsSmallClass("SmallClassCN")&"</option>"
            rsSmallClass.movenext
        wend
		rsSmallClass.Close
		'显示姓名
        set rsSmallClass1 = server.createobject("adodb.recordset")
        rsSmallClass1.source = "select Name,SmallClassCN from telephone where BigClassCN='"&BigClassCN&"'"
        rsSmallClass1.open rsSmallClass1.source,conn,1,1
        while not rsSmallClass1.eof
		  if rsSmallClass1("Name")<>"" and rsSmallClass1("SmallClassCN")="" then
		    response.Write "<option value="&rsSmallClass1("Name")&">&nbsp;&nbsp;├"&rsSmallClass1("Name")&"</option>"
            rsSmallClass1.movenext
		  else
            rsSmallClass1.movenext
		  end if
        wend
		rsSmallClass1.Close
      rs.movenext
    wend
rs.close
set rs=nothing

⌨️ 快捷键说明

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