<!-- #include file="include/config.asp" -->
<!-- #include file="../include/jk_ubb.asp" -->
<!-- #include file="../include/jk_review.asp" -->
<!-- #include file="../include/jk_emoney.asp" -->
<%
dim id,v_width,v_height,vtit,emoney
id=trim(request.querystring("id"))
if not int_true(id) then
  call format_redirect("gallery.asp")
end if

dim  tmp1,body,name,pic,remark,username,counter,tim,istop,view_true
sql="select top 1 name,types,pic,remark,username,power,emoney,counter,tim,istop from gallery where hidden=1 and id="&id
set rs=joekoe_cms.exec(sql,1)
if rs.eof then
  rs.close
  call format_redirect("gallery.asp")
end if
name=rs("name")
types=rs("types")
pic=rs("pic")
remark=rs("remark")
username=rs("username")
page_power=rs("power")
emoney=rs("emoney")
counter=rs("counter")
tim=rs("tim")
istop=rs("istop")
rs.close

v_width=500
v_height=400

select case types
case "flash"
  n_sort="flash"
  vtit="精彩Flash"
%>
<!-- #include file="../style/data_sort_flash.asp" -->
<%
case "film"
  n_sort="film"
  vtit="精彩视频"
%>
<!-- #include file="../style/data_sort_film.asp" -->
<%
case else
  n_sort="gall"
  types="paste"
  vtit="精彩贴图"
%>
<!-- #include file="../style/data_sort_gall.asp" -->
<%
end select
tit="浏览"&vtit

call web_head(0,0,0,0,0)
call emoney_notes(page_power,emoney,n_sort,id,1,"../vouch/gallery.asp")
call vouch_load(1,0,0)
'----------------------------左边 开始----------------------------
call vouch_left_sort(vtit,0)
call vouch_left()
'----------------------------左边 结束----------------------------
call web_center(0)
'----------------------------中间 开始----------------------------
  call gallery_view()
'----------------------------中间 结束----------------------------
call vouch_end()
call web_end(0,0)

sub gallery_view()
dim id1,name1,id2,name2,turl1,turl2
id1=0
name1=""
id2=0
name2=""
sql="select top 1 id,name from gallery 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 gallery 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

if name1<>"" and var_null(name1)<>"" then
   name1=joekoe_cms.code_html(name1,1,14)
   turl1="gallery_view.asp?id="&id1
else
   name1="没有上篇"
   turl1="#"
end if
if name2<>"" and var_null(name2)<>"" then
   name2=joekoe_cms.code_html(name2,1,14)
   turl2="gallery_view.asp?id="&id2
else
   name2="没有下篇"
   turl2="#"
end if

  tmp1=vbcrlf&"<tr><td class=bg_td align=center height=40><font class=blue size=3><b>"&joekoe_cms.code_html(name,1,0)&"</b></font></td></tr>" & _
       vbcrlf&"<tr><td class=bg_td align=center>"
  select case types
  case "flash"
    tmp1=tmp1&vbcrlf&"<object classid=""clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"" codebase=""http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"" width='"&v_width&"' height='"&v_height&"'>" & _
       vbcrlf&"<param name=movie value='"&pic_url(pic,0)&"'>" & _
       vbcrlf&"<param name=quality value=high>" & _
       vbcrlf&"<embed src='"&pic_url(pic,0)&"' quality=high pluginspage=""http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"" type=""application/x-shockwave-flash"" width='"&v_width&"' height='"&v_height&"'></embed> " & _
       vbcrlf&"</object>"
  case "film"
    tmp1=vouch_film_view(pic,v_width,v_height)
  case else
    tmp1=tmp1&vbcrlf&"<img src='"&pic_url(pic,0)&"' border=0 onload=""javascript:if(this.width>"&v_width&")this.width="&v_width&";"" align=center alt='在新窗口中浏览此图片' onclick=""javascript:open_view('"&pic_url(pic,0)&"',1);"">"
  end select
    tmp1=tmp1&vbcrlf&"</td></tr>" & _
       vbcrlf&"<tr><td class=bg_td>" & _
       vbcrlf&"<table border=0 cellspacing=0 cellpadding=2 width='100%'>" & _
       vbcrlf&"<tr><td class=bg_td>&nbsp;"&img_skin(web_img_h)&"发布用户："&format_user_name(username,0,"")&"</td><td class=bg_td>"&img_skin(web_img_h)&"发布时间："&joekoe_cms.time_type(tim,5)&"</td><td class=bg_td>"&img_skin(web_img_h)&"浏览：<font class=red>"&counter&"</font> 人次</td></tr>" & _
       vbcrlf&"<tr><td class=bg_td>&nbsp;"&img_skin(web_img_h)&"<a href='javascript:;' onclick=""javascript:open_view('"&pic_url(pic,0)&"',1);"">新窗口中浏览</a></td><td class=bg_td>"&img_skin(web_img_h)&"欣赏：<FONT color=#ff6600>【<a href='"&turl1&"' title='浏览："&name1&"'>上篇推荐</a>】</font><FONT color=#009933>【<a href='"&turl2&"' title='浏览："&name2&"'>下篇推荐</a>】</font></td><td class=bg_td>"&img_skin(web_img_h)&""&commend_friend(tit,name,"gallery_view.asp?id="&id)&"</td></tr>" & _
       vbcrlf&"</table>" & _
       vbcrlf&"</td></tr>" & _
       vbcrlf&"<tr><td class=bg_td align=center>" & _
       vbcrlf&"  <table border=0 cellspacing=0 cellpadding=2 width='98%' class=tf>" & _
       vbcrlf&"  <tr><td class=bw>"&img_skin(web_img_h)&"相关说明："&code_jk(remark)&"</td></tr>" & _
       vbcrlf&"<tr><td class=bw><br><DIV align=center><SCRIPT language=Javascript src='../common/bookmark/bookmark.js'></SCRIPT></DIV></td></tr>" & _
       vbcrlf&"  </table>" & _
       vbcrlf&"</td></tr>"
 call vouch_center_table(tit,tmp1,1,"")
response.write ukong
tit="相关评论"
  tmp1=review_type(n_sort,id,joekoe_cms.web_path&"vouch/gallery_view.asp?id="&id,1,username)       
   call vouch_center_table(tit,tmp1,0,"")
response.write ukong
call joekoe_cms.exec("update gallery set counter=counter+1 where id="&id,0)
end sub

function vouch_film_view(npic,nwidth,nheight)
  tmp1=vbcrlf&"<tr><td class=bg_td align=center height=40><font class=blue size=3><b>"&joekoe_cms.code_html(name,1,0)&"</b></font></td></tr>" & _
       vbcrlf&"<tr><td class=bg_td align=center>"
  dim file_type
  file_type=right(npic,4)
  if instr(1,file_type,".")>0 then
    file_type=right(file_type,len(file_type)-instr(1,file_type,"."))
  else
    file_type="mms"
  end if
  file_type=lcase(file_type)
  if lcase(left(npic,3))="mms" then file_type="mms"
  select case file_type
  case "rm","ram","rmvb","avi"
    tmp1=tmp1&vbcrlf&"<object id=""video2"" classid=""clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"" width=530 height=400>" & _
         vbcrlf&"  <param name=""_ExtentX"" value=""11906"">" & _
         vbcrlf&"  <param name=""_ExtentY"" value=""8996"">" & _
         vbcrlf&"  <param name=""AUTOSTART"" value=""-1"">" & _
         vbcrlf&"  <param name=""SHUFFLE"" value=""0"">" & _
         vbcrlf&"  <param name=""PREFETCH"" value=""0"">" & _
         vbcrlf&"  <param name=""NOLABELS"" value=""0"">" & _
         vbcrlf&"  <param name=""SRC"" value="""&joekoe_cms.url_true(joekoe_cms.web_upload,npic)&""">" & _
         vbcrlf&"  <param name=""CONTROLS"" value=""ImageWindow"">" & _
         vbcrlf&"  <param name=""CONSOLE"" value=""Clip1"">" & _
         vbcrlf&"  <param name=""LOOP"" value=""0"">" & _
         vbcrlf&"  <param name=""NUMLOOP"" value=""0"">" & _
         vbcrlf&"  <param name=""CENTER"" value=""0"">" & _
         vbcrlf&"  <param name=""MAINTAINASPECT"" value=""0"">" & _
         vbcrlf&"  <param name=""BACKGROUNDCOLOR"" value=""#000000"">" & _
         vbcrlf&"  <embed src=""4.rpm"" type=""audio/x-pn-realaudio-plugin"" console=""Clip1"" controls=""ImageWindow"" width=530 height=400 autostart=""false""></embed>" & _
         vbcrlf&"</object>" & _
         vbcrlf&"<object id=""video1"" classid=""clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"" width=530 height=60>" & _
         vbcrlf&"  <param name=""_ExtentX"" value=""11906"">" & _
         vbcrlf&"  <param name=""_ExtentY"" value=""1588"">" & _
         vbcrlf&"  <param name=""AUTOSTART"" value=""-1"">" & _
         vbcrlf&"  <param name=""SHUFFLE"" value=""0"">" & _
         vbcrlf&"  <param name=""PREFETCH"" value=""0"">" & _
         vbcrlf&"  <param name=""NOLABELS"" value=""0"">" & _
         vbcrlf&"  <param name=""CONTROLS"" value=""ControlPanel,StatusBar"">" & _
         vbcrlf&"  <param name=""CONSOLE"" value=""Clip1"">" & _
         vbcrlf&"  <param name=""LOOP"" value=""0"">" & _
         vbcrlf&"  <param name=""NUMLOOP"" value=""0"">" & _
         vbcrlf&"  <param name=""CENTER"" value=""0"">" & _
         vbcrlf&"  <param name=""MAINTAINASPECT"" value=""0"">" & _
         vbcrlf&"  <param name=""BACKGROUNDCOLOR"" value=""#000000"">" & _
         vbcrlf&"  <embed type=""audio/x-pn-realaudio-plugin"" console=""Clip1"" controls=""ControlPanel,StatusBar"" width=530 height=60 autostart=""false""></embed>" & _
         vbcrlf&"</object>"
  case "asf","wmv","mpg","mpeg","wma","asx","mms"
    tmp1=tmp1&vbcrlf&"<object id=""Joekoe.com.mPlayer"" width=544 height=440 classid=""CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6"" type=""application/x-oleobject"" standby=""正在载入 Windows Media Player 播放流 ..."">" & _
         vbcrlf&"  <param name=""URL"" value="""&joekoe_cms.url_true(joekoe_cms.web_upload,npic)&""">" & _
         vbcrlf&"  <param name=""Album"" value=""Joekoe.com""/>" & _
         vbcrlf&"  <param name=""rate"" value=""1"">" & _
         vbcrlf&"  <param name=""balance"" value=""0"">" & _
         vbcrlf&"  <param name=""currentPosition"" value=""0"">" & _
         vbcrlf&"  <param name=""defaultFrame"" value="""">" & _
         vbcrlf&"  <param name=""playCount"" value=""100"">" & _
         vbcrlf&"  <param name=""autoStart"" value=""-1"">" & _
         vbcrlf&"  <param name=""currentMarker"" value=""0"">" & _
         vbcrlf&"  <param name=""invokeURLs"" value=""-1"">" & _
         vbcrlf&"  <param name=""baseURL"" value="""">" & _
         vbcrlf&"  <param name=""volume"" value=""100"">" & _
         vbcrlf&"  <param name=""mute"" value=""0"">" & _
         vbcrlf&"  <param name=""uiMode"" value=""full"">" & _
         vbcrlf&"  <param name=""stretchToFit"" value=""0"">" & _
         vbcrlf&"  <param name=""windowlessVideo"" value=""0"">" & _
         vbcrlf&"  <param name=""enabled"" value=""-1"">" & _
         vbcrlf&"  <param name=""enableContextMenu"" value=""0"">" & _
         vbcrlf&"  <param name=""fullScreen"" value=""0"">" & _
         vbcrlf&"  <param name=""SAMIStyle"" value="""">" & _
         vbcrlf&"  <param name=""SAMILang"" value="""">" & _
         vbcrlf&"  <param name=""SAMIFilename"" value="""">" & _
         vbcrlf&"  <param name=""captioningID"" value="""">" & _
         vbcrlf&"</object>"
  end select
  vouch_film_view=tmp1  
end function
%>