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

<%'容错处理
function article_list_to_html(a_id,sql_id)
On Error Resume Next
%>

<%'网站基本信息内容读取替换
set rs=server.createobject("adodb.recordset")
sql="select web_name,web_url,web_image,web_copyright,web_tel,web_person 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_copyright=rs("web_copyright")
web_tel=rs("web_tel")
web_person=rs("web_person")
end if
rs.close
set rs=nothing



'顶部导航列表读取替换
set rs=server.createobject("adodb.recordset")
sql="select [number],[id] from web_menu_type order by [order]"
rs.open(sql),cn,1,1
if not rs.eof and not rs.bof then
do while not rs.eof
web_menu=web_menu&""
set rs_menu=server.createobject("adodb.recordset")
sql="select top "&rs("number")&" [name],[url] from web_menu where [position]="&rs("id")&" order by [order] "
rs_menu.open(sql),cn,1,1
if not rs_menu.eof and not rs_menu.bof then
for i= 1 to rs_menu.recordcount
if i=1  or i=rs_menu.recordcount/2+1 then
web_menu=web_menu&"<li><a href='"&rs_menu("url")&"' title='"&rs_menu("name")&"' target='_self'>"&left(rs_menu("name"),4)&"</a></li>"
else
web_menu=web_menu&"<li><a href='"&rs_menu("url")&"' title='"&rs_menu("name")&"' target='_self'>"&left(rs_menu("name"),4)&"</a></li>"
end if
if i=rs_menu.recordcount/2 then
web_menu=web_menu&""
end if
rs_menu.movenext
next
else
web_menu=web_menu&"无数据"
end if
rs_menu.close
set rs_menu=nothing

web_menu=web_menu&""
rs.movenext
loop
else
web_menu=web_menu&"无数据"
end if
rs.close
set rs=nothing

replace_code=replace(replace_code,"$web_menu$",web_menu)



'二层导航列表读取替换
set rs=server.createobject("adodb.recordset")
sql1="select top 12 name,folder from category where ppid=1 and id > 48 order by id asc"
rs.open(sql1),cn,1,1
if not rs.eof and not rs.bof then
web_menus=web_menus&""
do while not rs.eof 
web_menus=web_menus&"<li><a href='/"&rs("folder")&"/index.html' title='"&rs("name")&"' target='_self'>"&left(rs("name"),4)&"</a></li>"
rs.movenext
loop
web_menus=web_menus&""
else
web_menus=web_menus&"无数据"
end if
rs.close
set rs=nothing

replace_code=replace(replace_code,"$web_menus$",web_menus)



'二级导航列表读取替换
set rs=server.createobject("adodb.recordset")
sql="select top 12 [id],[name],[folder],[pid] from [category] where pid=36 and ppid=2 order by id"
rs.open(sql),cn,1,1
if not rs.eof and not rs.bof then
for i=1 to rs.recordcount

folder_name_0=rs("folder")
'ppid=2
set rs_1=server.createobject("adodb.recordset")
sql="select [folder] from [category] where [id]="&rs("pid")&" and ppid=1"
rs_1.open(sql),cn,1,1
if not rs_1.eof then

folder_name_1=rs_1("folder")

if folder_name_1<>"" and  folder_name_0<>"" then

Set Fso=Server.CreateObject("Scripting.FileSystemObject") 
If Fso.FolderExists(Server.MapPath("/"&folder_name_0))=true then
folder_path="/"&folder_name_0
else
folder_path="/html/"&rs("folder")
end if

else
folder_path="/html/"&rs("folder")
end if

end if
rs_1.close
set rs_1=nothing

if i=1 then
web_menuss=web_menuss&"<li><a href='"&folder_path&"/index.html' title='"&rs("name")&"' target='_self'>"&rs("name")&"</a></li>"
else
web_menuss=web_menuss&"<li><a href='"&folder_path&"/index.html' title='"&rs("name")&"' target='_self'>"&rs("name")&"</a></li>"
end if
rs.movenext
next
else
web_menuss=web_menuss&"无数据"
end if 
rs.close
set rs=nothing

replace_code=replace(replace_code,"$web_menuss$",web_menuss)



'站点推广①列表读取替换
set rs=server.createobject("adodb.recordset")
sql="select top 5 [name],[url] from web_keywords where hot_yes=1 order by [time] asc"
rs.open(sql),cn,1,1
if not rs.eof and not rs.bof then
do while not rs.eof
hotkeys_url=rs("url")
if rs("url")="" then
hotkeys_url=""
end if
web_hotsearch=web_hotsearch&"<a href='"&hotkeys_url&"' target='_blank' title='"&rs("name")&"'>"&left(rs("name"),6)&"</a>"
rs.movenext
loop
else
web_hotsearch=web_hotsearch&"无数据"
end if
rs.close
set rs=nothing

replace_code=replace(replace_code,"$web_hotsearch$",web_hotsearch)



'站内公告列表读取替换
set rs=server.createobject("adodb.recordset")
sql="select top 1 title,image,[url],memo from [web_special] where index_push=1 and id=17 order by [time] desc"
rs.open(sql),cn,1,1
if not rs.eof and not rs.bof then
web_gonggao_list=web_gonggao_list&""
web_gonggao_list=web_gonggao_list&"<a href='"&rs("url")&"' title='"&rs("title")&"' target='_blank'><font color=#333333>"&left(rs("title"),27)&"</font></a>"
web_gonggao_list=web_gonggao_list&""
else
web_gonggao_list=web_gonggao_list&"无数据"
end if
rs.close
set rs=nothing

replace_code=replace(replace_code,"$web_gonggao_list$",web_gonggao_list)



'站点推广②列表读取替换
set rs=server.createobject("adodb.recordset")
sql="select top 20 [name],[url] from web_keywords where index_yes=1 order by [time] asc"
rs.open(sql),cn,1,1
if not rs.eof and not rs.bof then
do while not rs.eof
hotkeys_url=rs("url")
if rs("url")="" then
hotkeys_url=""
end if
web_indexsearch=web_indexsearch&"<div><a href='"&hotkeys_url&"' target='_blank' title='"&rs("name")&"'><font color=#333333>"&left(rs("name"),15)&"</font></a></div>"
rs.movenext
loop
else
web_indexsearch=web_indexsearch&"无数据"
end if
rs.close
set rs=nothing

replace_code=replace(replace_code,"$web_indexsearch$",web_indexsearch)



'新进企业列表读取替换
set rs=server.createobject("adodb.recordset")
sql="select top 20 name,address,file_path,tel from [web_com]  where view_yes=1 order by [time] desc"

rs.open(sql),cn,1,1
if not rs.eof and not rs.bof then

for i= 1 to rs.recordcount
if i=1 then
web_xjcom_list=web_xjcom_list&""
else
web_xjcom_list=web_xjcom_list&""
end if
web_xjcom_list=web_xjcom_list&"<div><a href='"&rs("file_path")&"' target='_blank' title='"&rs("name")&"'>"&left(rs("name"),20)&"</a></div>"
web_xjcom_list=web_xjcom_list&""
web_xjcom_list=web_xjcom_list&""
web_xjcom_list=web_xjcom_list&""
rs.movenext
next
else
web_xjcom_list=web_xjcom_list&"无数据"
end if
rs.close
set rs=nothing

replace_code=replace(replace_code,"$web_xjcom_list$",web_xjcom_list)


'热门点击列表读取替换
set rs=server.createobject("adodb.recordset")
sql="select top 4 [title],[file_path],[hit] from [article] where view_yes=1 and [hit]<>0  order by [hit] desc"
rs.open(sql),cn,1,1
if not rs.eof and not rs.bof then
web_hit_link=web_hit_link&""
i=0
for c=1 to 4
i=i+1
web_hit_link=web_hit_link&"<li class='a_list_"&i&"'><a href='"&rs("file_path")&"' target='_blank' title='"&rs("title")&"'>"&left(rs("title"),20)&"</a></li>"
rs.movenext
next

web_hit_link=web_hit_link&""
else
web_hit_link=web_hit_link&"无数据"
end if
rs.close
set rs=nothing

replace_code=replace(replace_code,"$web_hit_link$",web_hit_link)

'教育新闻列表读取替换
set rs=server.createobject("adodb.recordset")
sql="select top 1 id,title,content,file_path,[url],time from [article]  where view_yes=1 and index_push=1 and cid='36' order by [time] desc"
rs.open(sql),cn,1,1
if not rs.eof and not rs.bof then
rs_url=""
if rs("url")<>"" then
rs_url=rs("url")
else
rs_url=rs("file_path")
end if 
web_jiaoyuxinwen_list=web_jiaoyuxinwen_list&"<li><a href='"&rs_url&"' title='"&rs("title")&"'  target='_blank'>"&left(rs("title"),20)&"</li>"
web_jiaoyuxinwen_list=web_jiaoyuxinwen_list&""
else
web_jiaoyuxinwen_list=web_jiaoyuxinwen_list&"无数据"
end if
rs.close
set rs=nothing

set rs=server.createobject("adodb.recordset")
sql="select top 9 title,content,file_path,[url],time from [article]  where [id] not in (select top 1 [id] from [article]  where view_yes=1 and index_push=1 and cid='36' order by [time] desc) and view_yes=1 and cid='36' order by [time] desc"
rs.open(sql),cn,1,1
if not rs.eof and not rs.bof then
web_jiaoyuxinwen_list=web_jiaoyuxinwen_list&""
do while not rs.eof 
rs_url=""
if rs("url")<>"" then
rs_url=rs("url")
else
rs_url=rs("file_path")
end if 
web_jiaoyuxinwen_list=web_jiaoyuxinwen_list&"<li><a href='"&rs_url&"' target='_blank' title='"&rs("title")&"'>"&left(rs("title"),20)&"</a></li>"
rs.movenext
loop
web_jiaoyuxinwen_list=web_jiaoyuxinwen_list&""
else
web_jiaoyuxinwen_list=web_jiaoyuxinwen_list&"无数据"
end if
rs.close
set rs=nothing

replace_code=replace(replace_code,"$web_jiaoyuxinwen_list$",web_jiaoyuxinwen_list)

'学校新闻列表读取替换
set rs=server.createobject("adodb.recordset")
sql="select top 1 id,title,content,file_path,[url],time from [article]  where view_yes=1 and index_push=1 and cid='37' order by [time] desc"
rs.open(sql),cn,1,1
if not rs.eof and not rs.bof then
rs_url=""
if rs("url")<>"" then
rs_url=rs("url")
else
rs_url=rs("file_path")
end if 
web_xuexiaoxinwen_list=web_xuexiaoxinwen_list&"<li><a href='"&rs_url&"' title='"&rs("title")&"'  target='_blank'>"&left(rs("title"),20)&"</li>"
web_xuexiaoxinwen_list=web_xuexiaoxinwen_list&""
else
web_xuexiaoxinwen_list=web_xuexiaoxinwen_list&"无数据"
end if
rs.close
set rs=nothing

set rs=server.createobject("adodb.recordset")
sql="select top 8 title,content,file_path,[url],time from [article]  where [id] not in (select top 1 [id] from [article]  where view_yes=1 and index_push=1 and cid='37' order by [time] desc) and view_yes=1 and cid='37' order by [time] desc"
rs.open(sql),cn,1,1
if not rs.eof and not rs.bof then
web_xuexiaoxinwen_list=web_xuexiaoxinwen_list&""
do while not rs.eof 
rs_url=""
if rs("url")<>"" then
rs_url=rs("url")
else
rs_url=rs("file_path")
end if 
web_xuexiaoxinwen_list=web_xuexiaoxinwen_list&"<li><a href='"&rs_url&"' target='_blank' title='"&rs("title")&"'>"&left(rs("title"),20)&"</a></li>"
rs.movenext
loop
web_xuexiaoxinwen_list=web_xuexiaoxinwen_list&""
else
web_xuexiaoxinwen_list=web_xuexiaoxinwen_list&"无数据"
end if
rs.close
set rs=nothing

replace_code=replace(replace_code,"$web_xuexiaoxinwen_list$",web_xuexiaoxinwen_list)'推荐学校列表读取替换
set rs=server.createobject("adodb.recordset")
sql="select top 1 id,title,content,file_path,[url],time from [article]  where view_yes=1 and index_push=1 and cid='44' order by [time] desc"
rs.open(sql),cn,1,1
if not rs.eof and not rs.bof then
rs_url=""
if rs("url")<>"" then
rs_url=rs("url")
else
rs_url=rs("file_path")
end if 
web_tuijianxuexiao_list=web_tuijianxuexiao_list&"<li><a href='"&rs_url&"' title='"&rs("title")&"'  target='_blank'>"&left(rs("title"),25)&"</li>"
web_tuijianxuexiao_list=web_tuijianxuexiao_list&""
else
web_tuijianxuexiao_list=web_tuijianxuexiao_list&"无数据"
end if
rs.close
set rs=nothing

set rs=server.createobject("adodb.recordset")
sql="select top 9 title,content,file_path,[url],time from [article]  where [id] not in (select top 1 [id] from [article] where view_yes=1 and index_push=1 and cid='44' order by [time] desc) and view_yes=1 and cid='44' order by [time] desc"
rs.open(sql),cn,1,1
if not rs.eof and not rs.bof then
web_tuijianxuexiao_list=web_tuijianxuexiao_list&""
do while not rs.eof 
rs_url=""
if rs("url")<>"" then
rs_url=rs("url")
else
rs_url=rs("file_path")
end if 
web_tuijianxuexiao_list=web_tuijianxuexiao_list&"<li><a href='"&rs_url&"' target='_blank' title='"&rs("title")&"'>"&left(rs("title"),25)&"</a></li>"
rs.movenext
loop
web_tuijianxuexiao_list=web_tuijianxuexiao_list&""
else
web_tuijianxuexiao_list=web_tuijianxuexiao_list&"无数据"
end if
rs.close
set rs=nothing

replace_code=replace(replace_code,"$web_tuijianxuexiao_list$",web_tuijianxuexiao_list)

'招商专区列表读取替换
set rs=server.createobject("adodb.recordset")
sql="select [name],[url],[memo] from web_gov where view_yes=1 order by [order]"
rs.open(sql),cn,1,1
if not rs.eof then
web_zhaoshang_list=web_zhaoshang_list&""
do while not rs.eof 
web_zhaoshang_list=web_zhaoshang_list&"<li><a href='"&rs("url")&"' target='_blank' title='"&rs("name")&"'><font color='#"&rs("memo")&"'>"&left(rs("name"),20)&"</font></a></li>"
rs.movenext
loop
web_zhaoshang_list=web_zhaoshang_list&""
else
web_zhaoshang_list=web_zhaoshang_list&"无数据"
end if
rs.close
set rs=nothing

replace_code=replace(replace_code,"$web_zhaoshang_list$",web_zhaoshang_list)



'友情链接列表读取替换
set rs=server.createobject("adodb.recordset")
sql="select [name],[url] from web_link where view_yes=1 order by [time] asc"
rs.open(sql),cn,1,1
if not rs.eof then
web_links_list=web_links_list&""
do while not rs.eof 
web_links_list=web_links_list&"<a href='"&rs("url")&"' target='_blank' title='"&rs("name")&"'>"&left(rs("name"),12)&"</a>"
rs.movenext
loop
web_links_list=web_links_list&""
else
web_links_list=web_links_list&"无数据"
end if
rs.close
set rs=nothing

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



<%'list_common use

'标题，描述，头键词，您现在的位置读取替换
set rs1=server.createobject("adodb.recordset")
sql="select [name],[id],[pid],[ppid],[folder],[description],[keywords],[content] from [category] where [id]="&a_id&""
rs1.open(sql),cn,1,1
if not rs1.eof and not rs1.bof then

folder_name=rs1("folder")

category_title=rs1("name")
category_description=rs1("description")
category_keywords=rs1("keywords")
category_content=left(rs1("content"),200)

'一级分类情况下的当前位置
if rs1("ppid")=1 then
'----------------------
if folder_name<>"" then

Set Fso=Server.CreateObject("Scripting.FileSystemObject") 
If Fso.FolderExists(Server.MapPath("/"&folder_name))=true then
folder_path="/"&folder_name
else
folder_path="/html/"&rs1("id")
end if

else
folder_path="/html/"&rs1("id")
end if

category_position=""
category_position=category_position&"<a href='"&folder_path&"/index.html'>"&rs1("name")&"</a>"
end if


'二级分类情况下的当前位置
if rs1("ppid")=2 then
'--------------------
set rs_1=server.createobject("adodb.recordset")
sql="select [id],[pid],[ppid],[name],[folder] from [category] where [id]="&rs1("pid")&" and ppid=1"
rs_1.open(sql),cn,1,1
if not rs_1.eof then

folder_name_1=rs_1("folder")
if folder_name_1<>"" then

Set Fso=Server.CreateObject("Scripting.FileSystemObject") 
If Fso.FolderExists(Server.MapPath("/"&folder_name_1))=true then
folder_path_1="/"&folder_name_1
else
folder_path_1="/html/"&rs_1("id")
end if

else
folder_path_1="/html/"&rs_1("id")
end if

category_position=""
category_position=category_position&"<a href='"&folder_path_1&"/index.html'>"&rs_1("name")&"</a>"
end if
rs_1.close
set rs_1=nothing
'---------------------------------------------------------------------------------------

if folder_name<>"" then

Set Fso=Server.CreateObject("Scripting.FileSystemObject") 
If Fso.FolderExists(Server.MapPath("/"&folder_name_1&"/"&folder_name))=true then
folder_path="/"&folder_name_1&"/"&folder_name
else
folder_path="/html/"&rs1("id")
end if

else
folder_path="/html/"&rs1("id")
end if


category_position=category_position&" > <a href='"&folder_path&"/index.html'>"&rs1("name")&"</a>"
end if


'三级分类情况下的当前位置
if rs1("ppid")=3 then

'--------------------
set rs_1=server.createobject("adodb.recordset")
sql="select [id],[ppid],[pid],[name],[folder] from [category] where [id]="&rs1("pid")&" and ppid=2"
rs_1.open(sql),cn,1,1
if not rs_1.eof then

set rs_1_1=server.createobject("adodb.recordset")
sql="select [id],[pid],[ppid],[name],[folder] from [category] where [id]="&rs_1("pid")&" and ppid=1"
rs_1_1.open(sql),cn,1,1
if not rs_1_1.eof then
'
folder_name_1_1=rs_1_1("folder")
if folder_name_1_1<>"" then

Set Fso=Server.CreateObject("Scripting.FileSystemObject") 
If Fso.FolderExists(Server.MapPath("/"&folder_name_1_1))=true then
folder_path_1_1="/"&folder_name_1_1
else
folder_path_1_1="/html/"&rs_1_1("id")
end if

else
folder_path_1_1="/html/"&rs_1_1("id")
end if


category_position=""
category_position=category_position&"<a href='"&folder_path_1_1&"/index.html'>"&rs_1_1("name")&"</a>"
end if
rs_1_1.close
set rs_1_1=nothing
'-----------------------------------------------------------------------------------------------------

folder_name_1=rs_1("folder")
if folder_name_1<>"" then

Set Fso=Server.CreateObject("Scripting.FileSystemObject") 
If Fso.FolderExists(Server.MapPath("/"&folder_name_1_1&"/"&folder_name_1))=true then
folder_path_1="/"&folder_name_1_1&"/"&folder_name_1
else
folder_path_1="/html/"&rs_1("id")
end if

else
folder_path_1="/html/"&rs_1("id")
end if

category_position=category_position&" > <a href='"&folder_path_1&"/index.html'>"&rs_1("name")&"</a>"
end if
rs_1.close
set rs_1=nothing
'--------------------------------------------------------------------------------------------------
if folder_name<>"" then

Set Fso=Server.CreateObject("Scripting.FileSystemObject") 
If Fso.FolderExists(Server.MapPath("/"&folder_name_1_1&"/"&folder_name_1&"/"&folder_name))=true then
folder_path="/"&folder_name_1_1&"/"&folder_name_1&"/"&folder_name
else
folder_path="/html/"&rs1("id")&""
end if

else
folder_path="/html/"&rs1("id")
end if

category_position=category_position&" > <a href='"&folder_path&"'>"&rs1("name")&"</a>"
end if


end if 
rs1.close
set rs1=nothing
%>



<%'文章列表读取替换
sql="select * from [article] where "&sql_id&" and view_yes=1 order by [time] desc"
set rs=server.createObject("ADODB.Recordset")
rs.open sql,cn,1,1
%>

<%
rs.pagesize=10
totalpage=rs.pagecount
rs.close
set rs=nothing

for j=1 to totalpage
sql="select * from [article] where "&sql_id&" and view_yes=1 order by [time] desc"
set rs=server.createObject("ADODB.Recordset")
rs.open sql,cn,1,1
if not rs.eof then
rscount=rs.recordcount
whichpage=j 
rs.pagesize=10
totalpage=rs.pagecount
rs.absolutepage=whichpage
howmanyrecs=0
list_block=""
list_block=list_block&""
do while not rs.eof and howmanyrecs<rs.pagesize
%>

<%
list_block=list_block&""
list_block=list_block&"<div class='item'><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr valign='top'><td></td><td width='100%'><div class='con1' style='padding-bottom: 5px'><a href='"&rs("file_path")&"' target='_blank'>"&left(rs("title"),35)&"</a><span>"&year(rs("time"))&"-"&month(rs("time"))&"-"&day(rs("time"))&"</span></div><div class='con3' style='line-height: 21px;'>"&left(nohtml(rs("content")),100)&"...<strong><a href='"&rs("file_path")&"' target='_blank'>查看详细&raquo;</a></strong></div></td></tr></table></div>"
list_block=list_block&""
%>

<%
rs.movenext
howmanyrecs=howmanyrecs+1
loop
list_block=list_block&""
else
list_block=list_block&"暂无文章！"
end if
rs.close
set rs=nothing
%>

<%
'分页部分
list_page=""
list_page=list_page&"<div class='list'>"
list_page=list_page&"文章总数：<span style='color:#ff0000;font-size: 14px;'>"&rscount&"</span> 条&nbsp;&nbsp;&nbsp;当前页数：<span class='red'>" & j & "</span>/" & totalpage &"&nbsp;&nbsp;&nbsp;"
list_page=list_page&"<a href='/html/"&a_id&"/list_1.html'"&">" & "首页" & "</a>&nbsp;"
if whichpage=1 then
list_page=list_page&""
else
list_page=list_page&"<a href='/html/"&a_id&"/list_"&j-1&".html'"&">" & "上一页" & "</a>&nbsp;"
end if
   
for counter=1 to totalpage
list_page=list_page&""
next

if (whichpage>totalpage or whichpage=totalpage) then
list_page=list_page&""
else
list_page=list_page&"<a href='/html/"&a_id&"/list_"&j+1&".html'"&">" & "下一页" & "</a>&nbsp;"
end if
list_page=list_page&"<a href='/html/"&a_id&"/list_"&totalpage&".html'"&">" & "尾页" & "</a></div>"
%>

<%'读取模板内容
Set fso=Server.CreateObject("Scripting.FileSystemObject") 
Set htmlwrite=fso.OpenTextFile(Server.MapPath("/model/article_list_model.html")) 
replace_code=htmlwrite.ReadAll() 
htmlwrite.close 
%>


<%'循环列表替换内容
list_block=list_block&list_page
replace_code=replace(replace_code,"$list_block$",list_block)   


%>
<%'循环其它替换内容
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_copyright$",web_copyright)
replace_code=replace(replace_code,"$web_tel$",web_tel)
replace_code=replace(replace_code,"$web_person$",web_person)
replace_code=replace(replace_code,"$web_menu$",web_menu)
replace_code=replace(replace_code,"$web_menus$",web_menus)
replace_code=replace(replace_code,"$web_hotsearch$",web_hotsearch)
replace_code=replace(replace_code,"$web_indexsearch$",web_indexsearch)
replace_code=replace(replace_code,"$web_xjcom_list$",web_xjcom_list)
replace_code=replace(replace_code,"$web_hit_link$",web_hit_link)
replace_code=replace(replace_code,"$web_jiaoyuxinwen_list$",web_jiaoyuxinwen_list)
replace_code=replace(replace_code,"$web_xuexiaoxinwen_list$",web_xuexiaoxinwen_list)
replace_code=replace(replace_code,"$web_tuijianxuexiao_list$",web_tuijianxuexiao_list)
replace_code=replace(replace_code,"$web_zhaoshang_list$",web_zhaoshang_list)
replace_code=replace(replace_code,"$web_links_list$",web_links_list)

replace_code=replace(replace_code,"$category_position$",category_position)
replace_code=replace(replace_code,"$category_title$",category_title)
replace_code=replace(replace_code,"$category_description$",category_description)
replace_code=replace(replace_code,"$category_content$",category_content)
replace_code=replace(replace_code,"$category_keywords$",category_keywords)

replace_code=replace(replace_code,"$article_commentrank$",article_commentrank)

%>

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



<%
filepath="/html/"&a_id&"/list_"&j&".html"


Set fso=Server.CreateObject("Scripting.FileSystemObject")
Set f=fso.CreateTextFile(Server.MapPath(filepath),true)
f.WriteLine replace_code
f.close
%>

<% '判断分类文件夹是否 设置 - 创建 - 生成首页
Set Fso=Server.CreateObject("Scripting.FileSystemObject") 
If Fso.FolderExists(Server.MapPath(folder_path))=true Then
filepath_index=folder_path&"/index.html"

if j=1 then
Set f=fso.CreateTextFile(Server.MapPath(filepath_index),true)
f.WriteLine replace_code
f.close
end if

end if
%>

<%
next
%>
<%end function%>