<%
'----------影院列表调用----------
'c_num 片名字数
'b_num 主演字数
't_num 简介字数
sub video_more(c_num,b_num,t_num)
  dim types,remark,role,sql_ads
  dim sqladd,mhead,nums
  dim sea_type,sea_lang,sea_genre,keyword,sql_end
  mhead=tit
  nums=nummer
  sqladd=""
  sql_end=""
  sql_ads=" order by id desc"
  select case action
  case "all"
    sql_ads=sql_ads
  case "ishot"
    sql_ads=" order by counter desc,id desc"
  case "istop"
    sqladd=sqladd&" and star=5"
  case "isfree"
    sqladd=sqladd&" and isfree=1"
  case "search"
    if int(cid)>0 then
      sqladd=sqladd&" and c_id="&cid
      pageurl=pageurl&"c_id="&cid&"&"
    end if
    sea_type=joekoe_cms.code_form(request.querystring("types"))
    sea_lang=joekoe_cms.code_form(request.querystring("lang"))
    sea_genre=joekoe_cms.code_form(request.querystring("genre"))
    keyword=code_search(request.querystring("keyword"))
    sql_end=sql_key(keyword,"name",2,"all")
    if sea_type="mtv" or sea_type="music" or sea_type="film" then
	  sqladd=sqladd&" and types='"&sea_type&"'"
	end if
    if sea_genre="wmp" or sea_genre="qt" or sea_genre="real" then
	  sqladd=sqladd&" and genre='"&sea_genre&"'"
	end if
	if sea_lang="汉语" or sea_lang="粤语" or sea_lang="英语" or sea_lang="日语" or sea_lang="韩语" or sea_lang="法语" or sea_lang="其它" then
	  sqladd=sqladd&" and lang='"&sea_lang&"'"
	end if
    if sql_end<>"" then
      sqladd=sqladd&" and "&sql_end
      sql_end=""
	end if
    pageurl=pageurl&"types="&server.urlencode(sea_type)&"&lang="&server.urlencode(sea_lang)&"&genre="&server.urlencode(sea_genre)&"&keyword="&server.urlencode(keyword)&"&"
  case else
    if int(cid)>0 then
      sqladd=sqladd&" and c_id="&cid
      pageurl=pageurl&"c_id="&cid&"&"
    end if
    mhead=cname
  end select
  sql="select count(id) from video where hidden=1"&sqladd
  set rs=joekoe_cms.exec(sql,1)
  rssum=rs(0)
  rs.close
  call format_pagecute()
  sql="select top "&viewpage*nummer&" id,pic,name,types,star,counter,emoney,power,role,genre,lang,remark from video where hidden=1"&sqladd&sql_ads
  call joekoe_cms.exec("",-1)
  rs.open sql,conn,1,1
  if cint(viewpage)>1 then rs.move (viewpage-1)*nummer
  if int(viewpage*nummer)>int(rssum) then nums=nummer-(viewpage*nummer-rssum)
  response.write video_page(rssum,mhead,viewpage,thepages,pageurl,0)
  if rssum=0 then
    response.write vbcrlf&"<tr><td colspan=2 height=100 align=center class=red>当前没有影片！</td></tr>"
  else
    for i=1 to nums
      types=rs("types")
      types=type_view(types)
      remark=rs("remark")
      remark=joekoe_cms.code_html(remark,1,t_num)
      role=joekoe_cms.code_html(rs("role"),1,b_num)
	  response.write vbcrlf&video_view_body(c_num,rs("id"),int(rs("counter")),int(rs("emoney")),rs("power"),int(rs("star")),remark,rs("lang"),types,rs("name"),role,rs("genre"),rs("pic"))
      rs.movenext
    next
  end if
  response.write video_page(rssum,mhead,viewpage,thepages,pageurl,1)
  rs.close
end sub

'----------影院分页调用----------
function video_page(vsum,vhead,vp,vtp,vpu,om)
if om=0 then
  response.write vbcrlf&"<table width='98%' border=0 cellspacing=0 cellpadding=0 align=center>"
  response.write vbcrlf&"<tr><td align=right><img src='"&pic_dir&"center_list.gif' border=0></td></tr>"
  response.write vbcrlf&"</table>"
  response.write vbcrlf&"<table width='98%' border=0 cellspacing=0 cellpadding=0 align=center>"
  response.write vbcrlf&"<tr><td>"
  response.write vbcrlf&"<table border=0 width='98%'>"
  response.write vbcrlf&"<tr valign=top><td width='25%'></td><td width='75%'></td></tr>"
end if
  response.write vbcrlf&"<tr>"
  response.write vbcrlf&"<td align=center>共 <font class=red>"&vsum&"</font> 部&nbsp;&nbsp;<font class=blue><b>"&vhead&"</b></font></td>"
  response.write vbcrlf&"<td align=right>"
  response.write vbcrlf&"  <table border=0>"
  response.write vbcrlf&"  <tr>"
  response.write vbcrlf&" <td width=80>页次：<font class=red>"&vp&"</font>/<font class=red>"&vtp&"</font></td>"
  response.write vbcrlf&"  <td>"
  response.write vbcrlf&pagecute_fun(vp,vtp,vpu)&"</td></tr></table>"
  response.write vbcrlf&"  </td>"
  response.write vbcrlf&"  </tr>"
if om=0 then
  response.write vbcrlf&"  <tr><td colspan=2 height=3 align=right><table border=0 width='98%' cellspacing=0 cellpadding=2><tr><td height=1 background='images/bg_dian.gif' border=0></td></tr></table></td></tr>"
else
  response.write vbcrlf&"</table>"
  response.write vbcrlf&"</td></tr>"
  response.write vbcrlf&"</table>"
end if
end function
%>