<!--#include file="system/conn.asp"--><%


Set Rs=Server.CreateObject("ADODB.RecordSet")

'列表类型
url_listtype=Request.QueryString("listtype")
If url_listtype="" Or Not IsNumeric(url_listtype) Then url_listtype=0

'品牌id
url_ppid=Request.QueryString("ppid")
If url_ppid="" Or Not IsNumeric(url_ppid) Then url_ppid=0

'应用id
url_yyid=Request.QueryString("yyid")
If url_yyid="" Or Not IsNumeric(url_yyid) Then url_yyid=0


'行业id
url_hyid=Request.QueryString("hyid")
If url_hyid="" Or Not IsNumeric(url_hyid) Then url_hyid=0

'分页
Page = Request.QueryString("Page")


	wtitle = nav1
	wurl = " > <span>"& nav1 &"</span>"
	wkeywords = ""
	wdescription = ""

	If url_ppid>0 Then
		Rs.Open "SELECT ppmc FROM pp WHERE ppstate>0 AND id="& url_ppid,Conn,1,1
		If Not Rs.Bof And Not Rs.Eof Then
			wtitle = Rs("ppmc") & "_" & wtitle
			wkeywords = Rs("ppmc")
			wdescription = Rs("ppmc") & "品牌相关的" & nav1
			wurl = " > <a href=""pl.asp"">"& nav1 &"</a> > <span>"& Rs("ppmc") &"</span>"
			WhereStr = " AND ppid=" & url_ppid
			PageName="pl.asp?ppid="& url_ppid &"&Page="
		Else
			PageName="p-"
		End If
		Rs.Close
	ElseIf url_yyid>0 Then
		Rs.Open "SELECT yymc FROM cpyy WHERE yystate>0 AND id="& url_yyid,Conn,1,1
		If Not Rs.Bof And Not Rs.Eof Then
			wtitle = Rs("yymc") & "_" & wtitle
			wkeywords = Rs("yymc")
			wdescription = Rs("yymc") & "应用相关的" & nav1
			wurl = " > <a href=""pl.asp"">"& nav1 &"</a> > <span>"& Rs("yymc") &"</span>"
			WhereStr = " AND yyid=" & url_yyid
			PageName="pl.asp?yyid="& url_yyid &"&Page="
		Else
			PageName="p-"
		End If
		Rs.Close

	ElseIf url_hyid>0 Then

		Rs.Open "SELECT mc FROM hy WHERE id="& url_hyid,Conn,1,1
		If Not Rs.Bof And Not Rs.Eof Then
			wtitle = Rs("mc") & "行业相关_" & wtitle
			wkeywords = Rs("mc")
			wdescription = Rs("mc") & "行业相关的" & nav1
			wurl = " > <a href=""pl.asp"">"& nav1 &"</a> > <span>"& Rs("mc") &"</span>"
			WhereStr = " AND hyid like '%"& url_hyid &"%'"
			PageName="pl.asp?hyid="& url_hyid &"&Page="
		Else
			PageName="p-"
		End If
		Rs.Close

	Else
		PageName="p-"
	End If

%><!DOCTYPE html>
<html>
<head>
<meta charset=utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<meta name="keywords" content="<%=keywords%><%If wkeywords<>"" Then Response.Write "," & wkeywords%>" />
<meta name="description" content="<%If wdescription<>"" Then Response.Write wdescription Else Response.Write description End If%>" />
<title><%=wtitle & "【" & webname & "】"%></title>
<link rel="stylesheet" type="text/css" href="s/c.css?ver=1030" />
<script type="text/javascript" src="j/js.js"></script>
</head>
<body>
<div id="container">
<%Call subTop()%>
<div class="pt"><%=nav1%></div>
<div class="pt1">选择指定品牌相关的<%=nav1%></div>
<ul class="ppl"><%
Rs.Open "Select id,ppmc,ppslt From pp Where ppstate>0 Order By ppord Desc,id Desc",Conn,1,1
Do While Not Rs.Bof And Not Rs.Eof%>
<li><a href="pl.asp?ppid=<%=Rs("id")%>" title="查看<%=Rs("ppmc")%>产品"><img src="<%=WebUrl & Rs("ppslt")%>" alt="<%=Rs("ppmc")%>LOGO" width="103" height="50" onLoad="rimg(this,103,50)" /></a></li><%
Rs.MoveNext
Loop
Rs.Close
%>
</ul>
<div class="pt1">选择指定应用领域相关的<%=nav1%></div>
<ul class="yyl"><%
Rs.Open "Select id,yymc From cpyy Where yystate>0 Order By yyord Desc,id Desc",Conn,1,1
Do While Not Rs.Bof And Not Rs.Eof%>
<li><a href="pl.asp?yyid=<%=Rs("id")%>" title="查看<%=Rs("yymc")%>产品"><%=Rs("yymc")%></a></li><%
Rs.MoveNext
Loop
Rs.Close
%>
</ul>
<ul class="pl"><%

SqlStr = "SELECT id,cpmc,cptd,cpxh,cpslt,sp,(Select Count(id) From da Where dastate>0 And cid<>2 And da.cpid=cp.id) As dasl,(SELECT gjtb FROM gj WHERE gj.id=cp.gjid) AS gjtb FROM cp WHERE cpstate>0"& WhereStr &" ORDER BY cpord Desc,id Desc"
Rs.Open SqlStr,Conn,1,1
If Not Rs.Bof And Not Rs.Eof Then

	Rs.PageSize = 9
	If Page = "" Then Page = 1
	If Page = "end" Then Page = Rs.PageCount
	If Not IsNumeric(Page) Or Page < 1 Then Page = 1
	Page = Cint(Page)
	If Page > Rs.PageCount Then Page = Rs.PageCount
	Rs.AbsolutePage = Page
		For i=1 To Rs.PageSize
			If Rs.Bof Or Rs.Eof Then Exit For
			id=Rs("id"):cpmc=Rs("cpmc"):cpslt=Rs("cpslt"):cptd=StrLeft(RemoveHTML(HTMLUnCode(Rs("cptd"))),60):cpxh=Rs("cpxh"):sp=Rs("sp"):dasl=Rs("dasl"):gjtb=Rs("gjtb")

			'id=Rs("id"):cpmc=Rs("cpmc"):cpjj=StrLeft(RemoveHTML(HTMLUnCode(Rs("cpjj"))),60):cpslt=Rs("cpslt"):gjtb=Rs("gjtb")
%><li>
<div class="i"><%If cpslt<>"" Then%><img src="wap_img.asp?imgw=83&url=<%=WebUrl&cpslt%>" /><%Else%><img src="/images/nopic.gif" /><%End If%></div>
<a href="p.asp?id=<%=id%>" title="<%=cpmc%>"><%=cpmc%></a>
<p><%=cptd%></p>
</li><%

			Rs.MoveNext
		Next
		Set Rs1=Nothing
Else
	Response.Write "<li style=""margin:30px"">暂无内容</li>"
End If
If Rs.PageCount > 1 Then
	liststr=liststr & "<div class=""sp"">"

	Pagelen=3
	If Page>1 Then
		liststr=liststr & "<a href="""&PageName&"1"">首页</a>"
		liststr=liststr & "<a href="""&PageName&Page-1&""">上一页</a>"
	End If

	If Pagelen*2+1 >= Rs.PageCount Then
		StartPage=1:EndPage=Rs.PageCount
	Else
		If Page<=Pagelen+1 Then
			StartPage=1
			EndPage=Pagelen*2+1
		Else
			StartPage=Page-Pagelen
			EndPage=Page+Pagelen
		End If
		If Page+Pagelen>Rs.PageCount Then StartPage=Rs.PageCount-Pagelen*2:EndPage=Rs.PageCount
	End If

	For i = StartPage To EndPage
		If i = Page Then
			liststr=liststr & "<a class=""current"">"&i&"</a>"
		Else
			liststr=liststr & "<a href="""&PageName&i&""">"&i&"</a>"
		End If
	Next

	If Page<Rs.PageCount Then
		If Rs.PageCount - Page > Pagelen Then liststr=liststr & "<a href="""&PageName&Rs.PageCount&""">..."&Rs.PageCount&"</a>"
		liststr=liststr & "<a href="""&PageName&Page+1&""">下一页</a>"
		liststr=liststr & "<a href="""&PageName&Rs.PageCount&""">尾页</a>"
	End If
	liststr=liststr & "</div>"
End If
Rs.Close

%>
</ul>
<%=liststr%>
<%Call subBottom()%>
</div>
</body>
</html><%Conn.Close:Set Conn=Nothing%>