<!--#include file="main.asp"-->
<%word=request("word")
key=request("key")
ypxxone_id=request("ypxxone_id")
ypxxtwo_id=request("ypxxtwo_id")
addone_id=request("addone_id")
addtwo_id=request("addtwo_id")
if ypxxone_id<>"" then
xxsort=" and dlxf_ypxxone_id="&ypxxone_id&""
if ypxxtwo_id<>"" then
xxsort=xxsort&" and dlxf_ypxxtwo_id="&ypxxtwo_id&""
end if
end if
if addone_id<>"" then
addsort=" and dlxf_addone_id="&addone_id&""
if addtwo_id<>"" then
addsort=addsort&" and dlxf_addtwo_id="&addtwo_id&""
end if
end if
'==================================
if word="" or key="" then
response.redirect"search.asp"
end if%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>企业搜索 - <%=citytitle%></title>
</head>

<%search%>
<table width="100%" border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td valign=top>
<!--结果-->
<table width="600" border="0" cellspacing="0" cellpadding="10">
<%sql= "select * from dlxf_yp where dlxf_key<>0 and dlxf_key<>2 and dlxf_key<>4 and dlxf_key1=1 and(dlxf_coname like'%"&word&"%' or dlxf_cojc like'%"&word&"%' or dlxf_coms like'%"&word&"%') "&xxsort&addsort&" order by dlxf_id desc"
set rs=server.createobject("adodb.recordset")                     
rs.open sql,conn,1,1                     
if rs.eof and rs.bof then                     
	response.write "<tr><td height=50>没有找到能和“<font color=red>"&word&"</font>”匹配的内容，请尝试其它搜索。</td></tr>"
else  
'分页的实现 
listnum=10
Rs.pagesize=listnum
page=Request("page")
if (page-Rs.pagecount) > 0 then
page=Rs.pagecount
elseif page = "" or page < 1 then
page = 1
end if
Rs.absolutepage=page
'编号的实现
j=rs.recordcount
j=j-(page-1)*listnum
i=0
do while not rs.eof and i<listnum
goname=rs("dlxf_user")
goid=rs("dlxf_id")
'====================
dlxf_coname=replace(rs("dlxf_coname"),word,"<font color=red>"&word&"</font>")
aaa=trim(rs("dlxf_coms"))
if instr(aaa,word) then
a=len(aaa)
b=instr(aaa,word)
if b<50 then c=left(aaa,b) else c="..."&mid(aaa,b-50,50)
if a-(b+len(word))<50 then d=right(aaa,a-(b+len(word))) else d=mid(aaa,b,50)&"..."
dlxf_coms=c&d
else
dlxf_coms=Trim(left(aaa,100))&"..."
end if
dlxf_coms=replace(dlxf_coms,word,"<font color=red>"&word&"</font>")
'====================
%>
<!--#include file="dns/dns.asp"-->
<tr>
 <td height=30><p style="line-height:200%"><a href="<%=usertwourl%>" target="_blank" class=blue><font face="宋体" size=2px><strong><%=dlxf_coname%></strong></font></a> <font color=#999999>(<%=rs("dlxf_date")%>)</font>
<br>　　<font face="宋体" size=2px><%=dlxf_coms%></font></td>
</tr>
<%rs.movenext 
i=i+1 
j=j-1
loop%>
<tr>
<%filename="search_"&key&".asp?word="&word&"&key="&key&"&ypxxone_id="&ypxxone_id&"&ypxxtwo_id="&ypxxtwo_id&"&addone_id="&addone_id&"&addtwo_id="&addtwo_id&""%>
<td align=right><font class=f14><%=page%>/<%=Rs.pagecount%> 页 
<% if page=1 then %><%else%>
<a href=<%=filename%> class=blue>|<<</a> 
<a href=<%=filename%>&page=<%=page-1%> class=blue><<</a> 
<a href=<%=filename%>&page=<%=page-1%> class=blue>[<%=page-1%>]</a> 
<%end if%><% if Rs.pagecount=1 then %><%else%>[<%=page%>]<%end if%>
<% if Rs.pagecount-page <> 0 then %>
<a href=<%=filename%>&page=<%=page+1%> class=blue>[<%=page+1%>]</a> 
<a href=<%=filename%>&page=<%=page+1%> class=blue>>></a> 
<a href=<%=filename%>&page=<%=Rs.pagecount%> class=blue>>>|</a> 
<%end if%>&nbsp;&nbsp;</font></td>
<%end if%></tr>
</table>
<!--结果-->
	</td>
    <td valign=top>
<!--竞价-->
<%Call CpcView200%><br><br><br>
<!--竞价-->
	</td>
  </tr>
</table>
<!--====== bottom ========-->
<table width="760" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor=#ffffff>
<tr><td height=2 bgcolor=#4795EC></td></tr>
  <tr>
    <td align="center" height=80><%=citybottom%></td>
  </tr>
</table>
</body>
</html>