⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 news_view.asp

📁 Art2008 CMS是一款具有强大的功能的基于ASP语言的网站管理软件
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file = admin_conn.asp -->
<!--#include file = admin/titleb.asp -->

<%
nextpage_string=trim(config("nextpage")) '这个分页符已在配置中设置。
page_css=trim(config("page_css"))  '分页的样式,字符型
page=chkhtm(trim(Request("page")))  '文章的页数
if page="" or not isNumeric(page) then  page=0 '空页数或不是数字时,默认是第一页.
page=clng(page)
news_Pay=request.QueryString("news_Pay")
'豪气冲天--增加结束

newsid=chkhtm(trim(Request("newsid")))
if newsid="" then newsid=chkhtm(trim(Request("id")))
id=newsid
if newsid="" then 
  Response.Write "<BR><BR><BR><center>参数不正确</center>"
  response.end  
end if

if (not isNumeric(newsid)) then
  Response.Write "<Script Language=JavaScript>alert('ID参数错误或有非法字符或没指定参数,请勿随意提交数据!');location.href='/';</Script>"
  response.end  
end if

if (not isNumeric(page)) then
	page=""
end if

sql = "select * from news where id="&newsid
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
if rs.recordcount=0 then
  Response.Write "<BR><BR><Center>该新闻已经没有了,可能已经删除了!<BR><BR>"
  rs.close:set rs=nothing
  conn.close:set conn=nothing
  Response.end
end if
'取消了原静态输出部分.因为已在tatleb.asp里增加一个静态输出函数了. --豪-2006-9-14
title="<font color="&rs("titlecolor")&">"&trim(rs("title"))&"</font>"
webtitle=rs("title")
htitle=trim(rs("htitle"))
if htitle="" then htitle="&nbsp;"
dat=rs("time")
zz=trim(rs("zz"))
piczz=trim(rs("piczz"))        '2007_12_28  增加一个图片来源
hit=rs("hit")+1
hit=hit

    content=rs("content")
    lmid=rs("lm3")
    if lmid="0" or lmid="" then lmid=rs("lm2")
    if lmid="0" or lmid="" then lmid=rs("lm")

  
   if config("NewsWordKeyon")=1 then                     '080917___Art增加新闻内容关键字搜索功能
   NewsWordKey=","&config("NewsWordKey")&","
    aabb=split(NewsWordKey,",")
    for jjj=0 to ubound(aabb)
	content=replace(content,aabb(jjj),"<a target=_blank title='查看更多' href="&root_path&"so/?word="&aabb(jjj)&"><u>"&aabb(jjj)&"</u></a>")
    next
   end if
	
	dim	PaginationType,MaxCharPerPage
	MaxCharPerPage=rs("MaxCharPerPage")
    PaginationType=rs("PaginationType")

select case PaginationType     '20080702art增加自动分页功能
case 0    '不分页显示
	content=content

case 1    '自动分页显示

    Content=SplitNewsPage(Content,MaxCharPerPage)	

    call select_page_Css()
 
case 2    '手动分页显示
 
    call select_page_Css()

end select
 
   webxgnews=chkhtm(trim(rs("xgnews")))
    if webxgnews="" then webxgnews=left(rs("title"),5)
    if webxgnews<>"" then
	webxgnews=replace(webxgnews,"[","")
	webxgnews=replace(webxgnews,"]","")
    end if
 
   
url=trim(rs("url"))

conn.Execute = "update news set hit=hit+1 where ID="&newsid

if url<>"" then 
  response.write "<html><body><table cellpadding=0 cellspacing=0 border=0 width=95%  align=center><tr><td align=center bgcolor=FFFFFF height=50><font color=red>正在跳转中…………</font></td></tr></table></body></html>"
  'Response.Redirect url
  response.write "<meta http-equiv=""refresh"" content=""3;url="&url&""">"
  response.End
end if

	pp=""
	pp=pp&"&nbsp;"
	pp=pp&"<a name=pl><img src="&root_path&"images/bbstitle.gif></a><a href=#pl onclick='window.open("""&root_path&"newspl.asp?id="&rs("id")&""",""newsview"",""width=805,height=400,top=70,left=150,scrollbars=yes"" )'  title='"&rs("title")&"'>发表,查看评论(<script charset='gb2312' TYPE='text/javascript' language='javascript' src='"&root_path&"js-pls.asp?newsid="&rs("id")&" '></script>)</a>&nbsp;"
	pp=pp&"<img border='0' src='"&root_path&"images/print.gif' width='16' height='16'><a href='javascript:window.print()'>打印本页</a>&nbsp;"
	pp=pp&"<img border='0' src='"&root_path&"images/soso.gif'><a href="&root_path&"so/?word="&webxgnews&" target=_blank>搜索相关信息</a>"

         dim fddh   '08_09_01 增加$$浮动导航$$标签
         if config("fddh") =0 then
           fddh_x=config("fddh_x")
	       fddh_y=config("fddh_y")
	       fddh_body=config("fddh_body")
	
          fddh="<SCRIPT FOR=window EVENT=onload LANGUAGE=""javascript"">initAd();</SCRIPT>"
          fddh=fddh&"<script language=""javascript"">function initAd() {" & vbcrlf
          fddh=fddh&"           document.all.AdLayer.style.posTop = -250;" & vbcrlf
          fddh=fddh&"            document.all.AdLayer.style.visibility = 'visible'" & vbcrlf
          fddh=fddh& "           MoveLayer('AdLayer');}" & vbcrlf
          fddh=fddh& "        function MoveLayer(layerName) {" & vbcrlf
          fddh=fddh&"            var x = "& fddh_x &";" & vbcrlf
          fddh=fddh&"            var y = "& fddh_y &";" & vbcrlf
          fddh=fddh&"            var diff = (document.body.scrollTop + y - document.all.AdLayer.style.posTop)*.40;" & vbcrlf
          fddh=fddh&"            var y = document.body.scrollTop + y - diff;" & vbcrlf      
          fddh=fddh&"           eval(""document.all."" + layerName + "".style.posTop = y"");" & vbcrlf
          fddh=fddh&"            eval(""document.all."" + layerName + "".style.posLeft = x"");" & vbcrlf
          fddh=fddh&"            setTimeout(""MoveLayer('AdLayer');"", 10);}" & vbcrlf
          fddh=fddh&"          </script>" & vbcrlf
          fddh=fddh&"<div id=AdLayer style='position:absolute; z-index:20; visibility:hidden;'>"& fddh_body &"</div>"
       else
         fddh=""
       end if

	   dim digg
        digg="<SCRIPT src="""&root_path&"Include/digg/ArtDigg.js"" type=text/javascript></SCRIPT>"
        digg=digg&"<SCRIPT src="""&root_path&"Include/digg/prototype.js"" type=text/javascript></SCRIPT>"
        digg=digg&"<DIV class=endPageVote ><UL><LI>"
        digg=digg&"<div class=diggArea>"& vbcrlf
		digg=digg&"<div id=Art_ding"&newsid&" class=diggNum><SCRIPT language=javascript src="""&root_path&"Include/digg/digg.asp?id="&newsid&"&post=diggshow""></SCRIPT></div>"& vbcrlf
		digg=digg&"<div id=diggact"&newsid&" class=diggLink><a onclick=""javascript:Digg("&newsid&",'"&root_path&"');"" href=""javascript:void(0);"">顶一下</a></div>"& vbcrlf
        digg=digg&"</div>"& vbcrlf
		digg=digg&"</LI><LI>" & vbcrlf
	    digg=digg&"<div class=diggArea>"& vbcrlf
        digg=digg&"<div id=Art_down"&newsid&" class=diggNum><SCRIPT language=javascript src="""&root_path&"Include/digg/digg.asp?id="&newsid&"&post=downshow""></SCRIPT></div>"& vbcrlf
        digg=digg&"<div id=downact"&newsid&" class=diggLink><a onclick=""javascript:down("&newsid&",'"&root_path&"');"" href=""javascript:void(0);"">踩一脚</a></div>"& vbcrlf
        digg=digg&"</div>"& vbcrlf
		digg=digg&"</LI><LI>" & vbcrlf
	    digg=digg&"<div class=diggArea>"& vbcrlf
        digg=digg&"<div  class=diggimg><a href="""&root_path&""" target=_self><img src="""&root_path&"images/end_n_i4.gif"" alt=返回首页 width=""12"" height=""13"" border=""0""align=""absmiddle"" ></a></div>"& vbcrlf
        digg=digg&"<div  class=diggLink><a href="""&root_path&""" target=_self>返回首页</a></div>"& vbcrlf
        digg=digg&"</div>"& vbcrlf
	    digg=digg&"</LI></UL></DIV>"
        
		dim NewsPurview:NewsPurview="<script language=""javascript"" src="""&root_path&"js_news_read.asp?news_id="&newsid&"&lm_id="&lmid&"&news_Pay="&news_Pay&"""></script>"

sql2 = "select * from lm where mb<>'' and  id="&clng(lmid)
Set rs2 = Server.CreateObject("ADODB.RecordSet")
rs2.Open sql2,conn,1,1
if rs2.recordcount<>0 then

lm=rs2("lm")&rs2("lm2")&rs2("lm3")
mbid=rs2("mb")

ClassKeywords=rs2("ClassKeywords")
ClassDescription=rs2("ClassDescription")
if ClassKeywords="" then ClassKeywords=setting("sitekey")
if ClassDescription="" then ClassDescription=setting("sitedes")

if piczz="" then piczz="不详"

sql3 = "select * from newsmb where id="&mbid
Set rs3 = Server.CreateObject("ADODB.RecordSet")
rs3.Open sql3,conn,1,1
if htitle="" then htitle="&nbsp;"
if rs3.recordcount<>0 then
  updown=rs3("updown")
  Comment=rs3("pl")
  plfb=rs3("plfb")
  nr=NewsPurview&rs3("mid")
  
  
  if Comment=1 then ppll="<BR><hR size=1><script language='javascript' src='js_news_pl.asp?id="&id&"&form="&plfb&"'></script>"
  
  	Set rs4 = Server.CreateObject("ADODB.RecordSet")   '廖2008-6-1新增,页头页尾调用开始
		rs4.Open "select * from [config]",conn,1,1
		if rs4.recordcount<>0 then
		  top=rs4("top")
		  down=rs4("down")
		  nr=replace(nr,"$$通用页头$$",top)
		  nr=replace(nr,"$$通用页尾$$",down)
		rs4.close
		set rs4=nothing 
		end if        '廖2008-6-1新增,页头页尾调用结束  

 
  nr=replace(nr,"$$浮动导航$$",fddh)   '08_09_01 增加$$浮动导航$$标签
  nr=replace(nr,"$$Digg$$",digg)
  nr=replace(nr,"$$路径$$",lmpath(newsid))  '豪---取消上面一句,改为这一句.
  nr=replace(nr,"$$页标题$$",webtitle)  '豪--增加
  nr=replace(nr,"$$副标题$$",htitle)
  nr=replace(nr,"$$标题$$",title)
  nr=replace(nr,"$$栏目名$$",lm)
  nr=replace(nr,"$$时间$$",dat)
  nr=replace(nr,"$$访问量$$",hit)
  nr=replace(nr,"$$内容$$",content)
  nr=replace(nr,"$$来源$$",zz)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -