<!-- #include file="include/con_photo.asp" -->
<%
dim id
id=trim(request.querystring("id"))
if not(isnumeric(id)) then
  call format_redirect("photo.asp")
end if
%>
<!-- #include file="include/jk_review.asp" -->
<!-- #include file="include/jk_emoney.asp" -->
<!-- #include file="include/jk_ubb.asp" -->
<%
dim username,name,remark,tim,counter,pic,tt,power,emoney
sql="select top 1 * from photo where hidden=1 and id="&id
set rs=joekoe_cms.exec(sql,1)
if rs.eof then
  rs.close
  call format_redirect("photo.asp")
end if
cid=rs("c_id")
sid=rs("s_id")
username=rs("username")
name=rs("name")
remark=rs("remark")
tim=rs("tim")
counter=rs("counter")
power=rs("power")
emoney=rs("emoney")
pic=rs("pic")
rs.close

tit="图片浏览"
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") 
    tit=tit&" - "&cname 
    if sid>0 then 
      sname=rs("s_name") 
      tit=topic 
    end if 
    tit=name 
  end if 
  rs.close 
end if 

page_power=power
call web_head(0,0,3,0,0)
call emoney_notes(power,emoney,n_sort,id,1,"photo_list.asp?c_id="&cid&"&s_id="&sid)
call photo_load(0,0,0)
'----------------------------中间 开始----------------------------
tim=joekoe_cms.time_type(tim,1)
name=joekoe_cms.code_html(name,1,0)

dim id1,name1,id2,name2
id1=0
name1=""
id2=0
name2=""
sql="select top 1 id,name from photo 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)
  name1=rs(1)
end if
rs.close
sql="select top 1 id,name from photo where hidden=1 and id>"&id&" order by id"
set rs=joekoe_cms.exec(sql,1)
if not(rs.eof) then
  id2=rs(0)
  name2=rs(1)
end if
rs.close

'response.write vbcrlf&photo_view1(id,name,joekoe_cms.time_type(tim,5),comto,author)
response.write pic_fk(pic,3,"")&"<font id=""font_remark"" class=htd style=""font-size:14px; font-family:宋体, Verdana, Arial, Helvetica, sans-serif;"">"&remark&"</font>"
response.write vbcrlf&photo_view2(id,name,counter,username,id1,name1,id2,name2)
'call photo_sort("photo_list.asp?",0,0,"图片分类")
response.write vbcrlf&photo_bar_top("图片评论",0)
call review_type(n_sort,id,"photo_view.asp?id="&id,1,username)
response.write vbcrlf&photo_bar_end("",0)

call joekoe_cms.exec("update photo set counter=counter+1 where id="&id,0)
'----------------------------中间 结束----------------------------
call photo_end()
call web_end(0,0)

'****************************************************
' Joekoe CMS 1.2 Free      Power by Joekoe.com
' Email: cms@joekoe.com , service@joekoe.com
' Web: http://www.joekoe.com , http://www.topv.com
' Copyright (C) 2004 Joekoe.com All Rights Reserved.
'****************************************************
%>