<!--#include file="utf-8.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="seeion.asp"-->
<!--#include file="../Inc/sql.asp"-->
<!--#include file="../Inc/webset.asp"-->
<!--#include file="../module/config.asp" -->
<!--#include file="../module/nav.asp" -->
<!--#include file="../module/flink.asp" -->
<!--#include file="../module/eqq.asp" -->
<!--#include file="../module/home_url.asp" -->
<%
'######################################
' 启点在线企业网站管理系统中英文版
' Enterprise Web Site Management System
' 官方网站：http://www.kelvinvt.com
' 联系QQ：15038883
' 淘宝店： http://kelvinvt.taobao.com
'######################################
%>

<%
'关于我们分类
set rse3=server.CreateObject("adodb.recordset")
rse3.open "select * from about order by px_id asc",conn,1,1
while not rse3.eof

aboutfl = aboutfl & "<div class='dbh'><a title='"&(rse3("title"))&"' href='"&root&"/about/"&rse3("id")&".html' target='_blank'>"&(rse3("title"))&"</a><div>"&vbcrlf

rse3.movenext
wend
rse3.close
set rse3=nothing
%>

<%
'新闻分类
set rse2=server.CreateObject("adodb.recordset")
rse2.open "select * from news_fl order by px_id asc",conn,1,1
while not rse2.eof

newsfl = newsfl & "<div class='dbh'><a title='"&(rse2("title"))&"' href='"&root&"/news/?id="&rse2("id")&"' target='_blank'>"&(rse2("title"))&"</a></div>"&vbcrlf

rse2.movenext
wend
rse2.close
set rse2=nothing
%>

<%
'产品分类
set rse=server.CreateObject("adodb.recordset")
rse.open "select * from shop_fl where sid = 0 order by px_id asc",conn,1,1
while not rse.eof

shopfl = shopfl & "<div class='dbh'><a title='"&(rse("title"))&"' href='"&root&"/products/?id="&rse("id")&"' target='_blank'>"&(rse("title"))&"</a></div>"&vbcrlf

rse.movenext
wend
rse.close
set rse=nothing
%>

<%
'案例分类
set rse4=server.CreateObject("adodb.recordset")
rse4.open "select * from cases_fl order by px_id asc",conn,1,1
while not rse4.eof

casesfl = casesfl & "<div class='dbh'><a title='"&(rse4("title"))&"' href='"&root&"/cases/?id="&rse4("id")&"' target='_blank'>"&(rse4("title"))&"</a></div>"&vbcrlf

rse4.movenext
wend
rse4.close
set rse4=nothing
%>

<%
'下载分类
set rse5=server.CreateObject("adodb.recordset")
rse5.open "select * from download_fl order by px_id asc",conn,1,1
while not rse5.eof

downloadfl = downloadfl & "<div class='dbh'><a title='"&(rse5("title"))&"' href='"&root&"/Download/?id="&rse5("id")&"' target='_blank'>"&(rse5("title"))&"</a></div>"&vbcrlf

rse5.movenext
wend
rse5.close
set rse5=nothing
%>

<%
dim id,rs,exec

exec="select * from about"
set rs=server.createobject("adodb.recordset") 
rs.open exec,conn,1,1
while not rs.eof

id = rs("id")

if rs.eof then
rs.close
set rs = nothing
conn.close
set conn = nothing
response.write "不存在些信息"
response.end
end if 

'企业信息
Kdesign_title = rs("title")
Kdesign_keyword = rs("keyword")
Kdesign_description = rs("description2")
id = rs("id")
Kdesign_body = rs("body")

%>
<!--#include file="../module/left2.asp" -->
<!--#include file="../module/hot.asp" -->
<%
Template="../template/about.htm" '模版
str=ReadFromUTF(Template,"utf-8") '编码
content=Replace(str,"{Kdesign_webtitle}",Kdesign_webtitle) '替换
content=Replace(content,"{Kdesign_title}",Kdesign_title)
content=Replace(content,"{Kdesign_keyword}",Kdesign_keyword)
content=Replace(content,"{Kdesign_description}",Kdesign_description)
content=Replace(content,"{Kdesign_logo}",Kdesign_logo)
content=Replace(content,"{Kdesign_enurl}",Kdesign_enurl)
content=Replace(content,"{Kdesign_cnurl}",Kdesign_cnurl)
content=Replace(content,"{id}",id)
content=Replace(content,"{Kdesign_body}",Kdesign_body)
content=Replace(content,"{Kdesign_copyright}",Kdesign_copyright)
content=Replace(content,"{Kdesign_share}",Kdesign_share)
content=Replace(content,"{Kdesign_beian}",Kdesign_beian)
content=Replace(content,"{Kdesign_dz}",Kdesign_dz)
content=Replace(content,"{Kdesign_tel}",Kdesign_tel)
content=Replace(content,"{Kdesign_fax}",Kdesign_fax)
content=Replace(content,"{Kdesign_email}",Kdesign_email)
content=Replace(content,"{Kdesign_nav}",Kdesign_nav)
content=Replace(content,"{Kdesign_nav2}",Kdesign_nav2)
content=Replace(content,"{Kdesign_leftnav}",Kdesign_leftnav)
content=Replace(content,"{Kdesign_hot}",Kdesign_hot)
content=Replace(content,"{Kdesign_flink}",Kdesign_flink)
content=Replace(content,"{aboutfl}",aboutfl)
content=Replace(content,"{newsfl}",newsfl)
content=Replace(content,"{casesfl}",casesfl)
content=Replace(content,"{shopfl}",shopfl)
content=Replace(content,"{downloadfl}",downloadfl)
content=Replace(content,"{eqq}",eqq)
content=Replace(content,"{root}",root)


Filen="../about/"&id&".html" '静态存放位置
Call WriteToUTF(content,Filen) '生成静态页
If Not Err Then Response.Write "<a href='"&root&"/about/"&id&".html' target='_blank'>about/"&id&".html</a>...生成成功！</br>"





Kdesign_leftnav = ""
Kdesign_eleftnav = ""
Kdesign_hot = ""
Kdesign_ehot = ""

rs.movenext
wend
rs.close
set rs=nothing
%>

<%
Function ReadFromUTF(TempString,CharSet) 'TempString为要读取的模版文件路径；Charset是编码
Dim str
Set stm=server.CreateObject("adodb.stream")
stm.Type=2
stm.Mode=3
stm.Charset=CharSet
stm.Open
stm.loadfromfile Server.MapPath(TempString)
str=stm.readtext
stm.Close
Set stm=Nothing
ReadFromUTF=str
End Function

Function WriteToUTF(content,Filen) '将替换后的内容写入HTML文档,content为替换后的字符串,Filen为生成的文件名
Set objStream=Server.CreateObject("ADODB.Stream")
    With objStream
    .Open
    .Charset="utf-8" '编码，这里你可以改成任何编码
    .Position=objStream.Size
    .WriteText=content '模版+数据 写入内容
    .SaveToFile server.mappath(Filen),2 '生成文件路径
    .Close
    End With
Set objStream=Nothing
End Function

Function eReadFromUTF(TempString,CharSet) 'TempString为要读取的模版文件路径；Charset是编码
Dim str
Set stm=server.CreateObject("adodb.stream")
stm.Type=2
stm.Mode=3
stm.Charset=CharSet
stm.Open
stm.loadfromfile Server.MapPath(TempString)
str=stm.readtext
stm.Close
Set stm=Nothing
eReadFromUTF=str
End Function

Function eWriteToUTF(content,Filen) '将替换后的内容写入HTML文档,content为替换后的字符串,Filen为生成的文件名
Set objStream=Server.CreateObject("ADODB.Stream")
    With objStream
    .Open
    .Charset="utf-8" '编码，这里你可以改成任何编码
    .Position=objStream.Size
    .WriteText=content '模版+数据 写入内容
    .SaveToFile server.mappath(Filen),2 '生成文件路径
    .Close
    End With
Set objStream=Nothing
End Function
%>