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

📄 querytelephone.asp

📁 一个适用于企业的客户电话咨询系统,可以与其它的相关企业管理系统进行整合!
💻 ASP
📖 第 1 页 / 共 2 页
字号:
           四级:  
          <select name="Class4" onchange="javascript:submit()">
            <option value="">请选择查询条件</option>
            <%
		if Class3<>"" then response.Write "<option value='' style=background-color:#a4cee4 >╋"&Class3&"</option>"
		'只显示某三级类中的四级类和姓名
        set rsSmallClass = server.createobject("adodb.recordset")
        rsSmallClass.source = "select * from SmallClass where BigClassCN='"&Class2&"' and SmallClassCN='"&Class3&"'"
        rsSmallClass.open rsSmallClass.source,conn,1,1
        while not rsSmallClass.eof
		if rsSmallClass("isFatherclass")=false then
%>
            <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 BigClassCN1='"&Class1&"' and BigClassCN='"&Class2&"' and SmallClassCN='"&Class3&"'"
        rsSmallClass1.open rsSmallClass1.source,conn,1,1
        while not rsSmallClass1.eof
		  if rsSmallClass1("Name")<>"" then
		    if rsSmallClass1("Name")=Class4 then
              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
%>
          </select>
      </p></td>
    </tr>
  </form>
  <form action="querytelephone.asp?action=keySearch" method=post>
    <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>
          &nbsp; <font color="#0000FF">关键字咨询</font> (支持特征码) </div></td>
    </tr>
    <tr bgcolor="#f6f6f6"> 
      <td colspan="2" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><br>
        &nbsp; 二级条件:&nbsp; <input type="text" name="bigkey"> &nbsp;三级条件: 
        <input type="text" name="smallkey"> <br> </td>
    </tr>
    <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>
          <input type="submit" name="Submit2" value="搜索">
        </div></td>
    </tr>
  </form>
  <form action="querytelephone.asp?action=ZhiNengSearch" method=post>
    <tr bgcolor="#f6f6f6"> 
      <td colspan="2" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';>&nbsp; 
        <br>
        <img src="images/search.gif" width="18" height="18" alt="提示一下,我 能帮你 找到答案."> 
        <font color="#0000FF">智能搜索</font>: 
        <input type="text" name="ZhiNengSearch"> &nbsp;&nbsp; <input type="submit" name="Submit" value="咨询"> 
      </td>
    </tr>
  </form>
</table>
  <%
  bigkey=request("bigkey")
  smallkey=request("smallkey")
  zhinengkey=request("zhinengsearch")
  Quickcondition=request("action")
  if  Quickcondition="QuickSearch" then
    call QuickResult()
  elseif quickcondition="highSearch" then
    call advancedquery()
  elseif Quickcondition="ZhiNengSearch" then
    call zhinengsearch()
  elseif Quickcondition="keySearch" then
    call keysearch()
  else
     response.Write("<p align=center>请指定搜索条件!</p>")
 end if
'高级搜索===============================================
sub advancedquery()
%>
<%
response.Write"<p align=center>搜索:"&Class1&" + "&Class2&" + "
response.Write Class3&" + "&Class4&"</p>"
dim sql
        if Class1="" and Class2="" and  Class3="" and Class4="" then
		  response.Write("<p align='center'>请指定搜索条件</p>")
		elseif Class1="" and Class2<>"" and  Class3="" and Class4="" then
		  sql="select * from telephone where BigclassCN='"&Class2&"'"
		elseif Class1<>"" and Class2<>"" and  Class3="" and Class4="" then
		  sql="select * from telephone where (BigclassCN='"&Class2&"' and BigclassCN1='"&Class1&"') or (name='"&Class2&"' and BigclassCN1='"&Class1&"')"
		elseif Class1="" and Class2<>"" and  Class3<>"" and Class4="" then
		  sql="select * from telephone where (SmallclassCN='"&Class3&"' and BigclassCN='"&Class2&"') or (name='"&Class3&"' and BigclassCN='"&Class2&"')"
		elseif Class1<>"" and Class2<>"" and  Class3<>"" and Class4="" then
		  sql="select * from telephone where (name='"&Class3&"' and BigclassCN='"&Class2&"' and BigclassCN1='"&Class1&"') or (SmallclassCN='"&Class3&"' and BigclassCN='"&Class2&"' and BigclassCN1='"&Class1&"')"
		elseif Class1="" and Class2<>"" and  Class3<>"" and Class4<>"" then
		  sql="select * from telephone where (name='"&Class4&"' and SmallclassCN='"&Class3&"' and BigclassCN='"&Class2&"') or (SmallclassCN1='"&Class4&"' and SmallclassCN='"&Class3&"' and BigclassCN='"&Class2&"')"
		elseif Class1<>"" and Class2<>"" and  Class3<>"" and Class4<>"" then
		  sql="select * from telephone where (name='"&Class4&"' and SmallclassCN='"&Class3&"' and BigclassCN='"&Class2&"' and BigclassCN1='"&Class1&"') or (SmallclassCN1='"&Class4&"' and SmallclassCN='"&Class3&"' and BigclassCN='"&Class2&"' and BigclassCN1='"&Class1&"')"
		end if
		call SearchResult(sql)
end sub
'=================================================================
 sub keysearch()
       if smallkey="" and bigkey="" then
         response.write("<p align=center>请输入关键字!</p>")
		 response.end
		elseif smallkey="" and bigkey<>"" then
		  sql="select * from telephone where BigclassCN='"&bigkey&"' or BigclassEN='"&bigkey&"'"
		elseif smallkey<>"" and bigkey="" then
		  sql="select * from telephone where SmallclassCN='"&smallkey&"' or SmallclassEN='"&smallkey&"'"
		elseif smallkey<>"" and bigkey<>"" then
		  sql="select * from telephone where (SmallclassCN='"&smallkey&"' and BigclassCN='"&bigkey&"') or (SmallclassEN='"&smallkey&"' and BigclassEN='"&bigkey&"')"
		else
		  sql="select * from telephone"
		end if
        call SearchResult(sql)
end sub
'======================================================
sub zhinengsearch()
		if zhinengkey="" then 
		  response.write("<p align=center>什么都不说,怎么帮你找?</p>")
		  response.end()
		else
		  sql="select * from [telephone] where SmallclassCN like '%"&zhinengkey&"%' or BigclassCN like '%"&zhinengkey&"%' or name like '%"&zhinengkey&_
		  "%' or BigclassEN like '%"&zhinengkey&"%' or SmallclassEN like '%"&zhinengkey&"%' or nameEN like '%"&zhinengkey&"%' order by date desc"
	    end if
call SearchResult(sql)
end sub	
'搜索结果====================================================	
sub SearchResult(SearchSql)
        set rst = server.createobject("adodb.recordset")
        rst.open SearchSql,conn,1,1
%>
<br>
<table align="center" width="500">
  <tr align=center> 
    <td colspan="54" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';>搜索结果&nbsp;<br></td>
  </tr>
<%		
if rst.eof then
		response.write "<tr><td colspan='36' bgcolor='#f6f6f6' onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';>没有找到相关记录。</td></tr>"
else
	%>
<tr>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><B>一类</B></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><B>二类</B></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><B>三类</B></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><B>四类</B></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><B><font color="#FF0000">&nbsp;值班电话&nbsp;</font></B></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><B>姓名</B></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><B>办公电话</B></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><B>详细信息</B></td>
</tr>
<%
 while not rst.eof
%>
<tr>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><%=rst("BigClassCN1")%></a></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><%=rst("BigClassCN")%></a></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><%=rst("SmallClassCN")%></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><%=rst("SmallClassCN1")%></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><div align="center"><a href="AddFavouriate.asp?action=AddTelephone&Tel_number=<%=rst("OfficeNumber")%>&keyword=<%=rst("keyword")%>&bigclasscn1=<%=rst("bigclasscn1")%>&bigclasscn=<%=rst("bigclasscn")%>&smallclasscn=<%=rst("smallclasscn")%>&explain=<%=rst("content")%>" title="点击加入书签"><%=rst("OfficeNumber")%></a></div></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><%=rst("name")%></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><a href="AddFavouriate.asp?action=AddTelephone&Tel_number=<%=rst("Tel_number")%>&keyword=<%=rst("keyword")%>&bigclasscn1=<%=rst("bigclasscn1")%>&bigclasscn=<%=rst("bigclasscn")%>&smallclasscn=<%=rst("smallclasscn")%>&explain=<%=rst("content")%>&Name=<%=rst("Name")%>&HomeNumber=<%=rst("HomeNumber")%>&Mobile=<%=rst("Mobile")%>&ZipCode=<%=rst("ZipCode")%>&Address=<%=rst("Address")%>" title="点击加入书签"><%=rst("Tel_number")%></a></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><a href="result.asp?action=detail&dworkplace=<%=rst("SmallClassCN")%>&dOfficeNumber=<%=rst("OfficeNumber")%>&dname=<%=rst("name")%>&dnameEN=<%=rst("nameEN")%>&dofficetel=<%=rst("tel_number")%>&dhometel=<%=rst("HomeNumber")%>&dmobile=<%=rst("Mobile")%>&dzipcode=<%=rst("Zipcode")%>&daddress=<%=rst("Address")%>&dwork=<%=rst("keyword")%>">点击查看</a></td>
</tr>
<%
		rst.movenext
	wend
		%>
</table>
<% 
end if
end sub
%>

</body>
</html>

⌨️ 快捷键说明

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