<!-- #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_emoney.asp" -->
<!-- #include file="../include/jk_ubb.asp" -->
<!-- #include file="../include/jk_keyes.asp" -->
<%
dim username,topic,word,tim,counter,comto,author,cod,tt,power,emoney,tcolor,PaginationType,MaxCharPerPage,tmp,prview,a_keyes
sql="select top 1 * from article 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")
power=rs("power")
emoney=rs("emoney")
comto=rs("comto")
author=rs("author")
cod=rs("cod")
a_keyes=rs("keyes")
tcolor=rs("tcolor")
PaginationType=rs("PaginationType")
MaxCharPerPage=rs("MaxCharPerPage")
prview=rs("prview")
if var_null(prview)="" then prview="没有预览！"
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

page_power=""
call web_head(0,0,0,0,0)

'----------------------------左边 开始----------------------------
call article_left_sort(tit,0)
call article_left2("hot",cid,sid,10,22,"本类热门文章")
call article_left2("good",cid,sid,10,22,"本类推荐文章")
%>
<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)
'------------------------------------修改开始------------------------------------
page_power=power
dim dim_tmp,word1,word2,alt_mouse,art_num
art_num=200                                                    '预览字数
word2=""
word1=""
alt_mouse=""
if int(login_is_abate)>0 then
 alt_mouse="href='view.asp?id="&id&"&action=emoney' onclick=""javascript:return click_return('您是未过期的计时用户将不扣除！',1);"""
elseif int(login_emoney)<int(emoney) then
 alt_mouse="onclick=""javascript:return click_return('您现有 "&login_emoney&" "&joekoe_cms.web_unit&"，不足以支付 "&emoney&" "&joekoe_cms.web_unit&"！',1);"""
else
 alt_mouse="href='view.asp?id="&id&"&action=emoney' onclick=""javascript:return click_return('浏览此文章将扣除你 "&emoney&" "&joekoe_cms.web_unit&"！扣除后将不能恢复！ 你确定吗？',1);"""
end if
if action="emoney" then
 if int(login_is_abate)>0 then
  session("huzhu_art"&id)=true
 else 
  session("huzhu_art"&id)=emoney_note(power,emoney,n_sort,id,1,"list.asp?action=more&c_id="&cid&"&s_id="&sid)
 end if
end if
if page_power<>"" and instr("."&page_power&".","."&login_modep&".")<1 then
 word1="<center><font color=blue size=2><b>〖文章内容预览〗</b></font></center><br>"
 word=left(word,art_num)&"…………"
 word2="<br><br><center><font color=red>本文浏览权限：</font>"
 for i=0 to ubound(dim_user)
  dim_tmp=split(dim_user(i),":")
  if instr(page_power,i+1)>0 then word2=word2&dim_tmp(1)&" "
 next
 word2=word2&"<br>"
elseif int(emoney)>0 then
 if session("huzhu_art"&id)=false then
  word1="<center><font color=blue size=2><b>〖文章内容预览〗</b></font></center><br>"
  word=left(word,art_num)&"…………"
  word2="<br><br><center><font color=red>浏览本文需要支付（"&emoney&"）"&joekoe_cms.web_unit&""
  word2=word2&"，您现有（"&login_emoney&"）"&joekoe_cms.web_unit&"〖<a "&alt_mouse&">浏览全文</a>〗"
  word2=word2&"</font><br>"
 end if
end if
'------------------------------------修改结束------------------------------------ 
'----------------------------中间 开始----------------------------
if int(cod)=1 then word=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 article 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 article 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
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.md(md_view)
tmp=Replace(tmp,"{$topic}",topic)
tmp=Replace(tmp,"{$comto}",comto)
tmp=Replace(tmp,"{$author}",author)
tmp=Replace(tmp,"{$web_name}",joekoe_cms.web_name)
tmp=Replace(tmp,"{$tim}",joekoe_cms.time_type(tim,5))
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 article_bar_top("文章浏览",vbcrlf&tmp,"")
'call article_bar_top("文章分类",sort_type("list.asp?action=more&",0,0),"")
'------------------------------------------相关文章------------------------------------ 
i=1  
dim a_topic,a_id,temp2  
if var_null(a_keyes)<>"" then  
sql="select top 6 id,topic from article 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,42)&"</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 article_bar_top("相关文章",vbcrlf&tmp2,"") 
call article_bar_top("文章评论",review_type(n_sort,id,joekoe_cms.web_path&"article/view.asp?id="&id,1,username),"")
call joekoe_cms.exec("update article set counter=counter+1 where id="&id,0)
'----------------------------中间 结束----------------------------
call article_end()
call web_end(0,0)
%>
