<%
function genre_view(vg)
	select case lcase(vg)
	case "real"
	  genre_view="<img src=images/video/ico_rp.gif border=0 align=absmiddle alt='Real Player 格式'>"
	case "qt"
	  genre_view="<img src=images/video/ico_mov.gif border=0 align=absmiddle alt='Quick Time 格式'>"
	case else
	  genre_view="<img src=images/video/ico_wmp.gif border=0 align=absmiddle alt='Media Player 格式'>"
	end select
end function
function type_view(tv)
    select case lcase(tv)
    case "music"
      type_view="歌曲"
    case "mtv"
      type_view="MTV"
    case else
      type_view="影片"
    end select
end function
%>
<table border=0 cellspacing=0 cellpadding=0 width='100%'>
<tr>
<td height=27 background='images/index/video_bg.gif'>
  <table border=0 cellspacing=0 cellpadding=0 width='100%'>
  <tr>
  <td align=left width=124><img src='images/index/video_left.gif' border=0></td>
  <td align=right>
    <table border=0>
    <tr>
    <td><img src='skin/<%response.write joekoe_cms.web_skin%>/small/h_video.gif' border=0 align=absmiddle>&nbsp;&nbsp;<a href='video_list.asp?action=istop' target=_blank>推荐视频</a></td>
    <td width=10></td>
    <td><img src='skin/<%response.write joekoe_cms.web_skin%>/small/h_video.gif' border=0 align=absmiddle>&nbsp;&nbsp;<a href='video_list.asp?action=ishot' target=_blank>热门视频</a></td>
    <td width=10></td>
    <td><img src='skin/<%response.write joekoe_cms.web_skin%>/small/h_video.gif' border=0 align=absmiddle>&nbsp;&nbsp;<a href='video_list.asp?action=isfree' target=_blank>免费视频</a></td>
    <td width=10></td>
    <td><img src='skin/<%response.write joekoe_cms.web_skin%>/small/h_video.gif' border=0 align=absmiddle>&nbsp;&nbsp;<a href='video_list.asp?action=all' target=_blank>所有视频</a></td>
    </tr>
    </table>
  </td>
  <td align=right><a href='video.asp' target=_blank><img src='images/index/video_more.gif' border=0></a></td>
  </tr>
  </table>
</td>
</tr>
</table>
<table border=0 cellspacing=0 cellpadding=0 width='100%'>
<tr align=center>
<td width='43%'>
<%
oid=0
sql="select top 1 id,name,types,genre,lang,star,emoney,counter,remark,pic from video where hidden=1 and star=5 and pic='' order by id desc"
set rs=joekoe_cms.exec(sql,1)
if not rs.eof then
  id=rs("id")
  oid=id
  topic=rs("name")
%>
  <table border=0 cellspacing=0 cellpadding=2 width='100%'>
  <tr align=center>
  <td width='35%'><%response.write pic_fk(rs("pic"),1,"video_view.asp?id="&id)%></td>
  <td width='65%'>
    <table border=0 width='100%' class=tf>
    <tr><td><b><a href='video_view.asp?id=<%response.write id%>' alt='<%response.write topic%>'><%response.write joekoe_cms.code_html(topic,1,13)%></a></b></td></tr>
    <tr><td>类型：<%response.write type_view(rs("types"))%>&nbsp;&nbsp;<%response.write replace(genre_view(rs("genre")),"{$picurl}","images/video/")%>&nbsp;&nbsp;语种：<%response.write rs("lang")%></td></tr>
    <tr><td>推荐星级：<img src='images/down/star<%response.write int(rs("star"))%>.gif' border=0></td></tr>
    <tr><td><%response.write web_dim(9)%>：<font class=red2><%response.write int(rs("emoney"))%></font>　人气：<font class=red><%response.write int(rs("counter"))%></font></td></tr>
    <tr><td class=bw>介绍：<%response.write joekoe_cms.code_html(rs("remark"),1,20)%></td></tr>
    </table>
  </td>
  </tr>
  </table>
<%
end if
rs.close
%>
</td>
<td width='57%'>
  <table border=0 cellspacing=1 cellpadding=0 width='100%'>
  <tr height=3><td width='50%'></td><td width='50%'></td></tr>
<%
i=0
sql="select top 4 id,name,types,genre,lang,star,emoney,counter,remark,pic from video where hidden=1 and star=5 and id<>"&oid&" and pic='' order by id desc"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
  id=rs("id")
  topic=rs("name")
  if i mod 2=0 then response.write vbcrlf&"  <tr>"
%>
  <td>
    <table border=0 cellspacing=0 cellpadding=2 width='100%'>
    <tr align=center>
    <td width='35%'><%response.write pic_fk(rs("pic"),5,"video_view.asp?id="&id)%></td>
    <td width='65%'>
      <table border=0 width='100%'>
      <tr><td><b><a href='video_view.asp?id=<%response.write id%>' alt='<%response.write topic%>'><%response.write joekoe_cms.code_html(topic,1,13)%></a></b></td></tr>
      <tr><td>星级：<img src='images/down/star<%response.write int(rs("star"))%>.gif' border=0></td></tr>
      <tr><td><%response.write web_dim(9)%>：<font class=red2><%response.write int(rs("emoney"))%></font>　人气：<font class=red><%response.write int(rs("counter"))%></font></td></tr>
      </table>
    </td>
    </tr>
    </table>
  </td>
<%
  if i+1 mod 2=0 then response.write vbcrlf&"  </tr>"
  if i=1 then response.write vbcrlf&"  <tr><td height=1></td></tr>"
  rs.movenext
  i=i+1
loop
rs.close
%>
  </table>
</td>
</tr>
</table>
<% call web_branch(0) %>
<table border=0 cellspacing=0 cellpadding=0 width='100%'>
<tr><td height=5></td></tr>
</table>