<%
'**************************************
'* 最后更新 2013-10-17 by 56770.Kingdge
'* Copyright www.56770.com
'**************************************
Dim pageUrl,Product_db_name,htmlFolder,RewritepageUrl
If product_type = "unite" Then
		Product_db_name = "Lebi_product_unite"
		pageUrl = PagePath(8)
		RewritepageUrl = LangPath & "unite_show"
		htmlFolder = LangPath & Folder(9)
Else
		Product_db_name = "Lebi_product"
		pageUrl = PagePath(10)
		RewritepageUrl = LangPath & "product"
		htmlFolder = LangPath & Folder(0)
End If

Function ProductInfoPrev()
		Dim loadListStr,strFile
		strFile = Eshop_url& Style_Folder &"Lebi.ProductInfoPrev."
        Set rs=conn.execute("select top 1 id,p_filename from ["&Product_db_name&"] where zhuangtai=1 and id<"&rspro("id")&" order by id desc")
	    If rs.eof And rs.bof Then
                LoadListStr = splits(LoadStyle(strFile&"1.style"))
	    Else
				LoadListStr = splits(LoadStyle(strFile&"0.style"))
	            Select Case show_html
		               Case "1" : ReplaceStyle "url",htmlFolder & rs(1)&".1."& Sys_Ext,LoadListStr
		               Case "0"
							Select Case ISAPI_Rewrite
								   Case "0" ReplaceStyle "url",pageUrl &"?id="& rs(0),LoadListStr
								   Case "1" ReplaceStyle "url",RewritepageUrl &"-"& rs(0) &".html",LoadListStr
							End Select
	            End Select
	    End If
	    rs.close:Set rs=Nothing
		ProductInfoPrev = LoadListStr
End Function

Function ProductInfoNext()
		Dim loadListStr,strFile
		strFile = Eshop_url& Style_Folder &"Lebi.ProductInfoNext."
        Set rs=conn.execute("select top 1 id,p_filename from ["&Product_db_name&"] where zhuangtai=1 and id>"&rspro("id")&" order by id asc")
	    If rs.eof And rs.bof Then
                LoadListStr = splits(LoadStyle(strFile&"1.style"))
	    Else
				LoadListStr = splits(LoadStyle(strFile&"0.style"))
	            Select Case show_html
		               Case "1" : ReplaceStyle "url",htmlFolder & rs(1)&".1."& Sys_Ext,LoadListStr
		               Case "0"
							Select Case ISAPI_Rewrite
								   Case "0" ReplaceStyle "url",pageUrl &"?id="& rs(0),LoadListStr
								   Case "1" ReplaceStyle "url",RewritepageUrl &"-"& rs(0) &".html",LoadListStr
							End Select
	            End Select
	    End If
	    rs.close:Set rs=Nothing
		ProductInfoNext = LoadListStr
End Function

Function ProductInfoFav()
        dim Product_Back_Url
        If show_html="0" Then
                Product_Back_Url = Eshop_url & pageUrl &"?id="& RsPro("id")
	    Else
                Product_Back_Url = Eshop_url & htmlFolder & RsPro("p_filename") &".1."& Sys_Ext
        End If
	    ProductInfoFav = "<a href="""& Eshop_url & PagePath(0) &"?action=shoucang_add&id="&RsPro("id")&"&product_name="&Urlencode(RsPro("product_name"& LangTxt))&"&backurl="&Urlencode(Product_Back_Url)&"&product_type="&product_type&""" title="""&Lebi_pro(36)&"""><img src="""&Eshop_url&"images/guanzhu.gif"" border=""0"" align=""absmiddle""></a>"
End Function

Function ProductInfoInque()
	    ProductInfoInque = Replace(splits(button_9),"[product_name]",Urlencode(RsPro("product_name"& LangTxt)))
End Function

Function ProductInfoBack()
	    ProductInfoBack = splits(button_10)
End Function

rem c_type 0 类别 1 标题 2 描述 3 关键词
Function Lebi_showproduct_category(c_type)
        Dim Getrows_Data,i,Datacount
		set Rs = conn.execute("select c_id,c_name"& LangTxt &",c_foldername,c_filename from [Lebi_category] where c_id in(0"& Replace(RsPro("categoryid"),",,",",") &"0) and is_hide=0")
	    If Not rs.eof Then
		        Getrows_Data = rs.getrows()
				Datacount = 1
		Else
		        Datacount = 0
		End If
		rs.close : Set rs = Nothing
		If Datacount = 1 Then
				For i = 0 To UBound(Getrows_Data,2)
				        Select Case c_type
							   Case "0"
									Select Case show_html
										   Case "0"
												Select Case ISAPI_Rewrite
													   Case "0"
															Select Case Config_Lebi_Eshop(16)
																   Case "0" : Lebi_showproduct_category = Lebi_showproduct_category & "<a href="""& Eshop_url & LangPath &"showsort.asp?sort_id="& Getrows_Data(0,i) &""">"& Getrows_Data(1,i) &"</a>&nbsp;|&nbsp;"
																   Case "1" : Lebi_showproduct_category = Lebi_showproduct_category & "<a href="""& Eshop_url & LangPath &"category/"& Getrows_Data(2,i) &"/"">"& Getrows_Data(1,i) &"</a>&nbsp;|&nbsp;"
																   Case "2" : Lebi_showproduct_category = Lebi_showproduct_category & "<a href="""& Eshop_url & LangPath &"category/"& Getrows_Data(2,i) &"/default.asp"">"& Getrows_Data(1,i) &"</a>&nbsp;|&nbsp;"
															End Select
														Case "1" Lebi_showproduct_category = Lebi_showproduct_category & "<a href="""& Eshop_url & LangPath &"category-"& Getrows_Data(0,i) &".html"">"& Getrows_Data(1,i) &"</a>&nbsp;|&nbsp;"
												End Select
										   Case "1" : Lebi_showproduct_category = Lebi_showproduct_category & "<a href="""& Eshop_url & LangPath & Folder(2) & Getrows_Data(3,i) &".1."& Sys_Ext &""">"& Getrows_Data(1,i) &"</a>&nbsp;|&nbsp;"
									End Select
							   Case "1" : Lebi_showproduct_category = Lebi_showproduct_category & "_"& Getrows_Data(1,i) &""
							   Case "2" : Lebi_showproduct_category = Lebi_showproduct_category & " "& Getrows_Data(1,i) &""
							   Case "3" : Lebi_showproduct_category = Lebi_showproduct_category & ","& Getrows_Data(1,i) &""
						End Select
				Next
		End If
End Function

Function ProductInfoItemViews()
        Select Case show_html
               Case "0" : ProductInfoItemViews = rspro("views")
               Case "1" : ProductInfoItemViews = "<script src="""& Eshop_url & LangPath &"product/Html/Productinfo.asp?do=Info&type=views&id="& rspro("id") &"""></script>"
        End Select
End Function

Function ProductInfoItemBuys()
        Select Case show_html
               Case "0" : ProductInfoItemBuys = rspro("buys")
               Case "1" : ProductInfoItemBuys = "<script src="""& Eshop_url & LangPath &"product/Html/Productinfo.asp?do=Info&type=buys&id="& rspro("id") &"""></script>"
        End Select
End Function

rem 2007-3-23 修正 by 56770.kingdge
Function ProductInfoEffect()
        Dim Getrows_ProductInfoEffect,ProductInfoEffect_i,Datacount
        set rs = conn.execute("select g_id,g_name"& LangTxt &" from [Lebi_gongxiao] order by g_paixu desc")
	    If Not (rs.eof And rs.bof) Then
		        Getrows_ProductInfoEffect = rs.getrows()
				Datacount = 1
		Else
		        Datacount = 0
		End If
		rs.close : Set rs = Nothing
		If Datacount = 1 Then
				For ProductInfoEffect_i = 0 To UBound(Getrows_ProductInfoEffect)
					If instr(","&rspro("p_gongxiao")&",",","& Getrows_ProductInfoEffect(0,ProductInfoEffect_i) &",")>0 Then
							Select Case ISAPI_Rewrite
								   Case "0"
										Select Case Config_Lebi_Eshop(16)
											   Case "0" : ProductInfoEffect = ProductInfoEffect + "<a href='"& Eshop_Url & LangPath &"showsort.asp?sort_id=0&gongxiao="&Getrows_ProductInfoEffect(0,ProductInfoEffect_i)&"' target='_blank'>"&Getrows_ProductInfoEffect(1,ProductInfoEffect_i)&"</a>,"
											   Case "1" : ProductInfoEffect = ProductInfoEffect + "<a href='"& Eshop_Url & LangPath &"category/0/?gongxiao="&Getrows_ProductInfoEffect(0,ProductInfoEffect_i)&"' target='_blank'>"&Getrows_ProductInfoEffect(1,ProductInfoEffect_i)&"</a>,"
											   Case "2" : ProductInfoEffect = ProductInfoEffect + "<a href='"& Eshop_Url & LangPath &"category/0/default.asp?gongxiao="&Getrows_ProductInfoEffect(0,ProductInfoEffect_i)&"' target='_blank'>"&Getrows_ProductInfoEffect(1,ProductInfoEffect_i)&"</a>,"
										End Select
									Case "1" ProductInfoEffect = ProductInfoEffect + "<a href='"& Eshop_Url & LangPath &"category-0-g"&Getrows_ProductInfoEffect(0,ProductInfoEffect_i)&".html' target='_blank'>"&Getrows_ProductInfoEffect(1,ProductInfoEffect_i)&"</a>,"
							End Select
					End If
				Next
				ProductInfoEffect = cut_Right(ProductInfoEffect)
		End If
End Function

rem 2007-3-23 修正 by 56770.kingdge
Function ProductInfoPerson()
        Dim Getrows_ProductInfoPerson,ProductInfoPerson_i,Datacount
        set rs = conn.execute("select p_id,p_name"& LangTxt &" from [Lebi_person] order by p_paixu desc")
	    If Not (rs.eof And rs.bof) Then
		        Getrows_ProductInfoPerson = rs.getrows()
				Datacount = 1
		Else
		        Datacount = 0
		End If
		rs.close : Set rs = Nothing
		If Datacount = 1 Then
				For ProductInfoPerson_i = 0 To UBound(Getrows_ProductInfoPerson)
					If instr(","&rspro("p_person")&",",","& Getrows_ProductInfoPerson(0,ProductInfoPerson_i) &",")>0 Then
							Select Case ISAPI_Rewrite
								   Case "0"
										Select Case Config_Lebi_Eshop(16)
											   Case "0" : ProductInfoPerson = ProductInfoPerson + "<a href='"& Eshop_Url & LangPath &"showsort.asp?sort_id=0&person="&Getrows_ProductInfoPerson(0,ProductInfoPerson_i)&"' target='_blank'>"&Getrows_ProductInfoPerson(1,ProductInfoPerson_i)&"</a>,"
											   Case "1" : ProductInfoPerson = ProductInfoPerson + "<a href='"& Eshop_Url & LangPath &"category/0/?person="&Getrows_ProductInfoPerson(0,ProductInfoPerson_i)&"' target='_blank'>"&Getrows_ProductInfoPerson(1,ProductInfoPerson_i)&"</a>,"
											   Case "2" : ProductInfoPerson = ProductInfoPerson + "<a href='"& Eshop_Url & LangPath &"category/0/default.asp?person="&Getrows_ProductInfoPerson(0,ProductInfoPerson_i)&"' target='_blank'>"&Getrows_ProductInfoPerson(1,ProductInfoPerson_i)&"</a>,"
										End Select
									Case "1" ProductInfoEffect = ProductInfoEffect + "<a href='"& Eshop_Url & LangPath &"category-0-p"&Getrows_ProductInfoPerson(0,ProductInfoPerson_i)&".html' target='_blank'>"&Getrows_ProductInfoPerson(1,ProductInfoPerson_i)&"</a>,"
							End Select
					End If
				Next
				ProductInfoPerson = cut_Right(ProductInfoPerson)
		End If
End Function

rem 相关商品
rem s_type 0 文本 1 图片 2008-4-16
Function ProductInfoRelatedProduct(s_type,topnum,cutname)
        Dim strtags,sqllike,str_tags,likepro_i,Getrows_ProductInfoRelatedProduct_error, Getrows_ProductInfoRelatedProduct,ProductInfoRelatedProduct_i,showpic_width,showpic_height, div_width,div_height,strFile,url,RLoadStyle(2),LoadListStr,load_str,loopstr
        s_type = checknum(s_type,0) : topnum = checknum(topnum,4) : cutname = checknum(cutname,12)
		If Product_db_name = "Lebi_product" Then 
			strtags=Trim(rspro("p_tags"))
		End If 
        If strtags = "" Then strtags = "No Tags"
        sqllike = "select top "&topnum&" product_name"& LangTxt &",id,pic,pic_size,p_filename from ["&Product_db_name&"] where zhuangtai=1 and id<>"&rspro("id")&" and ("
	    If InStr(strtags,",")>0 Then
		        str_tags = Split(strtags,",")
		        For likepro_i = 0 To UBound(str_tags)
			        If likepro_i>0 Then sqllike=sqllike&" or "
		             sqllike=sqllike&"product_name"& LangTxt &" like '%"& str_tags(likepro_i) &"%' or p_tags like '%"& str_tags(likepro_i) &"%'"
		        Next
	    Else
                sqllike = sqllike&" product_name"& LangTxt &" like '%"& strtags &"%' or p_tags like '%"& strtags &"%'"
	    End If
	    sqllike = sqllike&")"
        set Rs = conn.execute(sqllike)
        if rs.eof And rs.bof Then
		        Getrows_ProductInfoRelatedProduct_error = 1
        Else
		        Getrows_ProductInfoRelatedProduct_error = 0
		        Getrows_ProductInfoRelatedProduct = rs.getrows(topnum)
		End If
		rs.close : Set rs = Nothing
		strFile = Eshop_url& Style_Folder &"Lebi.ProductInfoRelatedProduct."
		LoadListStr = LoadStyle(strFile&"0.style")
        If Getrows_ProductInfoRelatedProduct_error = 0 Then
				RLoadStyle(0) = LoadStyle(strFile&"2.style")
				RLoadStyle(1) = LoadStyle(strFile&"3.style")
				load_str = ""
		        For ProductInfoRelatedProduct_i = 0 To UBound(Getrows_ProductInfoRelatedProduct,2)
						loopstr = ""
		                If s_type = "0" Then
								loopstr = RLoadStyle(0)
		                        Select Case show_html
		                               Case "0"
											Select Case ISAPI_Rewrite
												   Case "0" url = Eshop_url & PagePath(10) &"?id="&Getrows_ProductInfoRelatedProduct(1,ProductInfoRelatedProduct_i)
												   Case "1" url = Eshop_url & LangPath &"product-"&Getrows_ProductInfoRelatedProduct(1,ProductInfoRelatedProduct_i) &".html"
											End Select
		                               Case "1" : url = Eshop_url & LangPath & Folder(0) & Getrows_ProductInfoRelatedProduct(4,ProductInfoRelatedProduct_i)&".1."& Sys_Ext
		                        End Select
								ReplaceStyle "url",url,loopstr
								ReplaceStyle "name",Getrows_ProductInfoRelatedProduct(0,ProductInfoRelatedProduct_i),loopstr
								ReplaceStyle "target",Config_Lebi_Eshop(9),loopstr
								ReplaceStyle "cut_name",Cutchar(Getrows_ProductInfoRelatedProduct(0,ProductInfoRelatedProduct_i),12),loopstr
		                Else
								loopstr = RLoadStyle(1)
		                        Select Case show_html
                                       Case "0"
											Select Case ISAPI_Rewrite
												   Case "0" url = Eshop_url & PagePath(10) &"?id="&Getrows_ProductInfoRelatedProduct(1,ProductInfoRelatedProduct_i)
												   Case "1" url = Eshop_url & LangPath &"product-"&Getrows_ProductInfoRelatedProduct(1,ProductInfoRelatedProduct_i) &".html"
											End Select
											ReplaceStyle "br","",loopstr
		                               Case "1" :
											url = Eshop_url & LangPath & Folder(0) & Getrows_ProductInfoRelatedProduct(4,ProductInfoRelatedProduct_i) &".1."& Sys_Ext
											ReplaceStyle "br","<br>",loopstr
		                        End Select
								ReplaceStyle "url",url,loopstr
								ReplaceStyle "target",Config_Lebi_Eshop(9),loopstr
								ReplaceStyle "cut_name",Cutchar(Getrows_ProductInfoRelatedProduct(0,ProductInfoRelatedProduct_i),cutname),loopstr
								ReplaceStyle "pic_url",Eshop_url & PicturePath & Getrows_ProductInfoRelatedProduct(2,ProductInfoRelatedProduct_i),loopstr
								ReplaceStyle "name",Getrows_ProductInfoRelatedProduct(0,ProductInfoRelatedProduct_i),loopstr
		                End If
						ReplaceStyle "loop_num",ProductInfoRelatedProduct_i + 1,loopstr
						load_str = load_str & loopstr
                Next
				LoadListStr = LoadListStr & load_str
		Else
				LoadListStr = LoadListStr & splits(LoadStyle(strFile&"1.style"))
        End if
		ProductInfoRelatedProduct = LoadListStr & LoadStyle(strFile&"4.style")
End Function

Function ProductInfoRelatedNews(p_topnum,p_lentitle)
        Dim strtags,sqllike,str_tags,likenews_i,Getrows_ProductInfoRelatedNews_error, Getrows_ProductInfoRelatedNews,ProductInfoRelatedNews_i,strFile,Load_str_1,url,title,width, newline,LoadListStr,loopstr,loopstr_2
		strFile = Eshop_url& Style_Folder &"Lebi.ProductInfoRelatedNews."
        p_topnum = checknum(p_topnum,4) : p_lentitle = checknum(p_lentitle,12)
        strtags=Trim(rspro("p_tags"))
        If strtags = "" Then strtags = "No Tags"
        sqllike="select top "& p_topnum &" title"& LangTxt &",id,n_filename from [Lebi_news] where 1=1 and ("
	    If InStr(strtags,",")>0 Then
		        str_tags = Split(strtags,",")
		        For likenews_i = 0 To UBound(str_tags)
			            If likenews_i>0 Then sqllike=sqllike&" or "
		                sqllike=sqllike&"title"& LangTxt &" like '%"& str_tags(likenews_i) &"%'"
		        Next
	    Else
                sqllike=sqllike&" title"& LangTxt &" like '%"& strtags &"%'"
	    End If
	    sqllike=sqllike&")"
        set Rs = conn.execute(sqllike)
        if rs.eof And rs.bof Then
		        Getrows_ProductInfoRelatedNews_error = 1
        Else
		        Getrows_ProductInfoRelatedNews_error = 0
		        Getrows_ProductInfoRelatedNews = rs.getrows(p_topnum)
		End If
		rs.close : Set rs = Nothing
		LoadListStr = LoadStyle(strFile&"0.style")
        If Getrows_ProductInfoRelatedNews_error = 0 Then
				Load_str_1 = LoadStyle(strFile&"2.style")
				loopstr = ""
		        For ProductInfoRelatedNews_i = 0 To UBound(Getrows_ProductInfoRelatedNews,2)
						loopstr_2 = Load_str_1
					    Select Case show_html
		       			       Case "0"
									Select Case ISAPI_Rewrite
										   Case "0"
												Select Case Config_Lebi_Eshop(16)
													   Case "0" : url = Eshop_url & LangPath &"zhuanti.asp?action=news_list&id="& Getrows_ProductInfoRelatedNews(1,ProductInfoRelatedNews_i)
													   Case "1" : url = Eshop_url & LangPath &"news/list/?id="& Getrows_ProductInfoRelatedNews(1,ProductInfoRelatedNews_i)
													   Case "2" : url = Eshop_url & LangPath &"news/list/default.asp?id="& Getrows_ProductInfoRelatedNews(1,ProductInfoRelatedNews_i)
												End Select
											Case "1" url = Eshop_url & LangPath &"news_list-"& Getrows_ProductInfoRelatedNews(1,ProductInfoRelatedNews_i) &".html"
									End Select
		       			       Case "1" : url = Eshop_url & LangPath & Folder(1) &"info/"& Getrows_ProductInfoRelatedNews(2,ProductInfoRelatedNews_i) &"."& Sys_Ext
					    End Select
						title = Getrows_ProductInfoRelatedNews(0,ProductInfoRelatedNews_i)
						ReplaceStyle "url",url,loopstr_2
						ReplaceStyle "title",title,loopstr_2
						ReplaceStyle "cut_title",Cutchar(title,p_lentitle),loopstr_2
						ReplaceStyle "loop_num",ProductInfoRelatedNews_i + 1,loopstr_2
						loopstr = loopstr & loopstr_2
                Next
				LoadListStr = LoadListStr & loopstr
		Else
				LoadListStr = LoadListStr & splits(LoadStyle(strFile&"1.style"))
        End If
		ProductInfoRelatedNews = LoadListStr & LoadStyle(strFile&"3.style")
End Function

rem 商品标签 2008-4-16 56770.WangLei
Function ProductInfoTags()
        Dim strtags,str_tags,ProductInfoTags_i,tags_n,tags_num,url
        strtags=Trim(rspro("p_tags"))
        ProductInfoTags = ""
        If Trim(rspro("p_tags"))<>"" Then
	        If InStr(Trim(rspro("p_tags")),",")>0 Then
		        str_tags = Split(Trim(rspro("p_tags")),",")
		        For ProductInfoTags_i = 0 To UBound(str_tags)
						Set tags_n = conn.execute("select tags_num from [Lebi_tags] where tags_name='"&str_tags(ProductInfoTags_i)&"'")
						If Not tags_n.eof Then
							tags_num = tags_n("tags_num")
						Else
							tags_num = "0"
						End If
						tags_n.close
						Select Case ISAPI_Rewrite
							   Case "0"	url = Eshop_url & PagePath(9) &"?product_name="& Urlencode(str_tags(ProductInfoTags_i)) &"&keytype=4"
							   Case "1"	url = Eshop_url & LangPath &"search-"& Urlencode(str_tags(ProductInfoTags_i)) &"-4.html"
						End Select
						ProductInfoTags = ProductInfoTags &"<a href='"& url &"' class='Tags_link' title='"& str_tags(ProductInfoTags_i) &"' target='"& Config_Lebi_Eshop(9) &"'>"& str_tags(ProductInfoTags_i) &" ("& tags_num &")</a>&nbsp;&nbsp;"
		        Next
		Else
				Set tags_n = conn.execute("select tags_num from [Lebi_tags] where tags_name='"&Trim(rspro("p_tags"))&"'")
				If Not tags_n.eof Then
					tags_num = tags_n("tags_num")
				Else
					tags_num = "0"
				End If
				tags_n.close
				Select Case ISAPI_Rewrite
					   Case "0"	url = Eshop_url & PagePath(9) &"?product_name="& Urlencode(strtags) &"&keytype=4"
					   Case "1"	url = Eshop_url & LangPath &"search-"& Urlencode(strtags) &"-4.html"
				End Select
				ProductInfoTags = ProductInfoTags &"<a href='"& url &"' class='Tags_link' title='"& strtags &"' target='"& Config_Lebi_Eshop(9) &"'>"& strtags &" ("& tags_num &")</a>&nbsp;&nbsp;"
		End If
		Set tags_n = Nothing
	End If
End Function

rem 商品评论 2008-3-8 by 56770.WangLei
Function ProductInfoComments()
        Dim DataCount,DataList,i,Filename,user_name,strFile,sqlwhere,LoadListStr,loopstr,loopstr1,loopstr2,tmpstr
		sqlwhere = "LangTxt = '"& LangTxt &"' and downid="& rspro("id")
		If getGradePurview(9) = 1 Then
				sqlwhere = sqlwhere &" and (show=1 or ip = '"& GetIp() &"')"
		Else
				sqlwhere = sqlwhere &" or ip = '"& GetIp() &"'"
		End If
	    Dim ors
	    Set ors=new Cls_vbsPage
	    Set ors.Conn=conn
	    With ors
		    .PageSize=50
		    .PageName="Page"
		    .DbType="AC"
		    .RecType=0
		    .Pkey="id"
    	    .Field="name,vtime,content,replay"
		    .Table="[Lebi_Dvote]"
			.Condition = sqlwhere
            .OrderBy="id desc"
	    End With
	    DataCount=ors.RecCount()
	    DataList=ors.ResultSet()

		strFile = Eshop_url& Style_Folder &"Lebi.ProductInfoComments."
		LoadListStr = LoadStyle(strFile&"0.style")
	    If DataCount < 1 Then
				LoadListStr = LoadListStr & splits(LoadStyle(strFile&"1.style"))
        Else
				Select Case show_html
					   Case "0" : Filename = PagePath(10)
					   Case "1" : Filename = Eshop_url & LangPath & Folder(0) & rspro("p_filename")
				End Select
				loopstr1 = LoadStyle(strFile&"3.style")
				loopstr2 = splits(LoadStyle(strFile&"4.style"))
				loopstr = ""
                For i = 0 To Ubound(DataList,2)
						tmpstr = LoadStyle(strFile&"2.style") & loopstr1
						If Trim(DataList(0,i)) = "" Or IsNull(DataList(0,i)) Then
								user_name = "Guest"
						Else
								user_name = DataList(0,i)
						End If
						ReplaceStyle "content",DataList(2,i),tmpstr
						ReplaceStyle "userName",user_name,tmpstr
						ReplaceStyle "time",DataList(1,i),tmpstr
						ReplaceStyle "loop_num",i + 1,tmpstr
						loopstr = loopstr & tmpstr
						If DataList(3,i) <> "" Then
								tmpstr = loopstr2
								ReplaceStyle "replay",DataList(3,i),tmpstr
								loopstr = loopstr & tmpstr
						End If
						loopstr = loopstr & LoadStyle(strFile&"5.style")
                Next
				LoadListStr = LoadListStr & loopstr
		End If
		loopstr = LoadStyle(strFile&"6.style")
		ReplaceStyle "pagefoot",ors.ShowPageFoot(Filename),loopstr
		ProductInfoComments = LoadListStr & loopstr
End Function

Function GetOnlinepayOrdernum()
        Dim yy,mm,dd,ymd,xiaoshi,fenzhong,miao,billno
		yy=year(date):mm=right("00"&month(date),2):dd=right("00"&day(date),2):ymd=yy&mm&dd:xiaoshi=right("00"&hour(time),2):fenzhong=right("00"&minute(time),2):miao=right("00"&second(time),2):BillNo=xiaoshi&fenzhong&miao
        GetOnlinepayOrdernum=ymd&BillNo
End Function

Function ProductOnlinepayAlipay()
		If Pay_alipay(0)=1 And getGradePurview(0) And InStr(Pay_alipay(13),LangName)>0 Then
				If Pay_alipay(8) <> "" Then
						ProductOnlinepayAlipay = "<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=1&pay_type=1&pro_id="& rspro("id") &"&subject="&trim(rspro("bianhao")) &"&trade_no="& GetOnlinepayOrdernum() &"&price="& GetOnlinepayPrice() &"&md5char="& md5(GetOnlinepayPrice()) &"&paybackurl="& Pay_alipay(6) &"&extra_common_param="& LangPath &"|' title='"& Pay_alipay(11) &"' target='_blank'><img src='"& Eshop_url & Pay_alipay(8) &"' alt='"& Pay_alipay(11) &"' border='0' align='absmiddle'></a>"
				Else
						ProductOnlinepayAlipay = "<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=1&pay_type=1&pro_id="& rspro("id") &"&subject="&trim(rspro("bianhao")) &"&trade_no="& GetOnlinepayOrdernum() &"&price="& GetOnlinepayPrice() &"&md5char="& md5(GetOnlinepayPrice()) &"&paybackurl="& Pay_alipay(6) &"&extra_common_param="& LangPath &"|');"" value='"& Pay_alipay(11) &"' class='button'>"
				End If
        End If
End Function

Function ProductOnlinepayChinabank()
		If Pay_chinabank(0)=1 And getGradePurview(0) And InStr(Pay_chinabank(11),LangName)>0 Then
				If Pay_chinabank(6) <> "" Then
						ProductOnlinepayChinabank = "<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=1&pay_type=4&pro_id="& rspro("id") &"&subject="&trim(rspro("bianhao")) &"&trade_no="& GetOnlinepayOrdernum() &"&price="& GetOnlinepayPrice() &"&md5char="& md5(GetOnlinepayPrice()) &"&paybackurl="& Pay_chinabank(4) &"&remark1="& LangPath &"|' title='"& Pay_chinabank(9) &"' target='_blank'><img src='"& Eshop_url & Pay_chinabank(6) &"' alt='"& Pay_chinabank(9) &"' border='0' align='absmiddle'></a>"
				Else
						ProductOnlinepayChinabank = "<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=1&pay_type=4&pro_id="& rspro("id") &"&subject="&trim(rspro("bianhao")) &"&trade_no="& GetOnlinepayOrdernum() &"&price="& GetOnlinepayPrice() &"&md5char="& md5(GetOnlinepayPrice()) &"&paybackurl="& Pay_chinabank(4) &"&remark1="& LangPath &"|');"" value='"& Pay_chinabank(9) &"' class='button'>"
				End If
        End If
End Function

Function ProductOnlinepayBill()
		If Pay_bill(0)=1 And getGradePurview(0) And InStr(Pay_bill(10),LangName)>0 Then
				If Pay_bill(5) <> "" Then
						ProductOnlinepayBill = "<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=1&pay_type=2&pro_id="& rspro("id") &"&subject="& trim(rspro("bianhao")) &"&trade_no="& GetOnlinepayOrdernum() &"&price="& GetOnlinepayPrice() &"&md5char="& md5(GetOnlinepayPrice()) &"&paybackurl="& Pay_bill(3) &"&ext1="& LangPath &"|' title='"& Pay_bill(8) &"' target='_blank'><img src='"& Eshop_url & Pay_bill(5) &"' alt='"& Pay_bill(8) &"' border='0' align='absmiddle'></a>"
				Else
						ProductOnlinepayBill = "<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=1&pay_type=2&pro_id="& rspro("id") &"&subject="& trim(rspro("bianhao")) &"&trade_no="& GetOnlinepayOrdernum() &"&price="& GetOnlinepayPrice() &"&md5char="& md5(GetOnlinepayPrice()) &"&paybackurl="& Pay_bill(3) &"&ext1="& LangPath &"|');"" value='"& Pay_bill(8) &"' class='button'>"
				End If
        End If
End Function

Function ProductOnlinepayPaypal()
		If Pay_paypal(0)=1 And getGradePurview(0) And InStr(Pay_paypal(11),LangName)>0 Then
				If Pay_paypal(4) <> "" Then
						ProductOnlinepayPaypal = "<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=1&pay_type=3&pro_id="& rspro("id") &"&subject="&trim(rspro("bianhao")) &"&trade_no="& GetOnlinepayOrdernum() &"&price="& GetOnlinepayPrice() &"&md5char="& md5(GetOnlinepayPrice()) &"&paypal_currency_code="& paypal_currency_code &"&paybackurl="& Pay_paypal(7) &"&custom="& LangPath &"|' title='"& Pay_paypal(9) &"' target='_blank'><img src='"& Eshop_url & Pay_paypal(4) &"' alt='"& Pay_paypal(9) &"' border='0' align='absmiddle'></a>"
				Else
						ProductOnlinepayPaypal = "<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=1&pay_type=3&pro_id="& rspro("id") &"&subject="&trim(rspro("bianhao")) &"&trade_no="& GetOnlinepayOrdernum() &"&price="& GetOnlinepayPrice() &"&md5char="& md5(GetOnlinepayPrice()) &"&paypal_currency_code="& paypal_currency_code &"&paybackurl="& Pay_paypal(7) &"&custom="& LangPath &"|');"" value='"& Pay_paypal(9) &"' class='button'>"
				End If
        End If
End Function

Function ProductOnlinepayPaypal_cn()
		If Pay_paypal_cn(0)=1 And getGradePurview(0) And InStr(Pay_paypal_cn(11),LangName)>0 Then
				If Pay_paypal_cn(4) <> "" Then
						ProductOnlinepaypaypal_cn = "<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=1&pay_type=3&pro_id="& rspro("id") &"&subject="&trim(rspro("bianhao")) &"&trade_no="& GetOnlinepayOrdernum() &"&price="& GetOnlinepayPrice() &"&md5char="& md5(GetOnlinepayPrice()) &"&paybackurl="& Pay_paypal_cn(7) &"&custom="& LangPath &"|' title='"& Pay_paypal_cn(9) &"' target='_blank'><img src='"& Eshop_url & Pay_paypal_cn(4) &"' alt='"& Pay_paypal_cn(9) &"' border='0' align='absmiddle'></a>"
				Else
						ProductOnlinepaypaypal_cn = "<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=1&pay_type=3&pro_id="& rspro("id") &"&subject="&trim(rspro("bianhao")) &"&trade_no="& GetOnlinepayOrdernum() &"&price="& GetOnlinepayPrice() &"&md5char="& md5(GetOnlinepayPrice()) &"&paybackurl="& Pay_paypal_cn(7) &"&custom="& LangPath &"|');"" value='"& Pay_paypal_cn(9) &"' class='button'>"
				End If
        End If
End Function

Function ProductOnlinepayTenpay()
		If Pay_tenpay(0)=1 And getGradePurview(0) And InStr(Pay_tenpay(11),LangName)>0 Then
				If Pay_tenpay(6) <> "" Then
						ProductOnlinepayTenpay = "<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=1&pay_type=5&pro_id="& rspro("id") &"&subject="&trim(rspro("bianhao")) &"&trade_no="& GetOnlinepayOrdernum() &"&price="& GetOnlinepayPrice() &"&md5char="& md5(GetOnlinepayPrice()) &"&paybackurl="& Urlencode(Pay_tenpay(4)) &"&Pay_tenpay_attach="& LangPath &"|' title='"& Pay_tenpay(9) &"' target='_blank'><img src='"& Eshop_url & Pay_tenpay(6) &"' alt='"& Pay_tenpay(9) &"' border='0' align='absmiddle'></a>"
				Else
						ProductOnlinepayTenpay = "<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=1&pay_type=5&pro_id="& rspro("id") &"&subject="&trim(rspro("bianhao")) &"&trade_no="& GetOnlinepayOrdernum() &"&price="& GetOnlinepayPrice() &"&md5char="& md5(GetOnlinepayPrice()) &"&paybackurl="& Urlencode(Pay_tenpay(4)) &"&Pay_tenpay_attach="& LangPath &"|');"" value='"& Pay_tenpay(9) &"' class='button'>"
				End If
        End If
End Function

Function ProductOnlinepayTenpay2()
		If Pay_tenpay2(0)=1 And getGradePurview(0) And InStr(Pay_tenpay2(11),LangName)>0 Then
				If Pay_tenpay2(6) <> "" Then
						ProductOnlinepayTenpay2 = "<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=1&pay_type=6&pro_id="& rspro("id") &"&subject="&trim(rspro("bianhao")) &"&trade_no="& GetOnlinepayOrdernum() &"&price="& GetOnlinepayPrice() &"&md5char="& md5(GetOnlinepayPrice()) &"&paybackurl="& Urlencode(Pay_tenpay2(4)) &"&Pay_tenpay_attach="& LangPath &"|' title='"& Pay_tenpay2(9) &"' target='_blank'><img src='"& Eshop_url & Pay_tenpay2(6) &"' alt='"& Pay_tenpay2(9) &"' border='0' align='absmiddle'></a>"
				Else
						ProductOnlinepayTenpay2 = "<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=1&pay_type=6&pro_id="& rspro("id") &"&subject="&trim(rspro("bianhao")) &"&trade_no="& GetOnlinepayOrdernum() &"&price="& GetOnlinepayPrice() &"&md5char="& md5(GetOnlinepayPrice()) &"&paybackurl="& Urlencode(Pay_tenpay2(4)) &"&Pay_tenpay_attach="& LangPath &"|');"" value='"& Pay_tenpay2(9) &"' class='button'>"
				End If
        End If
End Function

Function ProductOnlinepayIPS()
		If Pay_ips(0)=1 And getGradePurview(0) And InStr(Pay_ips(11),LangName)>0 Then
				If Pay_ips(6) <> "" Then
						ProductOnlinepayIPS = "<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=1&pay_type=8&pro_id="& rspro("id") &"&subject="&trim(rspro("bianhao")) &"&trade_no="& GetOnlinepayOrdernum() &"&price="& GetOnlinepayPrice() &"&md5char="& md5(GetOnlinepayPrice()) &"&paybackurl="& Urlencode(Pay_ips(4)) &"&attach="& LangPath &"|' title='"& Pay_ips(9) &"' target='_blank'><img src='"& Eshop_url & Pay_ips(6) &"' alt='"& Pay_ips(9) &"' border='0' align='absmiddle'></a>"
				Else
						ProductOnlinepayIPS = "<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=1&pay_type=8&pro_id="& rspro("id") &"&subject="&trim(rspro("bianhao")) &"&trade_no="& GetOnlinepayOrdernum() &"&price="& GetOnlinepayPrice() &"&md5char="& md5(GetOnlinepayPrice()) &"&paybackurl="& Urlencode(Pay_ips(4)) &"&attach="& LangPath &"|');"" value='"& Pay_ips(9) &"' class='button'>"
				End If
        End If
End Function

Function ProductOnlinepayBaofu()
		If Pay_baofu(0)=1 And getGradePurview(0) And InStr(Pay_baofu(11),LangName)>0 Then
				If Pay_baofu(6) <> "" Then
						ProductOnlinepayChinabank = "<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=1&pay_type=9&pro_id="& rspro("id") &"&subject="&trim(rspro("bianhao")) &"&trade_no="& GetOnlinepayOrdernum() &"&price="& GetOnlinepayPrice() &"&md5char="& md5(GetOnlinepayPrice()) &"&paybackurl="& Pay_baofu(4) &"&AdditionalInfo="& LangPath &"|' title='"& Pay_baofu(9) &"' target='_blank'><img src='"& Eshop_url & Pay_baofu(6) &"' alt='"& Pay_baofu(9) &"' border='0' align='absmiddle'></a>"
				Else
						ProductOnlinepayChinabank = "<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=1&pay_type=9&pro_id="& rspro("id") &"&subject="&trim(rspro("bianhao")) &"&trade_no="& GetOnlinepayOrdernum() &"&price="& GetOnlinepayPrice() &"&md5char="& md5(GetOnlinepayPrice()) &"&paybackurl="& Pay_baofu(4) &"&AdditionalInfo="& LangPath &"|');"" value='"& Pay_baofu(9) &"' class='button'>"
				End If
        End If
End Function
rem 拍卖商品相关显示
Function Lebi_showproduct_auct()
End Function

rem 商品评级  56770.WangLei 2008-1-24
Function ProductInfoItemRating()
        Dim ratingnum,strFile,Load_str_1,Load_str_2,url
		ratingnum = conn.execute("select count(p_id) from [Lebi_rating] where p_id = "& rspro("id") &"")(0)
		strFile = Eshop_url& Style_Folder &"Lebi.ProductInfoItemRating."
		Load_str_2 = splits(LoadStyle(strFile&"0.style"))
		url = LangPath &"product/post.asp"
		ReplaceStyle "url1",url &"?ID="& rspro("id") &"&amp;do=rating&amp;Rank=1",Load_str_2
		ReplaceStyle "url2",url &"?ID="& rspro("id") &"&amp;do=rating&amp;Rank=2",Load_str_2
		ReplaceStyle "url3",url &"?ID="& rspro("id") &"&amp;do=rating&amp;Rank=3",Load_str_2
		ReplaceStyle "url4",url &"?ID="& rspro("id") &"&amp;do=rating&amp;Rank=4",Load_str_2
		ReplaceStyle "url5",url &"?ID="& rspro("id") &"&amp;do=rating&amp;Rank=5",Load_str_2
		If IsNumeric(rspro("p_rating")) And rspro("p_rating") > 0 Then
				Load_str_1 = splits(LoadStyle(strFile&"1.style"))
				ReplaceStyle "pic_url","images/rating/"& rspro("p_rating") &".gif",Load_str_1
				ReplaceStyle "alt",rspro("p_rating"),Load_str_1
				Select Case Config_Lebi_Eshop(16)
					   Case "2" : ReplaceStyle "user_url",LangPath &"Product/Rating/default.asp?ID="& rspro("id"),Load_str_1
					   Case Else
							ReplaceStyle "user_url",LangPath &"Product/Rating/?ID="& rspro("id"),Load_str_1
				End Select
				ReplaceStyle "num",ratingnum,Load_str_1
				ProductInfoItemRating = Load_str_1
		End If
		ProductInfoItemRating = Load_str_2 & ProductInfoItemRating
End Function

rem 调用大图 56770.WangLei 2008-1-24
Function ProductInfoItemBigpic()
        Dim strFile,loopstr,tmpstr,tmpstr2
		strFile = Eshop_url& Style_Folder &"Lebi.ProductInfoItemBigpic."
		ProductInfoItemBigpic = splits(LoadStyle(strFile&"0.style"))
		'ReplaceStyle "src",eshop_url &"include/js/js_menu.js",ProductInfoItemBigpic
		loopstr = LoadStyle(strFile&"1.style")
        If InStr(rspro("cpic"),"@@")>0 Then
		        Dim ProductInfoItemBigpic_cpic,i
                ProductInfoItemBigpic_cpic=split(rspro("cpic"),"@@")
				tmpstr = ""
                for i=1 to ubound(ProductInfoItemBigpic_cpic)
                        If ProductInfoItemBigpic_cpic(i)<>"" Then
								tmpstr2 = loopstr
								ReplaceStyle "pic_url",Eshop_url & PicturePath & ProductInfoItemBigpic_cpic(i),tmpstr2
								tmpstr = tmpstr & tmpstr2
                        End  If
                Next
				ProductInfoItemBigpic = ProductInfoItemBigpic & tmpstr
        Else
				ReplaceStyle "pic_url",Eshop_url & PicturePath & rspro("cpic"),loopstr
				ProductInfoItemBigpic = ProductInfoItemBigpic & loopstr
        End If
		ProductInfoItemBigpic = ProductInfoItemBigpic & LoadStyle(strFile&"2.style")
End Function

rem 商品颜色 2008-6-3 56770.kingdge
Function ProductInfoItemColor()
        Dim rss,strFile,LoadListStr,Load_str,loopstr,tmpstr
		strFile = Eshop_url& Style_Folder &"Lebi.ProductInfoItemColor."
		d_color = Replace(Trim(rspro("p_color"))," ","")
        If d_color<>",," And d_color<>"" Then
				sql = "select c_id,c_name"& LangTxt &",c_color from [Lebi_color] where"
				if IsSqlDataBase ="1" then sql = sql+" CharIndex(','+rtrim(c_id)+',',',"& d_color &",')>0"
				if IsSqlDataBase ="0" then sql = sql+" instr(',"& d_color &",',','+rtrim(c_id)+',')>0"
				sql = sql+" order by c_paixu desc"
				set rss = conn.execute(sql)
                If rss.eof Then
						ProductInfoItemColor = "<input type=""hidden"" name=""pro_color_0001_"&rspro("id")&""" value=""-"">"
	            Else
						LoadListStr = LoadStyle(strFile&"0.style")
						ReplaceStyle "id",rspro("id"),LoadListStr
						Load_str = LoadStyle(strFile&"1.style")
						loopstr = ""
						do while not rss.eof
								tmpstr = Load_str
								ReplaceStyle "name",Trim(rss(1)),tmpstr
								ReplaceStyle "color",trim(rss(2)),tmpstr
								loopstr = loopstr & tmpstr
								rss.movenext
								tmpstr = ""
						Loop
						ProductInfoItemColor = LoadListStr & loopstr & LoadStyle(strFile&"2.style")
	            End If
                rss.close:Set rss=Nothing

        Else
				ProductInfoItemColor = "<input type=""hidden"" name=""pro_color_0001_"&rspro("id")&""" value=""-"">"
        End If
end function

rem 商品尺码 2008-6-3 56770.kingdge
Function ProductInfoItemSize()
        Dim rss,strFile,LoadListStr,Load_str,tmpstr,loopstr
		strFile = Eshop_url& Style_Folder &"Lebi.ProductInfoItemSize."
		d_chima = Replace(Trim(rspro("p_chima"))," ","")
        If d_chima<>",," And d_chima<>"" Then
				sql = "select c_id,c_name"& LangTxt &" from [Lebi_chima] where"
				if IsSqlDataBase ="1" then sql = sql+" CharIndex(','+rtrim(c_id)+',',',"& d_chima &",')>0"
				if IsSqlDataBase ="0" then sql = sql+" instr(',"& d_chima &",',','+rtrim(c_id)+',')>0"
				sql = sql+" order by c_paixu desc"
				set rss = conn.execute(sql)
	            If rss.eof Then
	                    ProductInfoItemSize = "<input type=""hidden"" name=""pro_size_0001_"& rspro("id") &""" value=""-"">"
	            Else
						LoadListStr = LoadStyle(strFile&"0.style")
						ReplaceStyle "id",rspro("id"),LoadListStr
						Load_str = LoadStyle(strFile&"1.style")
						loopstr = ""
	                    do while not rss.eof
							tmpstr = Load_str
							ReplaceStyle "name",Trim(rss(1)),tmpstr
							loopstr = loopstr & tmpstr
							rss.movenext
							tmpstr = ""
                        Loop
						ProductInfoItemSize = LoadListStr & loopstr & LoadStyle(strFile&"2.style")
                End If
                rss.close:Set rss=Nothing
        Else
	            ProductInfoItemSize = "<input type=""hidden"" name=""pro_size_0001_"& rspro("id") &""" value=""-"">"
        End If
end function

Function ProductInfoItemQty()
        If CLng(getGradePurview(17)) = 1 Or (CLng(getGradePurview(17)) = 0 And CLng(rspro("kucun")) > 0) Then
                ProductInfoItemQty = "<input type=""text"" name=""pro_num_0001_"& rspro("id") &""" id=""pro_num_0001_"& rspro("id") &""" value=""1"" class=""form"" size=""5"" />"
		Else
				ProductInfoItemQty = "<input type=""hidden"" name=""pro_num_0001_"& rspro("id") &""" id=""pro_num_0001_"& rspro("id") &""" value=""0"" />"&Lebi_pro(39)
        end if
end function

rem 商品图片显示 56770.WangLei 2008-4-15
Function ProductInfoItemPicture()
		Dim border_type,cpic_name,showpic_url,cutcpic,i,view_pic_path,view_s_pic_i,view_s_pic_ii, ProductInfoItemPicture_linenum,pic_url,strFile,Load_str_2,pic_height,pic_width,LoadListStr,pic_type, RLoadStyle(15),tmpstr,loopstr,lang_pic_url
		If RsPro("cpic")<>"nonegif.gif" And InStr(rspro("cpic"),"@@")>0 Then
				dim str_cpic
				If Left(Trim(rspro("cpic")),2)="@@" Then
						str_cpic=split(Right(Trim(rspro("cpic")),(Len(Trim(rspro("cpic")))-2)),"@@")
				Else
						str_cpic=split(Trim(rspro("cpic")),"@@")
				End If
		End If
		strFile = Eshop_url& Style_Folder &"Lebi.ProductInfoItemPicture."
		LoadListStr = LoadListStr & splits(LoadStyle(strFile&"0.style"))
		tmpstr = ""
		If Trim(RsPro("cpic"))="" then
				tmpstr = LoadStyle(strFile&"1.style")
				pic_size=Split(rspro("pic_size"),"|")
				pic_width=pic_size(0)
				pic_height=pic_size(1)

				ReplaceStyle "pic_url",Eshop_url & PicturePath & RsPro("pic"),tmpstr
				ReplaceStyle "pic_width",pic_width,tmpstr
				ReplaceStyle "pic_height",pic_height,tmpstr
		Else
				tmpstr = LoadStyle(strFile&"2.style")
				pic_url = ""
				If RsPro("cpic")="nonegif.gif" Then
						pic_url = Eshop_url & PicPath &"/nonegif.gif"
						cpic_name="nonegif.gif"
				ElseIf InStr(Right(Trim(rspro("cpic")),Len(Trim(rspro("cpic")))-2),"@@")>0 Then
						i=0
						pic_url = Eshop_url & PicturePath & str_cpic(i)
				ElseIf InStr(Right(rspro("cpic"),Len(rspro("cpic"))-2),"@@")<=0 Then
						If InStr(rspro("cpic"),"@@")>0 Then
								cpic_name=Right(rspro("cpic"),Len(rspro("cpic"))-2)
						Else
								cpic_name=rspro("cpic")
						End If
						showpic_url=Eshop_url & PicturePath & cpic_name
						pic_url = showpic_url
				End If
				If product_type = "" Then product_type = "pro"
				Select Case ISAPI_Rewrite
					   Case "0" ReplaceStyle "url",Eshop_url & PagePath(12) &"?id="& RsPro("id") &"&product_type="&product_type,tmpstr
					   Case "1" ReplaceStyle "url",LangPath &"product_pic-"& RsPro("id") &"-t"& product_type &".html",tmpstr
				End Select
				ReplaceStyle "pic_url",pic_url,tmpstr
				ReplaceStyle "pic_width",pic_width,tmpstr
		End If
		ReplaceStyle "pic",tmpstr,LoadListStr
		ReplaceStyle "height",pic_dh,LoadListStr
'		If Left(Trim(rspro("cpic")),2)="@@" Then
'				cutcpic = Right(Trim(rspro("cpic")),(Len(Trim(rspro("cpic")))-2))
'		Else
				cutcpic = Trim(rspro("cpic"))
'		End If
		If InStr(cutcpic,"@@") > 0 Then
				loopstr = LoadStyle(strFile&"3.style")
				ReplaceStyle "border_type",border_type,loopstr
				LoadListStr = LoadListStr & loopstr
				tmpstr = splits(LoadStyle(strFile&"4.style"))
				Load_str_2 = ""
				For view_s_pic_i = 0 to ubound(str_cpic)
						loopstr = tmpstr
						view_s_pic_ii=view_s_pic_ii+1
						If str_cpic(view_s_pic_i)<>"" Then
								Select Case view_s_pic_i
								Case "0" ReplaceStyle "class","onbg",loopstr
								Case Else ReplaceStyle "class","autobg",loopstr
								End Select
								If product_type = "" Then product_type = "pro"
								Select Case ISAPI_Rewrite
									   Case "0" ReplaceStyle "url",PagePath(12) &"?id="& RsPro("id") &"&product_type="& product_type &"&pic_path="& str_cpic(view_s_pic_i),loopstr
									   Case "1" ReplaceStyle "url",LangPath &"product_pic-"& RsPro("id") &"-t"& product_type &"-p"& Urlencode(str_cpic(view_s_pic_i)) &".html",loopstr
								End Select
								ReplaceStyle "pic_url",PicturePath & str_cpic(view_s_pic_i),loopstr
								ReplaceStyle "lang_pic_url",Eshop_url & PicturePath & str_cpic(view_s_pic_i),loopstr
						End If
						Load_str_2 = Load_str_2 & loopstr
				Next
				Load_str_2 = Load_str_2 & LoadStyle(strFile&"5.style")
		End If
		ProductInfoItemPicture = LoadListStr & Load_str_2 & LoadStyle(strFile&"6.style")
End Function

rem 显示商品价格
rem p_type 价格类型 0 市场价 1,2,3... 为对应会员等级
'Function ProductInfoItemPrice(p_type,p_flag)
Function ProductInfoItemPrice(p_type)
		If show_html = "1" And product_type<>"unite" Then
				ProductInfoItemPrice = "<script src="""& Eshop_url & LangPath &"product/Html/Productinfo.asp?do=Info&type=gradePrice&p_type="& p_type &"&id="& rspro("id") &"&moneyhl="& moneyhl &"""></script>"
				Exit Function
		End If
		Dim t_price : t_price = 0
		If IsNull(p_type) Or Not IsNumeric(p_type) Then p_type = 0
		If p_type > UserGroupNumber Then p_type = UserGroupNumber
		If product_type = "unite" Then
				Select Case p_type
					   Case "0" : ProductInfoItemPrice = dw & formatnumber2(RsPro("sprice")/moneyhl) & dw2
					   Case Else
							t_price = dw & formatnumber2(RsPro("cprice")/moneyhl) & dw2
				End Select
		Else
				Select Case p_type
					   Case "0"
					   If Trim(RsPro("P_SpecificationName")) = "" Or IsNull(RsPro("P_SpecificationName")) Then
								ProductInfoItemPrice = dw & formatnumber2(RsPro("sprice")/moneyhl) & dw2
					   Else 
								Set rsprice = conn.execute("select top 1 p_price from [Lebi_Product_Stock] where p_id = "& id &" order by p_price asc")
								If Not rsprice.eof Then 
										Lowprice = RsPro("sprice") + rsprice(0)
								End If 
								rsprice.close : Set rs = Nothing
								Set rsprice = conn.execute("select top 1 p_price from [Lebi_Product_Stock] where p_id = "& id &" order by p_price desc")
								If Not rsprice.eof Then 
										Highprice = RsPro("sprice") + rsprice(0)
								End If 
								rsprice.close : Set rs = Nothing
								If CDbl(Highprice) = CDbl(Lowprice) Then 
										ProductInfoItemPrice = dw & formatnumber2(Lowprice/moneyhl) & dw2
								Else
										ProductInfoItemPrice = dw & formatnumber2(Lowprice/moneyhl) & dw2 &" - "& dw & formatnumber2(Highprice/moneyhl) & dw2
								End If 
					   End If 
					   Case Else
							If checkPricePurview(p_type) Then
									UserPrice = RsPro(35+p_type)
									If RsPro("cx") = 1 Then UserPrice = RsPro("cprice")
									If RsPro("P_SpecificationName") = "" Or IsNull(RsPro("P_SpecificationName")) Then
											ProductInfoItemPrice = dw & formatnumber2(UserPrice/moneyhl) & dw2
									Else 
											Set rsprice = conn.execute("select top 1 p_price from [Lebi_Product_Stock] where p_id = "& id &" order by p_price asc")
											If Not rsprice.eof Then 
													Lowprice = UserPrice + rsprice(0)
											End If 
											rsprice.close : Set rs = Nothing
											Set rsprice = conn.execute("select top 1 p_price from [Lebi_Product_Stock] where p_id = "& id &" order by p_price desc")
											If Not rsprice.eof Then 
													Highprice = UserPrice + rsprice(0)
											End If 
											rsprice.close : Set rs = Nothing
											If CDbl(Highprice) = CDbl(Lowprice) Then 
													ProductInfoItemPrice = dw & formatnumber2(Lowprice/moneyhl) & dw2
											Else
													ProductInfoItemPrice = dw & formatnumber2(Lowprice/moneyhl) & dw2 &" - "& dw & formatnumber2(Highprice/moneyhl) & dw2
											End If 
									End If 
							Else
									ProductInfoItemPrice = Lebi_word(66)
							End If
				End Select
		End if
End Function

rem	<-{ 读取在线支付价格 2008-2-29 by 56770.WangLei
Function GetOnlinepayPrice()
		If product_type = "unite" Then
				GetOnlinepayPrice = RsPro("cprice")
		Else
				Dim price1 : price1 = formatnumber2(RsPro("buyprice")/moneyhl)
				If RsPro("cx") = 1 Then price1 = formatnumber2(RsPro("cprice")/moneyhl)
				GetOnlinepayPrice = CDbl(Replace(price1,",",""))
		End If
End Function

Function ProductInfoItemChild()
		ProductInfoItemChild = getUniteChild(ProductInfoItemId,0,"<br>")
End Function

rem	<-{ 2008-6-6 by 56770.WangLei
rem 显示购买价格
rem p_type 是否显示节省金额 0 不显示 1 显示
Function ProductInfoBuyPrice(p_type)
		If show_html = "1" And product_type<>"unite" Then
				ProductInfoBuyPrice = "<script src="""& Eshop_url & LangPath &"product/Html/Productinfo.asp?do=Info&type=buyPrice&p_type="&p_type&"&id="& rspro("id") &"&moneyhl="& moneyhl &"""></script>"
				Exit Function
		End If
		Dim price1,price2
		If product_type = "unite" Then
				Select Case p_type
					   Case "0" : ProductInfoBuyPrice = dw & formatnumber2(RsPro("cprice")/moneyhl) & dw2
					   Case Else
							ProductInfoBuyPrice = dw & font_price(formatnumber2(RsPro("cprice")/moneyhl)) & dw2
							If p_type = 1 Then ProductInfoBuyPrice = ProductInfoBuyPrice &"&nbsp;&nbsp;"&Lebi_pro(108)&"&nbsp;"&dw & formatnumber2(js_price(RsPro("cprice"),RsPro("sprice"))/moneyhl) & dw2
				End Select
		Else
				If checkPricePurview(Lebi_UserGrade) Then
						price1 = RsPro("buyprice")
						If RsPro("cx") = 1 Then price1 = RsPro("cprice")
						If Trim(RsPro("P_SpecificationName")) <> "" And Not isnull(Trim(RsPro("P_SpecificationName"))) Then 
								Set rsprice = conn.execute("select top 1 p_price from [Lebi_Product_Stock] where p_id = "& id &" order by p_price asc")
								If Not rsprice.eof Then 
										Lowprice = price1 + rsprice(0)
								End If 
								rsprice.close : Set rs = Nothing
								Set rsprice = conn.execute("select top 1 p_price from [Lebi_Product_Stock] where p_id = "& id &" order by p_price desc")
								If Not rsprice.eof Then 
										Highprice = price1 + rsprice(0)
								End If 
								rsprice.close : Set rs = Nothing
								If CDbl(Highprice) = CDbl(Lowprice) Then 
										If p_type = 1 Then
												price2 = formatnumber2(js_price(Lowprice,RsPro("sprice"))/moneyhl)
												price2 = "&nbsp;&nbsp;"&Lebi_pro(108)&"&nbsp;"& dw & price2 & dw2
										End If
										ProductInfoBuyPrice = dw & formatnumber2(price1/moneyhl) & dw2 & price2
								Else
										ProductInfoBuyPrice = dw & formatnumber2(Lowprice/moneyhl) & dw2 &" - "& dw & formatnumber2(Highprice/moneyhl) & dw2
								End If 
						Else
								If p_type = 1 Then
										price2 = formatnumber2(js_price(price1,RsPro("sprice"))/moneyhl)
										price2 = "&nbsp;&nbsp;"&Lebi_pro(108)&"&nbsp;"& dw & price2 & dw2
								End If
								ProductInfoBuyPrice = dw & formatnumber2(price1/moneyhl) & dw2 & price2
						End If 
				Else
						ProductInfoBuyPrice = Lebi_word(66)
				End If
		End If
End Function
rem	}->
Function ProductInfoItemValue()
		On Error Resume Next 
		Dim Arr_name,Arr_value
		Arr_name = Split(rspro("pro_name"& LangTxt),"$")
		Arr_value = Split(rspro("pro_info"& LangTxt),"$$$")
		For i = 0 To UBound(Arr_name)
		If Arr_value(i) <> "" Then 
				ProductInfoItemValue = ProductInfoItemValue&"<dl><dt>"& Arr_name(i) &"：</dt><dd>"& Arr_value(i) &"</dd></dl>"
		End If 
		Next 
End Function 
Function ProductInfoItemSpecification()
		If rspro("P_SpecificationName") = "" Or IsNull(rspro("P_SpecificationName")) Then 
				Exit Function 
		End If 
		If InStr(rspro("P_SpecificationName"),",") = 0 Then 
				n = 0
				P_SpecificationValue = Replace(rspro("P_SpecificationValue"),"|",",")
				If Right(P_SpecificationValue,1) = "|" Then P_SpecificationValue = cut_Right(P_SpecificationValue)
				If Right(P_SpecificationValue,1) = "," Then P_SpecificationValue = cut_Right(P_SpecificationValue)
				Set rs = conn.execute("select s_name"& LangTxt &" from [Lebi_SelectName] where s_id = "& checknum(rspro("P_SpecificationName"),0) &"")
				If Not rs.eof Then 
						SName = rs(0)
						temp = temp &"<dl><dt>"& SName &"：</dt>"
				End If 
				rs.close : Set rs = Nothing
				Set rs = conn.execute("select s_value"& LangTxt &",id from [Lebi_SelectValue] where s_id = "& checknum(rspro("P_SpecificationName"),0) &" and id in("& P_SpecificationValue &")")
				If Not rs.eof Then 
				j = 0
				temp = temp &"<dd>"
				Do While Not rs.eof 
						P_SpecificationPic = rspro("P_SpecificationPic")
						If P_SpecificationPic = "" Or IsNull(P_SpecificationPic) Then P_SpecificationPic = "|||||||||||||||||||||||||||||||||||"
						k = getN(Replace(rspro("P_SpecificationValue"),"|",","),rs(1),",")
						if Split(P_SpecificationPic,"|")(k) <> "" Then
								temp = temp &"<div><a id=""sv_"& id &"_"& n &"_"& j &""" name=""sv_n_"& id &"_"& n &""" class=""spva-img"" title="""& rs(0) &""" onclick=""select_sp('"& id &"','"& n &"','"& j &"','"& SName &"|"& rs(0) &"','"& rspro("buyprice") &"','0001',"& getGradePurview(17) &");""><img src="""&Eshop_url&PicPath&"/"&Split(P_SpecificationPic,"|")(k)&""" /><span></span></a></div>"
						Else 
								temp = temp &"<div><a id=""sv_"& id &"_"& n &"_"& j &""" name=""sv_n_"& id &"_"& n &""" class=""spva"" onclick=""select_sp('"& id &"','"& n &"','"& j &"','"& SName &"|"& rs(0) &"','"& rspro("buyprice") &"','0001',"& getGradePurview(17) &");"">"& rs(0) &"</a></div>"
						End If 
				rs.movenext
				j = j + 1
				Loop
				temp = temp &"</dd>"
				End If 
				rs.close : Set rs = Nothing
				temp = temp &"<input type=""hidden"" name=""hidv_0001_"& id &""" id=""hidv_0001_"& id &"_0""></dl>"
		Else
				For n = 0 To UBound(Split(rspro("P_SpecificationName"),","))
				Set rs = conn.execute("select s_name"& LangTxt &" from [Lebi_SelectName] where s_id = "& checknum(Split(rspro("P_SpecificationName"),",")(n),0) &"")
				If Not rs.eof Then 
						SName = rs(0)
						temp = temp &"<dl><dt>"& SName &"：</dt>"
				End If 
				rs.close : Set rs = Nothing
				Set rs = conn.execute("select s_value"& LangTxt &",id from [Lebi_SelectValue] where s_id = "& checknum(Split(rspro("P_SpecificationName"),",")(n),0) &" and id in("& Split(rspro("P_SpecificationValue"),"|")(n) &")")
				If Not rs.eof Then 
				j = 0
				temp = temp &"<dd>"
				Do While Not rs.eof 
						P_SpecificationPic = rspro("P_SpecificationPic")
						If P_SpecificationPic = "" Or IsNull(P_SpecificationPic) Then P_SpecificationPic = "|||||||||||||||||||||||||||||||||||"
						k = getN(Replace(rspro("P_SpecificationValue"),"|",","),rs(1),",")
						if Split(P_SpecificationPic,"|")(k) <> "" Then
								temp = temp &"<div><a id=""sv_"& id &"_"& n &"_"& j &""" name=""sv_n_"& id &"_"& n &""" class=""spva-img"" title="""& rs(0) &""" onclick=""select_sp('"& id &"','"& n &"','"& j &"','"& SName &"|"& rs(0) &"','"& rspro("buyprice") &"','0001',"& getGradePurview(17) &");""><img src="""&Eshop_url&PicPath&"/"&Split(P_SpecificationPic,"|")(k)&""" /><span></span></a></div>"
						Else 
								temp = temp &"<div><a id=""sv_"& id &"_"& n &"_"& j &""" name=""sv_n_"& id &"_"& n &""" class=""spva"" onclick=""select_sp('"& id &"','"& n &"','"& j &"','"& SName &"|"& rs(0) &"','"& rspro("buyprice") &"','0001',"& getGradePurview(17) &");"">"& rs(0) &"</a></div>"
						End If 
				rs.movenext
				j = j + 1
				Loop
				temp = temp &"</dd>"
				End If 
				rs.close : Set rs = Nothing
				temp = temp &"<input type=""hidden"" name=""hidv_0001_"& id &""" id=""hidv_0001_"& id &"_"& n &"""></dl>"
				Next 
		End If 
		ProductInfoItemSpecification = temp
End Function 
%>