<!-- #include file="include/con_news.asp" -->
<%
dim id
id=trim(request.querystring("id"))
if not(isnumeric(id)) then
  call format_redirect("news.asp")
end if
%>
<!-- #include file="include/jk_review.asp" -->
<!-- #include file="include/jk_ubb.asp" -->
<%
dim username,topic,word,tim,counter,comto,pic,ispic,cod,tt
sql="select top 1 c_id,s_id,username,topic,word,tim,counter,comto,pic,ispic,cod from news where hidden=1 and id="&id
set rs=joekoe_cms.exec(sql,1)
if rs.eof then
  rs.close
  call format_redirect("news.asp")
end if
cid=rs("c_id")
sid=rs("s_id")
username=rs("username")
topic=rs("topic")
word=rs("word")
tim=rs("tim")
counter=rs("counter")
ispic=rs("ispic")
comto=rs("comto")
pic=rs("pic")
cod=rs("cod")
rs.close

cname="新闻浏览"
sname=""
if cint(cid)>0 then
  if cint(sid)>0 then
    sql="select top 1 jk_class.c_name,jk_sort.s_name from jk_sort inner join jk_class on jk_sort.c_id=jk_class.c_id where jk_sort.c_id="&cid&" and jk_sort.s_id="&sid
  else
    sql="select top 1 c_name from jk_class where c_id="&cid
  end if
  set rs=joekoe_cms.exec(sql,1)
  if not rs.eof then
    cname=rs("c_name")
    if sid>0 then sname=rs("s_name")
    tit=cname&"（"&sname&"）"
  end if
  rs.close
end if

tit=cname
if sname<>"" then tit=tit&"（"&sname&"）"

call web_head(0,0,3,0,0)
call news_load(0,0,0)
'----------------------------中间 开始----------------------------
if int(cod)=1 then word=llcenter_n(4,2)&code_jk(word)
tim=joekoe_cms.time_type(tim,1)
topic=joekoe_cms.code_html(topic,1,0)
comto=joekoe_cms.code_html(comto,1,0)

dim id1,topic1,id2,topic2
id1=0
topic1=""
id2=0
topic2=""
sql="select top 1 id,topic from news where hidden=1 and id<"&id&" order by id desc"
set rs=joekoe_cms.exec(sql,1)
if not rs.eof then
  id1=rs(0)
  topic1=rs(1)
end if
rs.close
sql="select top 1 id,topic from news where hidden=1 and id>"&id&" order by id"
set rs=joekoe_cms.exec(sql,1)
if not rs.eof then
  id2=rs(0)
  topic2=rs(1)
end if
rs.close

response.write vbcrlf&web_left(4)
response.write vbcrlf&news_view1(id,topic,tim,comto,pic,ispic)
response.write "<font id=""font_word"" class=htd style=""font-size:14px; font-family:宋体, Verdana, Arial, Helvetica, sans-serif;"">"&word&"</font>"
response.write vbcrlf&news_view2(id,topic,counter,username,id1,topic1,id2,topic2)
response.write vbcrlf&news_bar_top("相关评论",0,1,"")
call review_type(n_sort,id,"news_view.asp?id="&id,1,username)
response.write vbcrlf&news_bar_end("",0)

call web_center(0)
call news_left("hot",10,10,"新闻排行")
call news_left("good",10,10,"推荐新闻")
response.write vbcrlf&llright(4)
response.write vbcrlf&web_right()
call joekoe_cms.exec("update news set counter=counter+1 where id="&id,0)
'----------------------------中间 结束----------------------------
call news_end()
call web_end(0,0)

%>