<!-- #include file="include/config.asp" -->
<%
dim id
id=trim(request.querystring("id"))
if not(isnumeric(id)) then
  call format_redirect("index.asp")
end if
%>
<!-- #include file="../include/jk_page_view.asp" -->
<!-- #include file="../include/jk_review.asp" -->
<!-- #include file="../include/jk_ubb.asp" -->
<!-- #include file="../include/jk_keyes.asp" -->
<%
dim username,topic,word,tim,counter,comto,pic,ispic,cod,tt,tcolor,PaginationType,MaxCharPerPage,tmp,a_keyes
sql="select top 1 * from news where hidden=1 and id="&id
set rs=joekoe_cms.exec(sql,1)
if rs.eof then
  rs.close
  call format_redirect("index.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")
a_keyes=rs("keyes")
tcolor=rs("tcolor")
PaginationType=rs("PaginationType")
MaxCharPerPage=rs("MaxCharPerPage")
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
url1="list.asp?action=more&c_id="&cid
if sname<>"" then
tit2=sname
url2="list.asp?action=more&c_id="&cid&"&s_id="&sid
tit3="浏览:"&topic
else
tit2="浏览:"&topic
end if

call web_head(0,0,0,0,0)
'----------------------------左边 开始----------------------------
call news_left_sort(tit,0)
call news_left2("hot",cid,sid,10,20,"本类热门新闻")
call news_left2("good",cid,sid,10,20,"本类推荐新闻")
%>
<script type="text/javascript">
	<!--
	var M_Width = 185;
	var M_Height = 403;
	var M_ModuleID=10134;
	//-->
</script>
<script language="javascript" src="http://code.51link.com/memberdata/m12/12974/41130.js"></script>
<script language="javascript" src="http://code.51link.com/code.php"></script>
</script>
<%
'----------------------------左边 结束----------------------------
call web_center(0)
'----------------------------中间 开始----------------------------
 if int(cod)=1 then
    word=code_jk(word)
       else
    word=joekoe_cms.html_js(word)
  end if
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

dim about_up,about_down,about_print,turl1,turl2,n_pic
if ispic=true and pic<>"" and var_null(pic)<>"" then n_pic="<img src='"&pic_url(pic,0)&"' border=0 onload=""javascript:if(this.width>screen.width-0)this.width=screen.width-0"" style='margin-right: 1em; float: left'>"
 if n_pic="" then
 dim gg
   gg=vbcrlf&"<script type='text/javascript' src='"&joekoe_cms.web_path&"ads/ads_news.js'></script>"
  n_pic=vbcrlf&"<a border=0  onload=""javascript:if(this.width>screen.width-0)this.width=screen.width-0"" style='margin-right: 1em; float: left'>"&gg&"</a>"
end if
if topic1<>"" and var_null(topic1)<>"" then
   topic1=joekoe_cms.code_html(topic1,1,0)
   turl1="view.asp?id="&id1
else
   topic1="没有找到相关文章"
   turl1="#"
end if
if topic2<>"" and var_null(topic2)<>"" then
   topic2=joekoe_cms.code_html(topic2,1,0)
   turl2="view.asp?id="&id2
else
   topic2="没有找到相关文章"
   turl2="#"
end if
about_up="【<a href='"&turl1&"' title='"&topic1&"'>上篇文章</a>】"
about_down="【<a href='"&turl2&"' title='"&topic2&"'>下篇文章</a>】"
about_print="〖<a href='print.asp?id="&id&"' target=_blank>新闻打印</a>〗"
about_close="〖<a href=""javascript:self.close()"">关闭窗口</a>〗"
if var_null(tcolor)<>"" then topic="<font color="&tcolor&">"&topic&"</font>"
'tmp=cms_Skin.GetDB("news_view")
tmp=cms_skin.md(md_view)
tmp=Replace(tmp,"{$topic}",topic)
tmp=Replace(tmp,"{$comto}",comto)
tmp=Replace(tmp,"{$web_name}",joekoe_cms.web_name)
tmp=Replace(tmp,"{$tim}",joekoe_cms.time_type(tim,5))
tmp=Replace(tmp,"{$n_pic}",n_pic)
tmp=Replace(tmp,"{$remark}",ArticleContent())
tmp=Replace(tmp,"{$counter}",counter)
tmp=Replace(tmp,"{$username}",format_user_name(username,0,""))
tmp=Replace(tmp,"{$commend_friend}",commend_friend(tit,topic,"view.asp?id="&id))
tmp=Replace(tmp,"{$commend_err}",commend_err(tit,topic,id,n_sort,joekoe_cms.web_dir&"common/Err.asp?id="&id))
tmp=Replace(tmp,"{$tit_fir}","新闻")
tmp=Replace(tmp,"{$about_up}",about_up)
tmp=Replace(tmp,"{$about_down}",about_down)
tmp=Replace(tmp,"{$about_print}",about_print)
tmp=Replace(tmp,"{$about_close}",about_close)

call news_center_table("新闻浏览",vbcrlf&tmp,0,1,"")

'call news_center_table("新闻分类",sort_type("list.asp?action=more&",0,0),0,1,"")
'-------------------------------相关新闻--------------------- 
i=1  
dim a_topic,a_id,temp2  
if var_null(a_keyes)<>"" then  
sql="select top 6 id,topic from news where hidden=1 and "&sql_key(a_keyes,"keyes",1,"or")&" and id<>"&id&" order by id desc"  
set rs=joekoe_cms.exec(sql,1)  
if rs.eof then   
temp2=temp2&vbcrlf&"<td><font class=gray>没有相关新闻</font></td>"  
else   
do while not rs.eof  
a_topic=rs("topic")  
a_id=rs("id")  
temp2=temp2&vbcrlf&"<td width='50%' >"&img_skin(web_img_h)&"<a href='view.asp?id="&a_id&"' title='"&joekoe_cms.code_html(a_topic,1,0)&"'>"&joekoe_cms.code_html(a_topic,1,44)&"</a></td>"  
if i=2 then  
temp2=temp2&vbcrlf&"</tr><tr>"  
i=0  
end if  
rs.movenext  
i=i+1  
loop  
rs.close  
end if  
else   
temp2=temp2&vbcrlf&"<td><font class=gray>没有相关新闻</font></td>"  
end if  
tmp2="<table border=0 width='100%'><tr>"&temp2&"</tr></table>"  
'-----------------------------相关新闻-------------------------- 
call news_center_table("相关新闻",vbcrlf&tmp2,0,1,"") 
call news_center_table("相关评论",review_type(n_sort,id,joekoe_cms.web_path&"news/view.asp?id="&id,1,username),0,1,"")
call joekoe_cms.exec("update news set counter=counter+1 where id="&id,0)
'----------------------------中间 结束----------------------------
call news_end()
call web_end(0,0)
%>