<%
'##################################################################                                                                 
'★         web08.net - 威博购物系统                                              
'★  版权所有: web08.net                                                                                                       
'★  程序制作: 威博网络技术公司                                     
'★           email:web08net@hotmail.com                           
'★            Q Q :645095280,475980829
'★	       电话:021-55520018                                                                                                         
'★  相关网址: [产品介绍] http://www.021web.com.cn/gwxt.html
'★            [支持论坛] http://bbs.web08.net/                                                                                     
'★  主页地址: http://www.web08.net/  
'★		http://www.021web.com.cn/			                                                                 
'###################################################################

'Web08商城系统标签解析类
'方法：Web_MS.Get_MSLabelChar("标签代码","")
'Copyright (c)2007 Web08.net 
'官方站：Web08.net
'技术支持论坛：bbs.Web08.net

Class cls_MS
		'定义参数____________________________________________________________________
		Private m_Rs,m_WebO,m_Dict
		Private m_PathDir,m_Path_UserDir,m_Path_User,m_Path_adminDir,m_Path_UserPageDir,m_Path_Templet
		Private m_Err_Info,m_Err_NO,m_class_list,m_start_level,m_root_path,m_table_width,m_class_url,m_sub_classid,w_first_level

		Public Property Get Err_Info()
			Err_Info = m_Err_Info
		End Property

		Public Property Get Err_NO()
			Err_NO = m_Err_NO
		End Property

		Private Sub Class_initialize()
			m_Path_Templet  = "template/"
			m_root_path=web_get_rootdir(web_c_setupfolder)
			m_class_url=0
		End Sub

		Private Sub Class_Terminate()
			Set m_Rs = Nothing
			Set m_WebO = Nothing
			Set m_Dict = Nothing
		End Sub

		'获得参数____________________________________________________________________
		Public Function get_MSLabelChar(w_Labelchar,w_Id)
			Dim w_array
			'response.write w_Labelchar&"<br>"
			w_array= split(w_Labelchar,"┆")
			if ubound(w_array)=0 and not isarray(w_array) then
				get_MSLabelChar=""
				exit Function
			else
				select case LCase(w_array(0))
					case "classmalls"
						if ubound(w_array)<>18  and  ubound(w_array)<>17 and  ubound(w_array)<>24 then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=Classmalls(w_Labelchar,"classmalls",w_Id):end if
					case "specialmalls"
						if ubound(w_array)<>18  and  ubound(w_array)<>17 and  ubound(w_array)<>24 then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=Classmalls(w_Labelchar,"specialmalls",w_Id):end if
					case "lastmalls"
						if ubound(w_array)<>18  and  ubound(w_array)<>17 and  ubound(w_array)<>24 then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=Classmalls(w_Labelchar,"lastmalls",w_Id):end if
					case "hotmalls"
						if ubound(w_array)<>18  and  ubound(w_array)<>17 and  ubound(w_array)<>24 then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=Classmalls(w_Labelchar,"hotmalls",w_Id):end if
					case "guidemalls"
						if ubound(w_array)<>18  and  ubound(w_array)<>17 and  ubound(w_array)<>24 then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=Classmalls(w_Labelchar,"guidemalls",w_Id):end if
					case "recmalls"
						if ubound(w_array)<>18  and  ubound(w_array)<>17 and  ubound(w_array)<>24 then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=Classmalls(w_Labelchar,"recmalls",w_Id):end if
					case "salemalls"
						if ubound(w_array)<>18  and  ubound(w_array)<>17 and  ubound(w_array)<>24 then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=Classmalls(w_Labelchar,"salemalls",w_Id):end if
					case "scoremalls"
						if ubound(w_array)<>18  and  ubound(w_array)<>17 and  ubound(w_array)<>24 then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=Classmalls(w_Labelchar,"scoremalls",w_Id):end if
					case "marmalls"
						if ubound(w_array)<>21 and ubound(w_array)<>20 and  ubound(w_array)<>19 then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=Classmalls(w_Labelchar,"marmalls",w_Id):end if
					case "relationpro"
						if ubound(w_array)<>8  then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=relationpro(w_Labelchar,"relationpro",w_Id):end if

					'常规标签类
					case "flashfilt"
						if ubound(w_array)<>5   then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=flashfilt(w_Labelchar,"flashfilt",w_Id):end if
					case "norfilt"
						if ubound(w_array)<>7   then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=NorFilter(w_Labelchar,"NorFilt",w_Id):end if
					case "readmalls"
						if ubound(w_array)<>2   then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=Readmalls(w_Labelchar,"readmalls",w_Id):end if
					case "readclasses"
						if ubound(w_array)<>1   then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=Readclasses(w_Labelchar,"readclasses",w_Id):end if
					case "sitemap"
						if ubound(w_array)<>2   then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=SiteMap(w_Labelchar,"sitemap",w_Id):end if
					case "search"
						if ubound(w_array)<>2   then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=Search(w_Labelchar,"search"):end if
					case "infostat"
						if ubound(w_array)<>1   then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=infoStat(w_Labelchar,"infostat"):end if
					case "classnavi"
						if ubound(w_array)<>11   then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=ClassNavi(w_Labelchar,"classnavi",w_Id):end if
					case "classcode"
						if ubound(w_array)<>14 and ubound(w_array)<>13 and ubound(w_array) <>12  then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=ClassCode(w_Labelchar,"classcode",w_Id):end if
					case "c_malls"
						if ubound(w_array)<>5   then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=c_malls(w_Labelchar,"c_malls",w_Id):end if
					case "subclasslist"
						if ubound(w_array)<>21 and  ubound(w_array)<>27  then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=subClassList(w_Labelchar,"subclasslist",w_Id):end if
					case "classlist"
						if ubound(w_array)<>18  and  ubound(w_array)<>19 and ubound(w_array)<>24 then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=ClassList(w_Labelchar,"classlist",w_Id):end if
					case "allcode"
						if ubound(w_array)<>11 then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=AllCode(w_Labelchar,"allcode",w_Id):end if
					case "classinfo"
						if ubound(w_array)<>1 then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=ClassInfo(w_Labelchar,"ClassInfo",w_Id):end if
					case "classajax"
						if ubound(w_array)<>1 then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=ClassAjax(w_Labelchar,"classajax",w_Id):end if
					case "productstar"
						if ubound(w_array)<>1 then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=productstar(w_Labelchar,"productstar",w_Id):end if
					case "productreview"
						if ubound(w_array)<>1 then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=productreview(w_Labelchar,"productreview",w_Id):end if
					case "floatingpro"
						if ubound(w_array)<>0 then:get_MSLabelChar="标签错误,by Web08.net":else:get_MSLabelChar=floatingpro(w_Labelchar,"floatingpro",w_Id):end if
				end select
			end if
		End Function

		'DIV输出_____________________________________________________________________
		'得到div,table_________________________________________________________________________________
		Public Function table_str_list_head(w_tf,w_divid,w_divclass,w_ulid,w_ulclass)
			Dim table_,tr_
			Dim w_divid_1,w_divclass_1,w_ulid_1,w_ulclass_1
			if m_table_width="" then 
				m_table="width=""100%"""
			elseif m_table_width="0" then
				m_table=""
			else
				m_table="width='"&m_table_width&"'"
			end if 
			if w_tf=1 then
				if w_divid<>"" then:w_divid_1 = " id="""& w_divid &"""":else:w_divid_1 = "":end if
				if w_divclass<>"" then:w_divclass_1 = " class="""& w_divclass &"""":else:w_divclass_1 = "":end if
				if w_ulid<>"" then:w_ulid_1 = " id="""& w_ulid &"""":else:w_ulid_1 = "":end if
				if w_ulclass<>"" then:w_ulclass_1 = " class="""& w_ulclass &"""":else:w_ulclass_1 = "":end if
				table_="<div"& w_divid_1 & w_divclass_1 &">"
				tr_="<ul"& w_ulid_1 & w_ulclass_1 &">"
				table_str_list_head =  table_&vbNewLine
				table_str_list_head = table_str_list_head &" "& tr_&vbNewLine
			else
				table_="<table border=""0"" cellspacing=""0"" cellpadding=""0"" "&m_table&">"
				table_str_list_head =  table_&vbNewLine
			end if
		End Function

		'得到div,table_________________________________________________________________________________
		public Function table_str_list_middle_1(w_tf,w_liid,w_liclass)
			Dim w_liid_1,w_liclass_1,td_
			if w_tf=1 then
				if w_liid<>"" then:w_liid_1 = " id="""& w_liid &"""":else:w_liid_1 = "":end if
				if w_liclass<>"" then:w_liclass_1 = " class="""& w_liclass &"""":else:w_liclass_1 = "":end if
				td_="<li"&w_liid_1&w_liclass_1&">"
				table_str_list_middle_1 ="  "&td_
			end if
		End Function

		'得到div,table_________________________________________________________________________________
		public Function table_str_list_middle_2(w_tf)
			Dim td__,tr__
			if w_tf=1 then
				td__="</li>"
			else
				td__="</td>"
			end if
				table_str_list_middle_2 =  td__&vbNewLine
		End Function

		'得到div,table_________________________________________________________________________________
		Public Function table_str_list_middle_3(w_tf)
			if w_tf=1 then
				table_str_list_middle_3 = ""
			else
				table_str_list_middle_3 = "</tr>"
			end if
		End Function


		'得到div,table_________________________________________________________________________________
		Public Function table_str_list_bottom(w_tf)
			Dim table__,tr__
			if w_tf=1 then
				table__="</div>"
				tr__="</ul>"
				table_str_list_bottom = " "&tr__&vbNewLine
			else
				table__="</table>"
				table_str_list_bottom = ""
			end if
			table_str_list_bottom = table_str_list_bottom &table__&vbNewLine
		End Function
		'DIV格式输出结束_____________________________________________________________

		'开始读取标签____综合类标签__________________________________________________  
		'0		 ┆1	 ┆2	  ┆3		      ┆4	┆5	   ┆6	       ┆7	   ┆8        	       ┆9            ┆10	   ┆11	       ┆12		        ┆13	                    ┆14	       ┆15	     ┆16	    ┆17	 ┆ 18	     ┆19	    ┆ 20
		'Web:MS=HotMalls ┆分类$0┆Loop$10┆输出格式$out_Table┆多少天$0┆标题数$30┆打开窗口$0┆包含子类$0┆排列字段$P_viewnum┆排列方式$DESC┆更多连接$·┆PageCSS$  ┆日期格式$YY02年MM月DD日┆引用样式$0706071959915431 ┆商品排列数$1     ┆内容字数$200┆导航字数$200 ┆分类序列$0 ┆分类属性$0 		
		Public Function Classmalls(w_Labelchar,w_LabelType,w_Id)
			Dim table_array,classmalls_head,classmalls_bottom,classmalls_middle1,classmalls_middle2,div_tf,style_id,style_Content,Content_List,w_rs_s_obj,Content_more,c_i_k
			Dim mallnumber,classid,orderby,orderdesc,colnumber,contentnumber,navinumber,datenumber,titlenumber,picshowtf,datenumber_tmp,morechar,datestyle,opeMStyle,open_target,contaiMSubClass,childClass
			Dim w_sql,w_rs_obj,w_rs_configobj,w_configSql,CharIndexStr
			Dim Mw_Domain,marqueedirec,marqueespeed,marqueestyle
			Dim search_str
			Dim ClassName,ClassEName,c_Domain,ClassNaviContent,ClassNaviPic,c_SavePath,c_FileSaveType,search_iMSQL
			Dim Exist_Child_ClassID,picmallstf
			table_array=split(w_Labelchar,"┆")
			'response.write "search="&split(split(w_Labelchar,"┆")(9),"$")(0)&"<br>"
			if InStr(w_Labelchar,"out_DIV")>0 then
				div_tf=1
				'picmallstf = split(split(w_Labelchar,"┆")(1),"$")(1)
				search_str = split(split(w_Labelchar,"┆")(2),"$")(1)
				mallnumber =split(split(w_Labelchar,"┆")(3),"$")(1)
				datenumber= split(split(w_Labelchar,"┆")(11),"$")(1)
				titlenumber= split(split(w_Labelchar,"┆")(12),"$")(1)
				picshowtf=split(split(w_Labelchar,"┆")(13),"$")(1)
				opeMStyle=split(split(w_Labelchar,"┆")(14),"$")(1)
				contaiMSubClass=split(split(w_Labelchar,"┆")(15),"$")(1)
				orderby = split(split(w_Labelchar,"┆")(16),"$")(1)
				orderdesc = split(split(w_Labelchar,"┆")(17),"$")(1)
				morechar = split(split(w_Labelchar,"┆")(18),"$")(1)
				datestyle = split(split(w_Labelchar,"┆")(20),"$")(1)
				style_id = split(split(w_Labelchar,"┆")(21),"$")(1)
				colnumber= split(split(w_Labelchar,"┆")(22),"$")(1)
				contentnumber= split(split(w_Labelchar,"┆")(23),"$")(1)
				navinumber= split(split(w_Labelchar,"┆")(24),"$")(1)
				if w_LabelType="marmalls" then
					marqueespeed=split(split(w_Labelchar,"┆")(25),"$")(1)
					marqueedirec=split(split(w_Labelchar,"┆")(26),"$")(1)
				end if
			else
				div_tf=0
				'picmallstf = split(split(w_Labelchar,"┆")(1),"$")(1)
				search_str = split(split(w_Labelchar,"┆")(1),"$")(1)
				mallnumber = split(split(w_Labelchar,"┆")(2),"$")(1)
				datenumber= split(split(w_Labelchar,"┆")(4),"$")(1)
				titlenumber= split(split(w_Labelchar,"┆")(5),"$")(1)
				'picshowtf=split(split(w_Labelchar,"┆")(7),"$")(1)
				opeMStyle=split(split(w_Labelchar,"┆")(6),"$")(1)
				contaiMSubClass=split(split(w_Labelchar,"┆")(7),"$")(1)	'是否包含子类
				orderby = split(split(w_Labelchar,"┆")(8),"$")(1)
				orderdesc = split(split(w_Labelchar,"┆")(9),"$")(1)
				morechar = split(split(w_Labelchar,"┆")(10),"$")(1)
				datestyle = split(split(w_Labelchar,"┆")(12),"$")(1)
				style_id = split(split(w_Labelchar,"┆")(13),"$")(1)
				colnumber= split(split(w_Labelchar,"┆")(14),"$")(1)
				contentnumber= split(split(w_Labelchar,"┆")(15),"$")(1)
				navinumber= split(split(w_Labelchar,"┆")(16),"$")(1)
				if w_LabelType="marmalls" then
					marqueespeed=split(split(w_Labelchar,"┆")(17),"$")(1)
					marqueedirec=split(split(w_Labelchar,"┆")(18),"$")(1)
					marqueeheight=split(split(w_Labelchar,"┆")(19),"$")(1)
					if ubound(split(w_Labelchar,"┆"))>=20 then
						classrank=split(split(w_Labelchar,"┆")(20),"$")(1)
					end if 
					if ubound(split(w_Labelchar,"┆"))=21 then
						classtype=split(split(w_Labelchar,"┆")(21),"$")(1)
					end if 
				else
					if ubound(split(w_Labelchar,"┆"))>=17 then
						classrank=split(split(w_Labelchar,"┆")(17),"$")(1)
					end if 
					if ubound(split(w_Labelchar,"┆"))=18 then
						classtype=split(split(w_Labelchar,"┆")(18),"$")(1)
					end if 
				end if
			end if
			if mallnumber<>"" and isnumeric(mallnumber)=false then
				mallnumber = 10
			else
				mallnumber=mallnumber
			end if
			if titlenumber="" and isnumeric(titlenumber)=false then
				titlenumber = 30
			else
				titlenumber = titlenumber
			end if
			if colnumber="" and isnumeric(colnumber)=false then
				colnumber = 30
			else
				colnumber = colnumber
			end if
			if contentnumber="" and isnumeric(contentnumber)=false then
				contentnumber = 30
			else
				contentnumber = contentnumber
			end if
			if navinumber="" and isnumeric(navinumber)=false then
				navinumber = 30
			else
				navinumber = navinumber
			end If

			if classrank="" and isnumeric(classrank)=false then
				classrank = 0
			else
				classrank=clng(classrank)
			end If

			'if div_tf=1 then
			classmalls_head = table_str_list_head(div_tf,split(table_array(5),"$")(1),split(table_array(6),"$")(1),split(table_array(7),"$")(1),split(table_array(8),"$")(1))
			classmalls_middle1 = table_str_list_middle_1(div_tf,split(table_array(9),"$")(1),split(table_array(10),"$")(1))
			'end if
			classmalls_bottom = table_str_list_bottom(div_tf)
			classmalls_middle2 = table_str_list_middle_2(div_tf)
			'if datenumber ="0" or datenumber ="" then:datenumber_tmp = "":else:datenumber_tmp = " and datediff(day,p_addtime,getdate())>"&datenumber:end if
			select case search_str
			end select 
			Path_Flag=Lcase(Request.Cookies("Web_File_Save_Path"))
			if w_LabelType<>"guidemalls" then
			if classrank<>0 then	'指定了分类序列
				childclass=""
				if classrank=1 then 
					w_classid=getonevalue("web_proclass","id","fid="&search_str&" order by v_order desc")
				else
					i_num=classrank-1
					w_sql="select top 1 id from web_proclass where fid="&search_str&" and id not in (select top "&i_num&" id from web_proclass where fid="&search_str&" order by v_order desc) order by v_order desc" 
					'response.write w_sql
					set web_classid=conn.execute(w_sql)
					if web_classid.eof then
						w_classid=0
					else
						w_classid=web_classid("id")
					end if 
					web_classid.close : set web_classid=nothing
				end if
				if isnumeric(w_classid)=false then
					w_classid=0
				end if 
				if w_classid<>0 then
					If contaiMSubClass=1 Then
						Exist_Child_ClassID=getProSubClass_sp1(w_classid,0)
						If Exist_Child_ClassID<>"" Then
							w_classid_1=Exist_Child_ClassID
						else 
							w_classid_1=w_classid
						End If
					else
						w_classid_1=w_classid	
					End If

					if classtype=1 then	'包含扩展分类

						p_extpid=web_get_extpid(w_classid_1)
						if p_extpid<>"" then
							childClass=" and (p_classid in ("&w_classid_1&") or id in("&p_extpid&"))"
						else
							childClass=" and (p_classid in ("&w_classid_1&"))"
						end if 

					elseif classtype=2 then	'只包含扩展分类

						p_extpid=web_get_extpid(w_classid_1)
						if p_extpid<>"" then
							childClass=" and (id in ("&p_extpid&"))"
						end if 
					else	'默认为不包含扩展分类
						childClass=" and (p_classid in ("&w_classid_1&"))"
					end if 	
				else
					childclass=""
				end if 

			else	'不指定分类序列 

				if Path_Flag= "ms:allclass" or Path_Flag="ms:classlist" then
					w_classid_1=w_id
					w_autoclass=1
				else 
					w_autoclass=0
					w_classid_1=search_str
				end if
				if w_classid_1<>0 then
					If contaiMSubClass=1 Then
						w_classid_1=getProSubClass_sp1(w_classid_1,0)
					End If
					if classtype=1 then	'包含扩展分类

						p_extpid=web_get_extpid(w_classid_1)
						if p_extpid<>"" then
							childClass=" and (p_classid in ("&w_classid_1&") or id in("&p_extpid&"))"
						else
							childClass=" and (p_classid in ("&w_classid_1&"))"
						end if 

					elseif classtype=2 then	'只包含扩展分类

						p_extpid=web_get_extpid(w_classid_1)
						if p_extpid<>"" then
							childClass=" and (id in ("&p_extpid&"))"
						end if 

					else	'默认为不包含扩展分类

						childClass=" and (p_classid in ("&w_classid_1&"))"

					end if
				
				end if 
			end if 
			end if 

			if search_str=0 and classrank=0 and w_autoclass=0 then
				childclass=""
			end if

			select case lcase(w_LabelType)
				case "specialmalls"
					search_iMSQL=" and P_Fee=1 and p_scoreflag=0"
				case "lastmalls"
					search_iMSQL=" and P_newflag=1 and p_scoreflag=0"
				case "hotmalls"
					search_iMSQL=" and P_Hot=1 and p_scoreflag=0"
				case "recmalls"
					search_iMSQL=" and P_Recommend=1 and p_scoreflag=0"
				case "soldmalls":
				case "guidemalls":
					if classrank=1 then
						w_guidesql=" select top 1 id from web_guidepro order by g_order desc"
					elseif classrank>1 then
						w_guidesql=" select top 1 g_proid From web_guidepro  where id not in(select top "&classrank-1&" id from web_guidepro order by g_order desc ) order by g_order desc"
					end if
					if w_guidesql<>"" then
						set g_rs=conn.execute(w_guidesql)
						if not g_rs.eof then
							w_guidesql=" and id in("&g_rs("g_proid")&")"
							g_rs.close : set g_rs=nothing
						else
							w_guidesql=""
						end if
					end if 
				case "collmalls"
				case "classmalls"
				case "scoremalls"	
					search_iMSQL=" and p_scoreflag=1 "
			end select
			w_fldname="[id], [P_volumn], [P_PID], [P_name],[p_Shortname], [P_score], [P_MyProperty], [P_Content], [P_Rank], [P_MarketPrice], [P_MemberPrice], [P_Recommend2], [P_Recommend], [P_Solded], [P_viewnum], [P_Favnum], [P_Discount], [P_level], [P_classid], [P_ProCLass], [P_ProLevel], [P_Pphoto], [P_Sphoto], [P_savefilename], [P_Addtime], [P_Amount], [P_Stock], [P_Link], [P_Brand], [P_Indextj], [P_Moviename], [P_Movieurl], [P_Redbag], [P_Truegood], [P_Publicate], [P_Weight], [P_Ifalarm], [P_Alarmnum], [P_Hot], [P_Fee], [P_Morephoto], [P_Ordernums], [P_favoractivity], [P_newflag], [P_Onlyid], [P_Folder], [P_keyword], [P_Description], [P_SetMyPrice], [Userid], [Shopid], [P_Del], [P_Server], [P_Factory], [P_ShortContent], [p_adminstate], [p_adminrank], [p_admintime], [Templet],[p_changescore],[p_varprice] ,[P_Shortname],[P_scoreflag],[p_wholesale],[p_active],[p_moviexy]"
			w_sql="select top "& cint(mallnumber)&" "&w_fldname&" From Web_product where p_adminstate=0 and P_Publicate=1 and p_del=0 "&childClass&search_iMSQL & w_guidesql & datenumber_tmp &" order by "&orderby&" "&orderdesc&",id "&orderdesc&""
			'response.write w_sql &"<br>"
			Content_List=""
			set w_rs_obj = Conn.execute(w_sql)
			if w_rs_obj.eof then
				Content_List=""
				w_rs_obj.close:set w_rs_obj=nothing
			else
					if w_LabelType="marmalls" then
							Content_List = Content_List & "<marquee onmouseover=""this.stop();"" scrollamount="""& marqueespeed &""" direction="""& marqueedirec &""" height="""&marqueeheight&"""  onmouseout=""this.start();"">"
							do while not w_rs_obj.eof
								Content_List= Content_List  & getlist_malls(w_rs_obj,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,opeMStyle,Mw_Domain,w_LabelType)&"&nbsp;&nbsp;&nbsp;"
								w_rs_obj.movenext
							loop
							Content_List = Content_List & "</marquee>"
					else
							if div_tf = 0 then
								c_i_k = 0
								if cint(colnumber)<>1 then
									Content_List = Content_List &  "  <tr>"
								end if
							end if
							do while not w_rs_obj.eof
									if div_tf=1 then
										Content_List= Content_List & classmalls_middle1 & getlist_malls(w_rs_obj,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,opeMStyle,Mw_Domain,w_LabelType) & classmalls_middle2
									else
										if cint(colnumber) =1 then
											Content_List= Content_List & vbNewLine&"   <tr><td>" & getlist_malls(w_rs_obj,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,opeMStyle,Mw_Domain,w_LabelType) & "</td></tr>"
										else
											Content_List= Content_List & "<td width="""& cint(100/cint(colnumber))&"%"">" & getlist_malls(w_rs_obj,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,opeMStyle,Mw_Domain,w_LabelType) & "</td>"
										end if
									end if
									w_rs_obj.movenext
									if div_tf = 0 then
										if cint(colnumber)<>1 then
										c_i_k = c_i_k+1
											if c_i_k mod cint(colnumber) = 0 then
												Content_List = Content_List & "</tr>"&vbNewLine&"  <tr>"
											end if
										end if
									end if
							   loop
							   if div_tf=0 then
									if cint(colnumber)<>1 then
										Content_List = Content_List & "</tr>"&vbNewLine
									end if
							   end if
					end if
				'得到栏目路径
				if w_LabelType="classmalls" then
						fldname="[id], [Fid], [name], [Level], [v_order], [bid], [Templet], [Domain], [IsURL], [Description], [keyword]"
						set Query_rs=Conn.execute("Select "&fldname&" From Web_ProClass where Id="& search_str &"")
						if Query_rs.eof then
							Query_rs.close:set Query_rs=nothing
						else
							all_savepath = get_ClassLink(search_str,1)
							Query_rs.close:set Query_rs=nothing
						end if
						if opeMStyle=0 then
							open_target=" "
						else
							open_target=" target=""_blank"""
						end if
						if div_tf=1 then
								Content_more = "  <li><a href="""&  all_savepath &""" "& open_target &" title=""更多..."">"&morechar&"</a></li>"&vbNewLine
						else
								Content_more = "  <tr><td colspan="""& cint(colnumber) &"""><div align=""right""><a href="""&  all_savepath &""" "& open_target &" title=""更多..."">"&morechar&"</a></div></td></tr>"&vbNewLine
						end if
 				 end if
				 w_rs_obj.close:set w_rs_obj=nothing
				if w_LabelType="marmalls" then
					Content_List= Content_List
				else
					Content_List=classmalls_head & Content_List & Content_more & classmalls_bottom
				end if
			end if
			Classmalls =  Content_List
		End Function

		'开始读取标签____商品终极类标签______________________________________________
		'	  0	   ┆1		       ┆2	 ┆3	    ┆4	        ┆5	    ┆6		     ┆7	    ┆8     ┆9		       ┆10	    ┆11      ┆12		       ┆13	                   ┆14	         ┆15	       ┆16	     ┆17		   ┆18	      ┆19
		'Web:MS=ClassList  ┆输出格式$out_Table┆多少天$0┆标题数$30┆打开窗口$0┆包含子类$0┆排列字段$P_Rank┆排列方式$DESC┆分页$1┆分页样式$3,CC0066┆每页数量$30┆PageCSS$┆日期格式$YY02年MM月DD日┆引用样式$07061817334919877┆商品排列数$1┆内容字数$200┆导航字数$200┆商品类型$ClassMalls┆栏目位置$1┆扩展分类商品$1
		Public Function ClassList(w_Labelchar,w_type,web_Id)
			if web_Id<>"" then
					dim table_array,div_tf,newnumber,datenumber,titlenumber,picshowtf,openstyle,orderby,orderdesc,pageTF,pagestyle,pagenumber,pagecss,datestyle,style_id,colnumber,contentnumber,navinumber
					dim classMalls_head,classMalls_bottom,classMalls_middle1,classMalls_middle2,search_inSQL
					dim datenumber_tmp,w_sql,w_configsql,w_rs_obj,w_rs_configobj,Mw_Domain
					dim TPageNum,perPageNum,PageNum,sPageCount,cl_i,c_i_k
					dim rs_c,RefreshNumber,Page_flag_TF,picMallstf
					table_array=split(w_Labelchar,"┆")
					m_Err_Info = ""
					if instr(w_Labelchar,"out_DIV")>0 then
						div_tf=1
						datenumber= split(split(w_Labelchar,"┆")(9),"$")(1)
						'picMallstf = split(split(w_Labelchar,"┆")(1),"$")(1)
						titlenumber= split(split(w_Labelchar,"┆")(10),"$")(1)
						'picshowtf=split(split(w_Labelchar,"┆")(11),"$")(1)
						openstyle=split(split(w_Labelchar,"┆")(12),"$")(1)
						orderby = split(split(w_Labelchar,"┆")(14),"$")(1)
						orderdesc = split(split(w_Labelchar,"┆")(15),"$")(1)
						pageTF = split(split(w_Labelchar,"┆")(16),"$")(1)
						pagestyle = split(split(w_Labelchar,"┆")(17),"$")(1)
						pagenumber = split(split(w_Labelchar,"┆")(18),"$")(1)
						pagecss = split(split(w_Labelchar,"┆")(19),"$")(1)
						datestyle = split(split(w_Labelchar,"┆")(20),"$")(1)
						style_id = split(split(w_Labelchar,"┆")(21),"$")(1)
						colnumber= split(split(w_Labelchar,"┆")(22),"$")(1)
						contentnumber= split(split(w_Labelchar,"┆")(23),"$")(1)
						navinumber= split(split(w_Labelchar,"┆")(24),"$")(1)
					else
						div_tf=0
						
						'picMallstf = split(split(w_Labelchar,"┆")(1),"$")(1)
						datenumber= split(split(w_Labelchar,"┆")(2),"$")(1)
						titlenumber= split(split(w_Labelchar,"┆")(3),"$")(1)
						openstyle=split(split(w_Labelchar,"┆")(4),"$")(1)
						 contaiASubClass=split(split(w_Labelchar,"┆")(5),"$")(1)
						orderby = split(split(w_Labelchar,"┆")(6),"$")(1)
						orderdesc = split(split(w_Labelchar,"┆")(7),"$")(1)
						pageTF = split(split(w_Labelchar,"┆")(8),"$")(1)
						pagestyle = split(split(w_Labelchar,"┆")(9),"$")(1)
						pagenumber = split(split(w_Labelchar,"┆")(10),"$")(1)
						pagecss = split(split(w_Labelchar,"┆")(11),"$")(1)
						datestyle = split(split(w_Labelchar,"┆")(12),"$")(1)
						style_id = split(split(w_Labelchar,"┆")(13),"$")(1)
						colnumber= split(split(w_Labelchar,"┆")(14),"$")(1)
						contentnumber= split(split(w_Labelchar,"┆")(15),"$")(1)
						navinumber= split(split(w_Labelchar,"┆")(16),"$")(1)
						goodtype= split(split(w_Labelchar,"┆")(17),"$")(1)
						placetype= split(split(w_Labelchar,"┆")(18),"$")(1)
						if ubound(split(w_Labelchar,"┆"))=19 then
							classtype=split(split(w_Labelchar,"┆")(19),"$")(1)
						end if 
					end if
					'if div_tf=1 then
						classMalls_head = "[Web:PageBegin]"&table_str_list_head(div_tf,split(table_array(3),"$")(1),split(table_array(4),"$")(1),split(table_array(5),"$")(1),split(table_array(6),"$")(1))
						classMalls_middle1 = table_str_list_middle_1(div_tf,split(table_array(7),"$")(1),split(table_array(8),"$")(1))
					'end if
					classMalls_bottom = table_str_list_bottom(div_tf)
					classMalls_middle2 = table_str_list_middle_2(div_tf)

					Page_flag_TF = "{Web_Page}"& pagestyle &"|"& pagecss&"{/Web_Page}"
						Path_Flag=Lcase(Request.Cookies("Web_File_Save_Path"))
						if datenumber ="0" then:datenumber_tmp = "":else:datenumber_tmp = " and datevalue(addtime)+"&datenumber&">=datevalue(now)":end if
						select case LCase(goodtype)
							case "lastmalls"
								search_inSQL="and P_newflag=1 and p_scoreflag=0"
							case "hotmalls"
								search_inSQL="and P_Hot=1 and p_scoreflag=0"
							case "recmalls"
								search_inSQL="and P_Recommend=1 and p_scoreflag=0"
							case "specialmalls"
								search_inSQL="and P_Fee=1 and p_scoreflag=0"
							case "scoremalls"	
								search_iMSQL=" and p_scoreflag=1 "
						end select 
							
						if Path_Flag= "ms:allclass" or Path_Flag="ms:classlist" then
							If contaiASubClass=1 Then
								Exist_Child_ClassID=getProSubClass(web_Id)
								if Exist_Child_ClassID<>"" then
									Exist_Child_ClassID=Exist_Child_ClassID
									search_inSQLtype=" and P_classid in ("&Exist_Child_ClassID&")"

								else
									search_inSQLtype=" and P_classid ="&web_Id&""
								end if
							Else
								search_inSQLtype=" and P_classid ="&web_Id&""
							End If
							If contaiASubClass=1 Then
								w_classid_1=getProSubClass_sp1(web_Id,0)
							Else
								w_classid_1=web_Id
							End If
							if classtype=1 then	'包含扩展分类
		
								p_extpid=web_get_extpid(w_classid_1)
								if p_extpid<>"" then
									search_inSQLtype=" and (p_classid in ("&w_classid_1&") or id in("&p_extpid&"))"
								else
									search_inSQLtype=" and (p_classid in ("&w_classid_1&"))"
								end if 

							elseif classtype=2 then	'只包含扩展分类

								p_extpid=web_get_extpid(w_classid_1)
								if p_extpid<>"" then
									search_inSQLtype=" and (id in ("&p_extpid&"))"
								end if 

							else	'默认为不包含扩展分类
				
								search_inSQLtype=" and (p_classid in ("&w_classid_1&"))"
		
							end if 

						else
							search_inSQLtype=""
						end if

						if Path_Flag= "other:allbrand" or Path_Flag="other:brandlist" then
							sql_where_condition="and P_Brand="&web_Id&"" 
						end if
							
				 		if Path_Flag= "other:allact" or Path_Flag="other:actlist" then
							sql_where_condition=sql_where_condition&"and p_active="&web_Id&"" 
						 end if
						 if Path_Flag= "other:allguide" or Path_Flag="other:guidelist" then
							proid=getonevalue("web_guidepro","g_proid","id="&web_id&"")
						
							if proid="" or proid="-1NISNUL" then
								sql_where_condition=sql_where_condition&"and ID=0 " 
							else
								sql_where_condition=sql_where_condition&"and ID in ("&proid&")" 
							end if
						 end if
					
						fldname="[id], [P_volumn], [P_PID], [P_name],[p_Shortname],[P_score], [P_MyProperty], [P_Content], [P_Rank], [P_MarketPrice], [P_MemberPrice], [P_Recommend2], [P_Recommend], [P_Solded], [P_viewnum], [P_Favnum], [P_Discount], [P_level], [P_classid], [P_ProCLass], [P_ProLevel], [P_Pphoto], [P_Sphoto], [P_savefilename], [P_Addtime], [P_Amount], [P_Stock], [P_Link], [P_Brand], [P_Indextj], [P_Moviename], [P_Movieurl], [P_Redbag], [P_Truegood], [P_Publicate], [P_Weight], [P_Ifalarm], [P_Alarmnum], [P_Hot], [P_Fee], [P_Morephoto], [P_Ordernums], [P_favoractivity], [P_newflag], [P_Onlyid], [P_Folder], [P_keyword], [P_Description], [P_SetMyPrice], [Userid], [Shopid], [P_Del], [P_Server], [P_Factory], [P_ShortContent], [p_adminstate], [p_adminrank], [p_admintime], [Templet],[p_changescore],[p_varprice] ,[p_scoreflag],[p_wholesale],[p_active],[p_moviexy]"
						w_sql="select "&fldname&" "& RefreshNumber &" "
						w_sql = w_sql &"From web_product where  P_Publicate=1 and p_del=0 "&sql_where_condition&ownersql&search_iMSQL&search_inSQL&search_inSQLtype & datenumber_tmp &" order by "&orderby&" "&orderdesc&",id "&orderdesc&""
						
						Set  w_rs_obj = Server.CreateObject(C_Web_RS)
						w_rs_obj.open w_sql,Conn,1,3
						if w_rs_obj.eof then
								ClassList = ""
								w_rs_obj.close:set w_rs_obj=nothing
						else
								perPageNum =pagenumber
								TPageNum = w_rs_obj.recordcount
								w_rs_obj.PageSize = perPageNum
								sPageCount = w_rs_obj.PageCount
								if div_tf = 0 then
									c_i_k = 0
									if cint(colnumber)<>1 then
										ClassList = ClassList &  "  <tr>"
									end if
								end if
								'ClassList = ClassList &  "[Web:PageBegin]"
								for cl_i=1 to w_rs_obj.recordcount
										if w_rs_obj.eof Then exit For
											if div_tf=1 then
												ClassList= ClassList & classMalls_middle1 & getlist_malls(w_rs_obj,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,Mw_Domain,"ClassList") & classMalls_middle2
											else
												if cint(colnumber) =1 then
													ClassList= ClassList &"   <tr><td>" & getlist_malls(w_rs_obj,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,Mw_Domain,"ClassList") & "</td></tr>"
												else
													ClassList= ClassList & "<td width="""& cint(100/cint(colnumber))&"%"">" & getlist_malls(w_rs_obj,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,Mw_Domain,"ClassList") & "</td>"
												end if
											end if
										w_rs_obj.movenext
										if div_tf = 0 then
											if cint(colnumber)<>1 then
												c_i_k = c_i_k+1
												if c_i_k mod cint(colnumber) = 0 then
													ClassList = ClassList & "</tr>"&vbNewLine&"<tr>"
												end if
											end if
											dim tmp_1
											if pageTF="1" then
												if split(formatnumber(cl_i/w_rs_obj.pagesize,2,-1),".")(1)="00" and cl_i <> w_rs_obj.recordcount then
													ClassList = ClassList &"</table>"& Page_flag_TF&"{|}" & vbNewLine & classMalls_head
												end if
												if cl_i = w_rs_obj.recordcount then
													ClassList = ClassList&"</table>"& Page_flag_TF
												end if
											end if
										else
											if pageTF="1" then
												if split(formatnumber(cl_i/w_rs_obj.pagesize,2,-1),".")(1)="00" and cl_i <> w_rs_obj.recordcount then
													ClassList = ClassList & classMalls_bottom & Page_flag_TF &"{|}"& vbNewLine & classMalls_head
												end if
												if cl_i = w_rs_obj.recordcount then
													ClassList = ClassList & classMalls_bottom &"{|}"& vbNewLine
												end if
											end if
										end if
								next
								'ClassList = ClassList &  "[Web:PageEnd]"
								if div_tf=0 then
									if cint(colnumber)<>1 then
										'ClassList = ClassList & "</tr>"&vbNewLine '?????????????
									end if
								end if
								w_rs_obj.close:set w_rs_obj=nothing
								ClassList=classMalls_head & ClassList&"[Web:PageEnd]"
						end if
			else
		         			ClassList=""	
			end if
				
		End Function

		'分类列表调用____________________________________________________________________
		Public Function ClassCode(w_Labelchar,w_type,w_fid)
		'	0	 ┆1     ┆2		     ┆3         ┆4             ┆5             ┆6              ┆7              ┆8             ┆9             ┆10            ┆11            ┆12		   ┆13           ┆14
		'Web:MS=ClassCode┆分类$0┆输出方式$out_Table┆显示级别$1┆大类显示列数$1┆子类显示列数$0┆大类引用样式$25┆子类引用样式$25┆分类显示类型$0┆大类调用数量$0┆大类标题字数$0┆小类调用数量$0┆小类标题字数$0┆表格宽度$100%┆分类连接$0
			'response.write w_Labelchar
			dim table_array,ClassID,titleNavi,ClassCodestr,cols,pictf,picsize,piccss,piccssstr,ContentTF,ContentNumber,div_tf,titlecss,cssstyle,ContentCSS,ContentCSSstr,classMalls_head,classMalls_bottom,classMalls_middle1,classMalls_middle2
			table_array=split(w_Labelchar,"┆")
			ClassID = split(split(w_Labelchar,"┆")(1),"$")(1)
			view_level = split(split(w_Labelchar,"┆")(3),"$")(1)
			class_col = split(split(w_Labelchar,"┆")(4),"$")(1)
			child_col = split(split(w_Labelchar,"┆")(5),"$")(1)
			class_style=split(split(w_Labelchar,"┆")(6),"$")(1)
			Child_style=split(split(w_Labelchar,"┆")(7),"$")(1)
			Class_show = split(split(w_Labelchar,"┆")(8),"$")(1)
			Class_num = split(split(w_Labelchar,"┆")(9),"$")(1)
			Class_titlenum = split(split(w_Labelchar,"┆")(10),"$")(1)
			Child_num = split(split(w_Labelchar,"┆")(11),"$")(1)
			Child_titlenum = split(split(w_Labelchar,"┆")(12),"$")(1)
			if ubound(table_array)>=13 then
				m_table_width=split(split(w_Labelchar,"┆")(13),"$")(1)
			end if 
			if ubound(table_array)=14 then
				m_class_url=split(split(w_Labelchar,"┆")(14),"$")(1)
			end if 
			if class_col="" or isnumeric(class_col)=false then
				class_col=0
			end if 

			if child_col="" or isnumeric(child_col)=false then
				child_col=0
			end if 

			if class_num="" or isnumeric(class_num)=false then
				class_num=0
			end if 
			if class_titlenum="" or isnumeric(class_titlenum)=false then
				class_titlenum=0
			end if 

			if child_num="" or isnumeric(child_num)=false then
				child_num=0
			end if 
			if child_titlenum="" or isnumeric(child_titlenum)=false then
				child_titlenum=0
			end if 
			if class_show="" or isnumeric(class_show)=false then
				class_show=0
			else
				class_show=clng(class_show)				
			end if 

			if trim(w_fid)="" then
				w_fid=0
			end if 

			Path_Flag=Lcase(Request.Cookies("Web_File_Save_Path"))
			if Class_show=-1  then
				Select Case Path_Flag
					case "ms:allproduct","ms:lastproduct","ms:dateproduct","ms:idproduct","ms:classproduct":
						classsql="and  fid=0"
					case "ms:allclass","ms:classlist":
						classsql=" and fid = "&w_fid&""
					case else
						classsql="and  fid=0"
				end select
			elseif Class_show=-2  then
				Select Case Path_Flag
					case "ms:allproduct","ms:lastproduct","ms:dateproduct","ms:idproduct","ms:classproduct":
						classsql="and  fid=0"
					case "ms:allclass","ms:classlist":
						'classsql=" and fid in("&getsamelevelclass("web_proclass",w_fid)&")"
						if child_col>0 then
							call w_GetRootId("web_proclass",w_fid)
							classsql=" and fid = "&classrootid&""
							w_first_level=getonevalue("web_proclass","level","fid="&classrootid)
						else
							classsql=" and fid = "&w_fid&""
						end if
					case else
						classsql="and  fid=0"
				end select
			elseif class_show=0 then 
				if classid<>0 then
					classsql=" and id="&classid
				else
					classsql=" and fid=0"
				end if
			elseif class_show>=1 then
				classsql=""
				if class_col=0 and child_col>0 then
					class_col = child_col
					class_style=Child_style
					Class_num =Child_num
					Class_titlenum =Child_titlenum 
					child_col=-1
				end if 
				if class_show=1 then 
					w_classid=getonevalue("web_proclass","id","fid="&ClassID&" order by v_order desc")
					if isnumeric(w_classid)=false then
						classsql=" and fid=0"
					else
						if child_col=-1 then
							classsql=" and fid="&w_classid
						else
							classsql=" and id="&w_classid						
						end if  
					end if 
				else
					i_num=class_show-1
					w_sql="select top 1 id from web_proclass where fid="&ClassID&" and id not in (select top "&i_num&" id from web_proclass where fid="&ClassID&" order by v_order desc) order by v_order desc" 
					set web_classid=conn.execute(w_sql)
					if web_classid.eof then
						classsql=" and fid=0"
					else
						if child_col=-1 then
							classsql=" and fid="&web_classid("id")
						else
							classsql=" and id="&web_classid("id")							
						end if  
					end if 
					web_classid.close : set web_classid=nothing
				end if
			end if

			if instr(w_Labelchar,"out_DIV")>0 then
				div_tf = 1
			else
				div_tf=0
			end if
			class_head = table_str_list_head(div_tf,"","","","")
			class_bottom = table_str_list_bottom(div_tf)
			class_middle1 = table_str_list_middle_1(div_tf,"","")
			class_middle2 = table_str_list_middle_2(div_tf)
			ClassCodestr = ""
			dim w_rs_obj
			if class_num=0 then 
				fldname=""
				sql="select "
			else
				sql="select top "&class_num
			end if 
			fldname=" [id], [Fid], [name], [Level], [v_order], [bid], [Templet], [Domain], [IsURL], [Description], [keyword],[bigpic],[smallpic] "
			sql=sql&fldname&" From web_proClass Where 1=1"&classsql&" order by v_order desc"
			'response.write sql
			set w_rs_obj=Conn.execute(sql)
			if w_rs_obj.eof then
				ClassCodestr = ""
				w_rs_obj.close:set w_rs_obj=nothing
			else
				if div_tf = 0 then
					c_i_k = 0
					if cint(class_col)<>1 then
						ClassCodestr = ClassCodestr &  "  <tr>"
					end if 
				end if
			
				do while not w_rs_obj.eof 
					w_start_level=w_rs_obj("level")
					rem 调用子类
					if child_col>0 then
						if cint(class_col) =0 then
							ClassCodestr= ClassCodestr & "<td valign='top'><table width='100%' border='0' cellspacing='0' cellpadding='0'>"&Getlist_Child_class(w_rs_obj,1,view_level,class_col,child_col,Class_style,child_style,child_css,w_start_level,class_css,class_titlenum,child_num,child_titlenum)&"</table></td>"
						elseif cint(class_col) =1 then
							ClassCodestr= ClassCodestr &"<tr><td valign='top'><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td>" & getlist_class(w_rs_obj,0,view_level,class_col,child_col,Class_style,child_style,child_css,w_start_level,class_css,class_titlenum,child_num,child_titlenum)&"</td></tr><tr><td>"&"<table width='100%' border='0' cellspacing='0' cellpadding='0'>"&Getlist_Child_class(w_rs_obj,1,view_level,class_col,child_col,Class_style,child_style,child_css,w_start_level,class_css,class_titlenum,child_num,child_titlenum)&"</table>"&"</td></tr></table></td></tr>"
						else
							ClassCodestr= ClassCodestr & "<td valign='top'><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td>" & getlist_class(w_rs_obj,0,view_level,class_col,child_col,Class_style,child_style,child_css,w_start_level,class_css,class_titlenum,child_num,child_titlenum)&"</td></tr><tr><td>"&"<table width='100%' border='0' cellspacing='0' cellpadding='0'>"&Getlist_Child_class(w_rs_obj,1,view_level,class_col,child_col,Class_style,child_style,child_css,w_start_level,class_css,class_titlenum,child_num,child_titlenum)&"</table>"&"</td></tr></table></td>"
						end if
						w_rs_obj.movenext
						if cint(class_col)>1 then
							c_i_k = c_i_k+1
							if c_i_k mod cint(class_col) = 0 then
								ClassCodestr = ClassCodestr & "</tr>"&vbNewLine
							end if
							if c_i_k mod cint(class_col) = 0 and not w_rs_obj.eof then
								ClassCodestr = ClassCodestr & "<tr>"
							end if
						end if
					else
						if cint(class_col) =1 then
							ClassCodestr= ClassCodestr &"<tr><td>" & getlist_class(w_rs_obj,0,view_level,class_col,child_col,Class_style,child_style,child_css,w_start_level,class_css,class_titlenum,child_num,child_titlenum) & "</td></tr>"
						else
							ClassCodestr= ClassCodestr &"<td >" & getlist_class(w_rs_obj,0,view_level,class_col,child_col,Class_style,child_style,child_css,w_start_level,class_css,class_titlenum,child_num,child_titlenum) & "</td>"
						end if
						w_rs_obj.movenext
						if cint(class_col)<>1 then
							c_i_k = c_i_k+1
							if c_i_k mod cint(class_col) = 0 then
								ClassCodestr = ClassCodestr & "</tr>"&vbNewLine
							end if
							if c_i_k mod cint(class_col) = 0 and not w_rs_obj.eof then
								ClassCodestr = ClassCodestr & "<tr>"
							end if
						end if
					end if 
				loop
				w_rs_obj.close:set w_rs_obj=nothing
			end if
			ClassCode =class_head&ClassCodestr&class_bottom
		End Function

		'通用类标签________________________________________________________________________________________________________________________________________________________________________________
		Public Function AllCode(w_Labelchar,w_type,w_Id)
		'0	┆1	      ┆2        ┆3        ┆4       ┆5         ┆6       ┆7                      ┆8          ┆9                 ┆10	        ┆11
		'AllCode┆类型$HotMalls┆调用数$10┆标题数$40┆点击数$0┆图片商品$0┆排列数$1┆日期格式$YY02年MM月DD日┆引用样式$41┆输出格式$out_Table┆内容显示字数$200┆导航内容显示字数$200
			Dim WEB_Domain,LableType,CodeNumer,LeftTitle,ClickNum,PicTF,ColsNumer,DateStyle,Style_Id,contentNum,NaviNum,div_tf,table_array
			Dim SearSQL,w_rs_obj,w_sql,picMallstf,orderby,HotStr,Content_List,tjstr
			Dim classMalls_head,classMalls_middle1,classMalls_bottom,classMalls_middle2,c_i_k
			LableType = split(split(w_Labelchar,"┆")(1),"$")(1)
			CodeNumer = split(split(w_Labelchar,"┆")(2),"$")(1)
			if not isnumeric(CodeNumer) then:CodeNumer = 10:else:CodeNumer = cint(CodeNumer):end if
			LeftTitle = split(split(w_Labelchar,"┆")(3),"$")(1)
			if not isnumeric(LeftTitle) then:LeftTitle = 40:else:LeftTitle = cint(LeftTitle):end if
			ClickNum = split(split(w_Labelchar,"┆")(4),"$")(1)
			if not isnumeric(ClickNum) then:ClickNum =0:else:ClickNum = cint(ClickNum):end if
			PicTF = split(split(w_Labelchar,"┆")(5),"$")(1)
			ColsNumer = split(split(w_Labelchar,"┆")(6),"$")(1)
			DateStyle = split(split(w_Labelchar,"┆")(7),"$")(1)
			Style_Id = split(split(w_Labelchar,"┆")(8),"$")(1)
			contentNum = split(split(w_Labelchar,"┆")(9),"$")(1)
			if not isnumeric(contentNum) then:contentNum = 200:else:contentNum = cint(contentNum):end if
			NaviNum = split(split(w_Labelchar,"┆")(10),"$")(1)
			if not isnumeric(NaviNum) then:NaviNum = 200:else:NaviNum = cint(NaviNum):end if
			if instr(w_Labelchar,"out_DIV")>0 then:div_tf = 1:else:div_tf = 0:end if
			table_array=split(w_Labelchar,"┆")
			classMalls_head = table_str_list_head(div_tf,split(table_array(10),"$")(1),split(table_array(11),"$")(1),aa,bb)
			classMalls_middle1 = table_str_list_middle_1(div_tf,cc,dd)
			classMalls_bottom = table_str_list_bottom(div_tf)
			classMalls_middle2 = table_str_list_middle_2(div_tf)
			fldname=" [id], [P_volumn], [P_PID], [P_name],[p_Shortname], [P_score], [P_MyProperty], [P_Content], [P_Rank], [P_MarketPrice], [P_MemberPrice], [P_Recommend2], [P_Recommend], [P_Solded], [P_viewnum], [P_Favnum], [P_Discount], [P_level], [P_classid], [P_ProCLass], [P_ProLevel], [P_Pphoto], [P_Sphoto], [P_savefilename], [P_Addtime], [P_Amount], [P_Stock], [P_Link], [P_Brand], [P_Indextj], [P_Moviename], [P_Movieurl], [P_Redbag], [P_Truegood], [P_Publicate], [P_Weight], [P_Ifalarm], [P_Alarmnum], [P_Hot], [P_Fee], [P_Morephoto], [P_Ordernums], [P_favoractivity], [P_newflag], [P_Onlyid], [P_Folder], [P_keyword], [P_Description], [P_SetMyPrice], [Userid], [Shopid], [P_Del], [P_Server], [P_Factory], [P_ShortContent], [p_adminstate], [p_adminrank], [p_admintime], [Templet],[p_changescore],[p_varprice] ,[P_Shortname],[P_scoreflag],[p_wholesale],[p_active],[p_moviexy]"
			if session("kkshopid")<>"" then
				p_classid="p_proclass"
				search_i_SQL=" and shopid='"&session("kkshopid")&"'"
			else
				p_classid="p_classid"	
			end if
			if w_Id<>"" then
				'w_id=getProSubClass(w_id)
				'response.write w_id&"<br>"
				Path_Flag=Lcase(Request.Cookies("Web_File_Save_Path"))
				Select Case Path_Flag
					case "ms:allproduct","ms:lastproduct","ms:dateproduct","ms:idproduct","ms:classproduct":
						p_id=getonevalue("web_product",p_classid,"id="&w_id)
						SearSQL=" and "&p_classid&" in ("&p_id&")"
					case "ms:allclass","ms:classlist":
						SearSQL=" and "&p_classid&" in ("&w_id&") "
				End Select
			else
				SearSQL = ""
			end if 
			select Case LCase(LableType)
				case "specialmalls"
					search_iMSQL=" and P_Fee=1 "
				case "lastmalls"
					search_iMSQL=" and P_newflag=1 "
				case "hotmalls"
					search_iMSQL=" and P_viewnum >="&ClickNum
				case "recmalls"
					search_iMSQL=" and P_Recommend=1 "
				case "soldmalls":
					search_iMSQL=" and P_solded >="&ClickNum
				case "collmalls"
					search_iMSQL=" and P_Favnum >="&ClickNum	
				case "classmalls"	
			end select

			w_sql="select top "& cint(CodeNumer)&fldname 
			w_sql = w_sql &"From Web_product where 1=1 "&search_i_SQL&SearSQL&" "&search_iMSQL&" order by p_rank desc"
			'response.write w_sql&"<br>"
			set w_rs_obj = Conn.execute(w_sql)
			if w_rs_obj.eof then
				Content_List=""
				w_rs_obj.close:set w_rs_obj=nothing
			else
				if div_tf = 0 then
					c_i_k = 0
					if cint(ColsNumer)<>1 then
						Content_List = Content_List &  "  <tr>"
					end if
				end if
				do while not w_rs_obj.eof
					if div_tf=1 then
						Content_List= Content_List & classMalls_middle1 & getlist_malls(w_rs_obj,Style_Id,LeftTitle,contentNum,NaviNum,0,DateStyle,0,WEB_Domain,w_type) & classMalls_middle2
					else
						if cint(ColsNumer) =1 then
							Content_List= Content_List & vbNewLine&"   <tr><td>" & getlist_malls(w_rs_obj,Style_Id,LeftTitle,contentNum,NaviNum,0,DateStyle,0,WEB_Domain,w_type) & "</td></tr>"
						else
							Content_List= Content_List & "<td >" & getlist_malls(w_rs_obj,Style_Id,LeftTitle,contentNum,NaviNum,0,DateStyle,0,WEB_Domain,w_type) & "</td>"
						end if
					end if
					w_rs_obj.movenext
					if div_tf = 0 then
						if cint(ColsNumer)<>1 then
						c_i_k = c_i_k+1
							if c_i_k mod cint(ColsNumer) = 0 then
								Content_List = Content_List & "</tr>"&vbNewLine&"  <tr>"
							end if
						end if
					end if
			   loop
			   if div_tf=0 then
					if cint(ColsNumer)<>1 then
						Content_List = Content_List & "</tr>"&vbNewLine
					end if
			   end if
				w_rs_obj.close:set w_rs_obj=nothing
				Content_List=classMalls_head & Content_List & classMalls_bottom
			end if 
			AllCode = Content_List
		End Function
		'相关商品标签________________________________________________________________________________________________________________________________________________________________________________
		Public Function RelationPro(w_Labelchar,w_type,w_Id)
		'0		    ┆1	      ┆2        ┆3        ┆4       		     ┆5        ┆6                 ┆7               ┆8                          
		'{Web:MS=RelationPro┆调用数$10┆标题数$40┆排列数$1┆日期格式$YY02年MM月DD日┆引用样式$┆输出格式$out_Table┆内容显示字数$200┆导航内容显示字数$200}
			Dim WEB_Domain,LableType,CodeNumer,LeftTitle,ClickNum,PicTF,ColsNumer,DateStyle,Style_Id,contentNum,NaviNum,div_tf,table_array
			Dim SearSQL,w_rs_obj,w_sql,picMallstf,orderby,HotStr,Content_List,tjstr
			Dim classMalls_head,classMalls_middle1,classMalls_bottom,classMalls_middle2,c_i_k
			CodeNumer = split(split(w_Labelchar,"┆")(1),"$")(1)
			if not isnumeric(CodeNumer) then:CodeNumer = 10:else:CodeNumer = cint(CodeNumer):end if
			LeftTitle = split(split(w_Labelchar,"┆")(2),"$")(1)
			if not isnumeric(LeftTitle) then:LeftTitle = 40:else:LeftTitle = cint(LeftTitle):end if
			ColsNumer = split(split(w_Labelchar,"┆")(3),"$")(1)
			DateStyle = split(split(w_Labelchar,"┆")(4),"$")(1)
			Style_Id = split(split(w_Labelchar,"┆")(5),"$")(1)
			contentNum = split(split(w_Labelchar,"┆")(7),"$")(1)
			if not isnumeric(contentNum) then:contentNum = 200:else:contentNum = cint(contentNum):end if
			NaviNum = split(split(w_Labelchar,"┆")(8),"$")(1)
			if not isnumeric(NaviNum) then:NaviNum = 200:else:NaviNum = cint(NaviNum):end if
			if instr(w_Labelchar,"out_DIV")>0 then:div_tf = 1:else:div_tf = 0:end if
			table_array=split(w_Labelchar,"┆")
			classMalls_head = table_str_list_head(div_tf,split(table_array(7),"$")(1),split(table_array(8),"$")(1),aa,bb)
			classMalls_middle1 = table_str_list_middle_1(div_tf,cc,dd)
			classMalls_bottom = table_str_list_bottom(div_tf)
			classMalls_middle2 = table_str_list_middle_2(div_tf)
			fldname=" [id], [P_volumn], [P_PID], [P_name],[p_Shortname], [P_score], [P_MyProperty], [P_Content], [P_Rank], [P_MarketPrice], [P_MemberPrice], [P_Recommend2], [P_Recommend], [P_Solded], [P_viewnum], [P_Favnum], [P_Discount], [P_level], [P_classid], [P_ProCLass], [P_ProLevel], [P_Pphoto], [P_Sphoto], [P_savefilename], [P_Addtime], [P_Amount], [P_Stock], [P_Link], [P_Brand], [P_Indextj], [P_Moviename], [P_Movieurl], [P_Redbag], [P_Truegood], [P_Publicate], [P_Weight], [P_Ifalarm], [P_Alarmnum], [P_Hot], [P_Fee], [P_Morephoto], [P_Ordernums], [P_favoractivity], [P_newflag], [P_Onlyid], [P_Folder], [P_keyword], [P_Description], [P_SetMyPrice], [Userid], [Shopid], [P_Del], [P_Server], [P_Factory], [P_ShortContent], [p_adminstate], [p_adminrank], [p_admintime], [Templet],[p_changescore],[p_varprice] ,[P_Shortname],[p_scoreflag],[p_wholesale],[p_active],[p_moviexy]"
			if w_Id<>"" then
				Relationproid=getonevalue("web_product","p_Relationpro","id="&w_id&"")
				Path_Flag=Lcase(Request.Cookies("Web_File_Save_Path"))
				Select Case Path_Flag
					case "ms:allproduct","ms:lastproduct","ms:dateproduct","ms:idproduct","ms:classproduct":
						SearSQL=" and id in ("&Relationproid&")"
				End Select
			else
				SearSQL = "and 2=3"
			end if

			w_sql="select top "& cint(CodeNumer)&fldname 
			if IsSqlDataBase =1 then
        			w_sql = w_sql &"From Web_product where 1=1  "&SearSQL&" and p_changsale=0 and P_Del=0  order by id desc"
			else
				w_sql = w_sql &"From Web_product where 1=1  "&SearSQL&" and p_changsale=0 and P_Del=0  order by p_rank desc"
			end if
			
			'response.write w_sql&"<br>"
			set w_rs_obj = Conn.execute(w_sql)
			if w_rs_obj.eof then
				Content_List=""
				w_rs_obj.close:set w_rs_obj=nothing
			else
				if div_tf = 0 then
					c_i_k = 0
					if cint(ColsNumer)<>1 then
						Content_List = Content_List &  "  <tr>"
					end if
				end if
				do while not w_rs_obj.eof
					if div_tf=1 then
						Content_List= Content_List & classMalls_middle1 & getlist_malls(w_rs_obj,Style_Id,LeftTitle,contentNum,NaviNum,0,DateStyle,0,WEB_Domain,w_type) & classMalls_middle2
					else
						if cint(ColsNumer) =1 then
							Content_List= Content_List & vbNewLine&"   <tr><td>" & getlist_malls(w_rs_obj,Style_Id,LeftTitle,contentNum,NaviNum,0,DateStyle,0,WEB_Domain,w_type) & "</td></tr>"
						else
							Content_List= Content_List & "<td width="""& cint(100/cint(ColsNumer))&"%"">" & getlist_malls(w_rs_obj,Style_Id,LeftTitle,contentNum,NaviNum,0,DateStyle,0,WEB_Domain,w_type) & "</td>"
						end if
					end if
					w_rs_obj.movenext
					if div_tf = 0 then
						if cint(ColsNumer)<>1 then
						c_i_k = c_i_k+1
							if c_i_k mod cint(ColsNumer) = 0 then
								Content_List = Content_List & "</tr>"&vbNewLine&"  <tr>"
							end if
						end if
					end if
			   loop
			   if div_tf=0 then
					if cint(ColsNumer)<>1 then
						Content_List = Content_List & "</tr>"&vbNewLine
					end if
			   end if
				w_rs_obj.close:set w_rs_obj=nothing
				Content_List=classMalls_head & Content_List & classMalls_bottom
			end if 
			RelationPro = Content_List
		End Function
		'常规标签___________________________________________________________________________________________________________
		Public Function readmalls(w_Labelchar,w_type,w_Id)
			'ShowArticle┆引用样式$2┆日期格式$YY02-MM-DD HH:MI:SS
			Dim styleId,ReadSql,RsReadObj
			Dim Mw_Domain,datestyle,PageTF,pagecss,pageposi,pagegs
			styleId = split(split(w_Labelchar,"┆")(1),"$")(1)
			datestyle = split(split(w_Labelchar,"┆")(2),"$")(1)
			Showmalls = ""
			if trim(w_Id)="" then
				Readmalls = ""
			else
					T_Para="[id], [P_volumn], [P_PID], [P_name],[p_Shortname], [P_score], [P_MyProperty], [P_Content], [P_Rank], [P_MarketPrice], [P_MemberPrice], [P_Recommend2], [P_Recommend], [P_Solded], [P_viewnum], [P_Favnum], [P_Discount], [P_level], [P_classid], [P_ProCLass], [P_ProLevel], [P_Pphoto], [P_Sphoto], [P_savefilename], [P_Addtime], [P_Amount], [P_Stock], [P_Link], [P_Brand], [P_Indextj], [P_Moviename], [P_Movieurl], [P_Redbag], [P_Truegood], [P_Publicate], [P_Weight], [P_Ifalarm], [P_Alarmnum], [P_Hot], [P_Fee], [P_Morephoto], [P_Ordernums], [P_favoractivity], [P_newflag], [P_Onlyid], [P_Folder], [P_keyword], [P_Description], [P_SetMyPrice], [Userid], [Shopid], [P_Del], [P_Server], [P_Factory], [P_ShortContent], [p_adminstate], [p_adminrank], [p_admintime], [Templet],[p_changescore],[p_varprice] ,[P_Shortname],[p_scoreflag],[p_wholesale],[p_active],[p_moviexy]"
					ReadSql = "Select "&T_Para&" From Web_Product where id="&w_id&""
					'response.write ReadSql
					Set  RsReadObj = Server.CreateObject(C_Web_RS)
					RsReadObj.open ReadSql,Conn,1,1
					
					if not RsReadObj.eof then
						Readmalls  = Readmalls  & getlist_malls(RsReadObj,styleId,0,0,0,0,datestyle,0,Mw_Domain,"Readmalls")
					else
						Readmalls  =""
					end If
					RsReadObj.close:set RsReadObj = nothing
			end if
			Readmalls=Readmalls
		End Function

		'分类浏览___________________________________________________________________________________________________________
		Public Function readclasses(w_Labelchar,w_type,w_Id)
			'ShowArticle┆引用样式$2┆日期格式$YY02-MM-DD HH:MI:SS
			Dim styleId,ReadSql,RsReadObj
			Dim Mw_Domain,datestyle,PageTF,pagecss,pageposi,pagegs
			styleId = split(split(w_Labelchar,"┆")(1),"$")(1)
			Showmalls = ""
			if trim(w_Id)="" then
				Readclasses = ""
			else
				Path_Flag=Lcase(Request.Cookies("Web_File_Save_Path"))
				Select Case Path_Flag
					case "ms:allclass","ms:classlist":
						T_Para="*"
						ReadSql = "Select "&T_Para&" From Web_proclass where id="&w_id&""
						'response.write ReadSql
						Set  RsReadObj = Server.CreateObject(C_Web_RS)
						RsReadObj.open ReadSql,Conn,1,1
					
						if not RsReadObj.eof then
							Readclasses   = Readclasses  & Getlist_class(RsReadObj,styleId,0,0,0,styleId,styleId,child_css,1,class_css,0,0,0)
						else
							Readclasses   =""
						end If
						RsReadObj.close:set RsReadObj = nothing
					case else
						Readclasses = ""
				End Select
			end if
			Readclasses=Readclasses
		End Function

		Public Function floatingpro(w_Lablechar,w_type,w_id)
			web_string=web_string&"<div id=""floater"" style=""RIGHT: 0px; OVERFLOW: visible; POSITION: absolute; TOP: 0px"">"	
			web_string=web_string&"<script language=""javascript"" src="""&Web_Get_RootDir(web_c_setupfolder)&"js/Cart.js""></script>"
			web_string=web_string&"<script language=""javascript"" src="""&Web_Get_RootDir(web_c_setupfolder)&"pub/ShowCart.asp""></script>"
			web_string=web_string&"</div>"	
			web_string=web_string&"<script language=""javascript"" src="""&Web_Get_RootDir(web_c_setupfolder)&"js/serviceqq2.js""></script>"
			floatingpro=web_string
		End Function
		Public Function productreview(w_Lablechar,w_type,w_id)
			starheight = split(split(w_Lablechar,"┆")(1),"$")(1)
			web_string="<script src="""&Web_Get_RootDir(web_c_setupfolder)&"ajax/msgajax.js""></script>"
			web_string=web_string&"<script>loadMessage('"&w_id&"','0');</script>"
			web_string=web_string&"<span id=""web_procomment""></span>"
			ProductReview=web_string
		End Function
		Public Function productstar(w_Lablechar,w_type,w_id)
			starheight = split(split(w_Lablechar,"┆")(1),"$")(1)
			productstar="<IFRAME ID='editor' src='"&Web_Get_RootDir(Web_C_setupfolder)&"pub/getprostar.asp?productid="&w_id&"' frameborder='0' scrolling='no' width='100%' height='"&starheight&"'></IFRAME>"
		End Function
		'替换样式
		Public Function getlist_malls(w_obj,style_id,w_titlenumber,w_contentnumber,w_navinumber,w_picshowtf,w_datestyle,w_openStyle,w_Mw_Domain,w_subsys_ListType)
			Dim w_target,get_SpecialEName,ListSql,Rs_ListObj,s_Content,s_mallsPathUrl,Rs_Authorobj,k_i,k_tmp_Char,k_tmp_uchar,k_tmp_Chararray,FormReview
			Dim s_m_Rs,s_array,s_t_i,tmp_list,s_w_classSql,m_Rs_class,class_path,str_mallstitle
			if w_opeMStyle=0 then
				w_target=" "
			else
				w_target=" target=""_blank"""
			end if
			if style_id<>"" then
				onlyid=getonevalue("web_style","onlyid","onlyid='"&style_id&"'")
				if onlyid="-1NISNUL" then
					ListSql = "Select s_Content from Web_style where ID=" & style_id & ""
				else
					ListSql = "Select s_Content from Web_style where onlyid='" & onlyid & "'"
				end if
				Set Rs_ListObj = Conn.Execute(ListSql)
				if Not Rs_ListObj.Eof then
					s_Content = Rs_ListObj("s_Content")
	
					'替换自动编号:ID________________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_Id}")>0 then
						s_Content = replace(s_Content,"{MS:Web_Id}",w_obj("Id"))
					end if
					'替换商品编号:PID______________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallPid}")>0 then
						if w_obj("p_PId")="" or isnull(w_obj("p_PId"))=true then
							Pp_id=""
						else
							Pp_id=trim(w_obj("p_PId"))
						end if
						
						s_Content = replace(s_Content,"{MS:Web_MallPid}",Pp_id)
					end if
					'替换商品名称(全称):p_name__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallName}")>0 then
						if  w_titlenumber=0 or w_titlenumber="" then
							 str_mallstitle =w_obj("P_name")
						else
							str_mallstitle=msglength(w_obj("P_name"),w_titlenumber)  
						end if
						s_Content = replace(s_Content,"{MS:Web_MallName}",str_mallstitle)
					end if
					'替换商品名称(全称):p_name__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_FFMallName}")>0 then
							str_mallstitle=msglength(w_obj("P_name"),w_titlenumber)  
						s_Content = replace(s_Content,"{MS:Web_FFMallName}",str_mallstitle)
					end if
					'替换商品名称(全称):p_name__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_ShortName}")>0 then
						if w_obj("p_Shortname")="" or isnull(w_obj("p_Shortname"))=true then
							str_mallstitle =""
						else
							str_mallstitle =w_obj("P_Shortname")
						end if
						s_Content = replace(s_Content,"{MS:Web_ShortName}",str_mallstitle)
					end if
					'替换商品名称(截取):p_name__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_HMallName}")>0 then
						if  w_titlenumber=0 or w_titlenumber="" then
							 str_hmallstitle =w_obj("P_name")
						else
							 str_hmallstitle = msglength(w_obj("P_name"),w_titlenumber)
						end if
						s_Content = replace(s_Content,"{MS:Web_HMallName}",str_hmallstitle)
					end if
		
					'替换商品大图:P_Pphoto____________________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallBpic}")>0 then
						if instr(Lcase(w_obj("p_pphoto")),"http://")>0 then
							s_BigPicPath=w_obj("p_pphoto")
							s_BigPicUrl=w_obj("p_pphoto")
						else
							s_BigPicPath=web_get_rootdir(web_c_setupfolder)&w_obj("p_pphoto")
							s_BigPicUrl=Web_Get_RootDir(web_c_setupfolder)&w_obj("p_pphoto")
						end if 
						bwh=getonevalue("web_webconfig","w_bphoto","id=1")
						if bwh="-1NISNUL" then
							bw="90"
							bh="90"
						else
							bw=clng(split(bwh,"|")(0))
							bh=clng(split(bwh,"|")(1))
						end if
						if instr(Lcase(w_obj("p_pphoto")),"http://")>0 then	
							s_Content = replace(s_Content,"{MS:Web_MallBpic}",s_BigPicUrl)
							s_Content = replace(s_Content,"{MS:Web_Bwidth}",250)
							s_Content = replace(s_Content,"{MS:Web_Bheight}",250)
						else
							spicsize=split(getspicsize(s_BigPicPath,bw,bh),"|")
							s_Content = replace(s_Content,"{MS:Web_MallBpic}",s_BigPicUrl)
							s_Content = replace(s_Content,"{MS:Web_Bwidth}",spicsize(0))
							s_Content = replace(s_Content,"{MS:Web_Bheight}",spicsize(1))
						end if
					
						
					end if
					'替换商品小图:P_Pphoto____________________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallSpic}")>0 then
						if instr(Lcase(w_obj("p_sphoto")),"http://")>0 then
								s_SmallPicPath=w_obj("p_sphoto")
								s_SmallPicUrl=w_obj("p_sphoto")
								swh=getonevalue("web_webconfig","w_Sphoto","id=1")
								if swh="-1NISNUL" then
									sw="90"
									sh="90"
								else
									sw=clng(split(swh,"|")(0))
									sh=clng(split(swh,"|")(1))
								end if
						else
							if w_obj("p_sphoto")=""  then
								s_SmallPicPath=Web_Get_RootDir(web_c_setupfolder)&w_obj("p_pphoto")
								s_SmallPicUrl=Web_Get_RootDir(web_c_setupfolder)&w_obj("p_pphoto")
								sw=90
								sh=90
							else
								s_SmallPicPath=Web_Get_RootDir(web_c_setupfolder)&w_obj("p_sphoto")
								s_SmallPicUrl=Web_Get_RootDir(web_c_setupfolder)&w_obj("p_sphoto")
								swh=getonevalue("Web_Webconfig","w_Sphoto","id=1")
								if swh="-1NISNUL" then
									sw="90"
									sh="90"
								else
									
									sw=clng(split(swh,"|")(0))
									sh=clng(split(swh,"|")(1))
								end if
							end if

						end if 
						if instr(Lcase(w_obj("p_sphoto")),"http://")>0 then
							spicsize=split(getspicsize(s_SmallPicPath,sw,sh),"|")
							s_Content = replace(s_Content,"{MS:Web_MallSpic}",s_SmallPicUrl)
							s_Content = replace(s_Content,"{MS:Web_Swidth}",90)
							s_Content = replace(s_Content,"{MS:Web_Sheight}",90)
							
						else
							spicsize=split(getspicsize(s_SmallPicPath,sw,sh),"|")
							s_Content = replace(s_Content,"{MS:Web_MallSpic}",s_SmallPicUrl)
							s_Content = replace(s_Content,"{MS:Web_Swidth}",spicsize(0))
							s_Content = replace(s_Content,"{MS:Web_Sheight}",spicsize(1))
						end if
						
					end if
					'替换无大图:__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_Morepicture}")>0 then
						class_name=showpicture(w_obj("P_Morephoto"),w_obj("p_pphoto"),w_obj("Id"))
						class_name=class_name&"<link rel='stylesheet' href='"&m_root_path&"js/photojs/pic-css/lightbox.css' type='text/css' media='screen' />"&vbcrlf
						class_name=class_name&"<script src='"&m_root_path&"js/photojs/pic-js/prototype.js' type='text/javascript'></script>"&vbcrlf
						class_name=class_name&"<script src='"&m_root_path&"js/photojs/pic-js/scriptaculous.js?load=effects' type='text/javascript'></script>"&vbcrlf
						class_name=class_name&"<script src='"&m_root_path&"js/photojs/pic-js/lightbox.js' type='text/javascript'></script>"&vbcrlf
						s_Content = replace(s_Content,"{MS:Web_Morepicture}",class_name)
						class_name=""
					end if
					'商品属性:__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallProperty}")>0 then
						if w_obj("P_newflag")=1 then
							MallProperty="<img src='"&m_root_path&"images/product/newicon.gif' title='新品上架'>&nbsp;"
						end if 
						if w_obj("P_Recommend")=1 then
							MallProperty=MallProperty&"<img src='"&m_root_path&"images/product/commendicon.gif' title='商城推荐'>&nbsp;"
						end if 
						if w_obj("P_hot")=1 then
							MallProperty=MallProperty&"<img src='"&m_root_path&"images/product/hoticon.gif' title='热销焦点'>&nbsp;"
						end if
						if w_obj("P_fee")=1 then
							MallProperty=MallProperty&"<img src='"&m_root_path&"images/product/favoricon.gif' title='折价优惠'>&nbsp;"
						end if 
						if w_obj("p_scoreflag")=1 then
							MallProperty=MallProperty&"<img src='"&m_root_path&"images/product/exchangeicon.gif' title='可积分兑换'>&nbsp;"
						end if 
						if w_obj("p_wholesale")<>"0" then
							MallProperty=MallProperty&"<img src='"&m_root_path&"images/product/piicon.gif' title='可批发'>&nbsp;"
						end if 
						s_Content = replace(s_Content,"{MS:Web_MallProperty}",MallProperty)
					end if

					'购买按钮显示________________________________________________________________________________
					if w_obj("p_scoreflag")=1 then
						s_Content = replace(s_Content,"[scorenote]","<br>该产品可以用"&w_obj("p_changescore")&"点积分进行兑换")
						s_Content = replace(s_Content,"[scorenone]","style='display:'")
						s_Content = replace(s_Content,"[moneynone]","style='display:none'")
					else
						s_Content = replace(s_Content,"[scorenote]","")
						s_Content = replace(s_Content,"[scorenone]","style='display:none'")
						s_Content = replace(s_Content,"[moneynone]","style='display:'")
					end if 

					'自定义属性:__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallMyProperty}")>0 then
						web_class_name=GetSxList(trim(w_obj("P_MyProperty")))
						'response.write web_class_name
						s_Content = replace(s_Content,"{MS:Web_MallMyProperty}",web_class_name)
						
					end if
					if InStr(s_Content,"{MS:Web_ClassProperty}")>0 then
						web_class_sx=web_ClassSxList(trim(w_obj("P_varprice")))
						web_class_sx=Web_Restore_zh(trim(w_obj("P_varprice")))
						'response.write web_class_name
						s_Content = replace(s_Content,"{MS:Web_ClassProperty}",web_class_sx)
						
					end if

					'相关活动:__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallActive}")>0 then
						act_list=GetActList(w_obj("P_active"))
						s_Content = replace(s_Content,"{MS:Web_MallActive}",act_list)
					end if

					'相关活动:__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_OnlyId}")>0 then
						web_onlyid=trim(w_obj("P_Onlyid"))
						s_Content = replace(s_Content,"{MS:Web_OnlyId}",web_onlyid)
					end if

					'替换所属系统分类:p_classid__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallClassid}")>0 then
						class_name=getonevalue("web_proclass","name","id="&w_obj("p_classid"))
						s_Content = replace(s_Content,"{MS:Web_MallClassid}",class_name)
						class_name=""
					end if
					
					'替换所属品牌:p_brand__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallBrand}")>0 then
						if w_obj("p_brand")<>"" then
							brand_name=getonevalue("Web_Brand","B_Name","id="&w_obj("p_brand")&" ")
							if brand_name="-1NISNUL" then
								Tbrand_name=""
							else
								Tbrand_name=brand_name
							end if
						else
							Tbrand_name=""
						end if
						s_Content = replace(s_Content,"{MS:Web_MallBrand}",Tbrand_name)
						brand_name=""
					end if
					'替换所属品牌链接:p_brand__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_BrandUrl}")>0 then
						if w_obj("p_brand")<>"" then
							brand_Onlyid=getonevalue("Web_Brand","Onlyid","id="&w_obj("p_brand")&" ")
							if brand_Onlyid="-1NISNUL" then
								tbrandurl="#"
							else
								tbrandurl=Web_Get_RootDir(web_c_setupfolder)&"html/brand/"&brand_Onlyid&".html"
							end if
						else
							tbrandurl="#"
						end if
					
						s_Content = replace(s_Content,"{MS:Web_BrandUrl}",tbrandurl)
						brand_name=""
					end if
					'替换所属品牌LOGO:b_picurl__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MBrandPic}")>0 then
						brand_pic=getonevalue("Web_Brand","b_picurl","id="&w_obj("p_brand")&" ")
						s_Content = replace(s_Content,"{MS:Web_MBrandPic}",Web_Get_RootDir(web_c_setupfolder)&brand_pic)
						brand_pic=""
					end if
					'替换市场价格:P_MarketPrice__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallMPrice1}")>0 then
							if w_obj("P_MarketPrice")<1 then
								MarketPrice=formatnumber(w_obj("P_MarketPrice"),2,-1) 
							else
								MarketPrice=w_obj("P_MarketPrice")
							end if
	
						s_Content = replace(s_Content,"{MS:Web_MallMPrice1}",MarketPrice)
					end if
					'替换会员价格:P_MemberPrice__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallMPrice2}")>0 then
						if w_obj("P_MemberPrice")<1 then
							MemberPrice=formatnumber(w_obj("P_MemberPrice"),2,-1) 
						else
							MemberPrice=w_obj("P_MemberPrice")
						end if
						s_Content = replace(s_Content,"{MS:Web_MallMPrice2}",MemberPrice)
					end if
					'替换市场价格:P_MarketPrice__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_FMallMPrice1}")>0 then
							
								FMarketPrice=formatnumber(w_obj("P_MarketPrice"),2,-1) 
							
						s_Content = replace(s_Content,"{MS:Web_FMallMPrice1}",FMarketPrice)
					end if
					'替换会员价格:P_MemberPrice__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_FMallMPrice2}")>0 then
								FMemberPrice=formatnumber(w_obj("P_MemberPrice"),2,-1)
						s_Content = replace(s_Content,"{MS:Web_FMallMPrice2}",FMemberPrice)
					end if
					
					'替换商品积分:Web_MallScore__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallScore}")>0 then
						s_Content = replace(s_Content,"{MS:Web_MallScore}",w_obj("P_score"))
					end if

					'替换商品积分:Web_BuyScore__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_BuyScore}")>0 then
						if w_obj("p_changescore")<>"" then
							changescore=w_obj("p_changescore")
						else
							changescore=""
						end if
						s_Content = replace(s_Content,"{MS:Web_BuyScore}",changescore)
					end if

					'替换自定义价格:MS:Web_MallMyPrice__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallMyPrice}")>0 then
						str_MallMyPrice="<script src='"&Web_Get_RootDir(Web_C_setupfolder)&"ajax/Web_All_Ajax.js' language='javascript'></script><span id='web_ProductMyPrice' name='web_ProductMyPrice' ></span><script>ProductMyPrice('"&w_obj("id")&"','myprice');</script>"
						s_Content = replace(s_Content,"{MS:Web_MallMyPrice}",str_MallMyPrice)
					end if

					'替换自定义价格:MS:Web_MallMyPrice__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallMyPrice2}")>0 then
						str_MallMyPrice="<script src='"&Web_Get_RootDir(Web_C_setupfolder)&"ajax/Web_All_Ajax.js' language='javascript'></script><span id='web_ProductMyPrice2' name='web_ProductMyPrice2' ></span><script>ProductMyPrice2('"&w_obj("id")&"','onlymyprice');</script>"
						s_Content = replace(s_Content,"{MS:Web_MallMyPrice2}",str_MallMyPrice)
					end if

					'替换当前重量:P_stock__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallWeight}")>0 then
							if w_obj("P_weight")<>"" then
								str_MallWeight=formatnumber(w_obj("P_weight"),2,-1) 
							else
								str_MallWeight=0
							end if
						s_Content = replace(s_Content,"{MS:Web_MallWeight}",str_MallWeight)
					end if
					'替换当前库存:P_stock__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallStock}")>0 then
						str_MallStock="<script src='"&Web_Get_RootDir(Web_C_setupfolder)&"pub/ShowClick.asp?pid="&w_obj("id")&"&action=productstock' language='javascript'></script>"
						s_Content = replace(s_Content,"{MS:Web_MallStock}",str_MallStock)
					end if
					
					'替换浏览次数:P_viewnum__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallViewnum}")>0 then
						
						str_viewnum="<script src='"&Web_Get_RootDir(Web_C_setupfolder)&"pub/ShowClick.asp?pid="&w_obj("id")&"&action=product&action2=product2' language='javascript'></script>"
						s_Content = replace(s_Content,"{MS:Web_MallViewnum}",str_viewnum)
					end if
					
					if InStr(s_Content,"{MS:Web_AMallViewnum")>0 then
						if trim(w_obj("P_viewnum"))<>"" then
							str_viewnum="<script src='"&Web_Get_RootDir(Web_C_setupfolder)&"/pub/ShowClick.asp?pid="&w_obj("Id")&"&action=product' language='javascript'></script>"
						else
							str_Viewnum ="0"
						end if
						s_Content = replace(s_Content,"{MS:Web_AMallViewnum}",str_Viewnum)
					end if				
					

					'替换浏览次数:客服通_________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_KFtong}")>0 then
						
						str_KFtong="<script src='"&Web_Get_RootDir(Web_C_setupfolder)&"pub/KFtong.asp' language='javascript'></script>"
						s_Content = replace(s_Content,"{MS:Web_KFtong}",str_KFtong)
					end if

					
					'伸缩多图:P_Favnum__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MoreImages}")>0 then
						morepicture=web_showmorepic(w_obj("P_Morephoto"))
					
						s_Content = replace(s_Content,"{MS:Web_MoreImages}",morepicture)
					end if
					'鼠标效果_________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MouseStyle}")>0 then
						s_BigPicPath=Web_Get_RootDir(web_c_setupfolder)&w_obj("p_pphoto")
						
						
							
						spicsize=split(getspicsize(s_BigPicPath,350,350),"|")
					
						MouseStyle="onMouseOver=""javascript:ddrivetip('<img width="&spicsize(0)&" height="&spicsize(1)&" src="&Web_Get_RootDir(web_c_setupfolder)&w_obj("p_pphoto")&">','#ffffff', 224)"" onMouseOut=""hideddrivetip()"""
					
						s_Content = replace(s_Content,"{MS:Web_MouseStyle}",MouseStyle)
					end if		
					'替换收藏次数:P_Favnum__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallFavnum}")>0 then
						if isnull(w_obj("P_Favnum"))=true then
							web_Favnum=0
						else
							web_Favnum=w_obj("P_Favnum")
						end if
						s_Content = replace(s_Content,"{MS:Web_MallFavnum}",web_Favnum)
					end if
		
					'替换商品关键字:P_keyword__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallKeyword}")>0 then
						s_Content = replace(s_Content,"{MS:Web_MallKeyword}",get_isnull(w_obj("P_keyword")))
					end if
					'替换商品描述:P_Description__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallDescription}")>0 then
						s_Content = replace(s_Content,"{MS:Web_MallDescription}",get_isnull(w_obj("P_Description")))
					end if
					'替换制造商:P_Server__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallServer}")>0 then
						
							server_name=""
						
						s_Content = replace(s_Content,"{MS:Web_MallServer}",server_name)
						server_name=""
					end if
					'替换生产商:P_Factory__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallFactory}")>0 then
						
							factory_name=""
						
						s_Content = replace(s_Content,"{MS:Web_MallFactory}",factory_name)
						factory_name=""	
					end if
					'替换商品简述:P_ShortContent__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallShortContent}")>0 then
						navi_content=w_obj("P_ShortContent")
						if w_contentnumber<>0 then
							navi_content=msglength(lose_html(navi_content), w_navinumber)
						else
							navi_content=replace(w_obj("P_ShortContent"),Chr(10),"<br>")
							navi_content=replace(navi_content,chr(32),"&nbsp;")
						end if
						s_Content = replace(s_Content,"{MS:Web_MallShortContent}",get_isnull(navi_content))
						navi_content=""
					end if
					'替换商品内容:P_Content__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallContent}")>0 then
						p_content=w_obj("P_Content")
						if w_contentnumber<>0 then
							p_content=msglength(lose_html(p_content),w_contentnumber)
						end if
						s_Content = replace(s_Content,"{MS:Web_MallContent}",get_isnull(p_content))
						p_content=""
					end if
					'替换商品连接:Web:MallUrl__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallUrl}")>0 then
						'Get_MallsLink(店铺编号,文件名称,保存路径,打开模式)
						ms_url_mall=get_mallsLink(w_obj("p_onlyid"),w_obj("p_folder"),w_openStyle,w_obj("shopid"))
						s_Content = replace(s_Content,"{MS:Web_MallUrl}",ms_url_mall)
						ms_url_mall=""
					end if
					'替换系统分类连接:Web:ClassUrl__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_ClassUrl}")>0 then
						'Get_ClassLink(分类编号,打开模式)
						ms_url_mall=get_ClassLink(w_obj("p_classid"),w_openStyle)
						s_Content = replace(s_Content,"{MS:Web_ClassUrl}",ms_url_mall)
						ms_url_mall=""
					end if
					'替换商家分类连接:Web:ShopClassUrl__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_ShopClassUrl}")>0 then
						'Get_ShopClassLink(店铺编号,分类编号,打开模式)
						ms_url_mall=get_ShopClassLink(w_obj("Shopid"),w_obj("P_ProCLass"),w_openStyle)
						s_Content = replace(s_Content,"{MS:Web_ShopClassUrl}",ms_url_mall)
						ms_url_mall=""
					end if
					'替换品牌连接:Web:ShopClassUrl__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_BrandUrl}")>0 then
						ms_brand_mall=get_brandLink(w_obj("p_brand"),w_openStyle)
						s_Content = replace(s_Content,"{MS:Web_BrandUrl}",ms_brand_mall)
						ms_url_mall=""
					end if
					'下一篇__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_PrevPage}")>0 then
						Prevname=getonevalue("web_product","p_name"," p_classid="&w_obj("p_classid")&" and id <"&w_obj("id")&"")
						'response.write Prevname
						if Prevname="-1NISNUL" then
							str_PrevPage = "最后一篇"
						else
							str_PrevPage  =Prevname
						end if
						s_Content = replace(s_Content,"{MS:Web_PrevPage",str_PrevPage)
					end if
					 '下一篇链接__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_PrevUrl}")>0 then
						Prev_onlyid=getonevalue("web_product","P_onlyid"," P_classid="&w_obj("P_classid")&" and id <"&w_obj("id")&"")
						
						if Prev_onlyid="-1NISNUL" then
							tmp_PrevUrl="#"
						else
							tmp_PrevUrl=get_mallsLink(Prev_onlyid,Prev_onlyid,Prev_folder,w_opeAStyle)	
						end if
						
						s_Content = replace(s_Content,"{MS:Web_PrevUrl}",tmp_PrevUrl)
					end if
				       '上一篇_________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_NextPage}")>0 then
						Nextname=getonevalue("web_product","p_name","P_classid="&w_obj("P_classid")&" and id>"&w_obj("id")&"")
						if Nextname="-1NISNUL" then
							str_NextPage = "第一篇"
						else
							str_NextPage  =Nextname
						end if
						s_Content = replace(s_Content,"{MS:Web_NextPage}",str_NextPage)
					end if
					 '上一篇链接__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_NextUrl}")>0 then
						Next_onlyid=getonevalue("web_product","P_onlyid","P_classid="&w_obj("P_classid")&" and id >"&w_obj("id")&"")
						
						if Next_onlyid="-1NISNUL" then
							tmp_NextUrl="#"
						else
							tmp_NextUrl=get_mallsLink(Next_onlyid,Next_folder,w_opeAStyle,w_obj("shopid"))	
						end if
						s_Content = replace(s_Content,"{MS:Web_NextUrl}",tmp_NextUrl)
					end if	

					'分类统计__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_ClassTotal}")>0 then
						s_Content = replace(s_Content,"{MS:Web_ClassTotal}",Web_get_ProCount(w_obj("p_classid")))
					end if

					'视频文件名称__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallMovieName}")>0 then
						w_moviename=w_obj("p_moviename")
						if isnull(w_moviename) then w_moviename=""
						s_Content = replace(s_Content,"{MS:Web_MallMovieName}",w_moviename)
					end if

					'视频窗口原窗口__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallMoviePlay}")>0 then
						w_moviexy=w_obj("p_moviexy")
						if instr(w_moviexy,"*")<=0 or isnull(w_moviexy) then w_moviexy=w_moviexy&"*"
						w_moviexy=split(w_moviexy,"*")
						aa=VideoPlayer(w_obj("p_movieurl"),w_moviexy(0),w_moviexy(1))
						s_Content = replace(s_Content,"{MS:Web_MallMoviePlay}",aa)
						aa=""
					end if

					'视频窗口新窗口__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallMoviePlay2}")>0 then
						w_moviexy=w_obj("p_moviexy")
						if instr(w_moviexy,"*")<=0 or isnull(w_moviexy) then w_moviexy=w_moviexy&"*"
						w_moviexy=split(w_moviexy,"*")
						aa="onclick=""window.open('/showvideo.asp?url="&w_obj("p_movieurl")&"&xx="&w_moviexy(0)&"&yy="&w_moviexy(1)&"&name="&server.urlencode(w_obj("p_moviename"))&"','','left=300,right=300,width="&w_moviexy(0)&",height="&w_moviexy(1)&",scrollbar=yes')"" style='cursor:hand'"
						s_Content = replace(s_Content,"{MS:Web_MallMoviePlay2}",aa)
						aa=""
					end if

					'_________________________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_Content}")>0 then
						if w_obj("isUrl")=1 then
							s_Content = replace(s_Content,"{MS:Web_Content}","<a href="""&w_obj("URLAddress")&""">"&w_obj("URLAddress")&"</a>")
						else
							if w_subsys_ListType="readmalls" then
								if InStr(w_obj("Content"),"[Web:PAGE]")>0 then
									s_Content = replace(s_Content,"{MS:Web_Content}","[Web:CONTENT_START]"&w_obj("Content")&"[Web:CONTENT_END]")
								else
									s_Content = replace(s_Content,"{MS:Web_Content}",""&w_obj("Content"))
								end if
							else
								s_Content = replace(s_Content,"{MS:Web_Content}",replace(replace(GetCStrLen(""&replace(""&w_obj("Content"),"[Web:PAGE]","")&"",w_contentnumber),"&nbsp;",""),vbCrLf,"")&"...<a href="""& s_mallsPathUrl &""">详细内容</a>")
							end if
						end if
					end if
					'_________________________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallAddtime}")>0 then
						dim tmp_w_datestyle
						tmp_w_datestyle = w_datestyle
						if InStr(w_datestyle,"YY02")>0 then
							tmp_w_datestyle= replace(tmp_w_datestyle,"YY02",right(year(w_obj("p_AddTime")),2))
						end if
						if InStr(w_datestyle,"YY04")>0 then
							tmp_w_datestyle= replace(tmp_w_datestyle,"YY04",year(w_obj("p_AddTime")))
						end if
						if InStr(w_datestyle,"MM")>0 then
							if month(w_obj("p_AddTime"))<10 then
								tmp_w_datestyle= replace(tmp_w_datestyle,"MM","0"&month(w_obj("p_AddTime")))
							else
								tmp_w_datestyle= replace(tmp_w_datestyle,"MM",month(w_obj("p_AddTime")))
							end if
						end if
						if InStr(w_datestyle,"DD")>0 then
							if day(w_obj("p_AddTime"))<10 then
								tmp_w_datestyle= replace(tmp_w_datestyle,"DD","0"&day(w_obj("p_AddTime")))
							else

								tmp_w_datestyle= replace(tmp_w_datestyle,"DD",day(w_obj("p_AddTime")))
							end if
						end if
						if InStr(w_datestyle,"HH")>0 then
							if hour(w_obj("p_AddTime"))<10 then
								tmp_w_datestyle= replace(tmp_w_datestyle,"HH","0"&hour(w_obj("p_AddTime")))
							else
								tmp_w_datestyle= replace(tmp_w_datestyle,"HH",hour(w_obj("p_AddTime")))
							end if
						end if
						if InStr(w_datestyle,"MI")>0 then
							if minute(w_obj("p_AddTime"))<10 then
								tmp_w_datestyle= replace(tmp_w_datestyle,"MI","0"&minute(w_obj("p_AddTime")))
							else
								tmp_w_datestyle= replace(tmp_w_datestyle,"MI",minute(w_obj("p_AddTime")))
							end if
						end if
						if InStr(w_datestyle,"SS")>0 then
							if second(w_obj("p_AddTime"))<10 then
								tmp_w_datestyle= replace(tmp_w_datestyle,"SS","0"&second(w_obj("p_AddTime")))
							else
								tmp_w_datestyle= replace(tmp_w_datestyle,"SS",second(w_obj("p_AddTime")))
							end if
						end if
						s_Content = replace(s_Content,"{MS:Web_MallAddtime}",""&tmp_w_datestyle&"")
					end if
					Rs_ListObj.close : set Rs_ListObj=nothing
				else
					s_Content="样式不存在或被删除"
				End if 
			end if 
			GetList_malls = s_Content
		End Function
		
		rem 获取分类列表
		Function Getlist_class(w_obj,style_id,view_level,class_col,child_col,class_style,child_style,child_css,w_flevel,class_css,class_titlenum,child_num,child_titlenum)
			tmp_name=w_obj("name")
			if style_id=0 then
				style_id=class_style
				if class_titlenum<>0 then
					tmp_name=msglength(tmp_name,class_titlenum)
				end if
			elseif style_id=1 then
				style_id=Child_style
				if child_titlenum<>0 then
					tmp_name=msglength(tmp_name,child_titlenum)
				end if
			end if
			if style_id<>"" then
				onlyid=getonevalue("web_style","onlyid","onlyid='"&style_id&"'")
				if onlyid="-1NISNUL" then
					ListSql = "Select s_Content from Web_style where ID=" & style_id & ""
				else
					ListSql = "Select s_Content from Web_style where onlyid='" & onlyid & "'"
				end if
				Set Rs_ListObj = Conn.Execute(ListSql)
				if Not Rs_ListObj.Eof then
					s_Content = Rs_ListObj("s_Content")
					'替换系统分类ID:Web:MClassID__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MClassid}")>0 then
						s_Content = replace(s_Content,"{MS:Web_MClassid}",w_obj("id"))
					end if

					'替换系统分类名称:Web:ClassID__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallClassid}")>0 then
						s_Content = replace(s_Content,"{MS:Web_MallClassid}",tmp_name)
					end if
					
					'替换分类小图:Web:ClassUrl__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallClassSmallPic}")>0 then
						if trim(w_obj("smallpic"))<>"" then
							str_SmallPic = Web_Get_RootDir(Web_C_setupfolder)&trim(w_obj("smallpic"))
						else
							str_SmallPic =""
						end if
					
						s_Content = replace(s_Content,"{MS:Web_MallClassSmallPic}",str_SmallPic)
						
					end if
					'替换分类大图:Web:ClassUrl__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_MallClassidBigPic}")>0 then
						if trim(w_obj("bigpic"))<>"" then
							str_BigPic = Web_Get_RootDir(Web_C_setupfolder)&trim(w_obj("bigpic"))
						else
							str_BigPic =""
						end if
						s_Content = replace(s_Content,"{MS:Web_MallClassidBigPic}",str_BigPic)
						
					end if
					if InStr(s_Content,"{MS:Web_ClassDescription}")>0 then
						if trim(w_obj("Description"))<>"" then
							str_BigPic = trim(w_obj("Description"))
						else
							str_BigPic =""
						end if
						s_Content = replace(s_Content,"{MS:Web_ClassDescription}",str_BigPic)
						
					end if
					if InStr(s_Content,"{MS:Web_ShopClassUrl}")>0 then
						'Get_ShopClassLink(店铺编号,分类编号,打开模式)
						ms_url_mall=get_ShopClassLink(session("kkshopid"),w_obj("id"),w_openStyle)
						s_Content = replace(s_Content,"{MS:Web_ShopClassUrl}",ms_url_mall)
						ms_url_mall=""
					end if	
					'替换系统分类连接:Web:ClassUrl__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_ClassUrl}")>0 then
						'Get_ClassLink(分类编号,打开模式)
						ms_url_mall=get_ClassLink(w_obj("id"),w_openStyle)
						s_Content = replace(s_Content,"{MS:Web_ClassUrl}",ms_url_mall)
						ms_url_mall=""
					end if
					'分类统计__________________________________________________________________________________
					if InStr(s_Content,"{MS:Web_ClassTotal}")>0 then
						s_Content = replace(s_Content,"{MS:Web_ClassTotal}",Web_get_ProCount(w_obj("id")))
					end if
					Rs_ListObj.close : set Rs_ListObj=nothing
				else
					S_content="样式不存在或被删除"
				end if 
			end if
			Getlist_class=s_Content
		End Function

		rem 获取分类列表
		public Function Getlist_Child_class(w_obj,style_id,view_level,class_col,child_col,Class_style,Child_style,child_css,w_flevel,class_css,class_titlenum,child_num,child_titlenum)
			if child_num=0 then
				sql="select * "
			else
				sql="select top "&child_num&" * "
			end if 
			
			sql=sql&" from web_proclass where fid="&w_obj("id") &" order by v_order desc"
			'response.write sql
			set w_obj_child=conn.execute(sql)
			if w_obj_child.eof then
				Getlist_Child_class=m_class_list
				m_class_list=""
				w_obj_child.close : set w_obj_child=nothing	
				exit function
			end if
			c_i_j = 0
			if cint(child_col)<>1 then
				m_class_list = m_class_list &  "  <tr>"
			end if 
		     	do while not w_obj_child.eof
				w_flevel=w_obj_child("level")
				if cint(child_col) =1 then
					m_class_list= m_class_list &"<tr><td>" & Getlist_class(w_obj_child,1,view_level,class_col,child_col,Class_style,Child_style,child_css,w_flevel,class_css,class_titlenum,child_num,child_titlenum) & "</td></tr>"
				else
					m_class_list= m_class_list & "<td>" & Getlist_class(w_obj_child,1,view_level,class_col,child_col,Class_style,Child_style,child_css,w_flevel,class_css,class_titlenum,child_num,child_titlenum) & "</td>"
				end if
				if cint(child_col)<>1 then
					c_i_j = c_i_j+1
					if c_i_j mod cint(child_col) = 0 then
						m_class_list = m_class_list & "</tr>"&vbNewLine&"<tr>"
					end if
				end if
				'm_class_list=m_class_list&Getlist_class(w_obj_child,style_id,view_level,class_col,child_col,Class_style,Child_style,child_css,w_flevel)
				'call Getlist_Child_class(w_obj_child,style_id,view_level,class_col,child_col,Class_style,Child_style,child_css,w_flevel)
			w_obj_child.movenext
			loop
			w_obj_child.close : set w_obj_child=nothing
			Getlist_Child_class=m_class_list
			'response.write m_class_list
			m_class_list=""
		End Function

		'Flash幻灯片_________________________________________________________________
		Public Function flashfilt(w_Labelchar,w_type,w_Id)
				dim Randomize_i_Str,TitleNumberStr,FilterSql,ClassId,IMSQL_Search,RsFilterObj,str_filt,mallsNumberStr,FlashStr
				dim ClassSaveFilePath,ImagesStr,TxtStr,TxtFirst,LinkStr
				dim Class_SQL,RsClassObj,Temp_Num
				Randomize
				Randomize_i_Str =  CStr(Int((999 * Rnd) + 1))
				TitleNumberStr= split(split(w_Labelchar,"┆")(3),"$")(1)
				mallsNumberStr= split(split(w_Labelchar,"┆")(2),"$")(1)
				if trim(mallsNumberStr)<>"" and  isNumeric(mallsNumberStr) then
					mallsNumberStr = cint(mallsNumberStr)
				else
					mallsNumberStr = 6
				end if
				ClassId=split(split(w_Labelchar,"┆")(1),"$")(1)
				if trim(ClassId)<>"" then
					IMSQL_Search = " and ClassId='"& ClassId &"'"
				else
					if w_Id <> "" then
						IMSQL_Search = " and ClassId='"& w_Id &"'"
					else
						IMSQL_Search = ""
					end if
				end if
				str_filt=" and "& all_substring &"(mallsProperty,21,1)='1'"
				w_fldname="*"
				FilterSql="select top "& mallsNumberStr &" "&w_fldname&" From Web_product where p_adminstate=0 and P_Publicate=1 order by p_rank desc,id desc"
				Set RsFilterObj = Conn.Execute(FilterSql)
				If not RsFilterObj.Eof then
					do while Not RsFilterObj.Eof
						Next_onlyid=RsFilterObj("P_Onlyid")
						'ImagesStr=""
						if (Not IsNull(RsFilterObj("P_Pphoto"))) And (RsFilterObj("P_Pphoto") <> "") then
							if ImagesStr = "" then
								ImagesStr =  RsFilterObj("P_Pphoto")
								TxtStr =  Msglength(RsFilterObj("p_name"),TitleNumberStr)
								TxtFirst = MsgLength(RsFilterObj("p_name"),TitleNumberStr)
								LinkStr =   get_mallsLink(Next_onlyid,Next_folder,w_opeAStyle,1)
							else
								If instr(1,LCase(RsFilterObj("P_Pphoto")),"http://") <> 0 then
									ImagesStr = ImagesStr &"|"& RsFilterObj("P_Pphoto")
								Else
									ImagesStr = ImagesStr &"|"&  RsFilterObj("P_Pphoto")
								End If
								TxtStr = TxtStr &"|"&msglength(RsFilterObj("p_name"),TitleNumberStr)
								LinkStr = LinkStr & "|" & get_mallsLink(Next_onlyid,Next_folder,w_opeAStyle,1)
							end if
						end if
						RsFilterObj.MoveNext
					loop
					FlashStr="<script type=""text/javascript"">"& Chr(13)
					FlashStr=FlashStr&" <!--"& Chr(13)
					dim PicWidthStr,PicHeightStr,txtheight
					PicWidthStr = split(split(split(w_Labelchar,"┆")(4),"$")(1),",")(0)
					PicHeightStr = split(split(split(w_Labelchar,"┆")(4),"$")(1),",")(1)
					txtheight = split(split(w_Labelchar,"┆")(5),"$")(1)
					FlashStr=FlashStr&" var focus_width"&Randomize_i_Str&"="&PicWidthStr& Chr(13)
					FlashStr=FlashStr&" var focus_height"&Randomize_i_Str&"="&PicHeightStr& Chr(13)
					FlashStr=FlashStr&" var text_height"&Randomize_i_Str&"="&txtheight& Chr(13)
					FlashStr=FlashStr&" var sww_height"&Randomize_i_Str&" = focus_height"&Randomize_i_Str&"+text_height"&Randomize_i_Str& Chr(13)
					FlashStr=FlashStr&" var pics"&Randomize_i_Str&"='"&ImagesStr&"'"&Chr(13)
					FlashStr=FlashStr&" var links"&Randomize_i_Str&"='"&LinkStr &"'"&Chr(13)
					FlashStr=FlashStr&" var texts"&Randomize_i_Str&"='"&TxtStr&"'"&Chr(13)
					FlashStr=FlashStr&" document.write('<object classid=""clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"" codebase=""http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"" width=""'+ focus_width"&Randomize_i_Str&" +'"" height=""'+ sww_height"&Randomize_i_Str&" +'"">');"&Chr(13)
					FlashStr=FlashStr&" document.write('<param name=""allowScriptAccess"" value=""sameDomain""><param name=""movie"" value="""&m_Path_Templet & "Flash.swf""><param name=""quality"" value=""high""><param name=""bgcolor"" value=""white"">');"&Chr(13)
					FlashStr=FlashStr&" document.write('<param name=""menu"" value=""false""><param name=wmode value=""opaque"">');"&Chr(13)
					FlashStr=FlashStr&" document.write('<param name=""FlashVars"" value=""pics='+pics"&Randomize_i_Str&"+'&links='+links"&Randomize_i_Str&"+'&texts='+texts"&Randomize_i_Str&"+'&borderwidth='+focus_width"&Randomize_i_Str&"+'&borderheight='+focus_height"&Randomize_i_Str&"+'&textheight='+text_height"&Randomize_i_Str&"+'"">');"&Chr(13)
					FlashStr=FlashStr&" document.write('<embed src="""&m_Path_Templet & "Flash.swf"" wmode=""opaque"" FlashVars=""pics='+pics"&Randomize_i_Str&"+'&links='+links"&Randomize_i_Str&"+'&texts='+texts"&Randomize_i_Str&"+'&borderwidth='+focus_width"&Randomize_i_Str&"+'&borderheight='+focus_height"&Randomize_i_Str&"+'&textheight='+text_height"&Randomize_i_Str&"+'"" menu=""false"" bgcolor=""white"" quality=""high"" width=""'+ focus_width"&Randomize_i_Str&" +'"" height=""'+ sww_height"&Randomize_i_Str&" +'"" allowScriptAccess=""sameDomain"" type=""application/x-shockwave-flash"" plugiMSpage=""http://www.macromedia.com/go/getflashplayer"" />');"&Chr(13)
					FlashStr=FlashStr&" document.write('</object>');"&Chr(13)
					FlashStr=FlashStr&" //-->"& Chr(13)
					FlashStr=FlashStr&"</script>"
				else
					FlashStr=""
				end if
				RsFilterObj.Close:Set RsFilterObj = Nothing
				flashfilt= FlashStr
		End Function
		Public Function ClassAjax(w_labelchar,classaa,w_id)
			classtype= split(split(w_Labelchar,"┆")(1),"$")(1)
			if classtype="0" then
				classtype="Classinfo"
			else
				classtype="subclassinfo"
			end if
			str="<span id='"&classtype&"'></span>"&vbcrlf
			str=str&"<script language='JavaScript' src='"&web_get_rootdir(web_c_setupfolder)&"ajax/Prototype.js' type='text/javascript'></script>"&vbcrlf
			str=str&"<script language='JavaScript'>"&vbcrlf
			str=str&"function Go()"&vbcrlf
			str=str&"{MainSearch('"&classtype&"','classid="&w_id&"');}"&vbcrlf
			str=str&"function MainSearch(GetType,URLValue)"&vbcrlf
			str=str&"{new Ajax.Updater(GetType, '"&web_get_rootdir(web_c_setupfolder)&"showclass.asp?GetType='+GetType+'&no-cache='+Math.random() , {method: 'get',parameters: URLValue });}"&vbcrlf
			str=str&"Go();"&vbcrlf
			str=str&"</script>"&vbcrlf
			ClassAjax=str
		End Function

		Public Function getMallsSubClass(typeID)
			Dim childClassRs,result,Str_SubClassID
			result=""
			Set childClassRs=Conn.execute("Select * from web_proclass where Fid='" & TypeID & "'order by id desc")
			While Not childClassRs.eof
				If result="" Then
					result="'"&childClassRs("ID")&"'"
				Else
					result=result&",'"&childClassRs("ID")&"'"
				End If
				Str_SubClassID=getMallsSubClass(childClassRs("ID"))
				If Str_SubClassID<>"" Then
					result=result&","&Str_SubClassID
				End If
				childClassRs.movenext
			Wend
			childClassRs.close:Set childClassRs=nothing
			getMallsSubClass=result
		End Function

		rem 参数(店铺编号,文件名称,保存路径,打开模式)
		Public Function get_mallsLink(w_onlyid,w_folder,w_openstyle,s_shopid)
			
			get_mallsLink =Web_Get_RootDir(Web_C_setupfolder)&"html/product/"&w_onlyid&".html"
			
			if w_openstyle=1 then
				get_mallsLink=get_mallsLink&""" target=""_blank"
			end if 
		End Function

		rem 参数(系统分类,打开模式)
		Public Function get_ClassLink(w_classid,w_openstyle)
			if m_class_url=1 then
				get_ClassLink =Web_Get_RootDir(Web_C_setupfolder)&"html/category/class_ext_"&w_classid&".html"
			else
				get_ClassLink =Web_Get_RootDir(Web_C_setupfolder)&"html/category/class_"&w_classid&".html"
			end if
			if w_openstyle=1 then
				get_ClassLink=get_ClassLink&""" target=""_blank"
			end if
		End Function
		Public Function get_brandLink(w_brandid,w_openstyle)
			w_classid= getonevalue("web_brand","onlyid","id="&w_brandid&"")
			get_brandLink =Web_Get_RootDir(Web_C_setupfolder)&"html/brand/"&w_classid&".html"
			if w_openstyle=1 then
				get_brandLink=get_brandLink&""" target=""_blank"
			end if
		End Function

		Public Function Get_IsNull(val)
			if isnull(val)=true then
				val=""
			end if
			Get_IsNull=val
		End Function

		Public Function Web_get_ProCount(id)
			sql="select * from web_product where p_publicate=1 and P_Del=0 and p_changsale=0 "
			set web_rs1=conn.execute(sql)
			do while not web_rs1.eof 
				if trim(web_rs1("p_extfid"))<>"" or isnull(web_rs1("p_extfid"))=false then
					
					tmp=split(web_rs1("p_extfid"),",")
					
						for iii=0 to ubound(tmp)
							if clng(tmp(iii))=clng(id) then 
								isnum=isnum+1
								exit for
							else	
								isnum=isnum+0
							end if 
						next
					
				else
					isnum=isnum+0
				end if
			web_rs1.movenext
			loop
			web_rs1.close
			sql="select count(id) as num from web_product where p_publicate=1 and P_Del=0 and p_changsale=0 and  p_classid in ("&getSubClass("web_proclass",id)&") "
			set web_rs2=conn.execute(sql)
			Web_get_ProCount=web_rs2("num")+isnum
			
			web_rs2.close : set web_rs2=nothing
		End Function

		Public Function getProSubClass_sp1(typeID,w_flag)
			'response.write typeID&"<br>"
			Dim childClassRs,result,Str_SubClassID
			if w_flag=0 then
				m_sub_classid=typeid
			else
				m_sub_classid=m_sub_classid&","&typeid
			end if
			sql="Select * from Web_ProClass where  Fid=" & TypeID & " order by id desc"
			Set childClassRs=Conn.execute(sql)
			While Not childClassRs.eof
				Str_SubClassID=getProSubClass_sp1(childClassRs("ID"),1)
				childClassRs.movenext
			Wend
			getProSubClass_sp1=m_sub_classid
			childClassRs.close:Set childClassRs=nothing
		End Function
End Class
%> 
