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

📄 result.asp

📁 一个适用于企业的客户电话咨询系统,可以与其它的相关企业管理系统进行整合!
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file=conn.asp-->
<!--#include file=const.asp-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=version%>--咨询结果</title>
</head>
<body>
<script language=javascript>
function ContentSize(size)
{
	var obj=document.all.ContentBody;
	obj.style.fontSize=size+"px";
}
</script>

<table border="0" cellspacing="1" cellpadding="0" align="center">
  <tr bgcolor="<%=tabletitlecolor%>"> 
    <td colspan="3" width="100%" height="25">
	<!--#include file = topMenu.htm--></td>
  </tr>
</table>
<%dim sql
  dim action
  dim smallkey,bigkey
  dim Class1,Class2,Class3,Class4
  dim zhinengkey

  action=request("action")
  smallkey=request("smallkey")
  bigkey=request("bigkey")
  zhinengkey=request("zhinengkey")
  Class1=request("Class1") '一类
  Class2=request("Class2") '二类或姓名
  Class3=request("Class3") '三类或姓名
  Class4=request("Class4") '四类或姓名

if action="highSearch" then
    call advancedquery()
  elseif action="keySearch" then
    call keysearchresault()
  elseif action="zhinengSearch" then
    call zhinengsearch()
  elseif action="detail" then
    call detail()
  else
     response.Write("请指定搜索条件!")
 end if
'=================================================
 sub keysearchresault()
 response.Write"<p align=center>搜索:"&bigkey&"+"&smallkey
       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 listresault()
end sub

'=================================================
sub advancedquery()
response.Write"<p align=center>搜索:"&Class1&"+"&Class2&"+"&Class3&"+"&Class4
        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 BigclassCN1='"&Class1&"'"
		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 listresault()
end sub
'=================================================
sub zhinengsearch()
		if zhinengkey="" then 
		  response.write("<p align=center>什么都不说,怎么帮你找?</p>")
		  response.end()
		else
		response.Write"<p align=center>搜索:"&zhinengkey
		  sql="select * from [telephone] where BigclassCN like '%"&zhinengkey&"%' or BigclassEN like '%"&zhinengkey&"%' or SmallclassCN like '%"&zhinengkey&"%' or SmallclassEN like '%"&zhinengkey&"%' or SmallclassCN1 like '%"&zhinengkey&"%' or SmallclassEN1 like '%"&zhinengkey&"%' or name like '%"&zhinengkey&"%' or nameEN like '%"&zhinengkey&"%' order by date desc"
	    end if
call listresault()
end sub
'=================================================
'显示搜索结果
'=================================================
sub listresault()
set rst = server.createobject("adodb.recordset")
rst.open sql,conn,1,1
if rst.eof then
   response.write "<p align=center>没有找到相关记录。</p>"
else
response.Write "<table cellpadding=0 cellspacing=0 border=0 width=750 bgcolor="&TableborderColor&" align=center class=content id=ContentBody style='PADDING-RIGHT: 10px; DISPLAY: block; PADDING-LEFT: 10px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px'>"
%>
<tr align=center>
    <td height="25" colspan="54" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';>搜索结果</td>
</tr>
<tr align=center>
    <td height="25" colspan="54" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';>
	【 字体:<a href="javascript:ContentSize(16)">大</a> <a href="javascript:ContentSize(14)">中</a> <a href="javascript:ContentSize(12)">小</a> 】</td>
</tr>
<tr align=center>
  <td height="25" colspan="54" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><hr size="1"></td>
</tr>
<tr align=center>
 <td height="25" colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><div align="left"><%response.Write "<B>一级</B>"%></div></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><div align="left"><%response.Write "<B>二级</B>"%></div></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><div align="left"><%response.Write "<B>三级</B>"%></div></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><div align="left"><%response.Write "<B>四级</B>"%></div></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><div align="left"><%response.Write "<B><font color='#FF0000'>值班电话</font></B>"%></div></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><div align="left"><%response.Write "<B>姓名</B>"%></div></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><div align="left"><%response.Write "<B>办公电话</B>"%></div></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><div align="left"><%response.Write "<B>手机</B>"%></div></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><div align="left"><%response.Write "<B>详细信息</B>"%></div></td>
</tr>
<tr align=center>
  <td height="25" colspan="54" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><hr size="1"></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';><%response.Write rst("BigClassCN1")%></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><%response.Write rst("BigClassCN")%></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><%response.Write rst("SmallClassCN")%></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><%response.Write rst("SmallClassCN1")%></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><%response.Write rst("OfficeNumber")%></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><%response.Write rst("name")%></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><%response.Write rst("Tel_Number")%></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><%response.Write rst("Mobile")%></td>
 <td colspan="6" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><%response.Write "<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>
<tr align=center>
  <td height="25" colspan="54" bgcolor="#f6f6f6" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand';><hr size="1"></td>
</tr>
<%
  rst.movenext
  wend
response.Write "</table>"
end if
end sub
'---------------------
sub detail()
dim dname,dnameEN,dwork,dofficetel,dhometel,dmobile,dzipcode,daddress
dim dworkplace,dOfficeNumber
dname=trim(request.QueryString("dname"))
dnameEN=trim(request.QueryString("dnameEN"))
dwork=trim(request.QueryString("dwork"))
dofficetel=trim(request.QueryString("dofficetel"))
dhometel=trim(request.QueryString("dhometel"))
dmobile=trim(request.QueryString("dmobile"))
dzipcode=trim(request.QueryString("dzipcode"))
daddress=trim(request.QueryString("daddress"))
dworkplace=trim(request.QueryString("dworkplace"))
dOfficeNumber=trim(request.QueryString("dOfficeNumber"))

if dname<>"" then 
%>
<br>
<p align="center">详细信息</p>
<table align="center" width="250" border="1">
  <tr>
    <td>姓名:<font color="#FF0000"><%=dname%></font></td>
  </tr>
  <tr>
    <td>姓名特征码:<%=dnameEN%></td>
  </tr>
  <tr>
    <td>职务:<%=dwork%></td>
  </tr>
  <tr>
    <td>办公室电话:<%=dofficetel%></td>
  </tr>
  <tr>
    <td>住宅电话:<%=dhometel%></td>
  </tr>
  <tr>
    <td>手机:<%=dmobile%></td>
  </tr>
  <tr>
    <td>地址:<%=daddress%></td>
  </tr>
  <tr>
    <td>邮政编码:<%=dzipcode%></td>
  </tr>
</table>
<%
else 
%>
<br>
<p align="center">详细信息</p>
<table align="center" width="250" border="1">
  <tr>
    <td>单位:<font color="#FF0000"><%=dworkplace%></font></td>
  </tr>
  <tr>
    <td>值班电话:<%=dOfficeNumber%></td>
  </tr>
</table>
<%
end if
end sub
%>
</body>
</html>

⌨️ 快捷键说明

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