<%
'**************************************
'* 最后更新 2011-02-06 by 56770.Kingdge
'* 历史更新 2008-6-3 by 56770.WangLei
'* Copyright www.56770.com
'**************************************
Showpath = "<a href='"& Eshop_url & LangPath &"'>"& Lebi_word(0) &"</a> → "& Lebi_word(12)
'..................................
'读取商品目录页分类导航
'..................................
Public Function ProductCategoryListMenu()
		Dim strFile,strLoad,rs,ProductCategoryListMenu_num,LoadPC_ListMenu,RLoadStyle
		strFile = Eshop_url& Style_Folder &"Lebi.ProductCategoryListMenu."
		ProductCategoryListMenu = LoadStyle(strFile&"0.style")
		RLoadStyle = LoadStyle(strFile&"1.style")
        set rs = conn.execute("select c_name"& LangTxt &" from [Lebi_category] where c_father = 1 and is_hide=0 order by c_order desc")
        ProductCategoryListMenu_num = 1
	    do while not rs.Eof
		If Not IsNull(Trim(rs(0))) And Trim(rs(0)) <> "" Then 
			LoadPC_ListMenu = RLoadStyle
			ReplaceStyle "name",rs(0),LoadPC_ListMenu
			ReplaceStyle "loop_num",ProductCategoryListMenu_num,LoadPC_ListMenu
        	ProductCategoryListMenu_num = ProductCategoryListMenu_num + 1
			ProductCategoryListMenu = ProductCategoryListMenu & LoadPC_ListMenu
		End If 
        rs.MoveNext
        Loop
        rs.Close:Set rs=Nothing
	    ProductCategoryListMenu = ProductCategoryListMenu & LoadStyle(strFile&"2.style")
End Function

'..................................
'读取商品目录页分类列表
'..................................
Public Function ProductCategoryList()	' 2008-4-12 by Lebi.WangLei
        Dim rs,ProductCategoryList_url,ProductCategoryList_url_2,ProductCategoryList_num,strFile, loopstr_1,loopstr_2,LoopPC_List,loopstr,LoadListStr(0),RLoadStyle(2),tmpstr_1,tmpstr_2
		strFile = Eshop_url& Style_Folder &"Lebi.ProductCategoryList."
		RLoadStyle(0) = Replace(splits(LoadStyle(strFile&"0.style")),"/#","#")
		RLoadStyle(1) = splits(LoadStyle(strFile&"1.style"))
		RLoadStyle(2) = LoadStyle(strFile&"2.style")
        set rs = conn.execute("select c_id,c_name"& LangTxt &",c_pronum,c_foldername,c_filename from [Lebi_category] where c_father = 1 and is_hide=0 order by c_order desc")
	    do while not rs.Eof
			If Not IsNull(Trim(rs(1))) And Trim(rs(1)) <> "" Then 
				loopstr_1 = RLoadStyle(0)
				Select Case show_html
					   Case "1" ProductCategoryList_url = Folder(2) & rs(4) &".1."& Sys_Ext
					   Case "0"
							Select Case ISAPI_Rewrite
								   Case "0"
										Select Case Config_Lebi_Eshop(16)
											   Case "0" : ProductCategoryList_url = "showsort.asp?sort_id="& rs(0)
											   Case "1" : ProductCategoryList_url = "category/"& rs(3) &"/"
											   Case "2" : ProductCategoryList_url = "category/"& rs(3) &"/default.asp"
										End Select
								   Case "1"	ProductCategoryList_url = "category-"& rs(3) &".html"
							End Select
				End Select
				ReplaceStyle "url",LangPath & ProductCategoryList_url,loopstr_1
				ReplaceStyle "name",rs(1),loopstr_1
				ReplaceStyle "pro_qty",rs(2),loopstr_1
				Select Case ISAPI_Rewrite
					   Case "0" ReplaceStyle "rss_url",PagePath(11) &"?sort_id="& rs(0),loopstr_1
					   Case "1" ReplaceStyle "rss_url",LangPath &"rss-"& rs(0) &".html",loopstr_1
				End Select
				Dim sql1,rs1
				sql1 = "select c_id,c_name"& LangTxt &",c_pronum,c_foldername,c_filename from [Lebi_category] where c_parentid="&rs(0)&" and is_hide=0 order by c_order desc"
				set rs1 = conn.execute(sql1)
				ProductCategoryList_num=1
				tmpstr_2 = ""
				do while not rs1.EOF
					If Not IsNull(Trim(rs1(1))) And Trim(rs1(1)) <> "" Then 
						loopstr_2 = RLoadStyle(1)
						Select Case show_html
							   Case "1" ProductCategoryList_url_2 = Folder(2) & rs1(4) &".1."& Sys_Ext
							   Case "0"
									Select Case ISAPI_Rewrite
										   Case "0"
												Select Case Config_Lebi_Eshop(16)
													   Case "0" : ProductCategoryList_url_2 = "showsort.asp?sort_id="& rs1(0)
													   Case "1" : ProductCategoryList_url_2 = "category/"& rs1(3) &"/"
													   Case "2" : ProductCategoryList_url_2 = "category/"& rs1(3) &"/default.asp"
												End Select
										   Case "1" ProductCategoryList_url_2 = "category-"& rs1(3) &".html"
									End Select
						End Select
						ReplaceStyle "url",LangPath & ProductCategoryList_url_2,loopstr_2
						ReplaceStyle "name",rs1(1),loopstr_2
						ReplaceStyle "pro_qty",rs1(2),loopstr_2
						Select Case ISAPI_Rewrite
							   Case "0" ReplaceStyle "rss_url", PagePath(11) &"?sort_id="& rs1(0),loopstr_2
							   Case "1" ReplaceStyle "rss_url", LangPath &"rss-"& rs1(0) &".html",loopstr_2
						End Select
						ReplaceStyle "loop_num",ProductCategoryList_num,loopstr_2
						rs1.MoveNext
						tmpstr_2 = tmpstr_2 & loopstr_2
						ProductCategoryList_num=ProductCategoryList_num+1
					End If 
				Loop
				rs1.Close:Set rs1=nothing
				loopstr_1 = loopstr_1 & tmpstr_2
				ProductCategoryList = ProductCategoryList & loopstr_1 & RLoadStyle(2)
				rs.MoveNext
			End If 
        Loop
        rs.Close:Set rs=Nothing
End Function
%>