<%
function createindex()
	dim Temp:Temp = ""
	    Temp = processcustomtag(loadtempletfile("../templets/" & site_index_temp & ""))
	dim charclass
	set charclass = new stringclass
	dim PatrnStr
		PatrnStr = "</title>"
		Temp = charclass.replacestr(PatrnStr,Temp,"--"& site_name & "</title>")
		PatrnStr = "\{\$path\$\}"   
		Temp = charclass.replacestr(PatrnStr,Temp,site_root)
		PatrnStr = "\{\$keywords\$\}"
		Temp = charclass.replacestr(PatrnStr,Temp,site_keywords)
		PatrnStr = "\{\$description\$\}"
		Temp = charclass.replacestr(PatrnStr,Temp,site_description)
		PatrnStr = "\{\$copyright\$\}"
		Temp = charclass.replacestr(PatrnStr,Temp,site_copyright)
		PatrnStr = "\{\$Ku654cN\$\}"
		Temp = charclass.replacestr(PatrnStr,Temp,Ku654cN)
		PatrnStr = "\{\$Class654cN\$\}"
		Temp = charclass.replacestr(PatrnStr,Temp,Class654cN)
		PatrnStr = "\{\$New654cN\$\}"
		Temp = charclass.replacestr(PatrnStr,Temp,New654cN)
		PatrnStr = "\{\$Hot654cN\$\}"
		Temp = charclass.replacestr(PatrnStr,Temp,Hot654cN)
		PatrnStr = "\{\$nowtime\$\}"		
		Temp = charclass.replacestr(PatrnStr,Temp,dateformat(now(),8))
		PatrnStr = "\{\$ZZLink654cN\$\}"
		Temp = charclass.replacestr(PatrnStr,Temp,ZZLink654cN(0,36))
		PatrnStr = "\{\$root\$\}"
		Temp = charclass.replacestr(PatrnStr,Temp,site_root)
	dim sPATH:sPATH = "../index" & site_extname & ""
	dim objstream
	set objstream = server.createobject("adodb.stream")
	with objstream
		.open
		.charset = "" & chrset & ""
		.position = objstream.size
		.writetext = Temp
		.savetofile server.mappath(sPATH),2
		.close
	end with
	set objstream = nothing
	if err.number <> 0 then
		err.clear
		createindex = false
	else
		createindex = true
	end if
end function

function parsetag(byval strtag)
	dim arrresult,classname,arrattributes,objclass
	if len(strtag) = 0 then exit function
	arrresult = split(strtag,":")
	classname = split(arrresult(1)," ")(0)
	select case lcase(classname)
		case "pd"
			set objclass = new Channeltag
			    if not isnumeric(getattribute("id",strtag)) then
					response.write("标签[DH654:pd]参数错误!参数[id]必须是数字!")
					response.end()
				end if
				objclass.id = getattribute("id",strtag)			    
				parsetag = objclass.Channel(getattribute("id",strtag))
			set objclass = nothing
		case "ad"
			set objclass = new Advertisetag
			    if getattribute("Name",strtag)="" then
					response.write("标签[DH654:ad]参数[Name]不存在!")
					response.end()
				end if
				parsetag = objclass.Advertise(getattribute("Name",strtag))
			set objclass = nothing
		case else
			response.write("标签{DH654:xx id=""1"" say=""说明"" /DH}构造错误!")
			response.end()
	end select
end function
REM 修改后台版权的撞车去死！
REM 本身都没有要求你的模板上保留版权，已经够意思的了，还修改后台版权。
REM 你Y祖宗十八代肯定都是木jj的太监！！
REM 就因为你这种垃圾，国内优秀的asp程序都加DLL了

%>