<!--#include file = admin_conn.asp -->
<!--#include file = language.asp -->
<!--#include file = titleb.asp -->

<%

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('ＩＤ参数错误或有非法字符或没指定参数，请勿随意提交数据！');location.href='/';</Script>"
  response.end  
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
title=rs("title")
title="<font color="&rs("titlecolor")&">"&trim(title)&"</font>"
webtitle=rs("title")
htitle=trim(rs("htitle"))
if htitle="" then htitle="&nbsp;"
dat=rs("time")
zz=trim(rs("zz"))
hit=rs("hit")+1
hit=hit
webxgnews=rs("xgnews")
if webxgnews="" then webxgnews=left(rs("title"),5)
webxgnews=replace(webxgnews,"[","")
webxgnews=replace(webxgnews,"]","")
Set xgrs = Server.CreateObject("ADODB.RecordSet")
xgrs.Open "select top 10 * from [news] where ( title like '%"&webxgnews&"%' or xgnews like '%"&webxgnews&"%' ) and id<>"&chkhtm(trim(Request("newsid")))&" order by id desc",conn,1,1
while not xgrs.eof
   xgnews=xgnews + "·<a href=news_view.asp?newsid="&xgrs("id")&" title='"&xgrs("title")&"'>"&xgrs("title")&"</a><BR>"
xgrs.movenext
wend
if xgrs.recordcount=0 then xgnews="没有相关信息"

content=rs("content")
content=replace(content,"]","］")
content=replace(content,"[","［")

  if config("ggso")="1" then
  	content=content&GoogleSo()
  end if
  
  if config("xuasGG")="1" then
	nrGG="<center><iframe name='xGGI1' src='http://www.xuas.com/Other/GoogleAD/Google468x60-FFFFFF.asp' marginwidth='1' marginheight='1' height='60' width='468' scrolling='no' border='0' frameborder='0'></iframe></center><BR><BR>"
  	if config("xuasGGWZ")="1" then
		content=nrgg+content
	elseif config("xuasGGWZ")="2" then
		content=content+nrgg
  	end if
  end if
  

  
  
if pl()=1 then ppll="<BR><hR size=1><script language='javascript' src='js_news_pl.asp?id="&id&"'></script>"
url=trim(rs("url"))

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

if url<>"" then 
  Response.Redirect url
end if

pp=""
pp=pp&"<table bgcolor=#ffffff>"
pp=pp&"<form method=get action=http://www.google.cn/custom target=_blank><tr><td nowrap=nowrap valign=top align=left >"
pp=pp&"&nbsp;<input type=hidden name=q size=31 maxlength=255 value='"&webxgnews&"'></input>"
pp=pp&"<a name=pl><img src=images/bbstitle.gif></a><a href=#pl onclick='window.open(""NewsPL.asp?id="&rs("id")&""",""newsview"",""width=680,height=400,top=70,left=150,scrollbars=yes"" )'  title='"&rs("title")&"'>发表,查看评论</a>&nbsp;"
pp=pp&"<input type=image src=images/xgxx.gif name=sa value=搜索></input> "
pp=pp&"<img border='0' src='images/print.gif' width='16' height='16'><a href='javascript:window.print()'>打印本页</a>"
pp=pp&"<input type=hidden name=client value=pub-7709734864915288></input>"
pp=pp&"<input type=hidden name=forid value=1></input>"
pp=pp&"<input type=hidden name=ie value=GB2312></input>"
pp=pp&"<input type=hidden name=oe value=GB2312></input>"
pp=pp&"<input type=hidden name=cof value=GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:103;LW:437;L:http://www.xuas.com/images/001.jpg;S:http://www.google.com.cn;FORID:1;></input>"
pp=pp&"<input type=hidden name=hl value=zh-CN></input>"
pp=pp&"</td></tr></form></table>"
%>

<head>
<!--#include file = language.asp -->
<title><%=webtitle%></title>

</head>

<%



    lmid=rs("lm3")
     if lmid="0" or lmid="" then lmid=rs("lm2")
        if lmid="0" or lmid="" then lmid=rs("lm")
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")


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")
  nr=rs3("mid")
  nr=replace(nr,"$$路径$$",lmpath())
  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)
  nr=replace(nr,"$$评论$$",ppll)
  nr=replace(nr,"$$打印$$",pp)
  nr=replace(nr,"$$工具栏$$",pp)
  nr=replace(nr,"$$相关$$",xgnews)
  nr=replace(nr,"$$NEWSID$$",newsid)

  if updown=0 then
    nr=replace(nr,"$$上下条$$","")
  else
    Set rs4 = Server.CreateObject("ADODB.RecordSet")
    rs4.Open "select top 1 * from [news] where (lm2='"&lmid&"' or lm='"&lmid&"' or lm3='"&lmid&"') and id<"&newsid&" and sh=1 order by id desc",conn,1,1
    if rs4.recordcount<>0 then
	    uuu="上一条：<a href=news_view.asp?newsid="&rs4("id")&"><font color="&rs4("titlecolor")&">"&rs4("title")&"</font></a><BR>"
	else
	    uuu="上一条：已经没有了<BR>"
	end if
    Set rs5 = Server.CreateObject("ADODB.RecordSet")
    rs5.Open "select top 1 * from [news] where (lm2='"&lmid&"' or lm='"&lmid&"' or lm3='"&lmid&"') and id>"&newsid&" and sh=1 order by id asc",conn,1,1
    if rs5.recordcount<>0 then
	    uuu=uuu&"下一条：<a href=news_view.asp?newsid="&rs5("id")&"><font color="&rs5("titlecolor")&">"&rs5("title")&"</font></a>"
	else
	    uuu=uuu&"下一条：已经没有了"
	end if
    nr=replace(nr,"$$上下条$$",uuu)
    rs4.close
    set rs4=nothing
    rs5.close
    set rs5=nothing
  end if
  response.write nr

else
  response.write "<center><BR><BR><BR>模版设置不正确。"
end if 
rs3.close
set rs3=nothing
else
  Response.Write "<center><BR><BR><BR>此栏目模版设置不正确"
  mbid=1
end if

'rs.close
'set rs=nothing
rs2.close
set rs2=nothing

conn.close
set conn=nothing
%>
 
