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

PageTitle = "厂商列表"
Dim strtmp, HotNum
Dim ProducerName, i, rsProducer, sqlProducer

Call GetChannel(ChannelID)
strFileName = "ShowProducerList.asp"
strNavPath = strNavPath & strNavLink & "&nbsp;" & PageTitle
HotNum = 100

strHtml = GetTemplate(0, 15, 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, "{$ShowProducerList}", GetProducerList())

Response.Write strHtml
Set PE_Content = Nothing
Call CloseConn

Function GetProducerList()
    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", "ShowProducerList/t1", "名称") & "</td><td width='160'>" & XmlText("ShowSource", "ShowProducerList/t2", "主页") & "</td><td width='80'>" & XmlText("ShowSource", "ShowProducerList/t3", "所属频道") & "</td><td width='270'>" & XmlText("ShowSource", "ShowProducerList/t4", "厂商简介") & "</td></tr>"
    sqlProducer = "select * from PE_Producer Where Passed=" & PE_True
    If ChannelID > 0 Then sqlProducer = sqlProducer & " and ChannelID=" & ChannelID
    If Action = "ListElite" Then sqlProducer = sqlProducer & " and isElite=" & PE_True
    If Action = "ListHot" Then sqlProducer = sqlProducer & " and Hits>" & HotNum
    sqlProducer = sqlProducer & " order by onTop " & PE_OrderType & ",LastUseTime Desc"
    Set rsProducer = Server.CreateObject("ADODB.Recordset")
    rsProducer.Open sqlProducer, Conn, 1, 1
    If rsProducer.BOF And rsProducer.EOF Then
        totalPut = 0
        strtmp = strtmp & "<tr Class='Channel_tdbg'><td align='center'colspan='4'>" & XmlText("ShowSource", "ShowProducerList/NoFoundProducer", "本频道尚未添加厂商") & "</td></tr></table>"
    Else
        totalPut = rsProducer.RecordCount
        If CurrentPage > 1 Then
            If (CurrentPage - 1) * MaxPerPage < totalPut Then
                        rsProducer.Move (CurrentPage - 1) * MaxPerPage
                Else
                    CurrentPage = 1
                End If
        End If
        i = 0
        Do While Not rsProducer.EOF
            strtmp = strtmp & ("<tr Class='Channel_tdbg'><td align='center'><a href='" & "ShowProducer.asp?ChannelID=" & rsProducer("ChannelID") & "&ProducerName=" & rsProducer("ProducerName") & "'>" & rsProducer("ProducerName") & "</a></td><td align='center'>")
            strtmp = strtmp & rsProducer("HomePage")
            strtmp = strtmp & ("</td><td align='center'>&nbsp;" & ChannelName & "</td><td>&nbsp;" & Left(nohtml(rsProducer("ProducerIntro")), 200) & "</td></tr>")
            rsProducer.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", "ShowProducerList/PageChar", "个厂商"), False) & "</td></tr></Table>")
    End If
    rsProducer.Close
    Set rsProducer = Nothing
    GetProducerList = strtmp
End Function
%>
