<%

%>
<%
'web08商城系统发布函数
 Function Web_Create_index(w_tplpath,w_save_path,w_filename)
	conndb
	set web_lab=new labelclass
	if w_tplpath="" or isnull(w_tplpath)=true then
		web_filecontent=web_lab.LabGetContent("模板文件不存在，请添加后重新生成","")
	else
		web_filecontent=web_lab.LabGetContent(getfilecontent(w_tplpath),"")
	end if
	if instr(web_filecontent,"[Web:Title]")>0 then
		web_filecontent=replace(web_filecontent,"[Web:Title]",Web_C_webtitle)
	end if 
	if instr(web_filecontent,"[Web:keyword]")>0 then
		web_filecontent=replace(web_filecontent,"[Web:keyword]",getonevalue("web_webconfig","W_webkeyword","id=1"))
	end if
	if instr(web_filecontent,"[Web:Description]")>0 then
		web_filecontent=replace(web_filecontent,"[Web:Description]",getonevalue("web_webconfig","W_webdescription","id=1"))
	end if
	check_sys_ajax="<script src='"&web_get_rootdir(web_c_setupfolder)&"pub/checksysopen.asp' language='javascript'></script>"
	web_filecontent=replace(web_filecontent,"</body>","")
	web_filecontent=replace(web_filecontent,"</html>","")
	web_filecontent=web_filecontent&kft_getcode()&vbcrlf
	web_filecontent=web_filecontent&check_sys_ajax&vbcrlf
	web_filecontent=web_filecontent&"<div style='font-size:12px;' align=center>技术支持：<a href='http://www.mvivm.cn' target=_blank>梦幻网络</a></div>"&vbcrlf
	web_filecontent=web_filecontent&"<!--Created Page at "&Now()&",by mvivm.cn  mvivm Single-Shop Management Systeme 6.0-->"&vbcrlf
	web_filecontent=web_filecontent&"</body>"&vbcrlf&"</html>"
	call save_file(web_lab.LabGetXMLNode(web_filecontent,"\[web_[^ \t\r\n}]+08\]"),w_save_path&w_filename)
 End Function

 Function Get_Public_sql_head(tabname,Refresh_Type)
	Get_Public_Sql_Head="Select top 1 * from "&tabname&" as A where "
 End Function

 Function Web_Create(w_sql,IsCookies)
	conndb
	set web_rs=conn.execute(w_sql)
	if web_rs.eof then
		web_create=false
	else
		web_keyID=Request.Cookies("Web_IDFlag")
		web_keyID=web_rs(web_keyID)
		set web_lab=new labelclass
		web_lab.w_key_id=web_rs("id")
		If IsCookies Then
			Response.Cookies("Web_FirstID") = web_RS("ID")
		End If
		v_rootdir=Web_Get_RootDir(Web_C_setupfolder)
		w_folderpath=Get_File_Save_Path(v_rootdir,web_rs)
		v_tplpath=Get_File_Template_Path(v_rootdir,web_rs)
		if v_tplpath="" then
			lab_outcontent="模板文件不存在，请添加模板后重新生成！"
		else
			lab_outcontent=web_lab.LabGetContent(getfilecontent(v_tplpath),web_keyID)
		end if
		//lab_outcontent=lab_outcontent&"<div style='font-size:12px;' align=center>Designed By：<a href='http://www.mvivm.cn' target=_blank>梦幻网络</a></div>"
		//lab_outcontent=lab_outcontent&vbNewLine&"<!--Created Page at "&Now()&",by mvivm.cn  mvivm Single-Shop Management Systeme 6.0-->"
		lab_outcontent=replace(lab_outcontent,"</body>","")
		lab_outcontent=replace(lab_outcontent,"</html>","")
		lab_outcontent=lab_outcontent&kft_getcode()&vbcrlf
		lab_outcontent=lab_outcontent&"<div style='font-size:12px;' align=center>技术支持：<a href='http://www.mvivm.cn' target=_blank>梦幻网络</a></div>"&vbcrlf
		lab_outcontent=lab_outcontent&"<!--Created Page at "&Now()&",by mvivm.cn  mvivm Single-Shop Management Systeme 6.0-->"&vbcrlf
		lab_outcontent=lab_outcontent&"</body>"&vbcrlf&"</html>"


		lab_outcontent=web_get_keyword(lab_outcontent,"[Web:Title]",web_rs(web_var_Title))
		if web_var_keyword<>"-1no" then
			lab_outcontent=web_get_keyword(lab_outcontent,"[Web:keyword]",web_rs(web_var_keyword))
			lab_outcontent=web_get_keyword(lab_outcontent,"[Web:Description]",web_rs(web_var_Description))
		end if

		'response.write lab_outcontent
		rem 提取分页标志
		Set w_REG_Page = New RegExp
		w_REG_Page.Pattern= "\[Web\:PageBegin\][^\0]*\[Web\:PageEnd\]"
		w_REG_Page.IgnoreCase = True
		w_REG_Page.Global = True
		PageFlag=w_REG_Page.test(lab_outcontent)
		Set Matches = w_REG_Page.Execute(lab_outcontent)
		if PageFlag=True then
			for each match in matches
				pagecontent=match.value
			Next
			pagearr=split(pagecontent,"{|}")
			for i=0 to ubound(pagearr)
				if i=0 then
					w_folderpath_tmp=w_folderpath
				else
					w_folderpath_tmp=replace(w_folderpath,".html","_"&i+1&".html")
				end if
				tmpstr=lab_outcontent
				w_filename_tmp=replace(w_folderpath,".html","")
				lab_outcontent_tmp=replace(lab_outcontent,pagecontent,pagearr(i))
				lab_outcontent_tmp=Web_Get_PageFN(lab_outcontent_tmp,ubound(pagearr)+1,i+1,w_filename_tmp,"html")
				lab_outcontent_tmp=replace(lab_outcontent_tmp,"[Web:PageBegin]","")
				lab_outcontent_tmp=replace(lab_outcontent_tmp,"[Web:PageEnd]","")
				call save_file(lab_outcontent_tmp&kft_getcode(),w_folderpath_tmp)	
			next
		else
			call save_file(web_lab.LabGetXMLNode(lab_outcontent,"\[web_[^ \t\r\n}]+08\]")&kft_getcode(),w_folderpath)		
		end if 
		web_create=true
	end if
	closedb
	'web_rs.close : set web_rs=nothing
 End Function

 rem 得到文件保存路径及保存文件名称
 Function Get_File_Save_Path(v_rootdir,web_obj)
	Path_Flag=Lcase(Request.Cookies("Web_File_Save_Path"))
	w_path_flag=""
	Select Case Path_Flag
		case "sys:allchannel","sys:channellist":
			w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/sys/"&trim(web_obj("classename"))&"/index.html"
			web_var_keyword="classkeywords" : web_var_description="classdescription" : web_var_title="classname"

		case "ms:allproduct","ms:lastproduct","ms:dateproduct","ms:idproduct","ms:classproduct":
			w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/product/"
			call FolderExist(w_path_flag)		
			w_path_flag=w_path_flag&trim(web_obj("p_onlyid"))&".html"
			web_var_keyword="p_keyword" : web_var_description="p_description" : web_var_title="p_name"

		case "ms:allchannel","ms:channellist":
			w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/ms/"&trim(web_obj("classename"))&"/index.html"
			web_var_keyword="classkeywords" : web_var_description="classdescription" : web_var_title="classname"

		case "ms:allextclass","ms:classextlist":
			w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/category"
			call FolderExist(w_path_flag)
			w_path_flag=w_path_flag&"/class_ext_"&trim(web_obj("id"))&".html"
			web_var_keyword="keyword" : web_var_description="description" : web_var_title="name"

		case "ms:allclass","ms:classlist":
			w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/category"
			call FolderExist(w_path_flag)
			w_path_flag=w_path_flag&"/class_"&trim(web_obj("id"))&".html"
			web_var_keyword="keyword" : web_var_description="description" : web_var_title="name"

		case "as:allarticle","as:lastarticle","as:datearticle","as:idarticle","as:classarticle":
			w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/as/article/"
			call FolderExist(w_path_flag)
			w_path_flag=w_path_flag&trim(web_obj("a_onlyid"))&".html"
			web_var_keyword="a_keywords" : web_var_description="a_description" : web_var_title="a_title"

		case "as:allclass","as:classlist":
			w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/as/class/"
			call FolderExist(w_path_flag)
			w_path_flag=w_path_flag&"class_"&trim(web_obj("id"))&".html"
			web_var_keyword="keyword" : web_var_description="description" : web_var_title="name"

		case "gs:allinfo","gs:lastinfo","gs:dateinfo","gs:idinfo","gs:classinfo":
			w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/gs/info/"
			call FolderExist(w_path_flag)
			w_path_flag=w_path_flag&trim(web_obj("onlyid"))&".html"
			web_var_keyword="keyword" : web_var_description="description" : web_var_title="bs_title"

		case "gs:allchannel","gs:channellist":
			w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/gs/"&trim(web_obj("classename"))&"/index.html"
			web_var_keyword="classkeywords" : web_var_description="classdescription" : web_var_title="classname"

		case "gs:allclass","gs:classlist":
			w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/gs/class/"
			call FolderExist(w_path_flag)
			w_path_flag=w_path_flag&"class_"&trim(web_obj("id"))&".html"
			web_var_keyword="keyword" : web_var_description="description" : web_var_title="name"

		case "gs:allarea","gs:arealist":
			w_path_flag=v_rootdir&"html/gs/area/"
			call FolderExist(w_path_flag)
			w_path_flag=v_rootdir&"html/gs/area/"
			call FolderExist(w_path_flag)
			w_path_flag=w_path_flag&"p_"&trim(web_obj("id"))&".html"
			web_var_keyword="-1no" : web_var_description="no" : web_var_title="name"

		case "ns:allnotice":
			w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/ns/"
			call FolderExist(w_path_flag)
			w_path_flag=w_path_flag&trim(web_obj("onlyid"))&".html"
			web_var_keyword="keyword" : web_var_description="description" : web_var_title="n_title"

		case "other:allbrand","other:brandlist":
			w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/brand"
			call FolderExist(w_path_flag)
			w_path_flag=w_path_flag&"/"&trim(web_obj("onlyid"))&".html"
			web_var_keyword="keyword" : web_var_description="description" : web_var_title="b_name"

		case "other:allguide","other:guidelist":
			w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/guide"
			call FolderExist(w_path_flag)
			w_path_flag=w_path_flag&"/"&trim(web_obj("onlyid"))&".html"
			web_var_keyword="keyword" : web_var_description="description" : web_var_title="g_title"

		case "other:allact","other:actlist":
			w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/active"
			call FolderExist(w_path_flag)
			w_path_flag=w_path_flag&"/"&trim(web_obj("onlyid"))&".html"
			web_var_keyword="keyword" : web_var_description="description" : web_var_title="a_name"

		case "other:allgift","other:giftlist":
			w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/gift"
			call FolderExist(w_path_flag)
			w_path_flag=w_path_flag&"/"&trim(web_obj("onlyid"))&".html"
			web_var_keyword="keyword" : web_var_description="description" : web_var_title="g_name"

		case "other:allhclass","other:hclasslist":
			w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/help"
			call FolderExist(w_path_flag)
			w_path_flag=w_path_flag&"/class"&trim(web_obj("id"))&".html"
			web_var_keyword="keyword" : web_var_description="description" : web_var_title="name"

		case "other:allhelp","other:helplist":
			w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/help"
			call FolderExist(w_path_flag)
			w_path_flag=w_path_flag&"/"&trim(web_obj("onlyid"))&".html"
			web_var_keyword="h_keyword" : web_var_description="h_description" : web_var_title="h_title"

		case "other:allyhq","other:yhqlist":
			w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/Benefit"
			call FolderExist(w_path_flag)
			w_path_flag=w_path_flag&"/"&trim(web_obj("onlyid"))&".html"
			web_var_keyword="-1no" : web_var_description="no" : web_var_title="bf_name"

		case "other:allfeel","other:feellist":
			w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/feel"
			call FolderExist(w_path_flag)
			w_path_flag=w_path_flag&"/"&trim(web_obj("onlyid"))&".html"
			web_var_keyword="-1no" : web_var_description="no" : web_var_title="c_title"
	End Select
	Get_File_Save_Path=w_path_flag
	'showinfo Get_File_Save_Path
 End Function

 REM 得到模版路径
 Function Get_File_Template_Path(v_rootdir,web_obj)
	Path_Flag=Lcase(Request.Cookies("Web_File_Save_Path"))
	w_path_flag=""
	Select Case Path_Flag
		case "sys:allchannel","sys:channellist","ms:allchannel","ms:channellist","gs:allchannel","gs:channellist":
			w_path_flag=web_obj("Templet")
		case "ms:allproduct","ms:lastproduct","ms:dateproduct","ms:idproduct","ms:classproduct":
			w_path_flag=web_obj("Templet")
		case "ms:allclass","ms:classlist","ms:allextclass","ms:classextlist":
			w_path_flag=web_obj("Templet")
		case "as:allarticle","as:lastarticle","as:datearticle","as:idarticle","as:classarticle":
			w_path_flag=web_obj("Templet")
		case "as:allclass","as:classlist":
			w_path_flag=web_obj("Templet")
		case "gs:allinfo","gs:lastinfo","gs:dateinfo","gs:idinfo","gs:classinfo":
			w_path_flag=web_obj("Templet")
		case "gs:allclass","gs:classlist":
			w_path_flag=web_obj("Templet")
		case "gs:allprovince","gs:provincelist":
			w_path_flag=Web_C_gsprovince
		case "gs:allcity","gs:citylist":
			w_path_flag=Web_C_gscity
		case "ns:allnotice":
			w_path_flag=web_obj("Templet")
		case "other:allbrand","other:brandlist":
			w_path_flag=web_obj("Templet")
		case "other:allguide","other:guidelist":
			w_path_flag=web_obj("Templet")
		case "other:allact","other:actlist":
			w_path_flag=web_obj("Templet")
		case "other:allgift","other:giftlist":
			w_path_flag=web_obj("Templet")
		case "other:allhclass","other:hclasslist":
			w_path_flag=web_obj("Templet")
		case "other:allhelp","other:helplist":
			w_path_flag=web_obj("Templet")
		case "other:allyhq","other:yhqlist":
			w_path_flag=web_obj("Templet")
		case "other:allfeel","other:feellist":
			w_path_flag=web_obj("Templet")
	End Select
	if isnull(w_path_flag)=true or w_path_flag="" then 
		Get_File_Template_Path="" 
		exit Function
	end if

	w_exist=Web_FileExist(w_path_flag)
	if w_exist=false then
		Get_File_Template_Path=""
		exit Function
	else
		Get_File_Template_Path=w_path_flag	
	end if
 End Function

 Function Web_Get_Shop_Path()
	If Trim(session("kkshopid"))<>"" then
		Web_Get_Shop_Path="shop/"&Trim(session("kkshopid"))&"/"
	Else
		Web_Get_Shop_Path=""
	End If 
 End Function

 Function Web_Get_PageFN(tmpcontent,w_total,w_page_index,w_filename,w_extname)

	Set w_REG_PageFN = New RegExp
	w_REG_PageFN.Pattern= "{Web_Page}.*?{/Web_Page}"
	w_REG_PageFN.IgnoreCase = True
	w_REG_PageFN.Global = True
	PageFlag=w_REG_PageFN.test(tmpcontent)
	Set Matches = w_REG_PageFN.Execute(tmpcontent)
	for each match in matches
		pagefn=match.value
		pagefn1=match.value
	Next
	pagefn=replace(pagefn,"{Web_Page}","")
	pagefn=replace(pagefn,"{/Web_Page}","")
	w_link_type=split(pagefn,",")(0)
	w_link_color=split(split(pagefn,",")(1),"|")(0)
	w_link_css=split(split(pagefn,",")(1),"|")(1)
	w_pagecontent=Get_More_Page_Link_Str(w_link_type,w_link_color,w_link_css,w_total,w_page_index,w_filename,w_extname)
	Web_Get_PageFN=replace(tmpcontent,pagefn1,w_pagecontent)
 End Function

 Function Get_More_Page_Link_Str(w_More_Page_Link_Type,w_More_Page_Link_Color,w_More_Page_Css,w_Page_Count,w_More_Page_Index,w_File_Name,w_File_Ext_Name)
	Dim w_i,Str_Link,LinkUrl,Str_Style,Str_LinkUrl_Page
	Dim str_nonLinkColor,str_toF,str_toP10,str_toP1,str_toN1,str_toN10,str_toL,StartPage,EndPage,I
	If w_More_Page_Index>w_Page_Count Then
		w_More_Page_Index=w_Page_Count
	End If
	LinkUrl = w_File_Name
	Str_Link=""
	If w_More_Page_Link_Type="" Then
		w_More_Page_Link_Type=0
	End If
	If w_More_Page_Link_Color<>"" Then
		Str_Style=Str_Style&" style=""color: #"&w_More_Page_Link_Color&";"""
	End If
	If w_More_Page_Css<>"" Then
		Str_Style=Str_Style&" class="""&w_More_Page_Css&""""
	End If
	If w_Page_Count>1 Then
		Select Case w_More_Page_Link_Type
			Case 1
				If w_More_Page_Index=1 Then
					Str_Link=Str_Link&"上一页"
					Str_Link=Str_Link&"&nbsp;<a href="""&LinkUrl&"_"&w_More_Page_Index+1&"."&w_File_Ext_Name&""""&Str_Style&">下一页</a>"
				ElseIf (w_More_Page_Index+1)>w_Page_Count Then
					If w_More_Page_Index-1<2 Then
						Str_Link=Str_Link&"<a href="""&LinkUrl&"."&w_File_Ext_Name&""""&Str_Style&">上一页</a>"
					Else
						Str_Link=Str_Link&"<a href="""&LinkUrl&"_"&w_More_Page_Index-1&"."&w_File_Ext_Name&""""&Str_Style&">上一页</a>"
					End If
					Str_Link=Str_Link&"&nbsp;下一页"
				Else
					If w_More_Page_Index-1<2 Then
						Str_Link=Str_Link&"<a href="""&LinkUrl&"."&w_File_Ext_Name&""""&Str_Style&">上一页</a>"
					Else
						Str_Link=Str_Link&"<a href="""&LinkUrl&"_"&w_More_Page_Index-1&"."&w_File_Ext_Name&""""&Str_Style&">上一页</a>"
					End If
					Str_Link=Str_Link&"&nbsp;<a href="""&LinkUrl&"_"&w_More_Page_Index+1&"."&w_File_Ext_Name&""""&Str_Style&">下一页</a>"
				End If
			Case 2
				Str_Link="共"&w_Page_Count&"页&nbsp;"
				For w_i=1 To w_Page_Count
					If w_i>1 Then
						Str_LinkUrl_Page=LinkUrl&"_"&w_i
					Else
						Str_LinkUrl_Page=LinkUrl
					End If
					If w_i= w_More_Page_Index Then
						Str_Link=Str_Link&"&nbsp;第"&w_i&"页"
					Else
						Str_Link=Str_Link&"&nbsp;<a href="""&Str_LinkUrl_Page&"."&w_File_Ext_Name&""""&Str_Style&">第"&w_i&"页</a>"
					End If
				Next
			Case 3
				Str_Link="共"&w_Page_Count&"页&nbsp;"
				For w_i=1 To w_Page_Count
					If w_i>1 Then
						Str_LinkUrl_Page=LinkUrl&"_"&w_i
					Else
						Str_LinkUrl_Page=LinkUrl
					End If
					If w_i= w_More_Page_Index Then
						Str_Link=Str_Link&"&nbsp;"&w_i&""
					Else
						Str_Link=Str_Link&"&nbsp;<a href="""&Str_LinkUrl_Page&"."&w_File_Ext_Name&""""&Str_Style&">"&w_i&"</a>"
					End If
				Next
				
			Case Else
				str_nonLinkColor="#999999" '非热链接颜色
				str_toF="<font face=""webdings"">9</font>"  			'第一页
				str_toP10="<font face=""webdings"">7</font>"			'上十
				str_toP1="<font face=""webdings"">3</font>"				'上一
				str_toN1="<font face=""webdings"">4</font>"				'下一
				str_toN10="<font face=""webdings"">8</font>"			'下十
				str_toL="<font face=""webdings"">:</font>"				'尾页

				Str_Link=""

				if w_More_Page_Index=1 then
					Str_Link=Str_Link& "<font color="&str_nonLinkColor&" title=""第一页"">"&str_toF&"</font> " &vbNewLine
				Else
					Str_Link=Str_Link& "<a href="""&LinkUrl&"."&w_File_Ext_Name&""""&Str_Style&" title=""第一页"">"&str_toF&"</a> " &vbNewLine
				End If
				if w_More_Page_Index<11 then
					StartPage = 1
				else
					If w_More_Page_Index>(fix(w_More_Page_Index / 10) * 10) Then
						StartPage = (fix(w_More_Page_Index / 10) * 10)+1
					Else
						StartPage = ((fix(w_More_Page_Index / 10)-1) * 10)+1
					End If
				end if
				EndPage=StartPage+9
				If EndPage>w_Page_Count Then
					EndPage=w_Page_Count
				End If

				If StartPage>10 Then
					If (w_More_Page_Index - 10)<2 Then
						Str_Link=Str_Link& "<a href="""&LinkUrl&"."&w_File_Ext_Name&""""&Str_Style&" title=""上十页"">"&str_toP10&"</a> "  &vbNewLine
					Else
						Str_Link=Str_Link& "<a href="""&LinkUrl&"_"&w_More_Page_Index - 10&"."&w_File_Ext_Name&""""&Str_Style&" title=""上十页"">"&str_toP10&"</a> "  &vbNewLine
					End If
				Else
					Str_Link=Str_Link& "<font color="&str_nonLinkColor&" title=""上十页"">"&str_toP10&"</font> "  &vbNewLine
				End If

				If w_More_Page_Index > 1 Then
					If w_More_Page_Index=2 Then
						Str_Link=Str_Link& "<a href="""&LinkUrl&"."&w_File_Ext_Name&""""&Str_Style&" title=""上一页"">"&str_toP1&"</a> "  &vbNewLine
					Else
						Str_Link=Str_Link& "<a href="""&LinkUrl&"_"&w_More_Page_Index - 1&"."&w_File_Ext_Name&""""&Str_Style&" title=""上一页"">"&str_toP1&"</a> "  &vbNewLine
					End If
				Else
					Str_Link=Str_Link& "<font color="&str_nonLinkColor&" title=""上一页"">"&str_toP1&"</font> "  &vbNewLine
				End If

				For I=StartPage To EndPage
					If I=w_More_Page_Index Then
						Str_Link=Str_Link& "<b>"&I&"</b>"  &vbNewLine
					Else
						If I=1 Then
							Str_Link=Str_Link& "<a href="""&LinkUrl&"."&w_File_Ext_Name&""""&Str_Style&">" &I& "</a>"  &vbNewLine
						Else
							Str_Link=Str_Link& "<a href="""&LinkUrl&"_"&I&"."&w_File_Ext_Name&""""&Str_Style&">" &I& "</a>"  &vbNewLine
						End If
					End If
				Next
				If w_More_Page_Index < w_Page_Count Then
					Str_Link=Str_Link& " <a href="""&LinkUrl&"_"&w_More_Page_Index + 1&"."&w_File_Ext_Name&""""&Str_Style&" title=""下一页"">"&str_toN1&"</a> "  &vbNewLine
				Else
					Str_Link=Str_Link& "<font color="&str_nonLinkColor&" title=""下一页"">"&str_toN1&"</font> "  &vbNewLine
				End If

				If EndPage<w_Page_Count Then
					If (w_More_Page_Index+10)>w_Page_Count Then
						Str_Link=Str_Link& " <a href="""&LinkUrl&"_"&w_Page_Count&"."&w_File_Ext_Name&""""&Str_Style&"  title=""下十页"">"&str_toN10&"</a> "  &vbNewLine
					Else
						Str_Link=Str_Link& " <a href="""&LinkUrl&"_"&w_More_Page_Index+10&"."&w_File_Ext_Name&""""&Str_Style&"  title=""下十页"">"&str_toN10&"</a> "  &vbNewLine
					End If
				Else
					Str_Link=Str_Link& " <font color="&str_nonLinkColor&"  title=""下十页"">"&str_toN10&"</font> "  &vbNewLine
				End If

				if w_More_Page_Index<w_Page_Count Then
					Str_Link=Str_Link& "<a href="""&LinkUrl&"_"&w_Page_Count&"."&w_File_Ext_Name&""""&Str_Style&" title=""尾页"">"&str_toL&"</a>"  &vbNewLine
				Else
					Str_Link=Str_Link& "<font color="&str_nonLinkColor&" title=""尾页"">"&str_toL&"</font>"  &vbNewLine
				End If
		End Select
	End If
	Get_More_Page_Link_Str="<div>"&Str_Link&"</div>"
 End Function

 Function Web_showclass_ajax(id)
	str="<span id='Classinfo'></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('Classinfo','classid="&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
	Web_showclass_ajax=str
 End Function

 Function web_Get_keyword(v_content,v_content2,v_content3)
	if isnull(v_content3)=true then
		v_content3=""
	end if
	web_Get_keyword=replace(v_content,v_content2,v_content3)
 End Function
%> 

 
 

