📄 view.asp
字号:
<!-- #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" -->
<%
dim username,topic,word,tim,counter,comto,pic,ispic,cod,tt,tcolor,PaginationType,MaxCharPerPage,tmp
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")
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?c_id="&cid
if sname<>"" then
tit2=sname
url2="list.asp?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,12,"本类热门新闻")
call news_left2("good",cid,sid,10,12,"本类推荐新闻")
'----------------------------左边 结束----------------------------
call web_center(0)
'----------------------------中间 开始----------------------------
if int(cod)=1 then
word=code_jk(word)
else
word=html_put(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,n_pic
if ispic=true and pic<>"" and var_null(pic)<>"" then
n_pic="<tr><td align=center><img src='"&pic_url(pic,0)&"' border=0 onload=""javascript:if(this.width>"&max_w&")this.width="&max_w&";""></td></tr>"
end if
if topic1<>"" and var_null(topic1)<>"" then
about_up="<a href='view.asp?id="&id1&"' title='"&joekoe_cms.code_html(topic2,1,0)&"'>"&joekoe_cms.code_html(topic1,1,25)&"</a>"
else
about_up="<font class=gray>没有找到相关文章</font>"
end if
if topic2<>"" and var_null(topic2)<>"" then
about_down="<a href='view.asp?id="&id2&"' title='"&joekoe_cms.code_html(topic2,1,0)&"'>"&joekoe_cms.code_html(topic2,1,25)&"</a>"
else
about_down="<font class=gray>没有找到相关文章</font>"
end if
about_print="<a href='print.asp?id="&id&"' target=_blank>〖新闻打印〗</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)
call news_center_table("新闻浏览",vbcrlf&tmp,0,1,"")
'call news_center_table("新闻分类",sort_type("list.asp?",0,0),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)
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -