<!-- #include file="../access.asp" -->
<!-- #include file="../html_clear.asp" -->

<%'容错处理
function index_to_html()
On Error Resume Next
%>
<%
'首页基本信息内容读取替换
set rs=server.createobject("adodb.recordset")
sql="select web_name,web_url,web_image,web_title,web_keywords,web_contact,web_tel,web_TopHTML,web_BottomHTML,web_description,web_copyright,web_theme,web_shortintro from web_settings"
rs.open(sql),cn,1,1
if not rs.eof and not rs.bof then
web_name=rs("web_name")
web_url=rs("web_url")
web_image=rs("web_image")
web_title=rs("web_title")
web_keywords=rs("web_keywords")
web_description=rs("web_description")
web_copyright=rs("web_copyright")
web_theme=rs("web_theme")
web_consult=rs("web_contact")
web_TopHTML=rs("web_TopHTML")
web_BottomHTML=rs("web_BottomHTML")
web_tel=rs("web_tel")
web_video=rs("web_shortintro")
end if
rs.close
set rs=nothing
%>
<% '文件夹获取
'搜索文件夹获取
set rs_1=server.createobject("adodb.recordset")
sql="select FileName,FolderName from web_Models_type where [id]=35"
rs_1.open(sql),cn,1,1
if not rs_1.eof and rs_1("FolderName")<>"" then
Search_FolderName="/"&rs_1("FolderName")
end if
rs_1.close
set rs_1=nothing

'案例内容文件夹获取
set rs_1=server.createobject("adodb.recordset")
sql="select FileName,FolderName from web_Models_type where [id]=50"
rs_1.open(sql),cn,1,1
if not rs_1.eof and rs_1("FolderName")<>"" then
CasesContent_FolderName="/"&rs_1("FolderName")
end if
rs_1.close
set rs_1=nothing

'文章内容文件夹获取
set rs_1=server.createobject("adodb.recordset")
sql="select FileName,FolderName from web_Models_type where [id]=5"
rs_1.open(sql),cn,1,1
if not rs_1.eof and rs_1("FolderName")<>"" then
ArticleContent_FolderName="/"&rs_1("FolderName")
end if
rs_1.close
set rs_1=nothing

'产品内容文件夹获取
set rs_1=server.createobject("adodb.recordset")
sql="select FileName,FolderName from web_Models_type where [id]=6"
rs_1.open(sql),cn,1,1
if not rs_1.eof and rs_1("FolderName")<>"" then
ProductContent_FolderName="/"&rs_1("FolderName")
end if
rs_1.close
set rs_1=nothing
%>

<% '读取模板内容
'模板类型获取
set rs_1=server.createobject("adodb.recordset")
sql="select FileName,FolderName from web_Models_type where [id]=1"
rs_1.open(sql),cn,1,1
if not rs_1.eof then
Model_FileName=rs_1("FileName")
if rs_1("FolderName")<>"" then
Model_FolderName="/"&rs_1("FolderName")
end if
end if
rs_1.close
set rs_1=nothing

TemplatePath="/templates/"&web_theme&"/"&Model_FileName
replace_code=ReadFromUTF(TemplatePath,"utf-8") 
%>
<%
replace_code=replace(replace_code,"$web_name$",web_name)
replace_code=replace(replace_code,"$web_url$",web_url)
replace_code=replace(replace_code,"$web_image$",web_image)
replace_code=replace(replace_code,"$web_title$",web_title)
replace_code=replace(replace_code,"$web_keywords$",web_keywords)
replace_code=replace(replace_code,"$web_description$",web_description)
replace_code=replace(replace_code,"$web_copyright$",web_copyright)
replace_code=replace(replace_code,"$web_theme$",web_theme)
replace_code=replace(replace_code,"$web_consult$",web_consult)
replace_code=replace(replace_code,"$web_TopHTML$",web_TopHTML)
replace_code=replace(replace_code,"$web_BottomHTML$",web_BottomHTML)
replace_code=replace(replace_code,"$web_tel$",web_tel)
replace_code=replace(replace_code,"$search_FolderName$",search_FolderName)
replace_code=replace(replace_code,"$web_video$",web_video)

'顶部文字广告读取
Web_BannerTop=""
set rs=server.createobject("adodb.recordset")
sql="select top 1 [id],ADtype,[ADcode] from web_ads  where [position]=37 and view_yes=1 order by [time] desc"
rs.open(sql),cn,1,1
if not rs.eof then
if rs("ADtype")=4 then
Web_BannerTop=Web_BannerTop&rs("ADcode")
else
Web_BannerTop=Web_BannerTop&"<script src='/ADs/"&rs("id")&".js' type='text/javascript'></script>"
end if 
else
Web_BannerTop=Web_BannerTop&""
end if
rs.close
set rs=nothing

'底部导航
web_BottomMenu=""
set rs=server.createobject("adodb.recordset")
sql="select * from web_menu_type where BottomNav=1 order by [order]"
rs.open(sql),cn,1,1
if not rs.eof then
for i=1 to rs.recordcount

set rss=server.createobject("adodb.recordset")
sql="select * from web_menu where view_yes=1 and [position]="&rs("id")&" order by [order]"
rss.open(sql),cn,1,1
if not rss.eof then
web_BottomMenu=web_BottomMenu&"<div class='box_240px_left'><div class='post'><h2>"&rs("name")&"</span> </h2> "
web_BottomMenu=web_BottomMenu&"<ul>"
do while not rss.eof
web_BottomMenu=web_BottomMenu&"<li><a href='"&rss("url")&"'>"&rss("name")&"</a></li> "
rss.movenext
loop
web_BottomMenu=web_BottomMenu&"</ul></div></div> "
rss.close
set rss=nothing

end if
rs.movenext
next
end if
rs.close
set rs=nothing

replace_code=replace(replace_code,"$web_BottomMenu$",web_BottomMenu)
replace_code=replace(replace_code,"$Web_BannerTop$",Web_BannerTop)



'顶部导航
web_TopMenu=""
web_SecMenu=""
set rs=server.createobject("adodb.recordset")
sql="select [name],[url] from web_menu_type where TopNav=1 order by [order]"
rs.open(sql),cn,1,1
if not rs.eof then
for i=1 to rs.recordcount

web_TopMenu=web_TopMenu&"<li class='' _t_nav='FirstNav"&i&"'>"
web_TopMenu=web_TopMenu&"<h2>"
web_TopMenu=web_TopMenu&"<a href='"&rs("url")&"'>"&rs("name")&"</a>"
web_TopMenu=web_TopMenu&"</h2>"
web_TopMenu=web_TopMenu&"</li>"

'Cate Class start
set rss=server.createobject("adodb.recordset")
sql="select [id],[folder] from [category] where name='"&rs("name")&"' and ppid=1 order by [order]"
rss.open(sql),cn,1,1
if not rss.eof then
ItemID=rss("id")
WebMenu4FolderName=rss("folder")

web_SecMenu=web_SecMenu&"<div id='FirstNav"&i&"' class='nav-down-menu menu-1' style='display: none;' _t_nav='FirstNav"&i&"'>"
web_SecMenu=web_SecMenu&"<div class='navigation-down-inner'>"

set rsc=server.createobject("adodb.recordset")
sql="select [name],[folder],[id] from [category] where pid="&ItemID&" and ppid=2 order by [order] "
rsc.open(sql),cn,1,1
if not rsc.eof then
for ix=1 to rsc.recordcount
web_SecMenu=web_SecMenu&"<dl style='margin-left: 20px;'>"
web_SecMenu=web_SecMenu&"<dt><a href='/"&WebMenu4FolderName&"/"&rsc("folder")&"/'>"&rsc("name")&"</a></dt>"

set rsp=server.createobject("adodb.recordset")
sql="select [name],[folder] from [category] where pid="&rsc("id")&" and ppid=3 Order by [Order] "
rsp.open(sql),cn,1,1
if not rsp.eof then
do while not rsp.eof 

web_SecMenu=web_SecMenu&"<dd>"
web_SecMenu=web_SecMenu&"<a hotrep='hp.header.product.compute1' href='/"&WebMenu4FolderName&"/"&rsc("folder")&"/"&rsp("folder")&"/'>"&rsp("name")&"</a>"
web_SecMenu=web_SecMenu&"</dd>"

rsp.movenext
loop
end if 
rsp.close
set rsp=nothing


web_SecMenu=web_SecMenu&"</dl>"

rsc.movenext
next
end if
rsc.close 
set rsc=nothing

web_SecMenu=web_SecMenu&"</div>"
web_SecMenu=web_SecMenu&"<div class='clearfix'></div>"
web_SecMenu=web_SecMenu&"</div>"

end if
rss.close 
set rss=nothing
'Cate Class end

rs.movenext
next
end if
rs.close
set rs=nothing

replace_code=replace(replace_code,"$web_TopMenu$",web_TopMenu)
replace_code=replace(replace_code,"$web_SecMenu$",web_SecMenu)



'首页顶部幻灯广告读取替换
set rs=server.createobject("adodb.recordset")
sql="select top 10 name,url,image,ADcode from web_ads  where [position]=36 and view_yes=1 order by [order]"
rs.open(sql),cn,1,1
if not rs.eof then
for i=1 to rs.recordcount
if rs("adcode")<>"" then
BackAD=rs("ADcode")
else
BackAD="#FFFFFF"
end if

web_TopIMGAD=web_TopIMGAD&"<div class='p-home-banner' id='p-banner-"&i&"' style='background: "&BackAD&" url(/images/up_images/"&rs("image")&") no-repeat 50% 0px;'><a href='"&rs("url")&"'></a></div>"

web_TopIMGAD2=web_TopIMGAD2&"<a href='"&rs("url")&"'>"
web_TopIMGAD2=web_TopIMGAD2&"<div class='p-top-qh-view p-banner-small-"&i&"' style='background: url(/images/up_images/"&rs("image")&") no-repeat center center;'></div>"
web_TopIMGAD2=web_TopIMGAD2&"</a>"
			 
rs.movenext
next
else
web_TopIMGAD=web_TopIMGAD&"无数据"
end if
rs.close
set rs=nothing

replace_code=replace(replace_code,"$web_TopIMGAD$",web_TopIMGAD)
replace_code=replace(replace_code,"$web_TopIMGAD2$",web_TopIMGAD2)



'企业介绍
set rs=server.createobject("adodb.recordset")
sql="select top 1  [name],[folder],[id],[pid],[ppid],[image],[content] from [category] where ClassType=5 and ppid=1 order by [order]"
rs.open(sql),cn,1,1
if not rs.eof then
ItemID=rs("id")
WebAboutName=rs("name")
WebAboutFolderName=rs("folder")
WebAboutImage=rs("image")
WebAboutContent=left(ClearHtml(rs("content")),166)

select case rs("ppid")
case 1
ClassSQL="cid"
WebAboutFolder="/"&rs("folder") 
case 2
ClassSQL="pid"
set rs0=server.createobject("adodb.recordset")
sql="select [name],[folder],[id],[pid],[ppid] from [category] where id="&rs("pid")
rs0.open(sql),cn,1,1
if not rs0.eof then
WebAboutFolder="/"&rs0("folder")&"/"&rs("folder")
end if
rs0.close
set rs0=nothing
case 3
ClassSQL="ppid"
set rs0=server.createobject("adodb.recordset")
sql="select [name],[folder],[id],[pid],[ppid] from [category] where id="&rs("pid")
rs0.open(sql),cn,1,1
if not rs0.eof then
set rs00=server.createobject("adodb.recordset")
sql="select [name],[folder],[id],[pid],[ppid] from [category] where id="&rs0("pid")
rs00.open(sql),cn,1,1
if not rs00.eof then
WebAboutFolder="/"&rs00("folder")&"/"&rs0("folder")&"/"&rs("folder") 
end if
rs00.close
set rs00=nothing
end if
rs0.close
set rs0=nothing
end select
end if
rs.close
set rs=nothing

replace_code=replace(replace_code,"$WebAboutName$",WebAboutName)
replace_code=replace(replace_code,"$WebAboutFolderName$",WebAboutFolderName)
replace_code=replace(replace_code,"$WebAboutFolder$",WebAboutFolder)
replace_code=replace(replace_code,"$WebAboutImage$",WebAboutImage)
replace_code=replace(replace_code,"$WebAboutContent$",WebAboutContent)



'新闻动态
set rs=server.createobject("adodb.recordset")
sql="select top 1  [name],[folder],[id],[pid],[ppid] from [category] where ClassType=1 and ppid=1 order by [order]"
rs.open(sql),cn,1,1
if not rs.eof then
ItemID=rs("id")
WebNewNewsName=rs("name")
WebNewNewsFolderName=rs("folder")
select case rs("ppid")
case 1
ClassSQL="cid"
WebNewNewsFolder="/"&rs("folder") 
case 2
ClassSQL="pid"
set rs0=server.createobject("adodb.recordset")
sql="select [name],[folder],[id],[pid],[ppid] from [category] where id="&rs("pid")
rs0.open(sql),cn,1,1
if not rs0.eof then
WebNewNewsFolder="/"&rs0("folder")&"/"&rs("folder")
end if
rs0.close
set rs0=nothing
case 3
ClassSQL="ppid"
set rs0=server.createobject("adodb.recordset")
sql="select [name],[folder],[id],[pid],[ppid] from [category] where id="&rs("pid")
rs0.open(sql),cn,1,1
if not rs0.eof then
set rs00=server.createobject("adodb.recordset")
sql="select [name],[folder],[id],[pid],[ppid] from [category] where id="&rs0("pid")
rs00.open(sql),cn,1,1
if not rs00.eof then
WebNewNewsFolder="/"&rs00("folder")&"/"&rs0("folder")&"/"&rs("folder") 
end if
rs00.close
set rs00=nothing
end if
rs0.close
set rs0=nothing
end select
end if
rs.close
set rs=nothing
'content

set rs=server.createobject("adodb.recordset")
sql="select top 3 [name],[folder],[id],[pid],[ppid] from [category] where pid="&ItemID&" and ClassType=1 and ppid=2 order by [order] "
rs.open(sql),cn,1,1
if not rs.eof then
for i=1 to rs.recordcount
WebNewNewsTitles=WebNewNewsTitles&"<li><A href='"&WebNewNewsFolder&"/"&rs("Folder")&"'>"&rs("name")&"</A></li> "

WebNewNewsList=WebNewNewsList&"<li><div class='DivList'><table class='MBlockTable' width='100%' border='0' cellspacing='0' cellpadding='0'>"
set rsp=server.createobject("adodb.recordset")
sql="select top 7 [title],file_path,[time] from [article] where ArticleType=1 and cid='"&ItemID&"' and pid='"&rs("id")&"' and view_yes=1 order by [time] desc"
rsp.open(sql),cn,1,1
if not rsp.eof then
do while not rsp.eof 
rs_url=""
rs_url=ArticleContent_FolderName&"/"&rsp("file_path")
WebNewNewsList=WebNewNewsList&"<tr><td width='75%'>· <a href='"&rs_url&"' target='_blank' title='"&rsp("title")&"'>"&left(rsp("title"),23)&"</a></td>"
WebNewNewsList=WebNewNewsList&"<td width='25%'><span>"&year(rsp("time"))&"/"&month(rsp("time"))&"/"&day(rsp("time"))&"</span></td></tr>"
rsp.movenext
loop
end if 
rsp.close
set rsp=nothing

WebNewNewsList=WebNewNewsList&"</table><div class='clearfix'></div></div></li>"
rs.movenext
next
end if
rs.close
set rs=nothing

replace_code=replace(replace_code,"$WebNewNewsTitles$",WebNewNewsTitles)
replace_code=replace(replace_code,"$WebNewNewsList$",WebNewNewsList)



'技术支持
set rs=server.createobject("adodb.recordset")
sql="select top 1  [name],[folder],[id],[pid],[ppid] from [category] where id<>"&ItemID&" and ClassType=1 and ppid=1 order by [order]"
rs.open(sql),cn,1,1
if not rs.eof then
ItemID=rs("id")
WebNewNews2Name=rs("name")
WebNewNews2FolderName=rs("folder")
select case rs("ppid")
case 1
ClassSQL="cid"
WebNewNews2Folder="/"&rs("folder") 
case 2
ClassSQL="pid"
set rs0=server.createobject("adodb.recordset")
sql="select [name],[folder],[id],[pid],[ppid] from [category] where id="&rs("pid")
rs0.open(sql),cn,1,1
if not rs0.eof then
WebNewNews2Folder="/"&rs0("folder")&"/"&rs("folder")
end if
rs0.close
set rs0=nothing
case 3
ClassSQL="ppid"
set rs0=server.createobject("adodb.recordset")
sql="select [name],[folder],[id],[pid],[ppid] from [category] where id="&rs("pid")
rs0.open(sql),cn,1,1
if not rs0.eof then
set rs00=server.createobject("adodb.recordset")
sql="select [name],[folder],[id],[pid],[ppid] from [category] where id="&rs0("pid")
rs00.open(sql),cn,1,1
if not rs00.eof then
WebNewNews2Folder="/"&rs00("folder")&"/"&rs0("folder")&"/"&rs("folder") 
end if
rs00.close
set rs00=nothing
end if
rs0.close
set rs0=nothing
end select
end if
rs.close
set rs=nothing
'content

set rs=server.createobject("adodb.recordset")
sql="select top 3 [name],[folder],[id],[pid],[ppid] from [category] where pid="&ItemID&" and ClassType=1 and ppid=2 order by [order] "
rs.open(sql),cn,1,1
if not rs.eof then
for i=1 to rs.recordcount
WebNewNews2Titles=WebNewNews2Titles&"<li><A href='"&WebNewNews2Folder&"/"&rs("Folder")&"'>"&rs("name")&"</A></li> "

WebNewNews2List=WebNewNews2List&"<li><div class='DivList'><table class='MBlockTable' width='100%' border='0' cellspacing='0' cellpadding='0'>"
set rsp=server.createobject("adodb.recordset")
sql="select top 6 [title],file_path,[time] from [article] where ArticleType=1 and cid='"&ItemID&"' and pid='"&rs("id")&"' and view_yes=1 order by [time] desc"
rsp.open(sql),cn,1,1
if not rsp.eof then
do while not rsp.eof 
rs_url=""
rs_url=ArticleContent_FolderName&"/"&rsp("file_path")
WebNewNews2List=WebNewNews2List&"<tr><td width='75%'>· <a href='"&rs_url&"' target='_blank' title='"&rsp("title")&"'>"&left(rsp("title"),23)&"</a></td>"
WebNewNews2List=WebNewNews2List&"<td width='25%'><span>"&year(rsp("time"))&"/"&month(rsp("time"))&"/"&day(rsp("time"))&"</span></td></tr>"
rsp.movenext
loop
end if 
rsp.close
set rsp=nothing

WebNewNews2List=WebNewNews2List&"</table><div class='clearfix'></div></div></li>"
rs.movenext
next
end if
rs.close
set rs=nothing

replace_code=replace(replace_code,"$WebNewNews2Titles$",WebNewNews2Titles)
replace_code=replace(replace_code,"$WebNewNews2List$",WebNewNews2List)



'品牌产品
set rs=server.createobject("adodb.recordset")
sql="select top 1  [name],[folder],[id],[pid],[ppid] from [category] where ClassType=2 and ppid=1 order by [order]"
rs.open(sql),cn,1,1
if not rs.eof then
ItemID=rs("id")
WebProductName=rs("name")
WebProductFolderName=rs("folder")
WebProductFolder="/"&rs("folder")
end if
rs.close
set rs=nothing
set rs=server.createobject("adodb.recordset")
sql="select [name],[folder],[id],[pid],[ppid] from [category] where pid="&ItemID&" and ClassType=2 order by [order] "
rs.open(sql),cn,1,1
if not rs.eof then
for i=1 to rs.recordcount
 if i=1 then
Block03_LeftItem_Title=Block03_LeftItem_Title&"<li class='hover1'><A href='"&WebProductFolderName&"/"&rs("Folder")&"'>"&rs("name")&"</A></li> "
else
Block03_LeftItem_Title=Block03_LeftItem_Title&"<li><A href='"&WebProductFolderName&"/"&rs("Folder")&"'>"&rs("name")&"</A></li> "
end if

Block03_LeftItem=Block03_LeftItem&"<DIV class='hjone'>"
set rsp=server.createobject("adodb.recordset")
sql="select top 5 [title],file_path,[image] from [article] where ArticleType=2 and pid='"&rs("id")&"' and view_yes=1 order by [OrderCount],[time] desc"
rsp.open(sql),cn,1,1
if not rsp.eof then
do while not rsp.eof 
rs_url=""
rs_url=ProductContent_FolderName&"/"&rsp("file_path")
Block03_LeftItem=Block03_LeftItem&"<div class='albumblock'><div class='inner'><a href='"&rs_url&"' target='_blank' ><img src='/images/up_images/"&rsp("image")&"' alt='"&rsp("title")&"' /><div class='albumtitle'>"&left(rsp("title"),14)&"</div></a></div></div>"
rsp.movenext
loop
end if 
rsp.close
set rsp=nothing

Block03_LeftItem=Block03_LeftItem&"</div> "
rs.movenext
next
end if
rs.close
set rs=nothing

'Push
set rsp=server.createobject("adodb.recordset")
sql="select top 30 [title],file_path,[image] from [article] where ArticleType=2 and cid='"&ItemID&"' and view_yes=1 and index_push=1 order by [OrderCount],[time] desc"
rsp.open(sql),cn,1,1
if not rsp.eof then
do while not rsp.eof 
rs_url=""
rs_url=ProductContent_FolderName&"/"&rsp("file_path")
WebProductList=WebProductList&"<DIV class='box'><A class='imgBorder'  href='"&rs_url&"' target='_blank' title='"&rsp("title")&"'><IMG alt='"&rsp("title")&"' src='/images/up_images/"&rsp("image")&"' alt='"&rsp("title")&"'></a><p><A class='imgBorder'  href='"&rs_url&"' target='_blank' title='"&rsp("title")&"'>"&left(rsp("title"),14)&"</A></p> </DIV>"
rsp.movenext
loop
end if 
rsp.close
set rsp=nothing


replace_code=replace(replace_code,"$WebProductList$",WebProductList)
replace_code=replace(replace_code,"$Block03_LeftItem$",Block03_LeftItem)
replace_code=replace(replace_code,"$Block03_LeftItem_Title$",Block03_LeftItem_Title)
replace_code=replace(replace_code,"$WebProductName$",WebProductName)
replace_code=replace(replace_code,"$WebProductFolderName$",WebProductFolderName)
replace_code=replace(replace_code,"$WebProductFolder$",WebProductFolder)



'精彩案例
set rs=server.createobject("adodb.recordset")
sql="select top 1  [name],[folder],[id],[pid],[ppid] from [category] where ClassType=3 and ppid=1 order by [order]"
rs.open(sql),cn,1,1
if not rs.eof then
ItemID=rs("id")
WebCaseName=rs("name")
WebCaseFolderName=rs("folder")
WebCaseFolder="/"&rs("folder")
end if
rs.close
set rs=nothing

set rsp=server.createobject("adodb.recordset")
sql="select top 24 [title],file_path,[image] from [article] where ArticleType=3 and cid='"&ItemID&"' and view_yes=1 order by [OrderCount],[time] desc"
rsp.open(sql),cn,1,1
if not rsp.eof then
do while not rsp.eof 
rs_url=""
rs_url=CasesContent_FolderName&"/"&rsp("file_path")
WebCase_List=WebCase_List&"<DIV class='box'><A class='imgBorder'  href='"&rs_url&"' target='_blank' title='"&rsp("title")&"'><IMG alt='"&rsp("title")&"' src='/images/up_images/"&rsp("image")&"' alt='"&rsp("title")&"'></a><p><A class='imgBorder'  href='"&rs_url&"' target='_blank' title='"&rsp("title")&"'>"&left(rsp("title"),14)&"</A></p> </DIV>"
rsp.movenext
loop
end if 
rsp.close
set rsp=nothing

replace_code=replace(replace_code,"$WebCase_List$",WebCase_List)
replace_code=replace(replace_code,"$WebCaseName$",WebCaseName)
replace_code=replace(replace_code,"$WebCaseFolderName$",WebCaseFolderName)
replace_code=replace(replace_code,"$WebCaseFolder$",WebCaseFolder)



'友情链接
set rs=server.createobject("adodb.recordset")
sql="select  [name],[url],[image],follow_yes from [web_link] where view_yes=1 order by [order]"
rs.open(sql),cn,1,1
if not rs.eof then
do while not rs.eof
if rs("follow_yes")=1 then
NoFollow="rel='nofollow'"
else
NoFollow=""
end if 
web_link=web_link&"<a href='"&rs("url")&"' target='_blank' "&NoFollow&">"&rs("name")&"</a>"
rs.movenext
loop
else
web_link=web_link&"暂无链接。"
end if
rs.close
set rs=nothing

replace_code=replace(replace_code,"$web_link$",web_link)
%>

<% '判断文件夹是否存在，否则创建
Set Fso=Server.CreateObject("Scripting.FileSystemObject") 
If Fso.FolderExists(Server.MapPath(Model_FolderName))=false Then
NewFolderDir=Model_FolderName
call CreateFolderB(NewFolderDir)
end if
%>

<%'声明HTML文件名,指定文件路径
filepath=Model_FolderName&"/index.html"
%>

<% '读取模板
'******************************************
'功能：生成UTF-8文件
'******************************************
mappath =filepath
Set objStream = Server.CreateObject("ADODB.Stream")
With objStream
.Open
.Charset = "utf-8"
.Position = objStream.Size
.WriteText=replace_code
.SaveToFile server.mappath(mappath),2
.Close
End With
Set objStream = Nothing

%>
<%
end function
%>