<%dbdns="../"%>
<!--#include file="../inc/conn.asp"-->
<%
'yp.asp?aid=条数&bid=每条字数&cid=用户等级&did=推不推荐&eid=要不要Logo
'bid  一个中文字算两个字符
'cid  0不分 4试用 6普通 2VIP
'did  0为不推荐 1为推荐
'eid  0不要 1要

aid=int(request.querystring("aid"))
bid=int(request.querystring("bid"))
cid=int(request.querystring("cid"))
did=int(request.querystring("did"))
eid=int(request.querystring("eid"))
if cid=0 then c="" else c=" and dlxf_vip="&cid&""
if did=1 then d=" and (dlxf_key=3 or dlxf_key=1)" else d=" and dlxf_key=3"

ypview="<table width=""100%"" border=""0"" cellspacing=""5"" cellpadding=0>"
set rs=server.createobject("adodb.recordset")
sql="select top "&aid&" *  from dlxf_yp where dlxf_key<>2 and dlxf_key1=1"&c&d&" order by dlxf_id desc"
rs.open sql,conn,1,1
do while not rs.eof
goname=rs("dlxf_user")
goid=rs("dlxf_id")
coname=trim(rs("dlxf_coname"))
ypview=ypview&"<tr><td>"
if dnskey=1 then
if dnswww=1 then
usertwourl="http://www."&goname&citydns
else
usertwourl="http://"&goname&citydns
end if
else
usertwourl=cityurl&"co.asp?id="&goid
end if

if eid=1 then
if rs("dlxf_logo")<>"" then
cologo=application("cityurl")&rs("dlxf_logo")
else
cologo=application("cityurl")&"img/yplogo.gif"
end if

ypview=ypview&"<a href="&usertwourl&" target=_blank class=f14><img src="&cologo&" height=90 width=162 style=""border:1px #666666 solid""></a></td></tr><tr><td>"
end if

ypview=ypview&"·<a href="&usertwourl&" target=_blank>"&LeftT(coname,bid)&"</a>"

if rs("dlxf_vip")=2 then
ypview=ypview&" <img src="&application("cityurl")&"img/vip.gif title=VIP会员>"
end if

ypview=ypview&"</td></tr>"

rs.movenext
loop
rs.close
ypview=ypview&"</table>"
%>
document.write('<%=ypview%>')