<!--#include file="CommonCode.asp"-->
<%
'**************************************************************
' Software name: PowerEasy SiteWeaver
' Web: http://www.powereasy.net
' Copyright (C) 2005－2008 佛山市动易网络科技有限公司 版权所有
'**************************************************************

PageTitle = "品牌列表"
Dim strtmp, HotNum
Dim TrademarkName, i, rsTrademark, sqlTrademark

MaxPerPage = 20
strNavPath = strNavPath & strNavLink & "&nbsp;" & PageTitle
HotNum = 100
strHtml = GetTemplate(0, 17, 0)
Call ReplaceCommonLabel

strHtml = Replace(strHtml, "{$PageTitle}", SiteTitle & " >> " & PageTitle)
strHtml = Replace(strHtml, "{$ShowPath}", strNavPath)
strHtml = Replace(strHtml, "{$MenuJS}", GetMenuJS("", False))
strHtml = Replace(strHtml, "{$Skin_CSS}", GetSkin_CSS(0))

strHtml = Replace(strHtml, "{$ShowTrademarkList}", GetTrademarkList())

Response.Write strHtml

Set PE_Content = Nothing
Call CloseConn

Function GetTrademarkList()
    strtmp = "<table width=100% cellspacing='1' cellpadding='0' border='0'>"
    strtmp = strtmp & "    <tr class='main_title_760' align='center'><td style='word-break:break-all;Width:fixed'><b>" & ChannelName & "品牌列表" & "</b></td></tr>"
    strtmp = strtmp & "<tr><td><table width=100% cellspacing='1' cellpadding='0' border='0' class='Channel_border'><tr class='Channel_title' align='center'><td width='150'>" & XmlText("ShowSource", "ShowTrademarkList/t1", "名称") & "</td><td width='100'>" & XmlText("ShowSource", "ShowTrademarkList/t2", "图片") & "</td><td width='80'>" & XmlText("ShowSource", "ShowTrademarkList/t3", "所属频道") & "</td><td width='430'>" & XmlText("ShowSource", "ShowTrademarkList/t4", "简介") & "</td></tr>"
    sqlTrademark = "select * from PE_Trademark Where Passed=" & PE_True
    If ChannelID > 0 Then sqlTrademark = sqlTrademark & " and ChannelID=" & ChannelID
    If Action = "ListElite" Then sqlTrademark = sqlTrademark & " and isElite=" & PE_True
    If Action = "ListHot" Then sqlTrademark = sqlTrademark & " and Hits>" & HotNum
    sqlTrademark = sqlTrademark & " order by onTop " & PE_OrderType & ",TrademarkID Desc"
    Set rsTrademark = Server.CreateObject("ADODB.Recordset")
    rsTrademark.Open sqlTrademark, Conn, 1, 1
    If rsTrademark.BOF And rsTrademark.EOF Then
        totalPut = 0
        strtmp = strtmp & "<tr Class='Channel_tdbg'><td align='center'colspan='4'>" & XmlText("ShowSource", "ShowTrademarkList/NoFoundTrademark", "本频道尚未添加品牌") & "</td></tr></table>"
    Else
        totalPut = rsTrademark.RecordCount
        If CurrentPage > 1 Then
            If (CurrentPage - 1) * MaxPerPage < totalPut Then
                        rsTrademark.Move (CurrentPage - 1) * MaxPerPage
                Else
                    CurrentPage = 1
                End If
        End If
        i = 0
        Do While Not rsTrademark.EOF
            strtmp = strtmp & ("<tr Class='Channel_tdbg'><td align='center'><a href='" & "ShowTrademark.asp?ChannelID=" & rsTrademark("ChannelID") & "&TrademarkName=" & rsTrademark("TrademarkName") & "'>" & rsTrademark("TrademarkName") & "</a></td><td align='center'>")
            If rsTrademark("TrademarkPhoto") <> "" Then strtmp = strtmp & ("<img src='" & rsTrademark("TrademarkPhoto") & "' height='30' width='60'>")
            strtmp = strtmp & ("</td><td>&nbsp;" & ChannelName & "</td><td>&nbsp;" & Left(nohtml(rsTrademark("TrademarkIntro")), 200) & "</td></tr>")
            rsTrademark.MoveNext
            i = i + 1
            If i >= MaxPerPage Then Exit Do
        Loop
        strtmp = strtmp & ("</table></td></tr><tr Class='Channel_pager'><td align='center' colspan='4'>" & ShowPage(strFileName, totalPut, MaxPerPage, CurrentPage, True, True, XmlText("ShowSource", "ShowTrademarkList/PageChar", "个品牌"), False) & "</td></tr></Table>")
    End If
    rsTrademark.Close
    Set rsTrademark = Nothing
    GetTrademarkList = strtmp
End Function
%>
