<%
'------------------判断奇偶
function Is_odd(num)
n=num mod 2 
if n=1 then 
Is_odd=true 
else 
Is_odd=false 
end if 
end function 

'---------------------------------企业显示标签
function dlxf_User_View(ListCount,PagesCount,WordCount,UserGrade,UserKey,LogoView,One_ID,Two_ID,TradeOne_ID,TradeTwo_ID,UserExplain,PagesView,ByDesc,ViewDate,ViewHtc,PageName)

if ListCount<>0 then LC=" top "&ListCount&" "
if UserGrade<>0 then UG=" and dlxf_vip="&UserGrade&""
if UserKey<>0 then UK=" and dlxf_key=3"
if One_ID<>0 then OI=" and dlxf_addone_id="&One_ID&""
if Two_ID<>0 then TI=" and dlxf_addtwo_id="&Two_ID&""
if TradeOne_ID<>0 then TOI=" and dlxf_ypxxone_id="&TradeOne_ID&""
if TradeTwo_ID<>0 then TTI=" and dlxf_ypxxtwo_id="&TradeTwo_ID&""
Select Case ByDesc
  Case 0
    BD="dlxf_Id"
  Case 1
    BD="dlxf_Htc"
  Case 2
    BD="dlxf_Vip,dlxf_id"
  Case 3
    BD="dlxf_key,dlxf_id"
End Select

response.write "<table width=""100%"" border=0 cellspacing=0 cellpadding=3>"

set Srs=server.createobject("adodb.recordset")                     
Ssql="select "&LC&"* from dlxf_yp where dlxf_key<>0 and dlxf_key<>2 and dlxf_key<>4 and dlxf_key1=1"&UG&UK&OI&TI&TOI&TTI&" order by "&BD&" desc"
Srs.open Ssql,conn,1,1                     
if Srs.eof and Srs.bof then                     
	response.write "<tr><td height=50>没有内容</td></tr>"
else  
SRs.pagesize=PagesCount
page=Request("page")
if (page-SRs.pagecount) > 0 then
page=SRs.pagecount
elseif page = "" or page < 1 then
page = 1
end if
SRs.absolutepage=page
j=Srs.recordcount
j=j-(page-1)*PagesCount
i=0
do while not Srs.eof and i<PagesCount

if WordCount<>0 then User_Title=LeftT(Trim(Srs("dlxf_coname")),WordCount) else User_Title=Trim(Srs("dlxf_coname"))

if ViewDate<>0 then VD="Date:"&year(Srs("dlxf_date"))&"-"&month(Srs("dlxf_date"))&"-"&day(Srs("dlxf_date"))
if ViewHtc<>0 then VH=" Htc:"&Srs("dlxf_htc")

if VD<>"" or VH<>"" then VDH="　["&VD&VH&"]"

GoName=Srs("dlxf_user")
GoID=Srs("dlxf_id")
if dnskey=1 then
if dnswww=1 then usertwourl="http://www."&GoName&citydns else usertwourl="http://"&GoName&citydns
else
usertwourl=cityurl&"co.asp?id="&GoID
end if

if LogoView=1 then
if Srs("dlxf_logo")<>"" then
CoLogo=application("cityurl")&Srs("dlxf_logo")
else
CoLogo=application("cityurl")&"img/yplogo.gif"
end if
if UserExplain<>0 then LVrow=" rowspan=2"
LV="<td height=100 width=170"&LVrow&" align=center><a href="&usertwourl&" target=_blank><img src="&CoLogo&" height=90 width=162 style=""border:1px #666666 solid""></a></td>"
end if

UT="·<a href="&usertwourl&" target=_blank>"&User_Title&"</a>"

if Srs("dlxf_vip")=2 then
SVIP=" <img src="&CityUrl&"img/vip.gif title=VIP会员>"
end if

if UserExplain<>0 then
TopLine="<tr><td background="&CityUrl&"img/search_line.gif colspan=2></td></tr>"
if Srs("dlxf_coms")<>"" then UE=LeftT(Trim(Srs("dlxf_coms")),UserExplain) else UE=User_Title
UE="<tr><td height=70><p style=""line-height:180%"">&nbsp;　 "&UE&"</td></tr>"
TitBC=" bgcolor=#efefef"
FontClass=" class=f14"
UT="<strong><font color=#ff6600>>></font></strong> <a href="&usertwourl&" target=_blank class=f14><strong>"&User_Title&"</strong></a>"

User_view=TopLine&"<tr>"&LV&"<td height=30"&TitBC&">"&UT&SVIP&VDH&"</td></tr>"&UE
else
User_view="<tr>"&LV&"</tr><tr><td>"&UT&SVIP&VDH&"</td></tr>"
end if

response.write User_view

Srs.movenext 
i=i+1 
j=j-1
loop

if PagesView=1 then '分页开始
filename=PageName&"?id="&id
response.write "<tr><td align=right colspan=2 height=30 bgcolor=#efefef style=""border-top:1px #999999 solid""><strong><font color=red>"&page&"</font>/"&Srs.pagecount&"页"
if page > 1 then
response.write " <a href="&CityUrl&filename&">首页</a> <a href="&CityUrl&filename&"&page="&page-1&">上一页</a>"
end if
if Srs.pagecount-page > 0 then
response.write " <a href="&CityUrl&filename&"&page="&page+1&">下一页</a> <a href="&CityUrl&filename&"&page="&Srs.pagecount&">末页</a>" 
end if
response.write "</strong>&nbsp;&nbsp;</td></tr>"
end if '完成

Srs=close
set Srs=nothing

end if

response.write "</table>"
end function
'---------------------------------企业显示标签 end

'------------------批发市场显示
function dlxf_bz_View(ListCount,PagesCount,WordCount,UserGrade,UserKey,LogoView,One_ID,Two_ID,TradeOne_ID,TradeTwo_ID,UserExplain,PagesView,ByDesc,ViewDate,ViewHtc,PageName)

if ListCount<>0 then LC=" top "&ListCount&" "
if UserGrade<>0 then UG=" and dlxf_vip="&UserGrade&""
if UserKey<>0 then UK=" and dlxf_key=3"
if One_ID<>0 then OI=" and dlxf_addone_id="&One_ID&""
if Two_ID<>0 then TI=" and dlxf_addtwo_id="&Two_ID&""
if TradeOne_ID<>0 then TOI=" and dlxf_bazarone_id="&TradeOne_ID&""
if TradeTwo_ID<>0 then TTI=" and dlxf_bazartwo_id="&TradeTwo_ID&""
Select Case ByDesc
  Case 0
    BD="dlxf_Id"
  Case 1
    BD="dlxf_Htc"
  Case 2
    BD="dlxf_Vip,dlxf_id"
  Case 3
    BD="dlxf_key,dlxf_id"
End Select

response.write "<table width=""100%"" border=0 cellspacing=1 cellpadding=3 ><tr><td height=""30"" bgcolor=""#E1E1E1"" align=""center""><b>公司/信息</b></td><td height=""30"" bgcolor=""#E1E1E1"" align=""center""><b>公司/信息</b></td><td height=""30"" bgcolor=""#E1E1E1"" align=""center""><b>公司/信息</b></td></tr>"

set Srs=server.createobject("adodb.recordset")                     
Ssql="select "&LC&"* from dlxf_yp where dlxf_key<>0 and dlxf_key<>2 and dlxf_key<>4 and dlxf_key1=1"&UG&UK&OI&TI&TOI&TTI&" order by "&BD&" desc"
Srs.open Ssql,conn,1,1                     
if Srs.eof and Srs.bof then                     
	response.write "<tr><td height=50>没有内容</td></tr>"
else  
SRs.pagesize=PagesCount
page=Request("page")
if (page-SRs.pagecount) > 0 then
page=SRs.pagecount
elseif page = "" or page < 1 then
page = 1
end if
SRs.absolutepage=page
j=Srs.recordcount
j=j-(page-1)*PagesCount
i=0
h=0
do while not Srs.eof and i<PagesCount
Response.Write("<tr>")
 for e=0 to 2
 if Is_odd(h) then tdbcl="#F0F0F0" else tdbcl=""
 
if WordCount<>0 then User_Title=LeftT(Trim(Srs("dlxf_coname")),WordCount) else User_Title=Trim(Srs("dlxf_coname"))

if ViewDate<>0 then VD="Date:"&year(Srs("dlxf_date"))&"-"&month(Srs("dlxf_date"))&"-"&day(Srs("dlxf_date"))
if ViewHtc<>0 then VH=" Htc:"&Srs("dlxf_htc")

if VD<>"" or VH<>"" then VDH="　["&VD&VH&"]"

GoName=Srs("dlxf_user")
GoID=Srs("dlxf_id")
if dnskey=1 then
if dnswww=1 then usertwourl="http://www."&GoName&citydns else usertwourl="http://"&GoName&citydns
else
usertwourl=cityurl&"co.asp?id="&GoID
end if

if LogoView=1 then
if Srs("dlxf_logo")<>"" then
CoLogo=application("cityurl")&Srs("dlxf_logo")
else
CoLogo=application("cityurl")&"img/yplogo.gif"
end if
if UserExplain<>0 then LVrow=" rowspan=2"
LV="<td height=100 width=170"&LVrow&" align=center><a href="&usertwourl&" target=_blank><img src="&CoLogo&" height=90 width=162 style=""border:1px #666666 solid""></a></td>"
end if

UT="·<a href="&usertwourl&" target=_blank><b><font color=#000099>"&User_Title&"</font></b></a>"
set shrs=conn.execute("select * from dlxf_bazartwo where dlxf_ypxxtwo_id="&Srs("dlxf_bazartwo_id"))
shichang=shrs("dlxf_ypxxtwo")
if Srs("dlxf_vip")=2 then
SVIP=" <img src="&CityUrl&"img/vip.gif title=VIP会员>"
end if

if UserExplain=0 then
TopLine="<tr><td background="&CityUrl&"img/search_line.gif colspan=2></td></tr>"
if Srs("dlxf_coms")<>"" then UE=LeftT(Trim(Srs("dlxf_coms")),UserExplain) else UE=User_Title
UE="<tr><td height=70><p style=""line-height:180%"">&nbsp;　 "&UE&"</td></tr>"
TitBC=" bgcolor=#efefef"
FontClass=" class=f14"
UT="<strong><font color=#ff6600>>></font></strong> <a href="&usertwourl&" target=_blank class=f14><strong>"&User_Title&"</strong></a>"

User_view=TopLine&"<tr>"&LV&"<td height=30"&TitBC&">"&UT&SVIP&VDH&"</td></tr>"&UE
else
'User_view="<tr>"&LV&"</tr><tr><td>"&UT&SVIP&VDH&"</td></tr>"
User_view="<td class=S width=""33%"" bgcolor="&tdbcl&">"&UT&SVIP&"<br><a href=sca_vlist_bz.asp?id="&shrs("dlxf_ypxxtwo_id")&" ><font color=""#666666"">"&shichang&"</font></a><br>地址："&Srs("dlxf_coaddress")&"</td>"
end if

response.write User_view

Srs.movenext 
i=i+1 
j=j-1
next
Response.Write("</tr>")
h=h+1
loop

if PagesView=1 then '分页开始
filename=PageName&"?id="&id
response.write "<tr><td align=right colspan=2 height=30 bgcolor=#efefef style=""border-top:1px #999999 solid""><strong><font color=red>"&page&"</font>/"&Srs.pagecount&"页"
if page > 1 then
response.write " <a href="&CityUrl&filename&">首页</a> <a href="&CityUrl&filename&"&page="&page-1&">上一页</a>"
end if
if Srs.pagecount-page > 0 then
response.write " <a href="&CityUrl&filename&"&page="&page+1&">下一页</a> <a href="&CityUrl&filename&"&page="&Srs.pagecount&">末页</a>" 
end if
response.write "</strong>&nbsp;&nbsp;</td></tr>"
end if '完成

Srs=close
set Srs=nothing

end if

response.write "</table>"
end function
'---------------------------------商机显示标签
function dlxf_Sca_View(ListCount,PagesCount,ErectCount,WordCount,One_ID,Two_ID,ScaSort,User_ID,ScaSortView,ScaKey,ScaExplain,PagesView,ByDesc,ViewDate,ViewHtc,ViewDH,PageName)

if ListCount<>0 then LC=" top "&ListCount&""
if One_ID<>0 then OI=" and dlxf_ypxxone_id="&One_ID&""
if Two_ID<>0 then TI=" and dlxf_ypxxtwo_id="&Two_ID&""
if ScaSort<>999 then SS=" and dlxf_scasort="&ScaSort&""
if ScaKey<>0 then SK=" and dlxf_key3=1"
if User_ID<>0 then UI=" and dlxf_yp_id="&User_ID&""
Select Case ByDesc
  Case 0
    BD="dlxf_Id"
  Case 1
    BD="dlxf_Htc"
  Case 2
    BD="dlxf_key3,dlxf_id"
End Select

response.write "<table width=""100%"" border=0 cellspacing=0 cellpadding=3><tr>"

set Srs=server.createobject("adodb.recordset")                     
Ssql="select"&LC&" * from dlxf_sca where dlxf_key=1 and dlxf_key1=1 and dlxf_key2=1"&OI&TI&SS&SK&UI&" order by "&BD&" desc"
Srs.open Ssql,conn,1,1                     
if Srs.eof and Srs.bof then                     
	response.write "<tr><td height=50>没有内容</td></tr>"
else  
SRs.pagesize=PagesCount
page=Request("page")
if (page-SRs.pagecount) > 0 then
page=SRs.pagecount
elseif page = "" or page < 1 then
page = 1
end if
SRs.absolutepage=page
j=Srs.recordcount
j=j-(page-1)*PagesCount
i=1
do while not Srs.eof and i<PagesCount+1

Scatitle=Trim(Srs("dlxf_scatitle"))
if WordCount<>0 then Scatitle=LeftT(Scatitle,WordCount)

if ScaSortView<>0 and ScaSortView<>1 then
set Srs1=server.createobject("adodb.recordset")
Ssql1="select * from dlxf_scasort where dlxf_id="&Srs("dlxf_scasort")
Srs1.open Ssql1,conn,1,1
  if not Srs1.eof then
    Ssort="<a href="&CityUrl&"sca_tlist.asp?scasort="&Srs1("dlxf_id")&" target=_blank>"&Srs1("dlxf_scasort")&"</a>"
  else
    Ssort="<a href="&CityUrl&"sca_tlist.asp?scasort=0 target=_blank>其它</a>"
  end if
Srs1.close
set Srs1=nothing
end if

Select Case ScaSortView
  Case 0
    SsortView=""
  Case 1
    SsortView="·"
  Case 2
    SsortView=Ssort
  Case 3
    SsortView="("&Ssort&")"
  Case 4
    SsortView="["&Ssort&"]"
  Case 5
    SsortView=Ssort&"|"
End Select

if ViewDH<>0 then ViewD="Date:":ViewH=" Htc:"
Select Case ViewDate
  Case 0
    VD=""
  Case 1
    VD=ViewD&Srs("dlxf_begindate")
  Case 2
    VD=ViewD&year(Srs("dlxf_begindate"))&"-"&month(Srs("dlxf_begindate"))&"-"&day(Srs("dlxf_begindate"))
  Case 3
    VD=ViewD&month(Srs("dlxf_begindate"))&"-"&day(Srs("dlxf_begindate"))
  Case 4
    VD=ViewD&hour(Srs("dlxf_begindate"))&":"&minute(Srs("dlxf_begindate"))&":"&second(Srs("dlxf_begindate"))
  Case 5
    VD=ViewD&hour(Srs("dlxf_begindate"))&":"&minute(Srs("dlxf_begindate"))
End Select
if ViewHtc<>0 then VH=ViewH&Srs("dlxf_htc")
if VD<>"" or VH<>"" then VDH="　["&VD&VH&"]"

response.write "<td valign=top><table width=""100%"" border=0 cellspacing=0 cellpadding=0>"
if ScaExplain<>0 then
  Sca=LeftT(Trim(Srs("dlxf_sca")),ScaExplain)
  Sca_view="<tr><td background="&CityUrl&"img/list_line_1.gif></td></tr>"&_
           "<tr><td height=25 bgcolor=#efefef>"&SsortView&" <a href="&CityUrl&"sca_view.asp?id="&Srs("dlxf_id")&" target=_blank class=f14><strong>"&Scatitle&"</strong></a>"&VDH&"</td></tr>"&_
            "<tr><td height=60><p style=""line-height:180%"">　　"&Sca&"</td></tr>"
else
  Sca_view="<tr><td>"&SsortView&" <a href="&CityUrl&"sca_view.asp?id="&Srs("dlxf_id")&" target=_blank>"&Scatitle&"</a>"&VDH&"</td></tr>"
end if
response.write Sca_view
response.write "</table></td>"

if i mod int(ErectCount)=0 then response.write "</tr><tr>"

Srs.movenext 
i=i+1 
j=j-1
loop

response.write "</tr>"

if PagesView=1 then '分页开始
  filename=PageName&"?id="&id&"&scasort="&scasort
  response.write "<tr><td align=right colspan=2 height=30 bgcolor=#efefef style=""border-top:1px #999999 solid""><strong><font color=red>"&page&"</font>/"&Srs.pagecount&"页"
  if page > 1 then
    response.write " <a href="&CityUrl&filename&">首页</a> <a href="&CityUrl&filename&"&page="&page-1&">上一页</a>"
  end if
  if Srs.pagecount-page > 0 then
    response.write " <a href="&CityUrl&filename&"&page="&page+1&">下一页</a> <a href="&CityUrl&filename&"&page="&Srs.pagecount&">末页</a>" 
  end if
    response.write "</strong>&nbsp;&nbsp;</td></tr>"
end if '完成

Srs.close
set Srs=nothing

end if

response.write "</table>"

end function
'---------------------------------商机显示标签 end

'---------------------------------商机显示标签2
function dlxf_Sca_View2(ListCount,PagesCount,ErectCount,WordCount,One_ID,Two_ID,ScaSort,User_ID,ScaSortView,ScaKey,ScaExplain,PagesView,ByDesc,ViewDate,ViewHtc,ViewDH,PageName)

if ListCount<>0 then LC=" top "&ListCount&""
if One_ID<>0 then OI=" and dlxf_ypxxone_id="&One_ID&""
if Two_ID<>0 then TI=" and dlxf_ypxxtwo_id="&Two_ID&""
if ScaSort<>999 then SS=" and dlxf_scasort="&ScaSort&""
if ScaKey<>0 then SK=" and dlxf_key3=1"
if User_ID<>0 then UI=" and dlxf_yp_id="&User_ID&""
Select Case ByDesc
  Case 0
    BD="dlxf_Id"
  Case 1
    BD="dlxf_Htc"
  Case 2
    BD="dlxf_key3,dlxf_id"
End Select

response.write "<table width=""100%"" border=0 cellspacing=0 cellpadding=3><tr><td><table width=""760"" height=""30"" border=""0"" cellpadding=""0"" cellspacing=""1"">"&_
      "<tr>"&_
            "<td width=""16%"" height=""28"" bgcolor=""#EBEBEB""><div align=""center"">产品图片</div></td>"&_
            "<td width=""42%"" bgcolor=""#EBEBEB""><div align=""center"">供应信息/公司</div></td>"&_
            "<td width=""11%"" bgcolor=""#EBEBEB""><div align=""center"">会员状态</div></td>"&_
            "<td width=""17%"" bgcolor=""#EBEBEB""><div align=""center"">产地</div></td>"&_
            "<td width=""14%"" bgcolor=""#EBEBEB""><div align=""center"">在线状态</div></td>"&_
      "</tr>"&_
"</table></td></tr><tr>"

set Srs=server.createobject("adodb.recordset")                     
Ssql="select"&LC&" * from dlxf_sca where dlxf_key=1 and dlxf_key1=1 and dlxf_key2=1"&OI&TI&SS&SK&UI&" order by "&BD&" desc"
Srs.open Ssql,conn,1,1                     
if Srs.eof and Srs.bof then                     
	response.write "<tr><td height=50>没有内容</td></tr>"
else  
SRs.pagesize=PagesCount
page=Request("page")
if (page-SRs.pagecount) > 0 then
page=SRs.pagecount
elseif page = "" or page < 1 then
page = 1
end if
SRs.absolutepage=page
j=Srs.recordcount
j=j-(page-1)*PagesCount
i=1
do while not Srs.eof and i<PagesCount+1


'验证VIP会员,公司
set viprs=server.createobject("adodb.recordset")
vipsql="select * from dlxf_yp where dlxf_id="&srs("dlxf_yp_id")
viprs.open vipsql,conn,1,1 
if viprs("dlxf_vip")=2 then
SVIP="<img src="&CityUrl&"img/vip.gif title=VIP会员><br />VIP会员"
else
SVIP="普通会员"
end if
comname=viprs("dlxf_coname")
comurl=CityUrl&"co.asp?id="&viprs("dlxf_id")
qq=viprs("dlxf_oicq")
'产地
set vipadd=conn.execute("select * from dlxf_ypaddtwo where dlxf_addtwo_id="&srs("dlxf_addtwo_id"))
add=vipadd("dlxf_addone")&"/"&vipadd("dlxf_addtwo")
set vipadd=nothing
viprs.close
set viprs=nothing







Scatitle=Trim(Srs("dlxf_scatitle"))
if WordCount<>0 then Scatitle=LeftT(Scatitle,WordCount)

if ScaSortView<>0 and ScaSortView<>1 then
set Srs1=server.createobject("adodb.recordset")
Ssql1="select * from dlxf_scasort where dlxf_id="&Srs("dlxf_scasort")
Srs1.open Ssql1,conn,1,1
  if not Srs1.eof then
    Ssort="<a href="&CityUrl&"sca_tlist.asp?scasort="&Srs1("dlxf_id")&" target=_blank>"&Srs1("dlxf_scasort")&"</a>"
  else
    Ssort="<a href="&CityUrl&"sca_tlist.asp?scasort=0 target=_blank>其它</a>"
  end if
Srs1.close
set Srs1=nothing
end if

Select Case ScaSortView
  Case 0
    SsortView=""
  Case 1
    SsortView="·"
  Case 2
    SsortView=Ssort
  Case 3
    SsortView="("&Ssort&")"
  Case 4
    SsortView="["&Ssort&"]"
  Case 5
    SsortView=Ssort&"|"
End Select

if ViewDH<>0 then ViewD="Date:":ViewH=" Htc:"
Select Case ViewDate
  Case 0
    VD=""
  Case 1
    VD=ViewD&Srs("dlxf_begindate")
  Case 2
    VD=ViewD&year(Srs("dlxf_begindate"))&"-"&month(Srs("dlxf_begindate"))&"-"&day(Srs("dlxf_begindate"))
  Case 3
    VD=ViewD&month(Srs("dlxf_begindate"))&"-"&day(Srs("dlxf_begindate"))
  Case 4
    VD=ViewD&hour(Srs("dlxf_begindate"))&":"&minute(Srs("dlxf_begindate"))&":"&second(Srs("dlxf_begindate"))
  Case 5
    VD=ViewD&hour(Srs("dlxf_begindate"))&":"&minute(Srs("dlxf_begindate"))
End Select
if ViewHtc<>0 then VH=ViewH&Srs("dlxf_htc")
if VD<>"" or VH<>"" then VDH="　["&VD&VH&"]"


bg=""
if i mod 2=0 then bg=" bgcolor=""#F3F3F3"""
imgsrc=cpimages(srs("dlxf_sca"))
if imgsrc="" then  imgsrc=CityUrl&"img/null.gif"
	  
	  Sca_view="<td valign=top><table width=""760"" height=""97"" border=""0"" cellpadding=""0"" cellspacing=""1"""&bg&">"&_
      "<tr>"&_
            "<td width=""16%"" height=""95""><div align=""center""><a href="&imgsrc&" target=_blank><img src="&imgsrc&" width=""90"" height=""90"" alt="""" border=""0""/></a></div></td>"&_
            "<td width=""42%"">"&SsortView&"<a href="""&CityUrl&"sca_view.asp?id="&Srs("dlxf_id")&""" target=_blank class=f14><strong>"&Scatitle&"</strong></a><br />"&_
            "<a href="""&comurl&""" target=_blank class=S>"&comname&"</a> <span class=S>"&VDH&"</span></td>"&_
            "<td width=""11%""><div align=""center"">"&SVIP&"</div></td>"&_
            "<td width=""17%""><div align=""center"">"&add&"</div></td>"&_
            "<td width=""14%""><div align=""center""><a target=blank href=http://wpa.qq.com/msgrd?V=1&Uin="&qq&"&Site=dlxf&Menu=yes><img border=""0"" SRC=http://wpa.qq.com/pa?p=1:"&qq&":1 width=""74"" height=""23"" alt=""点击这里给我发消息""></a></div></td>"&_
      "</tr>"&_
"</table></td></tr>"


response.write Sca_view

Srs.movenext 
i=i+1 
j=j-1
loop

if PagesView=1 then '分页开始
  filename=PageName&"?id="&id&"&scasort="&scasort
  response.write "<tr><td align=right colspan=2 height=30 bgcolor=#efefef style=""border-top:1px #999999 solid""><strong><font color=red>"&page&"</font>/"&Srs.pagecount&"页"
  if page > 1 then
    response.write " <a href="&CityUrl&filename&">首页</a> <a href="&CityUrl&filename&"&page="&page-1&">上一页</a>"
  end if
  if Srs.pagecount-page > 0 then
    response.write " <a href="&CityUrl&filename&"&page="&page+1&">下一页</a> <a href="&CityUrl&filename&"&page="&Srs.pagecount&">末页</a>" 
  end if
    response.write "</strong>&nbsp;&nbsp;</td></tr>"
end if '完成

Srs.close
set Srs=nothing

end if

response.write "</table>"

end function
'---------------------------------商机显示标签 end
'---------------------------------产品显示标签
function dlxf_Cp_View(ListCount,PagesCount,ErectCount,WordCount,ViewPlace,CpKey,PicView,PicWidth,PicHeight,One_ID,Two_ID,User_ID,UserSort_ID,CpExplain,PagesView,ByDesc,ViewDate,ViewHtc,ViewDH,PageName)

if ListCount<>0 then LC=" top "&ListCount&""
if One_ID<>0 then OI=" and dlxf_ypxxone_id="&One_ID&""
if Two_ID<>0 then TI=" and dlxf_ypxxtwo_id="&Two_ID&""
if CpKey<>0 then CK=" and dlxf_key3=1"
if User_ID<>0 then UI=" and dlxf_yp_id="&User_ID&""
if UserSort_ID<>0 then USI=" and dlxf_sortid="&UserSort_ID&""
Select Case ByDesc
  Case 0
    BD="dlxf_Id"
  Case 1
    BD="dlxf_Htc"
  Case 2
    BD="dlxf_key3,dlxf_id"
End Select

response.write "<table width=""100%"" border=0 cellspacing=0 cellpadding=5 align=center><tr>"

set Srs=server.createobject("adodb.recordset")                     
Ssql="select "&LC&" * from dlxf_cp where dlxf_key=1 and dlxf_key1=1 and dlxf_key2=1"&OI&TI&CK&UI&USI&" order by "&BD&" desc"
Srs.open Ssql,conn,1,1                     
if Srs.eof and Srs.bof then                     
	response.write "<tr><td height=50>没有内容</td></tr>"
else  
SRs.pagesize=PagesCount
page=Request("page")
if (page-SRs.pagecount) > 0 then
page=SRs.pagecount
elseif page = "" or page < 1 then
page = 1
end if
SRs.absolutepage=page
j=Srs.recordcount
j=j-(page-1)*PagesCount
i=1
do while not Srs.eof and i<PagesCount+1

if ViewDH<>0 then ViewD="Date:":ViewH=" Htc:"
Select Case ViewDate
  Case 0
    VD=""
  Case 1
    VD=ViewD&Srs("dlxf_date")
  Case 2
    VD=ViewD&year(Srs("dlxf_date"))&"-"&month(Srs("dlxf_date"))&"-"&day(Srs("dlxf_date"))
  Case 3
    VD=ViewD&month(Srs("dlxf_date"))&"-"&day(Srs("dlxf_date"))
  Case 4
    VD=ViewD&hour(Srs("dlxf_date"))&":"&minute(Srs("dlxf_date"))&":"&second(Srs("dlxf_date"))
  Case 5
    VD=ViewD&hour(Srs("dlxf_date"))&":"&minute(Srs("dlxf_date"))
End Select
if ViewHtc<>0 then VH=ViewH&Srs("dlxf_htc")
if VD<>"" or VH<>"" then VDH="　["&VD&VH&"]"

'图
if PicView=1 then
If Srs("dlxf_pic")<>"" Then CpPic=application("cityurl")&Srs("dlxf_pic") Else CpPic=application("cityurl")&"img/Null.gif"

if PicWidth<>0 then PW=" Width="&PicWidth&""
if PicHeight<>0 then PH=" Height="&PicHeight&""
'if CpExplain<>0 then CErow=" rowspan=2"
PV="<a href="&CityUrl&"cp_view.asp?id="&Srs("dlxf_id")&" target=_blank><img src="&CpPic&PH&PW&" style=""border:1px #cccccc solid""></a>"
end if

'标题
Cpname=trim(Srs("dlxf_cpname"))
if WordCount<>0 then Cpname=LeftT(Cpname,WordCount)
WN="<img src="&Cityurl&"img/index_aro4.gif align=absmiddle> <a href="&CityUrl&"cp_view.asp?id="&Srs("dlxf_id")&" target=_blank>"&Cpname&"</a>"&VDH&""

'说明
if Srs("dlxf_cpjm")<>"" then CE="<p style=""line-height:180%"">　　"&LeftT(trim(Srs("dlxf_cpjm")),CpExplain) else CE="<p style=""line-height:180%"">　　"&Cpname

TDW=100/int(ErectCount)
response.write "<td valign=top width='"&TDW&"%'><table width=""100%"" border=0 cellspacing=0 cellpadding=5 align=center>"

Select Case ViewPlace
  Case 0
    Cp_view="<tr><td align=center>"&PV&"</td></tr>"
  Case 1
    Cp_view="<tr><td align=center>"&PV&"</td></tr><tr><td align=center>"&WN&"</td></tr>"
  Case 2
    Cp_view="<tr><td align=center>"&WN&"</td></tr><tr><td align=center>"&PV&"</td></tr>"
  Case 3
    Cp_view="<tr><td colspan=2 class=f14 bgcolor=#efefef><strong>"&WN&"</strong></td></tr><tr><td background="&CityUrl&"img/list_line_1.gif colspan=2></td></tr><tr><td align=center>"&PV&"</td><td width=""100%"">"&CE&"</td></tr>"
  Case 4
    Cp_view="<tr><td width=""100%"" rowspan=2>"&CE&"</td><td align=center>"&PV&"</td></tr><tr><td align=center bgcolor=#efefef>"&WN&"</td></tr>"
  Case 5
    Cp_view="<tr><td align=center>"&PV&"</td><td width=""100%"" rowspan=2>"&CE&"</td></tr><tr><td align=center bgcolor=#efefef>"&WN&"</td></tr>"
  Case 6
    Cp_view="<tr><td align=center rowspan=3>"&PV&"</td><td width=""100%"" bgcolor=#efefef><strong>"&WN&"</strong></td></tr><tr><td background="&CityUrl&"img/list_line_1.gif></td></tr><tr><td height=""100%"">"&CE&"</td></tr>"
  Case 7
    Cp_view="<tr><td width=""100%"" bgcolor=#efefef><strong>"&WN&"</strong></td><td align=center rowspan=3>"&PV&"</td></tr><tr><td background="&CityUrl&"img/list_line_1.gif></td></tr><tr><td height=""100%"">"&CE&"</td></tr>"
  Case 8
    Cp_view="<tr><td>"&WN&"</td></tr>"
End Select

response.write Cp_view

response.write "</table></td>"

if i mod int(ErectCount)=0 then response.write "</tr><tr>"

Srs.movenext 
i=i+1 
j=j-1
loop

response.write "</tr>"

if PagesView=1 then '分页开始
filename=PageName
response.write "<tr><td align=right colspan="&ErectCount&" height=30 bgcolor=#efefef style=""border-top:1px #999999 solid""><strong><font color=red>"&page&"</font>/"&Srs.pagecount&"页"
if page > 1 then
response.write " <a href="&CityUrl&filename&">首页</a> <a href="&CityUrl&filename&"?page="&page-1&">上一页</a>"
end if
if Srs.pagecount-page > 0 then
response.write " <a href="&CityUrl&filename&"?page="&page+1&">下一页</a> <a href="&CityUrl&filename&"?page="&Srs.pagecount&">末页</a>" 
end if
response.write "</strong>&nbsp;&nbsp;</td></tr>"
end if '完成

Srs.close
set Srs=nothing

end if

response.write "</table>"

end function
'---------------------------------产品显示标签 end
%>