<%
'**************************************
'* 最后更新 2010-04-24 by 56770.kingdge
'* Copyright www.56770.com
'**************************************
Function HelpList(showheadpage,showfootpage)
        Dim sql,url,strFile,RLoadStyle(10),HeadPage,FootPage,DataList,DataCount,i,LoadHelpList,TmpLoadHelpList, LoadHelpList_s,TmpLoadHelpList_s,Filename
		showheadpage = checknum(showheadpage,0) : showfootpage = checknum(showfootpage,0)
		strFile = Eshop_url& Style_Folder &"Lebi.HelpList."
		RLoadStyle(0) = splits(LoadStyle(strFile&"0.style"))
		RLoadStyle(6) = LoadStyle(strFile&"6.style")
		RLoadStyle(8) = LoadStyle(strFile&"8.style")
		RLoadStyle(10) = LoadStyle(strFile&"10.style")
	    Dim ors
	    Set ors=new Cls_vbsPage
	    Set ors.Conn=conn
	    With ors
		    .PageSize=top25
		    .PageName="Page"
			If IsSqlDataBase = 0 Then
		            .DbType="AC"
			Else
			        .DbType="MSSQL"
			End If
		    .RecType=0
		    .Pkey="id"
    	    .Field="id,subject"& LangTxt &""
		    .Table="[Lebi_help]"
			Select Case id
				   Case "0" : .Condition="syxs=1"
				   Case Else
						.Condition="type_id="& id
			End Select
            .OrderBy="idate DESC"
	    End With
	    DataCount=ors.RecCount()
	    DataList=ors.ResultSet()
		Select Case show_html
		       Case "0"
					Select Case Config_Lebi_Eshop(16)
						   Case "2" : Filename = Eshop_url & LangPath & "help/class/default.asp"
						   Case Else
								Filename = Eshop_url & LangPath & "help/class/"
					End Select
			   Case "1"
					Select Case id
						   Case "0" : Filename = Eshop_url & LangPath & Folder(6) & "news"
						   Case Else
								Filename = Eshop_url & LangPath & Folder(6) & news_type
					End Select
		End Select
		HelpList = RLoadStyle(0)
		If showheadpage = 1 Then
		        RLoadStyle(2) = LoadStyle(strFile&"2.style")
		        HeadPage = RLoadStyle(2)
		        ReplaceStyle "headpage",ors.ShowPageHead(Filename),HeadPage
		        HelpList = HelpList & HeadPage
		End If
	    If DataCount > 1 Then
		        RLoadStyle(3) = LoadStyle(strFile&"3.style")
				RLoadStyle(4) = LoadStyle(strFile&"4.style")
				RLoadStyle(5) = LoadStyle(strFile&"5.style")
		        For i = 0 To Ubound(DataList,2)
						LoadHelpList_s = RLoadStyle(4)
						ReplaceStyle "title",DataList(1,i),LoadHelpList_s
						ReplaceStyle "id",DataList(0,i),LoadHelpList_s
						TmpLoadHelpList_s = TmpLoadHelpList_s & LoadHelpList_s
                Next
				TmpLoadHelpList_s = RLoadStyle(3) & TmpLoadHelpList_s & RLoadStyle(5)
		ElseIf DataCount = 0 Then
		        RLoadStyle(1) = splits(LoadStyle(strFile&"1.style"))
				TmpLoadHelpList_s = RLoadStyle(1)
		End If
		HelpList = HelpList & TmpLoadHelpList_s & RLoadStyle(6)
	    With ors
		    .PageSize=top25
		    .PageName="Page"
			If IsSqlDataBase = 0 Then
		            .DbType="AC"
			Else
			        .DbType="MSSQL"
			End If
		    .RecType=0
		    .Pkey="id"
    	    .Field="id,subject"& LangTxt &",message"& LangTxt &",idate"
		    .Table="[Lebi_help]"
			Select Case id
				   Case "0" : .Condition="syxs=1"
				   Case Else
						.Condition="type_id="& id
			End Select
            .OrderBy="idate DESC"
	    End With
	    DataCount=ors.RecCount()
	    DataList=ors.ResultSet()
	    If DataCount >= 1 Then
		        RLoadStyle(7) = splits(LoadStyle(strFile&"7.style"))
		        For i = 0 To Ubound(DataList,2)
						LoadHelpList = RLoadStyle(7)
						ReplaceStyle "id",DataList(0,i),LoadHelpList
						ReplaceStyle "title",DataList(1,i),LoadHelpList
						ReplaceStyle "content",DataList(2,i),LoadHelpList
						ReplaceStyle "time",DataList(3,i),LoadHelpList
						ReplaceStyle "loop_num",i+1,LoadHelpList
						TmpLoadHelpList = TmpLoadHelpList & LoadHelpList
                Next
        End If
		HelpList = HelpList & TmpLoadHelpList & RLoadStyle(8)
		If showfootpage = 1 Then
		        RLoadStyle(9) = LoadStyle(strFile&"9.style")
		        FootPage = RLoadStyle(9)
		        ReplaceStyle "footpage",ors.ShowPageFoot(Filename),FootPage
		        HelpList = HelpList & FootPage
		End If
		HelpList = HelpList & RLoadStyle(10)
End Function
%>