<!--#include file="lib/base.asp"-->
<!--#include file="theme.asp"-->
<%
''' EYCMS 首页
''' ==================================================================
eycms.stophack
dim isindex:isindex="yes"
dim classid:classid=0
dim root:root="index"
dim htmlrule:htmlrule=webroot&root&"/[page]/"
dim area:area=eycms.enhtml(eycms.fget("area",0))
dim fdata
fdata = eycms.db.dbload(1,"replacetxt,replaceto,template","ey_plug_seocity","htmlname='"&area&"'","")
if ubound(fdata)>=0 then
	dim htmlname,rtxt,rto,i
	htmlname=area
	rtxt=replace(fdata(0,0),vbcrlf,"|")
	rto=replace(fdata(1,0),vbcrlf,"|")
	dim tpl
	if webremote=0 then
		tpl=eycms.loadfile(webroot&"theme/"&theme_root&"/city/"&fdata(2,0))
	else
		tpl=eycms.loadfile(webroot&"encry/theme/"&theme_root&"/city/"&fdata(2,0))
	end if
	dim html:html=htmlshow(tpl)
	dim arrf,arrt
	if instr(rtxt,"|") then
		arrf=split(rtxt,"|") 
		arrt=split(rto,"|") 
	else
		arrf=split(rtxt & "|","|") 
		arrt=split(rto & "|","|") 
	end if
	for i=0 to ubound(arrf)
		if eycms.strlen(arrf(i))>0 then html=replace(html,arrf(i),arrt(i)) 
	next 
	eycms.echo html
else
	Response.Status="301 Moved Permanently"
	Response.AddHeader "Location",webroot
	Response.End
end if

function htmlshow(byval t0)
	eycms.temp.isgzip=isgzip
	eycms.temp.iscache=false
	eycms.temp.isencry=false
	eycms.temp.cachepath=webroot&"cache/theme/"&theme_root&"/"
	eycms.temp.templatepath=webroot&"theme/"&theme_root&"/"
	eycms.temp.templatecode=t0
	eycms.temp.loadcode()
	htmlshow=eycms.temp.gethtml()
end function
eycms.db.dbclose
%>
