<!--#include file="Inc/Consts.inc" -->
<!--#include file="Inc/NoSQL.Asp" -->
<!--#include file="Inc/common.Asp" -->
<!--#include file="Inc/strfunc.Asp" -->
<!--#include file="Inc/sharefunc.Asp" -->
<!--#include file="Inc/profunc.Asp" -->
<!--#include file="Inc/aboutfunc.Asp" -->
<!--#include file="Inc/newsfunc.Asp" -->
<%
' 文件名称:NewsView.asp 2011-08-12 13:30:06
' Ss简单网站管理系统-开源版 
'晴天设计www.xxzwz.com
Dim ID,rs,sql
Dim Seokeywords,SeoDescription,SortID,SortPath,Content,newscontent
Dim templateurl :templateurl=SysRootDir&templatepath
Call SiteInfo()
If ISHTML = 1 Then
    Response.expires = 0
    Response.expiresabsolute = Now() - 1
    Response.addHeader "pragma", "no-cache"
    Response.addHeader "cache-control", "private"
    Response.CacheControl = "no-cache"
End If
ID=trim(request.QueryString("ID"))
if ID="" or not isnumeric(ID) then Call Alert("参数错误,ID Error!","b-1"):response.End()
    sql = "select NewsName,SeoKeywords,SeoDescription,Content,SortID,SortPath from ["&Datapre&"_News] where ViewFlag and ID="&ID
    set rs=db(sql,2)
	if rs.eof then Call Alert("参数错误,ID Error!","b-1"):response.End()
	 SortID=rs("SortID")
	 SortPath=rs("SortPath")
	 Content=rs("Content")
    If rs("SeoKeywords") <> "" Then
        SeoKeywords = rs("SeoKeywords")
    Else
        SeoKeywords = rs("NewsName")
    End If
    If rs("SeoDescription") <> "" Then
        SeoDescription = rs("SeoDescription")
    Else
        SeoDescription = rs("NewsName")
    End If
    SeoTitle = rs("NewsName")
rs.Close:Set rs = Nothing
newscontent="<h1 class=""newsdetail-title"">"&SeoTitle&"</h1><div>"&Content&"</div>"
Dim HeaderString,FooterString,LeftString,NewsViewString
HeaderString=FileSetTemplate("Head.html")
HeaderString=Replace(HeaderString,"$SiteLogo$",SiteLogo,1,1)
HeaderString=Replace(HeaderString,"$bannerpic$",bannerpic(3),1,1)
HeaderString=Replace(HeaderString,"$MainMenu$",MainMenu(3),1,1)
HeaderString=Replace(HeaderString,"$ProMenu$",ProMenu(0),1,1)
HeaderString=Replace(HeaderString,"$aboutlist$",aboutlist(),1,1)
HeaderString=Replace(HeaderString,"$NewsMenu$",NewsMenu(0),1,1)
LeftString=FileSetTemplate("Left.html")
LeftString=Replace(LeftString,"$searcher$",searcher,1,1)
LeftString=Replace(LeftString,"$leftcontact$",replace(replace(leftcontact,"$Address$",Address),"$Email$",Email))
NewsViewString=FileSetTemplate("NewsView.html")
NewsViewString=Replace(NewsViewString,"$Header$",HeaderString)
NewsViewString=Replace(NewsViewString,"$Left$",LeftString)
NewsViewString=Replace(NewsViewString,"$SeoTitle$",SeoTitle)
NewsViewString=Replace(NewsViewString,"$SiteTitle$",SiteTitle,1,1)
NewsViewString=Replace(NewsViewString,"$Keywords$",SeoKeywords,1,1)
NewsViewString=Replace(NewsViewString,"$copyright$",copyright,1,1)
NewsViewString=Replace(NewsViewString,"$Descriptions$",SeoDescription,1,1)
NewsViewString=Replace(NewsViewString,"$getlocation$",getlocation("NewsSort",SortID,SortPath,"NewsList",NewSortName),1,1)
NewsViewString=Replace(NewsViewString,"$NewsMenu$",NewsMenu(SortID),1,1)
NewsViewString=Replace(NewsViewString,"$newscontent$",newscontent,1,1)
NewsViewString=Replace(NewsViewString,"$HTMLName$",HTMLName)
NewsViewString=Replace(NewsViewString,"$templateurl$",templateurl)

Call PrintText(NewsViewString)


' 文件名称:NewsView.asp 2011-08-12 13:30:06
' Ss简单网站管理系统-开源版 
'晴天设计www.xxzwz.com
%>